/* Tablet Devices (768px and below) */
@media screen and (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .main-logo {
        font-size: 3.5rem;
    }
    
    .countdown-value {
        font-size: 2rem;
        min-width: 60px;
    }
    
    .countdown {
        gap: 1rem;
    }
    
    .counters {
        gap: 1rem;
    }
    
    .counter-item {
        flex: 0 0 calc(50% - 2rem);
    }
    
    .counter-value {
        font-size: 2.5rem;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-date {
        position: absolute;
        left: 0;
        top: 0;
        text-align: left !important;
        padding: 0 !important;
        width: 50px;
    }
    
    .timeline-content {
        width: 100%;
    }

    /* Timeline Section */
    .timeline-container {
        padding: 1rem 0;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-date {
        position: absolute;
        left: 0;
        top: 0;
        text-align: left !important;
        padding: 0 !important;
        width: 50px;
        font-size: 1.2rem;
    }
    
    .timeline-content {
        width: 100%;
        padding: 1rem;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    .timeline-content li {
        font-size: 0.9rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .scratch-container {
        width: 400px;
        height: 400px;
    }
    
    .carousel-container {
        height: 600px;
        max-width: 50%;
    }
    
    .carousel-item {
        width: 250px;
        height: 300px;
        margin-left: -125px;
        margin-top: -150px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.9);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1.5rem 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-tagline {
        font-size: 1.2rem;
    }
    
    .btn-hero {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

/* Mobile Devices (480px and below) */
@media screen and (max-width: 480px) {
    .section-title {
        font-size: 2rem;
        margin-bottom: 30%;
    }
    
    .main-logo {
        font-size: 2.5rem;
    }
    
    .hero-tagline {
        font-size: 1rem;
    }
    
    .countdown {
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .countdown-item {
        flex: 0 0 calc(50% - 1rem);
        margin-bottom: 1rem;
    }
    
    .countdown-value {
        font-size: 1.8rem;
        min-width: 50px;
    }
    
    .counter-item {
        flex: 0 0 100%;
    }
    
    .counter-value {
        font-size: 2rem;
    }
    
    .scratch-container {
        width: 300px;
        height: 300px;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .carousel-item {
        max-width: 200px;
        height: 250px;
        margin-left: -100px;
        margin-top: -125px;
    }
    
    .event-cards {
        grid-template-columns: 1fr;
    }
    
    .rulebook-buttons {
        flex-direction: column;
    }
    
    .sponsor-item {
        width: 150px;
        height: 80px;
        margin: 0 1rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-content p {
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    .timeline-content li {
        font-size: 0.9rem;
    }
     /* Timeline Section */
    .timeline-line {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline-date {
        width: 35px;
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 0.8rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .timeline-content li {
        font-size: 0.8rem;
    }
}

/* Darken backgrounds on mobile for better readability */
@media screen and (max-width: 768px) {
    .hero::before,
    .about::before,
    .timeline::before,
    .events::before,
    .star-night::before,
    .gallery::before,
    .sponsors::before,
    .contact::before {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* Height adjustments for mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 4rem 0;
    }
    
    .hero-content {
        transform: scale(0.8);
    }
}

/* Add these updates to the existing responsive.css file */

/* Gallery responsive adjustments */
@media screen and (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    .scratch-container {
        width: 400px;
        height: 400px;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .gallery-item {
        height: 180px;
    }
    
    .scratch-container {
        width: 300px;
        height: 300px;
    }
    
    .lightbox {
        padding: 1rem;
    }

}

/* Full-screen sections on mobile */
@media screen and (max-width: 768px) {
    .hero,
    .about,
    .timeline,
    .events,
    .star-night,
    .sponsors,
    .gallery,
    .contact {
        max-height: 100%;
        padding: 4rem 0;
    }
}
/* 3D Carousel Responsive Styles */
@media screen and (max-width: 900px) {
    .carousel-3d-container {
        height: 350px;
    }
    
    .carousel-3d-item {
        max-width: 250px;
        height: 300px;
        margin-left: -125px;
        margin-top: -150px;
    }
}

@media screen and (max-width: 768px) {
    .carousel-3d-container {
        height: 300px;
    }
    
    .carousel-3d-item {
        width: 220px;
        height: 260px;
        margin-left: -110px;
        margin-top: -130px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .carousel-3d-container {
        height: 250px;
    }
    
    .carousel-3d-item {
        max-width: 180px;
        height: 220px;
        margin-left: -90px;
        margin-top: -110px;
    }
    
    .carousel-controls {
        bottom: -40px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
/* Star Night Responsive Styles */
@media screen and (max-width: 768px) {
    .scratch-container {
        width: 400px;
        height: 400px;
    }
}

@media screen and (max-width: 480px) {
    .scratch-container {
        width: 300px;
        height: 300px;
        max-width: 100%;
        max-height: 100%;
    }
    
    .star-night-video video {
        object-position: center;
    }
}

/* Prevent video from affecting other sections */
.star-night {
    isolation: isolate; /* Creates a new stacking context */
}

/* Artist Reveal Text Responsive Styles */
@media screen and (max-width: 768px) {
    .artist-title {
        font-size: 2rem;
    }
    
    .artist-name {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 480px) {
    .artist-title {
        font-size: 1.8rem;
    }
    
    .artist-name {
        font-size: 2.2rem;
    }
    
    .star-night .section-description {
        font-size: 1rem;
    }
}

/* Timeline Specific Responsive Fixes */
@media screen and (max-width: 768px) {
    .timeline-vine {
        left: 30px;
    }
}

@media screen and (max-width: 480px) {
    .timeline-vine {
        left: 20px;
    }
}

/* Counter responsive fixes */
@media screen and (max-width: 768px) {
    .counters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .counter-item {
        flex: 0 0 100%;
        padding: 1.2rem;
        margin: 0.5rem 0;
    }
    
    .counter-value {
        font-size: 2.5rem;
    }
    
    .counter-label {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .counter-item {
        padding: 1rem;
        margin: 0.3rem 0;
    }
    
    .counter-value {
        font-size: 2.2rem;
    }
    
    .counter-label {
        font-size: 0.9rem;
    }
}

/* Animation fixes for mobile */
@media (prefers-reduced-motion: reduce) {
    .counter-value {
        transition: none;
    }
}

/* Ensure counters are visible and properly styled */
.counter-item {
    opacity: 1;
    transform: none;
    transition: all 0.5s ease;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .counter-value {
        -webkit-font-smoothing: antialiased;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .counter-value {
        color: var(--primary-green) !important;
        text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
    }
}