/* ==========================================================================
   RESPONSIVE DESIGN - AA ADMINISTRADORES ASOCIADOS SAC
   Estilos adaptativos optimizados para Desktop, Laptop, Tablet y Mobile
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LAPTOPS Y PANTALLAS MEDIANAS (1024px - 1280px)
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* --------------------------------------------------------------------------
   2. TABLETS (768px - 1023px)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
    :root {
        --header-height: 76px;
    }

    .section-padding {
        padding-block: 65px;
    }

    .desktop-nav,
    .header-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .brand-logo-img {
        height: 44px;
        max-width: 210px;
    }

    .hero-slider-section {
        height: 70vh;
        min-height: 500px;
    }

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

    .stats-card-wrapper {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.75rem 2rem;
    }

    .stat-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1.25rem;
        padding-inline: 0;
    }

    .about-grid,
    .digital-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image-wrapper {
        order: -1;
    }

    .about-img-main {
        height: 360px;
    }

    .about-experience-badge {
        right: 10px;
        bottom: -15px;
        padding: 1rem 1.5rem;
    }

    .badge-years {
        font-size: 2rem;
    }

    .gestion-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-box {
        padding: 2rem 1.5rem;
    }
}

/* --------------------------------------------------------------------------
   3. MOBILE GRANDES Y MEDIANOS (480px - 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    :root {
        --header-height: 68px;
    }

    .section-padding {
        padding-block: 45px 50px;
    }

    .section-title {
        font-size: 1.65rem;
        line-height: 1.25;
    }

    .section-title-wrapper {
        margin-bottom: 2.25rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    /* Logo Ajustado en Móvil */
    .brand-logo-img {
        height: 36px;
        max-width: 175px;
    }

    /* Hero Slider Optimizado 100vh Centrado */
    .hero-slider-section {
        height: 100vh;
        min-height: 520px;
        padding-top: 0;
    }

    .hero-content-container {
        padding-top: calc(var(--header-height) + 10px);
        padding-bottom: 50px;
        justify-content: center;
        align-items: center;
    }

    .hero-caption {
        text-align: center;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .hero-subtitle-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.85rem;
        margin-bottom: 0.85rem;
        margin-inline: auto;
    }

    .hero-title {
        font-size: 1.65rem;
        line-height: 1.25;
        margin-bottom: 0.85rem;
        text-align: center;
    }

    .hero-description {
        font-size: 0.875rem;
        line-height: 1.45;
        margin-bottom: 1.5rem;
        text-align: center;
        max-width: 92%;
        margin-inline: auto;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin-inline: auto;
        gap: 0.65rem;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Ocultar las flechas y la métrica duplicada interna del Hero en móvil */
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev,
    .hero-metrics-grid {
        display: none !important;
    }

    .hero-swiper .swiper-pagination {
        bottom: 10px !important;
    }

    /* Botones Proporcionales */
    .btn {
        padding: 0.7rem 1.25rem;
        font-size: 0.85rem;
        border-radius: var(--radius-sm);
    }

    .btn-sm {
        padding: 0.55rem 1rem;
        font-size: 0.8rem;
    }

    /* Estadísticas Flotantes */
    .stats-section {
        margin-top: -25px;
    }

    .stats-card-wrapper {
        padding: 1.25rem 1rem;
        gap: 1rem;
    }

    .stat-item {
        gap: 1rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        border-radius: 8px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

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

    /* Cards e Imágenes */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .service-card-body {
        padding: 1.25rem;
    }

    .service-card-title {
        font-size: 1.15rem;
    }

    .service-card-text {
        font-size: 0.875rem;
    }

    .gestion-card {
        flex-direction: column;
        gap: 1rem;
        padding: 1.35rem;
    }

    .digital-check-item {
        font-size: 0.925rem;
    }

    .digital-check-item i {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-box {
        padding: 1.5rem 1.15rem;
    }

    .form-control {
        padding: 0.7rem 0.9rem;
        font-size: 0.875rem;
    }

    .cta-banner {
        padding: 2.25rem 1.25rem;
    }

    .cta-banner h2 {
        font-size: 1.6rem;
    }

    .cta-banner p {
        font-size: 0.95rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* En Móvil el botón flotante de WhatsApp muestra icono ordenado */
    .whatsapp-widget {
        bottom: 20px;
        right: 18px;
    }

    .whatsapp-badge {
        display: none;
    }

    .whatsapp-btn {
        padding: 0;
        border-radius: 50%;
    }

    .whatsapp-icon {
        width: 50px;
        height: 50px;
        font-size: 1.75rem;
    }
}

/* --------------------------------------------------------------------------
   4. MOBILE PEQUEÑOS (320px - 479px)
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
    .brand-logo-img {
        height: 32px;
        max-width: 150px;
    }

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

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

    .stats-card-wrapper {
        padding: 1rem 0.85rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 1.45rem;
    }

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

    .cta-banner h2 {
        font-size: 1.4rem;
    }
}

/* --------------------------------------------------------------------------
   5. PREFERS REDUCED MOTION (ACCESIBILIDAD)
   -------------------------------------------------------------------------- */
@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;
    }
}
