/* ===================================
   Responsive Styles for Nritya Shilpi Academy
   =================================== */

/* ===================================
   Tablet Landscape & Small Desktop
   =================================== */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .nav-menu {
        gap: 0.75rem;
    }

    .nav-menu > li > a {
        font-size: 0.875rem;
    }

    .btn-enroll {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .dance-forms-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .about-content {
        gap: var(--spacing-md);
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .nav-menu {
        gap: 0.5rem;
    }

    .nav-menu > li > a {
        font-size: 0.8rem;
    }

    .btn-enroll {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .logo-image {
        height: 60px;
    }
}

/* ===================================
   Tablet Portrait
   =================================== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    /* Logo Responsive */
    .logo-image {
        height: 60px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-subtitle {
        font-size: 0.65rem;
    }

    .logo a {
        gap: 0.75rem;
    }

    /* Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 73px;
        right: -320px;
        width: 300px;
        max-width: 85vw;
        height: calc(100vh - 73px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-md);
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0,0,0,0.15);
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Overlay backdrop when menu is open */
    body::after {
        content: '';
        position: fixed;
        top: 73px;
        left: 0;
        width: 100%;
        height: calc(100vh - 73px);
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 998;
        pointer-events: none;
    }

    body.menu-open::after {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu > li > a {
        padding: 1rem 0;
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu li a {
        padding-left: 2rem;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hero Section */
    .hero-section {
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Stats Section */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* About Preview */
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-text {
        order: 2;
    }

    .about-image {
        order: 1;
    }

    /* Dance Forms */
    .dance-forms-grid {
        grid-template-columns: 1fr;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* CTA */
    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    /* Buttons */
    .whatsapp-float {
        bottom: 5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

/* ===================================
   Mobile Landscape
   =================================== */
@media (max-width: 640px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.75rem; }
    h4 { font-size: 1.25rem; }

    .section-title {
        font-size: 2rem;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: var(--spacing-sm);
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 250px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Mobile Portrait
   =================================== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    /* Logo */
    .logo-image {
        height: 50px;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .logo-subtitle {
        font-size: 0.6rem;
    }

    .logo a {
        gap: 0.5rem;
    }

    .old-logo-subtitle {
        font-size: 0.7rem;
    }

    /* Hero */
    .hero-section {
        min-height: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-buttons .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* Dance Cards */
    .dance-card-image {
        height: 200px;
    }

    /* Testimonials */
    .testimonial-content p {
        font-size: 1rem;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    /* Float Buttons */
    .whatsapp-float {
        bottom: 4.5rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* ===================================
   Landscape Orientation
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 400px;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    header,
    .mobile-menu-toggle,
    .hero-buttons,
    .scroll-indicator,
    .carousel-controls,
    .cta-section,
    footer,
    #back-to-top,
    .whatsapp-float {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* ===================================
   Accessibility - 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;
    }

    .scroll-indicator {
        animation: none;
    }

    .whatsapp-float {
        animation: none;
    }
}

/* ===================================
   High Contrast Mode
   =================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #800000;
        --text-dark: #000000;
        --text-light: #333333;
        --border-color: #000000;
    }

    .btn {
        border-width: 3px;
    }

    a:focus,
    button:focus {
        outline: 3px solid #000;
        outline-offset: 2px;
    }
}
