/* =========================================
   RESPONSIVE DESIGN - MOBILE & TABLET
   ========================================= */

/* ---- Global overflow fix ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   TABLET (max-width: 992px)
   ========================================= */
@media (max-width: 992px) {

    /* --- Navigation --- */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--primary);
        color: var(--white);
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.2rem;
        z-index: 1100;
        flex-shrink: 0;
    }

    .desktop-only {
        display: none !important;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        z-index: 2000;
        padding: 2rem;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        list-style: none;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        color: var(--white) !important;
        font-size: 1.4rem;
        font-weight: 600;
        display: block;
        padding: 0.5rem;
    }

    .mobile-only {
        display: list-item !important;
    }

    /* --- Hero --- */
    .hero-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .hero-visual {
        order: -1;
        width: 100%;
    }

    .image-container {
        width: 100%;
        max-width: 100%;
        height: 360px;
    }

    .floating-status {
        left: 50%;
        transform: translateX(-50%);
        bottom: 16px;
        max-width: 85%;
        min-width: 0;
    }

    /* --- Grids --- */
    .servicios-grid {
        grid-template-columns: 1fr !important;
        gap: 1.75rem;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }

    /* --- Contact --- */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-form-container {
        padding: 2rem;
    }

    .contact-form {
        order: 2;
    }

    .contact-info {
        order: 1;
    }

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

    /* --- Section padding --- */
    .servicios,
    .faq,
    .por-que,
    .stats,
    .contact {
        padding: 4rem 4%;
    }
}

/* =========================================
   MOBILE (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {

    /* --- Container --- */
    .container {
        padding: 0 1rem;
        width: 100%;
    }

    /* --- About Us Fix --- */
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .content-text {
        max-width: 100%;
        padding: 0 1rem;
    }

    .content-image {
        height: 350px;
        width: 100%;
    }

    .highlight-box {
        text-align: left;
    }

    /* --- Form Fix --- */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* --- Typography --- */
    .section-title {
        font-size: 1.85rem;
        line-height: 1.25;
        word-break: break-word;
    }

    .section-subtitle {
        font-size: 0.98rem;
    }

    .tagline {
        font-size: 0.72rem;
        letter-spacing: 0.05em;
    }

    /* --- Hero --- */
    .hero-modern {
        padding: 7.5rem 4% 3.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

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

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .image-container {
        height: 280px;
    }

    .floating-status {
        position: relative;
        left: auto;
        transform: none;
        bottom: auto;
        margin: 1rem auto 0;
        max-width: 90%;
    }

    /* --- Grids → 1 column --- */
    .servicios-grid,
    .benefits-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* --- Cards --- */
    .servicio-card,
    .benefit-card {
        padding: 2rem 1.5rem;
    }

    /* --- FAQ --- */
    .faq-accordion {
        max-width: 100%;
    }

    .faq-question {
        padding: 1.25rem 1rem;
        gap: 0.75rem;
    }

    .faq-question-text {
        font-size: 0.98rem;
    }

    .faq-answer p {
        padding: 0 1rem 1.25rem 3.75rem;
        font-size: 0.93rem;
    }

    /* --- Footer --- */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    /* --- Cookie --- */
    .cookie-content {
        padding: 1.75rem 1.25rem;
    }

    .cookie-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cookie-accept,
    .btn-cookie-reject {
        width: 100%;
        justify-content: center;
    }

    /* --- Section padding --- */
    .servicios,
    .faq,
    .por-que,
    .stats,
    .contact {
        padding: 3.5rem 4%;
    }
}

/* =========================================
   SMALL MOBILE (max-width: 480px)
   ========================================= */
@media (max-width: 480px) {

    /* --- Container --- */
    .container {
        padding: 0 0.875rem;
    }

    /* --- Typography --- */
    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.93rem;
    }

    /* --- Hero --- */
    .hero-modern {
        padding: 7rem 3.5% 3rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .pill-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.85rem;
        white-space: normal;
        text-align: center;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.85rem 1.25rem;
        font-size: 0.93rem;
    }

    .image-container {
        height: 220px;
    }

    /* --- Cards --- */
    .servicio-card,
    .benefit-card {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }

    .servicio-number,
    .faq-number {
        font-size: 3rem;
        top: 1rem;
        right: 1rem;
    }

    .servicio-icon,
    .faq-icon {
        width: 58px;
        height: 58px;
        font-size: 1.5rem;
        border-radius: 14px;
    }

    .servicio-card h3,
    .benefit-card h3 {
        font-size: 1.15rem;
    }

    .servicio-card p,
    .benefit-card p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    /* --- FAQ --- */
    .faq-question {
        padding: 1rem 0.875rem;
        gap: 0.6rem;
    }

    .faq-number-small {
        font-size: 0.9rem;
        min-width: 26px;
    }

    .faq-question-text {
        font-size: 0.9rem;
    }

    .faq-answer p {
        padding: 0 0.875rem 1rem 3rem;
        font-size: 0.87rem;
    }

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

    .stat-number,
    .stat-number-text {
        font-size: 2.2rem;
    }

    .stat-label {
        font-size: 0.88rem;
    }

    /* --- Contact --- */
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.8rem 0.9rem;
        font-size: 0.93rem;
    }

    .contact-info-item {
        padding: 1rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    /* --- Footer --- */
    .footer-logo {
        font-size: 1.35rem;
    }

    .footer-description {
        font-size: 0.87rem;
    }

    .footer-links a {
        font-size: 0.87rem;
    }

    /* --- Cookie --- */
    .cookie-content {
        padding: 1.25rem 0.875rem;
        gap: 1rem;
    }

    .cookie-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }

    .cookie-text h4 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.87rem;
    }

    /* --- WhatsApp --- */
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        bottom: 16px;
        right: 16px;
    }

    /* --- Modal --- */
    .modal-content {
        padding: 1.5rem 1rem;
        margin: 5% 3%;
        max-width: 94%;
        border-radius: 16px;
    }

    /* --- Section padding --- */
    .servicios,
    .faq,
    .por-que,
    .stats,
    .contact {
        padding: 3rem 3.5%;
    }
}

/* =========================================
   EXTRA SMALL (max-width: 360px)
   ========================================= */
@media (max-width: 360px) {

    .container {
        padding: 0 0.75rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

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

    .servicio-card,
    .benefit-card {
        padding: 1.5rem 1rem;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.87rem;
        padding: 0.8rem 1rem;
    }

    .faq-answer p {
        padding: 0 0.75rem 0.875rem 2.5rem;
    }

    .servicios,
    .faq,
    .por-que,
    .stats,
    .contact {
        padding: 2.5rem 3%;
    }
}