/* responsive.css - Mobile First & Responsive Overrides */

/* Contact Page Social Icons Fix */
.contact-info-card .social-links {
    display: flex !important;
    gap: 15px !important;
    flex-direction: row !important;
    flex-wrap: wrap;
}
.contact-info-card .social-links a {
    text-decoration: none;
}
.contact-info-card .social-links a i {
    width: 40px !important;
    height: 40px !important;
    background: var(--primary) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    transition: all 0.3s ease !important;
}
.contact-info-card .social-links a:hover i {
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
    background: #cc0000 !important;
}

/* Global Resets & Typography */
html {
    font-size: 16px;
}
img {
    max-width: 100%;
    height: auto;
}
.container {
    width: 100%;
    padding: 0 15px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Fluid Typography */
h1 { font-size: clamp(1.8rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 2rem); }
p { font-size: clamp(0.95rem, 1.5vw, 1.125rem); }

/* --- Mobile Menu Styles --- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    padding: 5px;
    margin-left: auto;
}

@media (max-width: 1024px) {
    /* Navbar and Mobile Menu */
    .mobile-menu-btn {
        display: block;
    }
    .navbar .container {
        flex-wrap: nowrap;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--light);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 0;
        margin: 0;
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        width: 100%;
    }
    .nav-links a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    .dropdown:hover .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    .dropdown.active .dropdown-menu {
        display: block;
        padding-left: 20px;
        background: #f9f9f9;
        margin: 0;
    }

    /* Grids to Stack */
    .welcome-grid, 
    .edge-wrap, 
    .live-update-grid, 
    .principal-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .stats-grid,
    .facilities-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    /* Hero Slider Adjustments */
    .slide-left {
        padding: 40px 20px;
        background: rgba(6, 25, 52, 0.75);
        justify-content: center;
        text-align: center;
    }
    .slide-left::before, .slide-left::after {
        display: none;
    }
    .hero-slider {
        height: 70vh;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    /* Hide top bar to save space on mobile, keeping it clean */
    .top-bar {
        display: none;
    }
    
    .navbar .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        padding: 10px 15px !important;
    }
    .logo {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    .logo-text { 
        font-size: 16px !important; 
        line-height: 1.2 !important; 
        white-space: normal !important;
        font-weight: 700 !important;
    }
    .logo-text span { display: none !important; } /* Hide subtext on mobile */
    .logo-img { 
        width: 50px !important; 
        height: 50px !important; 
        flex-shrink: 0 !important;
    }
    .mobile-menu-btn {
        margin: 0 0 0 10px !important;
        display: block !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .edge-grid {
        grid-template-columns: 1fr;
    }
    .testimonial-card {
        margin: 0 10px;
    }
    
    /* Responsive Tables */
    table, .eligibility-table, .fee-table, .about-table {
        display: table !important;
        width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse;
    }
    
    table th, table td {
        width: auto !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        padding: 8px 4px !important;
        font-size: 13px !important;
    }
    
    /* Academic Page Mobile Fixes */
    .curriculum-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }
    .curriculum-card {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    
    /* Responsive Forms */
    .admission-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }
    .form-group {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin: 0 !important;
    }
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix Gallery Grid squishing and overlapping (forcing true Grid layout) */
    .gallery-full-grid, .gallery-grid {
        grid-auto-rows: auto !important;
        height: auto !important;
    }
    .gallery-section .gallery-full-grid > div {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }
    .gallery-section .gallery-full-grid > div > div {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
        gap: 16px !important;
        margin-bottom: 16px !important;
        height: auto !important;
    }
    
    /* Dedicated Gallery Page Grid Fix */
    .page-content .gallery-full-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
        gap: 20px !important;
    }
    
    .gallery-full-item {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        display: block !important;
        overflow: visible !important;
    }
    .gallery-full-item img {
        height: auto !important;
        object-fit: cover !important;
        width: 100% !important;
    }
    .gallery-section .text-center {
        position: relative !important;
        z-index: 10 !important;
        margin-top: 40px !important;
        clear: both !important;
    }
    
    /* Fix announcement ticker spacing */
    .ticker-label { padding: 5px 10px; font-size: 12px; }
    .ticker-content { font-size: 14px; gap: 20px; }
}

@media (max-width: 480px) {
    .stats-grid, .facilities-grid {
        grid-template-columns: 1fr;
    }
    .hero-slider {
        height: 60vh;
        min-height: 350px;
    }
    .slide-left {
        padding: 20px 15px;
    }
    .logo-text {
        font-size: 14px !important;
    }
    .logo-img {
        width: 45px !important;
        height: 45px !important;
    }
}
