/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
    background: #0f3362 url('./images/background.png') no-repeat center center; /* Blue background with PNG overlay */
    background-size: 70%; /* Scale image to cover viewport */
    background-position: 0 120px !important;
}

.navbar {
    background-color: #0f3362; /* Match body background */
    padding: 0.5rem 1rem; /* Reduced padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* Fix navbar to top */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* Above all content except modal */
}

.logo {
    display: flex;
    align-items: center;
    margin: 0; /* No margins */
    padding: 0; /* No padding */
}

.logo a {
    display: block; /* Ensure the link wraps the image tightly */
    line-height: 0; /* Remove any line-height spacing */
}

.logo-image {
    width: 60px; /* Larger logo for mobile */
    height: 60px;
    object-fit: contain; /* Maintain logo aspect ratio */
}

.nav-container {
    display: flex;
    justify-content: flex-end; /* Align hamburger/menu to the right */
    align-items: center;
    flex-grow: 1; /* Allow nav-container to take available space */
}

.hamburger {
    display: none; /* Hidden by default on larger screens */
    flex-direction: column;
    cursor: pointer;
    z-index: 2100; /* Higher than navbar, below modal */
    margin-right: 10px; /* Pull hamburger inward from right edge */
}

.hamburger span {
    background: white;
    height: 3px;
    width: 25px;
    margin: 2px 0;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex; /* Inline menu by default */
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 1900; /* Below navbar, above content */
}

.nav-menu li {
    margin: 0 1rem;
}

.nav-menu li a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-menu li a:hover {
    color: #00aaff;
}

.nav-menu li a.active {
    color: #00aaff;
    font-weight: bold;
}

main {
    flex: 1; /* Allow main to grow and push footer down */
    margin-top: 60px; /* Offset for fixed navbar */
}

/* Full-screen countdown */
.countdown-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0f3362 url('./images/background.png') no-repeat center center; /* Blue background with PNG overlay */
    background-size: 70%; /* Scale image to cover viewport */
    background-position: 0 80px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000; /* Above all other elements */
}

