/* Responsive Design for Vipra Public School */

/* Tablets and below - show hamburger, hide desktop menu */
@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }
    .nav-cta {
        display: none;
    }
    .hamburger {
        display: flex;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    /* Navigation */
    .nav-inner {
        padding: 0 4vw;
        height: 60px;
    }

    .nav-logo-text .name {
        font-size: 13px;
    }

    .nav-logo-text .sub {
        font-size: 9px;
    }

    /* Topbar compact */
    .topbar {
        padding: 6px 4vw;
        font-size: 10px;
    }
    .topbar-left {
        display: none;
    }

    .sidebar {
        width: 280px;
    }
    
    /* Hero Section */
    /* .hero {
        flex-direction: column;
        padding: 60px 5vw 40px;
        min-height: auto;
        text-align: center;
    } */
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
    }
    
    h1.hero-title {
        font-size: clamp(24px, 4vw, 36px);
    }
    
    .hero-stats {
        position: static;
        transform: none;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        width: 100%;
        margin-top: 30px;
    }
    
    .stat-card {
        padding: 16px 12px;
        min-width: auto;
    }
    
    .stat-card .num {
        font-size: 28px;
    }
    
    .stat-card .lbl {
        font-size: 9px;
    }
    
    /* Topbar */
    .topbar {
        flex-direction: column;
        gap: 8px;
        padding: 8px 4vw;
        font-size: 11px;
    }
    
    .topbar-left,
    .topbar-right {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    /* General Sections */
    section {
        padding: 60px 5vw;
    }
    
    h2.section-title {
        font-size: clamp(24px, 3vw, 36px);
    }
    
    .section-desc {
        font-size: 14px;
        max-width: 100%;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-img-frame {
        aspect-ratio: 16/9;
    }
    
    .about-badge {
        bottom: -12px;
        right: -12px;
        padding: 14px 18px;
    }
    
    .about-badge .num {
        font-size: 28px;
    }
    
    /* Programs Grid */
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Stats Row */
    .stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-box {
        padding: 30px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    
    .stat-box:last-child {
        border-bottom: none;
    }
    
    /* Why Section */
    .why-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .why-item {
        padding: 24px;
    }
    
    /* Facilities Grid */
    .fac-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .fac-card {
        padding: 16px;
    }
    
    /* Safety Grid */
    .safety-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .safety-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Testimonials */
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    /* Admissions Grid */
    .admit-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .admit-box {
        padding: 24px;
    }
    
    /* Scholarship Grid */
    .schol-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* FAQ Grid */
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        margin-top: 40px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-col ul {
        justify-content: center;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-outline {
        font-size: 13px;
        padding: 12px 24px;
        width: 100%;
        text-align: center;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    /* CTA Actions */
    .cta-actions {
        flex-direction: column;
        gap: 12px;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    /* Basic */
    body {
        font-size: 14px;
    }
    
    /* Navigation */
    .nav-logo img {
        height: 40px;
    }
    
    .nav-logo-text .name {
        font-size: 12px;
    }

    .nav-logo-text .sub {
        display: none;
    }
    
    .nav-inner {
        height: 50px;
        padding: 0 3vw;
    }

    /* Sidebar narrower on small phones */
    .sidebar {
        width: 260px;
    }

    /* Hide topbar on small phones */
    .topbar {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 40px 5vw 30px;
    }
    
    h1.hero-title {
        font-size: clamp(20px, 3.5vw, 28px);
        margin-bottom: 16px;
    }
    
    .hero-sub {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .hero-desc {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.6;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    /* Sections */
    section {
        padding: 50px 5vw;
    }
    
    h2.section-title {
        font-size: clamp(20px, 2.5vw, 28px);
        margin-bottom: 12px;
    }
    
    .section-label {
        font-size: 10px;
        margin-bottom: 12px;
    }
    
    .section-desc {
        font-size: 13px;
    }
    
    /* Program Cards */
    .prog-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .program-card h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .program-card p {
        font-size: 12px;
    }
    
    /* Facilities Card */
    .fac-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .fac-card {
        padding: 12px;
        text-align: center;
    }
    
    .fac-card h4 {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .fac-card p {
        font-size: 11px;
    }
    
    /* Timeline / Milestones */
    .timeline {
        padding: 20px 0;
    }
    
    .timeline::before {
        left: 16px;
    }
    
    .tl-item {
        grid-template-columns: 40px 1fr;
        margin-bottom: 40px;
    }
    
    .tl-left {
        display: none;
    }
    
    .tl-right {
        padding-left: 20px;
    }
    
    .tl-dot {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    
    .tl-year {
        font-size: 14px;
    }
    
    .tl-content h4 {
        font-size: 13px;
    }
    
    .tl-content p {
        font-size: 12px;
    }
    
    /* Timings */
    .timings-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .timing-card {
        padding: 16px;
    }
    
    .timing-card h4 {
        font-size: 12px;
    }
    
    .timing-time {
        font-size: 14px;
    }
    
    .timing-card p {
        font-size: 11px;
    }
    
    /* Team Cards */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .team-card {
        padding: 16px;
    }
    
    .team-avatar {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }
    
    .team-card h4 {
        font-size: 13px;
    }
    
    .role {
        font-size: 10px;
    }
    
    .team-card p {
        font-size: 11px;
    }
    
    /* Documents */
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .doc-card {
        padding: 14px;
    }
    
    .doc-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .doc-card span {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .doc-arrow {
        font-size: 11px;
    }
    
    /* Committee Table */
    .committee-table {
        font-size: 12px;
    }
    
    .committee-table th,
    .committee-table td {
        padding: 10px;
    }
    
    /* Lists */
    .about-list li {
        font-size: 13px;
        gap: 8px;
    }
    
    .about-list li::before {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
    
    /* FAQ */
    .faq-q {
        font-size: 13px;
        padding: 12px;
    }
    
    .faq-a-inner {
        font-size: 12px;
    }
    
    /* Forms */
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .form-submit {
        font-size: 13px;
        padding: 12px 20px;
    }
    
    /* Contact Info */
    .contact-item h4 {
        font-size: 13px;
    }
    
    .contact-item p,
    .contact-item a {
        font-size: 12px;
    }
    
    /* Footer */
    .footer-brand {
        text-align: center;
    }
    
    .footer-col h5 {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .footer-col ul li {
        font-size: 12px;
    }
    
    /* Timeline */
    .timeline-dates li {
        flex-direction: column;
        gap: 4px;
    }
    
    .timeline-dates span {
        font-size: 12px;
    }
    
    /* Admit Steps */
    .admit-steps li {
        gap: 8px;
    }
    
    .step-num {
        font-size: 12px;
        width: 24px;
        height: 24px;
    }
    
    .step-num::before {
        font-size: 11px;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .nav-inner {
        height: 45px;
    }
    
    h1.hero-title {
        font-size: clamp(18px, 3vw, 24px);
    }
    
    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
    }
    
    .stat-card .num {
        font-size: 24px;
    }
    
    .stat-card .lbl {
        font-size: 8px;
    }
}

/* Print Styles */
@media print {
    nav,
    .topbar,
    .notice-band,
    footer,
    .form-section,
    .cta-section {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
        padding: 20px;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
}

/* High Resolution Displays (1920px and above) */
@media (min-width: 1920px) {
    .nav-inner,
    section,
    .container {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* High DPI (Retina) Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for Retina displays */
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ========== PHOTO GALLERY STYLES ========== */

/* Gallery Grid - Responsive */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 7px;
    margin-bottom: 60px;
}

.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: slideInUp 0.6s ease-out forwards;
}

.gallery-thumbnail {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    animation: glow 3s ease-in-out infinite;
    cursor: pointer;
}

.gallery-thumbnail:hover {
    animation: none !important;
}

/* Gallery Filter Buttons */
.gallery-filter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.gallery-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
}

.gallery-filter-btn.active {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: rotate(90deg);
}

.lightbox-nav-prev:hover,
.lightbox-nav-next:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ========== ANIMATIONS ========== */

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(212, 83, 26, 0.1);
    }
    50% {
        box-shadow: 0 8px 24px rgba(212, 83, 26, 0.2);
    }
}

/* ========== RESPONSIVE GALLERY ========== */

/* Desktop (1200px+) - 4 columns */
@media (min-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .video-thumbnail {
        min-height: 300px;
    }
}

/* Laptops (1024px - 1199px) - 3 columns */
@media (max-width: 1199px) and (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .video-thumbnail {
        min-height: 280px;
    }
}

/* Tablets (768px - 1023px) - 2 columns */
@media (max-width: 1023px) and (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .video-thumbnail {
        min-height: 240px;
    }
    
    .gallery-filter-wrapper {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .gallery-filter-btn {
        font-size: 12px !important;
        padding: 8px 14px !important;
    }
}

/* Mobile (480px - 767px) - 1 column */
@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .video-thumbnail {
        min-height: 200px;
    }
    
    .gallery-filter-wrapper {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .gallery-filter-btn {
        font-size: 11px !important;
        padding: 7px 12px !important;
    }
    
    .video-card-footer {
        padding: 10px 8px;
        min-height: 48px;
    }
    
    .video-card-footer p {
        font-size: 10px;
    }
}

/* Small Mobile (<480px) - Full width */
@media (max-width: 479px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 40px;
    }
    
    .gallery-filter-wrapper {
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 16px;
        justify-content: center;
    }
    
    .gallery-filter-btn {
        font-size: 10px !important;
        padding: 6px 10px !important;
    }
    
    .gallery-filter-btn-inactive {
        font-size: 10px !important;
    }
    
    .video-thumbnail {
        min-height: 160px;
    }
    
    .video-card-footer {
        padding: 8px 6px;
        min-height: 44px;
    }
    
    .video-card-footer p {
        font-size: 9px;
        -webkit-line-clamp: 1;
    }
    
    .play-button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Tablets (1200px and below) */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 7px;
    }
}

/* Medium Tablets (768px and below) */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 7px;
    }
    
    .gallery-filter-btn {
        font-size: 11px !important;
        padding: 10px 18px !important;
    }
    
    .lightbox-nav-prev,
    .lightbox-nav-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
}
