/* Public Calendar Styles - Apple-Inspired Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border-light: #d2d2d7;
    --bg-light: #f5f5f7;
    --shadow-soft: 0 2px 16px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Homepage */
.homepage {
    min-height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.homepage-container {
    max-width: 1200px;
    width: 100%;
}

.logo-section {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-logo {
    max-width: 280px;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.logo-section h1 {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.company-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover::before {
    transform: scaleX(1);
}

.company-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
}

.company-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 16px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo-placeholder svg {
    width: 40px;
    height: 40px;
    color: white;
}

.company-card h3 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.company-arrow {
    text-align: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.company-arrow svg {
    width: 24px;
    height: 24px;
    color: #667eea;
}

.company-card:hover .company-arrow {
    opacity: 1;
    transform: translateX(0);
}

.footer-links {
    text-align: center;
    margin-top: 40px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Passcode Screen */
.passcode-screen {
    min-height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.passcode-container {
    max-width: 500px;
    width: 100%;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    transition: all 0.3s;
}

.back-button svg {
    width: 20px;
    height: 20px;
}

.back-button:hover {
    opacity: 1;
    transform: translateX(-4px);
}

.passcode-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-large);
    text-align: center;
}

.company-logo-large {
    max-width: 150px;
    height: auto;
    margin-bottom: 24px;
}

.passcode-content h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.passcode-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 16px;
}

.passcode-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.passcode-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Calendar Page */
.calendar-page {
    min-height: 100vh;
    background: var(--bg-light);
}

.calendar-header {
    background: white;
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.calendar-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header .back-button {
    color: var(--text-primary);
    opacity: 0.8;
}

.calendar-header .back-button:hover {
    opacity: 1;
    transform: translateX(-4px);
}

.header-logo {
    max-width: 120px;
    height: auto;
}

.calendar-title-section {
    max-width: 1400px;
    margin: 60px auto 40px;
    padding: 0 40px;
    text-align: center;
}

.company-logo-title {
    max-width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

/* Week Filter */
.week-filter {
    max-width: 1400px;
    margin: 0 auto 40px;
    padding: 0 40px;
}

.week-filter-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.week-button {
    padding: 12px 24px;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.week-button:hover {
    border-color: #667eea;
    color: #667eea;
}

.week-button.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

/* Calendar Grid */
.calendar-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 60px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 32px;
}

.calendar-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.calendar-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
}

.calendar-item-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.calendar-item-date {
    display: flex;
    gap: 16px;
    align-items: center;
}

.calendar-item-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.calendar-item-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.calendar-item-day {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.calendar-item-date-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.calendar-item-type {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.calendar-item-body {
    padding: 24px;
}

.calendar-item-images {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.post-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.post-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-medium);
}

.calendar-item-videos {
    margin-bottom: 20px;
}

.post-video {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-small);
    margin-bottom: 10px;
}

.calendar-item-section {
    margin-bottom: 20px;
}

.calendar-item-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.calendar-item-section p {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.6;
}

.calendar-item-caption p {
    color: var(--text-secondary);
}

.calendar-item-budget {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
}

.budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.budget-row span {
    font-size: 14px;
    color: var(--text-secondary);
}

.budget-row strong {
    font-size: 16px;
    color: #10b981;
    font-weight: 600;
}

.btn-modify {
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px solid #667eea;
    border-radius: var(--radius-sm);
    color: #667eea;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modify:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Budget Summary */
.budget-summary {
    max-width: 1400px;
    margin: 0 auto 60px;
    padding: 0 40px;
}

.budget-summary h2 {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.budget-details {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-soft);
}

.budget-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.budget-line:last-child {
    border-bottom: none;
}

.budget-line span {
    font-size: 16px;
    color: var(--text-secondary);
}

.budget-line strong {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
}

.budget-line.subtotal {
    padding-top: 24px;
    margin-top: 8px;
}

.budget-line.total {
    padding-top: 24px;
    margin-top: 8px;
    border-top: 2px solid var(--border-light);
}

.budget-line.total span,
.budget-line.total strong {
    font-size: 24px;
    font-weight: 700;
}

.budget-line.total strong {
    color: #10b981;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s;
}

.image-modal-close:hover {
    transform: scale(1.1);
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-md);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-large);
    animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.modal-content form {
    padding: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
}

.btn {
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e5e5e7;
}

/* Success Modal */
.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 32px auto 24px;
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon svg {
    width: 48px;
    height: 48px;
    color: white;
    stroke-width: 3;
}

#successModal .modal-content {
    text-align: center;
    padding: 40px;
}

#successModal h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

#successModal p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    font-size: 15px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-section h1 {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-title {
        font-size: 32px;
    }
    
    .calendar-grid {
        grid-template-columns: 1fr;
        padding: 0 20px 40px;
    }
    
    .calendar-header-container,
    .calendar-title-section,
    .week-filter,
    .budget-summary {
        padding: 0 20px;
    }
    
    .budget-details {
        padding: 24px;
    }
    
    .budget-line span,
    .budget-line strong {
        font-size: 14px;
    }
    
    .budget-line.total span,
    .budget-line.total strong {
        font-size: 18px;
    }
}