.countdown-container {
    text-align: center;
    color: white;
    width: 90%;
    max-width: 600px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
    border: 2px solid white; /* Match line-up-button */
    border-radius: 5px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-unit span {
    font-size: 2rem;
    font-weight: bold;
}

.time-unit p {
    font-size: 1rem;
    margin-top: 5px;
}

/* Remove padding for homepage carousel, keep for other pages */
main .carousel-container {
    margin-top: 50px;
    border-radius: 5px;
}

main .page-content {
    padding: 2rem;
    text-align: center;
    color: white;
}

.carousel-container {
    position: relative;
    width: 70vw; /* 70% of viewport width */
    height: 500px; /* Increased height for mobile */
    margin: 0 auto; /* Center horizontally (15vw margins) */
    overflow: hidden;
    z-index: 500; /* Below countdown and navbar */
    border-radius: 5px;
}

.carousel {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s ease;
    height: 100%;
}

.carousel-item {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

.carousel-item img {
    width: 70vw; /* Match container width */
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.carousel-description {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    border-radius: 5px;
    max-width: 90%; /* Prevent overflow on small screens */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 510; /* Above carousel but below navbar */
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.line-up-button {
    display: block;
    margin: 20px auto 0; /* Center horizontally, add top margin */
    padding: 10px 20px;
    background: transparent;
    color: white;
    border: 2px solid white; /* White border */
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    z-index: 500; /* Match carousel for layering */
}

.line-up-button:hover {
    background: white;
    color: #0f3362; /* Match navbar/body background for contrast */
}

.columns-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 20px; /* Space between columns */
    width: 100%; /* Fit within parent container */
    max-width: 100vw; /* Prevent overflow */
    margin: 20px auto; /* Center with top margin */
    padding: 0 20px; /* Padding for spacing */
    box-sizing: border-box; /* Ensure padding doesn't add to width */
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.column img {
    width: 100%; /* Fill column width */
    height: auto;
    object-fit: cover; /* Maintain aspect ratio */
    border-radius: 5px; /* Match carousel description */
    aspect-ratio: 227 / 135; /* Fixed aspect ratio */
}

.column-description {
    background: rgba(0, 0, 0, 0.7); /* Match carousel description */
    color: white;
    padding: 0.5rem 1rem;
    font-weight: bold;
    font-size: 1rem;
    text-align: center;
    border-radius: 5px;
    max-width: 90%; /* Prevent overflow */
    margin-top: 10px; /* Space between image and text */
}

.lineup-section {
    width: calc(50% - 10px); /* Width of two middle columns (2/4 of grid minus half the gap) */
    margin: 20px auto; /* Center with top margin */
    text-align: center;
}

.lineup-section h1 {
    color: white; /* Match menu color */
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.5rem; /* Larger for heading */
    margin-bottom: 10px; /* Space below title */
}

.lineup-section div {
    font-size: 1.1rem; /* Match nav-menu */
    font-weight: bold; /* Match nav-menu active */
    text-transform: uppercase;
    padding: 10px 0; /* Space above and below text */
    white-space: nowrap; /* Keep artists on same line */
    overflow: hidden; /* Prevent overflow */
    text-overflow: ellipsis; /* Handle overflow gracefully */
}

.lineup-section div:not(:last-child) {
    border-bottom: 2px solid #00aaff; /* 2px horizontal line in hover color */
}

.lineup-section div span:nth-child(odd) {
    color: white; /* Menu color */
}

.lineup-section div span:nth-child(even) {
    color: #00aaff; /* Menu hover color */
}

.kidsprogram-container {
    width: calc(50% - 10px); /* Match lineup-section width */
    margin: 20px auto; /* Center with top margin */
    text-align: left; /* Left-align for readability */
    color: white;
}

.kidsprogram-container h1 {
    color: white; /* Match menu color */
    text-transform: uppercase;
    font-weight: bold;
    font-size: 1.5rem; /* Match lineup-section h1 */
    margin-bottom: 20px; /* Space below title */
    text-align: center; /* Center title like lineup-section */
}

.kidsprogram-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px; /* Space between items */
}

.kidsprogram-item img {
    width: 200px; /* Fixed width for desktop */
    height: auto;
    object-fit: cover;
    border-radius: 5px; /* Match column images */
    aspect-ratio: 227 / 135; /* Match column images */
    margin-right: 20px; /* Space between image and text */
}

.kidsprogram-content h3 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #00aaff; /* Match navbar hover for emphasis */
}

.kidsprogram-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.kidsprogram-content a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.kidsprogram-content a:hover {
    color: #00aaff; /* Match navbar hover */
}

.timetable-container {
    width: 90vw; /* Reduced width to prevent overflow */
    margin: 20px auto; /* Center with 7.5vw margins each side */
    padding: 0;
    box-sizing: border-box;
}

.timetable {
    display: grid;
    grid-template-columns: 100px repeat(32, 1fr); /* Stage labels + 32 quarter-hour slots (8 hours) */
    grid-template-rows: 50px repeat(4, 80px); /* Time labels + 4 stages */
    gap: 5px;
    background: rgba(0, 0, 0, 0.1); /* Subtle background for grid */
    border-radius: 5px;
    position: relative;
}

.stage-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.stage-1 { grid-row: 2; grid-column: 1; }
.stage-2 { grid-row: 3; grid-column: 1; }
.stage-3 { grid-row: 4; grid-column: 1; }
.stage-4 { grid-row: 5; grid-column: 1; }

.time-label {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem; /* Slightly smaller to fit labels */
}

.time-16-00 { grid-column: 2 / 6; grid-row: 1; } /* Spans 16:00-16:45 */
.time-17-00 { grid-column: 6 / 10; grid-row: 1; } /* Spans 17:00-17:45 */
.time-18-00 { grid-column: 10 / 14; grid-row: 1; } /* Spans 18:00-18:45 */
.time-19-00 { grid-column: 14 / 18; grid-row: 1; } /* Spans 19:00-19:45 */
.time-20-00 { grid-column: 18 / 22; grid-row: 1; } /* Spans 20:00-20:45 */
.time-21-00 { grid-column: 22 / 26; grid-row: 1; } /* Spans 21:00-21:45 */
.time-22-00 { grid-column: 26 / 30; grid-row: 1; } /* Spans 22:00-22:45 */
.time-23-00 { grid-column: 30 / 34; grid-row: 1; } /* Spans 23:00-23:45 */

.event {
    background: rgba(0, 0, 0, 0.7); /* Match carousel/column description */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: center;
    padding: 5px;
    transition: background 0.3s;
    cursor: pointer; /* Indicate clickability */
}

.event:hover {
    background: rgba(0, 170, 255, 0.7); /* Hover effect with #00aaff */
}

.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    z-index: 2500; /* Above navbar and hamburger */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #0f3362; /* Match navbar/body background */
    color: white;
    padding: 20px;
    border-radius: 5px;
    border: 2px solid white; /* White, radiused border */
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

.modal-close:hover {
    color: #00aaff; /* Match navbar hover */
}

.modal-content h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.modal-content p {
    margin: 5px 0;
    font-size: 1rem;
}

footer {
    background: #1A2525; /* Dark charcoal for contrast */
    color: white;
    text-align: center;
    padding: 1rem;
    width: 100%;
    flex-shrink: 0; /* Prevent footer from shrinking */
    z-index: 600; /* Above other elements */
}

/* Rotate prompt for mobile devices in portrait mode */
@media (max-width: 768px) and (orientation: portrait) {
    .rotate-prompt {
        display: flex;
        justify-content: center;
        align-items: center;
        height: calc(100vh - 60px); /* Account for navbar height */
        background: #0f3362; /* Match body background */
        position: relative;
        margin-top: 60px; /* Push below navbar */
    }

    .rotate-message {
        display: flex;
        justify-content: center;
        align-items: center;
        color: white;
        font-size: 1.2rem;
        font-weight: bold;
        text-align: center;
        padding: 20px;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 5px;
        max-width: 80%;
        z-index: 1600; /* Above timetable, below navbar */
    }

    .timetable-container {
        display: none; /* Hide timetable in portrait mode */
    }

    .modal {
        display: none; /* Hide modal in portrait mode */
        z-index: 2500; /* Above navbar and hamburger */
    }

    /* Ensure navbar and hamburger are visible */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2000; /* Above rotate-message, below modal */
    }

    .hamburger {
        display: flex; /* Show hamburger in mobile portrait */
        margin-right: 10px; /* Pull inward from right edge */
        z-index: 2100; /* Below modal */
    }

    .nav-container {
        justify-content: flex-end; /* Align hamburger to the right */
    }

    .nav-menu {
        display: none; /* Hidden by default */
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #0f3362; /* Match navbar */
        flex-direction: column;
        padding: 1rem;
        transition: all 0.3s ease;
        z-index: 1900; /* Below navbar, above rotate-message */
    }

    .nav-menu.active {
        display: flex; /* Show when hamburger is clicked */
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .nav-menu li a {
        font-size: 1.1rem;
    }

    /* Adjust columns for mobile */
    .columns-container {
        grid-template-columns: repeat(2, 1fr); /* Two columns for mobile */
        gap: 10px; /* Smaller gap */
        padding: 0 10px; /* Reduced padding */
    }

    .column img {
        width: 100%;
        aspect-ratio: 227 / 135; /* Fixed aspect ratio */
    }

    .column-description {
        font-size: 0.9rem; /* Slightly smaller for mobile */
    }

    /* Adjust lineup section for mobile */
    .lineup-section {
        width: 100%; /* Full width for two columns */
        font-size: 1rem; /* Slightly smaller */
    }

    .lineup-section h1 {
        font-size: 1.3rem; /* Slightly smaller for mobile */
    }

    .lineup-section div {
        font-size: 1rem; /* Slightly smaller */
    }

    /* Adjust kids program for mobile */
    .kidsprogram-container {
        width: 100%; /* Full width for mobile */
        font-size: 1rem;
    }

    .kidsprogram-container h1 {
        font-size: 1.3rem; /* Match lineup-section h1 */
    }

    .kidsprogram-item {
        flex-direction: column; /* Stack image and text */
        align-items: center;
    }

    .kidsprogram-item img {
        width: 100%; /* Full width for mobile */
        max-width: 300px; /* Cap image width */
        margin-right: 0;
        margin-bottom: 10px; /* Space below image */
    }

    .kidsprogram-content h3 {
        font-size: 1.1rem;
    }

    .kidsprogram-content p {
        font-size: 0.9rem;
    }

    .kidsprogram-content a {
        font-size: 0.9rem;
    }

    /* Adjust countdown for mobile */
    .countdown-container {
        width: 95%;
        padding: 0.5rem;
    }

    .countdown {
        gap: 10px;
    }

    .time-unit span {
        font-size: 1.5rem;
    }

    .time-unit p {
        font-size: 0.9rem;
    }

    /* Adjust carousel for mobile */
    .carousel-container {
        height: 400px; /* Smaller height for mobile-optimized images */
    }

    .carousel-item img {
        width: 70vw;
        height: 100%;
        object-fit: cover;
    }

    .carousel-description {
        font-size: 0.9rem; /* Slightly smaller for readability */
        padding: 0.4rem 0.8rem;
    }
}

/* Responsive Design for Small Screens (≤768px) in Landscape Mode */
@media (max-width: 768px) and (orientation: landscape) {
    .rotate-prompt {
        display: block; /* Normal display in landscape */
    }

    .rotate-message {
        display: none; /* Hide rotate message in landscape */
    }

    .timetable-container {
        width: 90vw;
        margin: 20px auto;
        padding: 0;
    }

    .timetable {
        grid-template-columns: 80px repeat(32, 1fr); /* Smaller stage label column + 32 quarter-hour slots */
        grid-template-rows: 40px repeat(4, 60px); /* Smaller rows */
        gap: 3px;
    }

    .stage-label {
        font-size: 0.9rem; /* Slightly larger for readability */
        padding: 5px;
    }

    .time-label {
        font-size: 0.9rem; /* Increased for better readability */
        padding: 5px;
    }

    .event {
        font-size: 0.8rem; /* Increased for readability */
        padding: 3px;
    }

    .modal-content {
        max-width: 300px;
        padding: 15px;
        border: 2px solid white; /* Maintain white border */
    }

    .modal-content h3 {
        font-size: 1.2rem;
    }

    .modal-content p {
        font-size: 0.9rem;
    }

    .modal {
        z-index: 2500; /* Above navbar and hamburger */
    }

    .time-16-00 { grid-column: 2 / 6; grid-row: 1; }
    .time-17-00 { grid-column: 6 / 10; grid-row: 1; }
    .time-18-00 { grid-column: 10 / 14; grid-row: 1; }
    .time-19-00 { grid-column: 14 / 18; grid-row: 1; }
    .time-20-00 { grid-column: 18 / 22; grid-row: 1; }
    .time-21-00 { grid-column: 22 / 26; grid-row: 1; }
    .time-22-00 { grid-column: 26 / 30; grid-row: 1; }
    .time-23-00 { grid-column: 30 / 34; grid-row: 1; }

    /* Adjust lineup section for mobile landscape */
    .lineup-section {
        width: 100%; /* Full width for two columns */
        font-size: 1rem; /* Slightly smaller */
    }

    .lineup-section h1 {
        font-size: 1.3rem; /* Slightly smaller */
    }

    .lineup-section div {
        font-size: 1rem; /* Slightly smaller */
    }

    /* Adjust kids program for mobile landscape */
    .kidsprogram-container {
        width: 100%; /* Full width */
        font-size: 1rem;
    }

    .kidsprogram-container h1 {
        font-size: 1.3rem;
    }

    .kidsprogram-item {
        flex-direction: column; /* Stack image and text */
        align-items: center;
    }

    .kidsprogram-item img {
        width: 100%; /* Full width */
        max-width: 300px;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .kidsprogram-content h3 {
        font-size: 1.1rem;
    }

    .kidsprogram-content p {
        font-size: 0.9rem;
    }

    .kidsprogram-content a {
        font-size: 0.9rem;
    }

    /* Adjust carousel for mobile landscape */
    .carousel-container {
        height: 400px; /* Smaller height for mobile-optimized images */
    }

    .carousel-item img {
        width: 70vw;
        height: 100%;
        object-fit: cover;
    }

    .carousel-description {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Responsive Design for Very Small Screens (≤480px) in Landscape Mode */
@media (max-width: 480px) and (orientation: landscape) {
    .rotate-prompt {
        display: block; /* Normal display in landscape */
    }

    .rotate-message {
        display: none; /* Hide rotate message in landscape */
    }

    .timetable-container {
        width: 90vw;
        margin: 20px auto;
        padding: 0;
    }

    .timetable {
        grid-template-columns: 60px repeat(32, 1fr); /* Smaller stage label column + 32 quarter-hour slots */
        grid-template-rows: 30px repeat(4, 50px); /* Smaller rows */
        gap: 2px;
    }

    .stage-label {
        font-size: 0.8rem; /* Adjusted for readability */
        padding: 3px;
    }

    .time-label {
        font-size: 0.8rem; /* Adjusted for readability */
        padding: 3px;
    }

    .event {
        font-size: 0.7rem; /* Adjusted for readability */
        padding: 2px;
    }

    .modal-content {
        max-width: 250px;
        padding: 10px;
        border: 2px solid white; /* Maintain white border */
    }

    .modal-content h3 {
        font-size: 1rem;
    }

    .modal-content p {
        font-size: 0.8rem;
    }

    .modal {
        z-index: 2500; /* Above navbar and hamburger */
    }

    .time-16-00 { grid-column: 2 / 6; grid-row: 1; }
    .time-17-00 { grid-column: 6 / 10; grid-row: 1; }
    .time-18-00 { grid-column: 10 / 14; grid-row: 1; }
    .time-19-00 { grid-column: 14 / 18; grid-row: 1; }
    .time-20-00 { grid-column: 18 / 22; grid-row: 1; }
    .time-21-00 { grid-column: 22 / 26; grid-row: 1; }
    .time-22-00 { grid-column: 26 / 30; grid-row: 1; }
    .time-23-00 { grid-column: 30 / 34; grid-row: 1; }

    /* Adjust columns for very small screens */
    .columns-container {
        grid-template-columns: 1fr; /* One column for very small screens */
        gap: 10px; /* Smaller gap */
        padding: 0 10px; /* Reduced padding */
    }

    .column img {
        width: 100%;
        aspect-ratio: 227 / 135; /* Fixed aspect ratio */
    }

    .column-description {
        font-size: 0.8rem; /* Smaller for very small screens */
    }

    /* Adjust lineup section for very small screens */
    .lineup-section {
        width: 100%; /* Full width for one column */
        font-size: 0.9rem; /* Smaller for readability */
    }

    .lineup-section h1 {
        font-size: 1.2rem; /* Smaller for readability */
    }

    .lineup-section div {
        font-size: 0.9rem; /* Smaller for readability */
    }

    /* Adjust kids program for very small screens */
    .kidsprogram-container {
        width: 100%; /* Full width */
        font-size: 0.9rem;
    }

    .kidsprogram-container h1 {
        font-size: 1.2rem;
    }

    .kidsprogram-item {
        flex-direction: column; /* Stack image and text */
        align-items: center;
    }

    .kidsprogram-item img {
        width: 100%; /* Full width */
        max-width: 250px; /* Smaller cap for very small screens */
        margin-right: 0;
        margin-bottom: 10px;
    }

    .kidsprogram-content h3 {
        font-size: 1rem;
    }

    .kidsprogram-content p {
        font-size: 0.8rem;
    }

    .kidsprogram-content a {
        font-size: 0.8rem;
    }

    /* Adjust countdown for very small screens */
    .countdown-container {
        width: 95%;
        padding: 0.5rem;
    }

    .countdown {
        gap: 5px;
    }

    .time-unit span {
        font-size: 1.2rem;
    }

    .time-unit p {
        font-size: 0.8rem;
    }

    /* Adjust carousel for very small screens */
    .carousel-container {
        height: 400px; /* Smaller height for mobile-optimized images */
    }

    .carousel-item img {
        width: 70vw;
        height: 100%;
        object-fit: cover;
    }

    .carousel-description {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Responsive Design for Larger Screens (>768px) */
@media (min-width: 769px) {
    .rotate-prompt {
        display: block; /* Normal display on larger screens */
    }

    .rotate-message {
        display: none; /* No rotate message on larger screens */
    }

    .nav-menu {
        flex-direction: row; /* Inline menu items */
    }

    .nav-menu li a {
        font-size: 1.2rem;
    }

    .logo-image {
        width: 80px; /* Larger logo for larger screens */
        height: 80px;
    }

    .carousel-container {
        height: 600px; /* Increased height for larger screens */
    }

    .carousel-item img {
        width: 70vw;
        height: 100%;
        object-fit: cover;
    }

    .carousel-description {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
    }

    /* Restore three columns for larger screens */
    .columns-container {
        grid-template-columns: repeat(3, 1fr); /* Three columns */
        gap: 20px;
        padding: 0 20px;
    }

    .column img {
        aspect-ratio: 227 / 135; /* Fixed aspect ratio */
    }

    .column-description {
        font-size: 1rem;
    }

    /* Lineup section for larger screens */
    .lineup-section {
        width: calc(50% - 10px); /* Width of two middle columns */
        font-size: 1.1rem;
    }

    .lineup-section h1 {
        font-size: 1.5rem;
    }

    .lineup-section div {
        font-size: 1.1rem;
    }

    /* Kids program for larger screens */
    .kidsprogram-container {
        width: calc(50% - 10px); /* Match lineup-section */
        font-size: 1.1rem;
    }

    .kidsprogram-container h1 {
        font-size: 1.5rem;
    }

    .kidsprogram-item {
        flex-direction: row; /* Image beside text */
        align-items: flex-start;
    }

    .kidsprogram-item img {
        width: 200px; /* Fixed width for desktop */
        margin-right: 20px;
        margin-bottom: 0;
    }

    .kidsprogram-content h3 {
        font-size: 1.2rem;
    }

    .kidsprogram-content p {
        font-size: 1rem;
    }

    .kidsprogram-content a {
        font-size: 1rem;
    }

    /* Countdown for larger screens */
    .countdown-container {
        width: 90%;
        max-width: 600px;
        padding: 1rem;
    }

    .countdown {
        gap: 20px;
    }

    .time-unit span {
        font-size: 2rem;
    }

    .time-unit p {
        font-size: 1rem;
    }

    /* Modal for larger screens */
    .modal {
        z-index: 2500; /* Above navbar and hamburger */
    }
}

.festivalmarkt-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns for large screens */
    gap: 10px; /* Consistent gap */
    margin-top: 25px; /* Space above grid */
    width: 100%; /* Respect container width */
    min-height: 0; /* Prevent grid track stretching */
    overflow: hidden; /* Clip any overflow */
}

.festivalmarkt-grid img {
    width: 100%; /* Fill grid cell width */
    aspect-ratio: 1 / 1; /* Force square images */
    object-fit: contain; /* Scale to fit cell without cropping */
    object-position: center; /* Center the image */
    border-radius: 5px; /* Match column images */
    box-sizing: border-box; /* Include borders/padding */
    max-width: 100%; /* Prevent overflow */
    max-height: 100%; /* Prevent overflow */
}

/* Medium Desktops (≤1200px) */
@media (max-width: 1200px) {
    .festivalmarkt-grid {
        grid-template-columns: repeat(4, 1fr); /* Maintain 4 columns */
        gap: 8px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Tablets (≤992px) */
@media (max-width: 992px) {
    .festivalmarkt-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for tablets */
        gap: 8px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Large Mobile/Portrait Tablets (≤768px) */
@media (max-width: 768px) {
    .festivalmarkt-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile */
        gap: 6px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
    .festivalmarkt-grid {
        grid-template-columns: 1fr; /* 1 column for small screens */
        gap: 5px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Very Small Mobile (≤360px) */
@media (max-width: 360px) {
    .festivalmarkt-grid {
        grid-template-columns: 1fr; /* 1 column */
        gap: 4px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}

/* Large Desktops (>1200px) */
@media (min-width: 1201px) {
    .festivalmarkt-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columns */
        gap: 10px;
        min-height: 0;
        overflow: hidden;
    }

    .festivalmarkt-grid img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
        box-sizing: border-box;
        max-width: 100%;
        max-height: 100%;
    }
}
.praktisch-grid {
    display: grid;
    grid-template-columns: auto 1fr; /* Image column adjusts to scaled image, text takes rest */
    gap: 20px; /* Space between columns */
    align-items: start; /* Align content to top */
    width: 100%; /* Ensure grid fills container */
}

.praktisch-image {
    max-width: 70%; /* Prevent overflow */
}

.praktisch-image img {
    max-width: 70%; /* Scale to 70% of natural width or available space */
    width: 100%; /* Fill available space up to max-width */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure full image visibility */
    border-radius: 5px; /* Match other images */
}

/* Medium Desktops (≤1200px) */
@media (max-width: 1200px) {
    .praktisch-grid {
        gap: 15px;
    }

    .praktisch-image {
        max-width: 100%;
    }

    .praktisch-image img {
        max-width: 70%;
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}

/* Tablets (≤992px) */
@media (max-width: 992px) {
    .praktisch-grid {
        gap: 15px;
    }

    .praktisch-image {
        max-width: 100%;
    }

    .praktisch-image img {
        max-width: 70%;
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}

/* Large Mobile/Portrait Tablets (≤768px) */
@media (max-width: 768px) {
    .praktisch-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 10px;
    }

    .praktisch-image {
        max-width: 100%;
        text-align: center; /* Center image */
    }

    .praktisch-image img {
        max-width: 300px; /* Cap image width */
        width: 100%; /* Fill available space */
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}

/* Small Mobile (≤576px) */
@media (max-width: 576px) {
    .praktisch-grid {
        gap: 8px;
    }

    .praktisch-image {
        max-width: 100%;
        text-align: center;
    }

    .praktisch-image img {
        max-width: 250px; /* Smaller cap */
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}

/* Very Small Mobile (≤360px) */
@media (max-width: 360px) {
    .praktisch-grid {
        gap: 6px;
    }

    .praktisch-image {
        max-width: 100%;
        text-align: center;
    }

    .praktisch-image img {
        max-width: 200px; /* Smallest cap */
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}

/* Large Desktops (>1200px) */
@media (min-width: 1201px) {
    .praktisch-grid {
        gap: 20px;
    }

    .praktisch-image {
        max-width: 100%;
    }

    .praktisch-image img {
        max-width: 70%;
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 5px;
    }
}