/* ========================================
   Responsive Styles
   ======================================== */

/* Large Tablets and Below (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    :root {
        --font-size-6xl: 3rem;      /* 48px */
        --font-size-5xl: 2.5rem;    /* 40px */
        --font-size-4xl: 2rem;      /* 32px */
    }

    .hero-title {
        font-size: var(--font-size-5xl);
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .about-image {
        height: 600px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Tablets and Below (max-width: 768px) */
@media screen and (max-width: 768px) {
    :root {
        --font-size-6xl: 2.5rem;    /* 40px */
        --font-size-5xl: 2rem;      /* 32px */
        --font-size-4xl: 1.75rem;   /* 28px */
        --font-size-3xl: 1.5rem;    /* 24px */
        --spacing-5xl: 4rem;        /* 64px */
        --spacing-4xl: 3rem;        /* 48px */
    }

    /* Fix mobile scroll issues */
    body, html {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    main {
        overflow: hidden !important;
        width: 100%;
    }

    section {
        overflow: hidden !important;
        width: 100%;
    }

    .container {
        overflow: hidden !important;
    }

    /* Header */
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-link {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--gray-200);
        text-align: center;
        width: 100%;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link.cta-btn {
        margin-top: var(--spacing-md);
        padding: var(--spacing-md) var(--spacing-lg);
        border-bottom: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1000;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(9px, 9px);
        width: 28px;
        animation: rotateTop 0.4s ease-out;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
        animation: fadeOut 0.2s ease-out;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(9px, -9px);
        width: 28px;
        animation: rotateBottom 0.4s ease-out;
    }

    @keyframes rotateTop {
        0% {
            transform: rotate(0deg) translate(0, 0);
        }
        50% {
            transform: rotate(60deg) translate(5px, 5px);
        }
        100% {
            transform: rotate(45deg) translate(9px, 9px);
        }
    }

    @keyframes rotateBottom {
        0% {
            transform: rotate(0deg) translate(0, 0);
        }
        50% {
            transform: rotate(-60deg) translate(5px, -5px);
        }
        100% {
            transform: rotate(-45deg) translate(9px, -9px);
        }
    }

    @keyframes fadeOut {
        0% {
            opacity: 1;
            transform: scale(1);
        }
        50% {
            opacity: 0.5;
            transform: scale(0.5);
        }
        100% {
            opacity: 0;
            transform: scale(0);
        }
    }

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

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

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

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

    /* Sections */
    section {
        padding: var(--spacing-4xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-3xl);
    }

    /* About Section */
    .about-image {
        height: 400px;
    }

    .lead {
        font-size: var(--font-size-lg);
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }

    .gallery-item {
        height: 250px;
    }

    /* Location */
    .location-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-3xl);
    }

    .location-map iframe {
        height: 350px;
    }

    /* Form */
    .contact-form-wrapper {
        padding: var(--spacing-xl);
    }

    .form-section {
        margin-bottom: var(--spacing-xl);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
}

/* Mobile (max-width: 480px) */
@media screen and (max-width: 480px) {
    :root {
        --font-size-6xl: 2rem;      /* 32px */
        --font-size-5xl: 1.75rem;   /* 28px */
        --font-size-4xl: 1.5rem;    /* 24px */
        --font-size-3xl: 1.25rem;   /* 20px */
        --container-padding: 1rem;
        --header-height: 70px;
    }

    /* Header */
    .header {
        height: var(--header-height);
    }

    .header-content {
        height: var(--header-height);
    }

    .logo-img {
        height: 100px;
    }

    /* Hero */
    .hero {
        margin-top: var(--header-height);
        min-height: 450px;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .scroll-indicator {
        bottom: var(--spacing-xl);
    }

    /* About Section - Mobile */
    .about-image {
        height: 300px;
    }

    .lead {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
    }

    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: var(--font-size-base);
    }

    /* Sections */
    section {
        padding: var(--spacing-3xl) 0;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .section-subtitle {
        font-size: var(--font-size-base);
    }

    /* About */
    .lead {
        font-size: var(--font-size-lg);
    }

    .features-list li {
        font-size: var(--font-size-base);
    }

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

    /* Float Buttons - Mobile Adjustments */
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
        font-size: 26px;
    }

    .social-hub-float {
        bottom: 90px;
        right: 20px;
        width: 180px;
        height: 180px;
    }

    .social-hub-trigger {
        width: 65px;
        height: 65px;
        bottom: 0;
        right: 0;
    }

    .social-hub-links {
        bottom: 32px;
        right: 32px;
    }

    .social-hub-center-icon {
        font-size: 20px;
    }

    .social-hub-top,
    .social-hub-bottom {
        font-size: 7px;
        letter-spacing: 2px;
    }

    .social-hub-link {
        width: 48px;
        height: 48px;
        font-size: 19px;
    }

    .social-hub-link[data-social="facebook"] {
        top: -80px;
        left: 0;
    }

    .social-hub-link[data-social="instagram"] {
        top: -60px;
        left: -70px;
    }

    .social-hub-link[data-social="youtube"] {
        top: 0px;
        left: -85px;
    }

    .social-hub-link[data-social="contact"] {
        top: 50px;
        left: -60px;
    }

    /* Preloader */
    .preloader-text {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
        padding: 0 var(--spacing-md);
        text-align: center;
    }

    .loader {
        width: 50px;
        height: 50px;
    }

    .preloader-content {
        width: 90%;
        max-width: 400px;
    }

    .gallery-item {
        height: 200px;
    }

    /* Location */
    .location-map iframe {
        height: 300px;
    }

    .location-item {
        padding: var(--spacing-md);
    }

    /* Form */
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .form-section-title {
        font-size: var(--font-size-xl);
    }

    .radio-group {
        gap: var(--spacing-sm);
    }

    .radio-label {
        padding: var(--spacing-sm);
    }

    /* Modal */
    .modal-content {
        padding: var(--spacing-xl);
        width: 95%;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-4xl);
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-menu-toggle,
    .scroll-indicator,
    .btn,
    .contact-form,
    .modal {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    section {
        page-break-inside: avoid;
    }
}

/* High Resolution Displays */
@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min-resolution: 192dpi) {
    /* Optimize images and icons for retina displays */
    .feature-icon img,
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

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