/* Enhanced Responsive styles */
@media (max-width: 1200px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .footer .container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-column {
        padding: 0 10px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 900px) {
    /* Hide the top bar on mobile views */
    .top-bar {
        display: none;
    }
    
    .secondary-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .main-nav {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .top-bar .container {
        justify-content: center;
        gap: 15px;
    }

    .contact-info {
        justify-content: center;
        text-align: center;
    }

    .auth-links {
        justify-content: center;
    }

    .social-icons {
        margin-left: 0;
        justify-content: center;
        width: 100%;
    }

    .header-top {
        justify-content: center;
        text-align: center;
    }

    .logo-img {
        height: 60px;
        max-height: 60px;
        max-width: 90%;
        width: auto;
    }
    
    .stats-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .vertical-divider {
        display: none;
    }
    
    .footer .container {
        grid-template-columns: 1fr 1fr;
    }
    
    .copyright-container {
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .auth-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-text {
        text-align: left;
    }
    
    .footer .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section {
        padding: 0 20px;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 50px;
        max-height: 50px;
        max-width: 85%;
        width: auto;
    }
}

/* Extra small screens (very small phones) */
@media (max-width: 360px) {
    .logo-img {
        height: 45px;
        max-height: 45px;
        max-width: 80%;
        width: auto;
    }

    .mobile-menu-toggle {
        padding: 8px;
        min-width: 40px;
        min-height: 40px;
    }
}

/* Comprehensive mobile fixes for all grids and flexbox layouts */
@media (max-width: 768px) {
    /* Force single column for all grid containers */
    [class*="grid"],
    [class*="-grid"],
    [class*="-container"][style*="grid"] {
        grid-template-columns: 1fr !important;
    }

    /* Force single column for flex containers with multiple items */
    .creative-programs-container,
    .features-container,
    .measuring-features-container {
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Ensure all child items take full width */
    .program-box,
    .creative-program-box,
    .news-item,
    .faculty-card,
    .quick-link-box,
    .feature-item,
    .measuring-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 1rem auto;
    }

    /* Video containers single column */
    .video-row,
    .voices-video-grid .video-row {
        flex-direction: column !important;
        align-items: center;
    }

    .video-item {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }

    /* Container padding for mobile */
    .container {
        padding: 0 15px !important;
    }

    /* Prevent any flex-wrap from creating multiple columns */
    [class*="-container"],
    [class*="-grid"] {
        flex-wrap: wrap !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile - ensure absolutely everything is single column */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .video-item {
        max-width: 100% !important;
    }

    /* Reduce padding on very small screens */
    .section {
        padding: 2rem 0 !important;
    }
}