/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
}

/* Desktop */
@media screen and (max-width: 1199px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet */
@media screen and (max-width: 991px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-lg) 0;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--spacing-sm) 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Carousel Controls */
    .carousel-controls {
        padding: 0 var(--spacing-md);
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    /* Facilities */
    .facilities-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .gallery-main {
        height: 300px;
    }
    
    .facilities-features {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    /* Team */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large */
@media screen and (max-width: 767px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-title::after {
        width: 40px;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--spacing-md);
    }
    
    .logo-text {
        font-size: var(--font-size-base);
    }
    
    .nav-menu {
        top: 60px;
    }
    
    /* Hero */
    .hero {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .carousel-indicators {
        bottom: var(--spacing-md);
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    /* Sections */
    .about,
    .services,
    .facilities,
    .testimonials,
    .blog-preview,
    .contact {
        padding: var(--spacing-xl) 0;
    }
    
    /* Services */
    .service-card {
        padding: var(--spacing-md);
        min-height: auto;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: var(--spacing-md);
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    /* About */
    .about-item {
        margin-bottom: var(--spacing-lg);
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .team-member {
        padding: var(--spacing-md);
    }
    
    .team-member img {
        width: 100px;
        height: 100px;
    }
    
    /* Facilities */
    .gallery-main {
        height: 250px;
    }
    
    .gallery-thumbnails {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs);
    }
    
    .thumbnail {
        height: 60px;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .feature-item i {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-md);
    }
    
    .testimonial-quote {
        font-size: 2rem;
        top: var(--spacing-sm);
        left: var(--spacing-sm);
    }
    
    .testimonial-text {
        padding-left: var(--spacing-md);
        font-size: 14px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-content {
        padding: var(--spacing-md);
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .contact-form-container {
        padding: var(--spacing-md);
    }
    
    .form-group input,
    .form-group textarea {
        padding: var(--spacing-sm);
    }
    
    .map-container {
        height: 300px;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        font-size: 1.25rem;
    }
}

/* Mobile Small */
@media screen and (max-width: 479px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .logo {
        height: 30px;
    }
    
    .logo-text {
        font-size: 14px;
    }
    
    /* Hero */
    .hero {
        height: 60vh;
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .carousel-controls {
        padding: 0 var(--spacing-sm);
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Cards */
    .service-card,
    .testimonial-card,
    .blog-card {
        margin: 0 var(--spacing-xs);
    }
    
    .service-card {
        padding: var(--spacing-sm);
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    .service-icon i {
        font-size: 1.25rem;
    }
    
    /* Facilities */
    .gallery-main {
        height: 200px;
    }
    
    .gallery-thumbnails {
        padding: var(--spacing-xs);
    }
    
    .thumbnail {
        height: 50px;
    }
    
    /* Contact */
    .contact-item {
        padding: var(--spacing-sm);
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon i {
        font-size: 1rem;
    }
    
    /* Forms */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 14px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 14px;
    }
    
    /* Map */
    .map-container {
        height: 250px;
    }
}

/* Mobile Extra Small */
@media screen and (max-width: 359px) {
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    .hero-title {
        font-size: 1.25rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .service-card,
    .testimonial-card,
    .feature-item,
    .contact-item {
        padding: var(--spacing-xs);
    }
    
    .gallery-main {
        height: 150px;
    }
    
    .thumbnail {
        height: 40px;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Landscape Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-actions {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .header,
    .whatsapp-float,
    .carousel-controls,
    .carousel-indicators,
    .btn,
    .social-links {
        display: none !important;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        page-break-after: always;
    }
    
    .hero-content {
        position: static;
        color: var(--prussian-blue);
    }
    
    .carousel-slide {
        position: static;
        opacity: 1;
    }
    
    .carousel-overlay {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    h4 { font-size: 12pt; }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .section-header {
        margin-bottom: 20pt;
    }
    
    .service-card,
    .testimonial-card,
    .feature-item {
        break-inside: avoid;
        margin-bottom: 15pt;
    }
}

/* High DPI Displays */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    .logo,
    .team-member img,
    .testimonial-author img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --timberwolf: #2d2d2d;
        --prussian-blue: #e0e0e0;
        --charcoal: #b0b0b0;
    }
    
    .header {
        background-color: rgba(26, 26, 26, 0.95);
    }
    
    .service-card,
    .testimonial-card,
    .blog-card,
    .team-member,
    .feature-item,
    .contact-item {
        background-color: #2d2d2d;
        border: 1px solid #404040;
    }
    
    .contact-form-container {
        background-color: #2d2d2d;
    }
    
    .form-group input,
    .form-group textarea {
        background-color: #1a1a1a;
        border-color: #404040;
        color: #e0e0e0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: none;
    }
    
    .whatsapp-float {
        animation: none;
    }
    
    .service-card:hover,
    .blog-card:hover,
    .team-member:hover {
        transform: none;
    }
}

/* Focus Visible Support */
@supports selector(:focus-visible) {
    button:focus,
    input:focus,
    textarea:focus,
    select:focus,
    a:focus {
        outline: none;
    }
    
    button:focus-visible,
    input:focus-visible,
    textarea:focus-visible,
    select:focus-visible,
    a:focus-visible {
        outline: 2px solid var(--lion);
        outline-offset: 2px;
    }
}