/* ========================================
   Arthouse Revival NYC - Styles
   Color Palette:
   - Primary Green: #106e30
   - Secondary Red: #a12a3e
   - Background White: #f2fafc
   ======================================== */

:root {
    --primary: #106e30;
    --primary-dark: #0a4d21;
    --secondary: #a12a3e;
    --secondary-light: #c4475b;
    --background: #f2fafc;
    --background-alt: #e8f4f8;
    --text-dark: #1a1a2e;
    --text-medium: #4a4a5a;
    --text-light: #7a7a8a;
    --border: #d0e0e5;
    --card-shadow: 0 4px 20px rgba(16, 110, 48, 0.08);
    --card-hover-shadow: 0 8px 32px rgba(16, 110, 48, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(16, 110, 48, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(161, 42, 62, 0.03) 0%, transparent 50%);
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ========================================
   Header
   ======================================== */

.header {
    background: var(--background);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10001;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.5rem;
    line-height: 0.9;
    text-align: center;
    letter-spacing: 0.15em;
    color: var(--primary);
    transition: color 0.3s ease;
}

.logo h1 span {
    font-style: italic;
    letter-spacing: 0.2em;
}

.logo:hover h1 {
    color: var(--primary-dark);
}

.main-nav {
    background: var(--primary);
    padding: 0;
}

.main-nav ul {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 1rem 2.5rem;
    color: var(--background);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary-dark);
}

.main-nav a.active::after {
    width: 50%;
}

/* ========================================
   Main Content
   ======================================== */

.main-content {
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
}

.schedule-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ========================================
   Filters
   ======================================== */


.theater-filter {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

.filter-btn:hover {
    background: var(--primary);
    color: var(--background);
}

.filter-btn svg {
    transition: transform 0.3s ease;
}

.theater-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    min-width: 250px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
    flex-direction: column;
    padding: 0.5rem 0;
    will-change: transform;
}

.theater-dropdown.open {
    display: flex;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.dropdown-option:hover {
    background: var(--background-alt);
}

.dropdown-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.dropdown-option label {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-dark);
    flex: 1;
    user-select: none;
}

.selected-theaters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 1.5rem;
    margin-bottom: 0.5rem;
}

.theater-tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--primary);
    color: var(--background);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ========================================
   Navigation Wrapper
   ======================================== */

.navigation-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

/* ========================================
   Date Navigation
   ======================================== */

.date-navigation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.week-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.week-nav-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--background);
}

.week-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--text-light);
    color: var(--text-light);
}

.week-nav-btn svg {
    width: 20px;
    height: 20px;
}

.calendar-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.calendar-btn:hover {
    background: var(--primary);
    color: var(--background);
}

.date-picker {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    padding-left: 0;
    padding-right: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--background-alt);
}

.date-picker::-webkit-scrollbar {
    height: 6px;
}

.date-picker::-webkit-scrollbar-track {
    background: var(--background-alt);
    border-radius: 3px;
}

.date-picker::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.date-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    min-width: 70px;
    background: transparent;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-btn:hover {
    border-color: var(--primary);
    background: rgba(16, 110, 48, 0.05);
}

.date-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--background);
}

.date-btn .day-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

.date-btn .month {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.date-btn .day-num {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text-dark);
}

.date-btn.active .day-name,
.date-btn.active .month,
.date-btn.active .day-num {
    color: var(--background);
}

/* ========================================
   Screenings Grid
   ======================================== */

.screenings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.screening-card {
    background: var(--background);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.screening-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.screening-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.screening-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    z-index: 1;
}

.screening-card-image img[style*="display: none"] {
    z-index: 0;
}

.screening-card:hover .screening-card-image img {
    transform: scale(1.05);
}

.screening-card-placeholder {
    position: relative;
    z-index: 0;
}

/* Hide placeholder when image is successfully loaded */
.screening-card-image.has-image .screening-card-placeholder {
    display: none;
}

.screening-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--background);
    opacity: 0.9;
}

.screening-card-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.screening-card-placeholder span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* Anthology cover image placeholder styling */
.screening-card-placeholder.anthology-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
}

.screening-card-content {
    padding: 1.25rem;
}

.screening-card-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    color: var(--primary);
}

.screening-card-meta {
    font-size: 0.85rem;
    color: var(--text-medium);
    margin-bottom: 0.75rem;
}

.screening-card-theater {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--background-alt);
    border-radius: 2px;
}

.screening-card-theater svg {
    width: 12px;
    height: 12px;
}

.screening-card-times {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.showtime-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: var(--background);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.showtime-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.showtime-btn.sold-out {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   Loading State
   ======================================== */

.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: var(--text-medium);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    text-align: center;
    color: var(--text-medium);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ========================================
   Theater Address
   ======================================== */

.theater-address {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem 2rem;
    color: var(--text-light);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 6rem;
    min-height: 51px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--text-dark);
    color: var(--background);
    padding: 3rem 2rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-newsletter {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-newsletter label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.newsletter-form {
    display: flex;
    gap: 0;
}

.newsletter-form input {
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--background);
    font-size: 0.9rem;
    min-width: 250px;
}

.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.15);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    border: none;
    color: var(--background);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--secondary);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: -3rem -2rem 1.5rem -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
}

.footer-copyright p {
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
}

.footer-nav a {
    font-size: 0.85rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.footer-nav a:hover {
    opacity: 1;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.75rem;
    }

    .main-nav ul {
        justify-content: center;
    }

    .main-nav a {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1rem;
    }

    .theater-dropdown {
        min-width: 200px;
    }

    .navigation-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-navigation {
        width: 100%;
        overflow-x: auto;
    }

    .screenings-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        min-width: 100%;
    }

    .footer-nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* ========================================
   Animation Classes
   ======================================== */

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

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

.screening-card {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.screening-card:nth-child(1) { animation-delay: 0.05s; }
.screening-card:nth-child(2) { animation-delay: 0.1s; }
.screening-card:nth-child(3) { animation-delay: 0.15s; }
.screening-card:nth-child(4) { animation-delay: 0.2s; }
.screening-card:nth-child(5) { animation-delay: 0.25s; }
.screening-card:nth-child(6) { animation-delay: 0.3s; }
.screening-card:nth-child(7) { animation-delay: 0.35s; }
.screening-card:nth-child(8) { animation-delay: 0.4s; }

/* ========================================
   About Page
   ======================================== */

.about-section {
    animation: fadeIn 0.4s ease forwards;
}

.about-container {
    max-width: 900px;
    margin: 0 auto;
}

.about-block {
    background: var(--background);
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.about-block:hover {
    box-shadow: var(--card-shadow);
    border-color: var(--primary);
}

.about-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 2.5rem;
    color: var(--primary);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.about-title strong {
    font-weight: 700;
}

.about-block h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    margin-top: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.about-block p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 1.25rem;
}

.about-block p:last-child {
    margin-bottom: 0;
}

.about-block a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.about-block a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .about-title {
        font-size: 1.75rem;
    }

    .about-block {
        padding: 1.5rem;
    }

    .about-block h3 {
        font-size: 1.5rem;
    }

    .about-block p {
        font-size: 0.95rem;
    }
}


