/* =====================================================
   RESPONSIVE STYLES
   ===================================================== */

/* =====================================================
   TABLET STYLES (1024px and below)
   ===================================================== */
@media screen and (max-width: 1024px) {
    
    /* Landing page adjustments */
    .rotating-logo {
        width: clamp(250px, 35vw, 400px);
    }
    
    .landing-text.top-left h1 {
        font-size: clamp(2rem, 4vw, 3.5rem);
    }
    
    .landing-text.top-right .date {
        font-size: clamp(1.5rem, 3vw, 2.5rem);
    }
    
    /* Theme section */
    .theme-content {
        max-width: 900px;
    }
    
    .theme-content p {
        font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    }
    
    /* Program section */
    .program-layout {
        gap: var(--spacing-lg);
    }
    
    /* Partners section */
    .partners-grid {
        gap: var(--spacing-md);
    }
    
    .partners-grid img {
        height: 80px;
        max-width: 200px;
    }
}

/* =====================================================
   MOBILE STYLES (768px and below)
   ===================================================== */
@media screen and (max-width: 768px) {
    
    /* Adjust spacing */
    :root {
        --spacing-xl: 3rem;
        --spacing-lg: 2rem;
        --spacing-md: 1rem;
    }
    
    /* Landing page */
    .rotating-logo {
        width: clamp(200px, 50vw, 300px);
    }
    
    .landing-text {
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    }
    
    .landing-text.top-left,
    .landing-text.top-right,
    .landing-text.bottom-left,
    .landing-text.bottom-right-vertical,
    .landing-text.bottom-center {
        padding: var(--spacing-sm);
    }
    
    .landing-text.top-left {
        top: 1rem;
        left: 1rem;
    }
    
    .landing-text.top-left h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    .landing-text.top-right {
        top: 1rem;
        right: 1rem;
    }
    
    .landing-text.top-right .date {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }
    
    .landing-text.bottom-left {
        bottom: 1rem;
        left: 1rem;
    }
    
    .landing-text.bottom-left .venue {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    
    /* Position festival name horizontally at same level as venue, on right side */
    .landing-text.bottom-right-vertical {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        bottom: 1rem;
        right: 1rem;
        left: auto;
    }
    
    .landing-text.bottom-right-vertical .festival-name {
        font-size: clamp(1rem, 3vw, 1.5rem);
        letter-spacing: 0.05em;
    }
    
    .landing-text.bottom-center {
        display: none; /* Hide on mobile to reduce clutter */
    }
    
    .scroll-indicator {
        bottom: 47%;
        transform: translateY(50%);
    }
    
    /* Section containers */
    .section-container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: var(--spacing-md);
    }
    
    /* Theme section */
    .theme-content {
        max-width: 100%;
        padding: 0 var(--spacing-sm);
    }
    
    .theme-content p {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
        line-height: 1.5;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Program section - stack days vertically */
    .program-layout {
        flex-direction: column;
        gap: var(--spacing-lg);
        padding: 0;
    }
    
    #program .section-title {
        text-align: center;
    }
    
    .day-block {
        gap: var(--spacing-sm);
    }
    
    .day-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }
    
    .event-item {
        margin-bottom: var(--spacing-md);
    }
    
    .event-time {
        font-size: 1.3rem;
    }
    
    .event-title {
        font-size: 1.2rem;
    }
    
    .event-artist {
        font-size: 0.95rem;
    }
    
    .event-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .event-detail {
        font-size: 0.8rem;
    }
    
    .hybrid-tag,
    .online-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    /* About section */
    #about .section-container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    #about .theme-content p {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }
    
    /* Partners section - smaller logos, better spacing */
    .partners-grid {
        gap: var(--spacing-md);
        padding: 0 var(--spacing-sm);
    }
    
    .partners-grid img {
        height: 70px;
        max-width: 150px;
    }
}

/* =====================================================
   SMALL MOBILE (480px and below)
   ===================================================== */
@media screen and (max-width: 480px) {
    
    html {
        font-size: 15px;
    }
    
    .rotating-logo {
        width: clamp(180px, 60vw, 250px);
    }
    
    .landing-text.top-left h1 {
        font-size: clamp(1.5rem, 10vw, 2rem);
        line-height: 1.1;
    }
    
    .landing-text.top-right .date {
        font-size: clamp(1.1rem, 6vw, 1.6rem);
    }
    
    .landing-text.bottom-left .venue {
        font-size: clamp(0.9rem, 4.5vw, 1.3rem);
    }
    
    .landing-text.bottom-right-vertical .festival-name {
        font-size: clamp(0.85rem, 3.5vw, 1.2rem);
    }
    
    .section-title {
        font-size: clamp(1.8rem, 10vw, 2.5rem);
    }
    
    .theme-content p {
        font-size: clamp(1rem, 4.5vw, 1.2rem);
    }
    
    .day-title {
        font-size: clamp(1.5rem, 9vw, 2rem);
    }
    
    .event-time {
        font-size: 1.2rem;
    }
    
    .event-title {
        font-size: 1.1rem;
    }
    
    .event-artist,
    .event-description {
        font-size: 0.85rem;
    }
    
    .partners-grid img {
        height: 60px;
        max-width: 130px;
    }
}

/* =====================================================
   LANDSCAPE MOBILE (max-height 600px)
   ===================================================== */
@media screen and (max-height: 600px) and (orientation: landscape) {
    
    #landing {
        min-height: 100vh;
    }
    
    .rotating-logo {
        width: clamp(150px, 25vh, 250px);
    }
    
    .landing-text.top-left h1 {
        font-size: clamp(1.5rem, 4vh, 2.5rem);
    }
    
    .landing-text.bottom-right-vertical {
        writing-mode: horizontal-tb;
        text-orientation: initial;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    
    #loading-screen,
    .scroll-indicator,
    .rotating-logo-container {
        display: none !important;
    }
    
    #video-background {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
        min-height: auto;
    }
    
    .event-item {
        page-break-inside: avoid;
    }
}

/* =====================================================
   HIGH CONTRAST MODE
   ===================================================== */
@media (prefers-contrast: high) {
    
    .theme-content,
    .event-item,
    .partners-grid {
        border: 2px solid var(--black);
    }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .rotating-logo {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .scroll-arrow::before {
        animation: none;
    }
}
