/* ==========================================================================
   CONTACTO — Tarjetas de información de la página de Contacto (BATCH 24)
   --------------------------------------------------------------------------
   Scope: .contacto-page (page-contacto.php → .main-default.sin-sidebar.contacto-page)
   El contenido (cards) vive en el editor de WP como bloque HTML (post 501).

   REESCRITO: se eliminó el CSS huérfano anterior (.section-contactanos,
   .contactanos-title/-subtitle, .contactanos-container, .contacto-redes,
   .redes-sociales) — sus clases NO se usaban en ningún template (código muerto).

   Iconos: Font Awesome 6 (ya enqueued globalmente como 'font-awesome').
   ========================================================================== */


/* ==========================================================================
   1. GRID DE TARJETAS DE INFORMACIÓN
   ========================================================================== */

.contacto-page .contacto-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(18px, 2.4vw, 26px);
    margin: 0 0 clamp(24px, 3vw, 36px);
}

.contacto-page .contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #eef0f1;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(48, 79, 85, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Icono circular (Font Awesome <i> directo dentro de .contacto-item) */
.contacto-page .contacto-item > i {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--main-green-color, #01a499);
    background: var(--main-lighter-green-color, #f2fbfa);
    border-radius: 50%;
}

.contacto-page .contacto-content h4 {
    margin: 0 0 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--main-orange-color, #e37604);   /* eyebrow naranja, coherente con el sistema */
}

.contacto-page .contacto-content p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--main-darker-green-color, #304f55);
    font-weight: 600;
}

.contacto-page .contacto-content a {
    color: var(--main-green-color, #01a499);
    text-decoration: none;
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* ==========================================================================
   2. CTA — Formulario de contacto (banner destacado)
   ========================================================================== */

.contacto-page .contacto-cta {
    text-align: center;
    padding: clamp(28px, 4vw, 44px);
    background: var(--main-lighter-green-color, #f2fbfa);
    border: 1px solid #e3efed;
    border-radius: 16px;
}

.contacto-page .contacto-cta-icono {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffffff;
    background: var(--main-green-color, #01a499);
    border-radius: 50%;
}

.contacto-page .contacto-cta h3 {
    margin: 0 0 8px;
    color: var(--main-darker-green-color, #304f55);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 800;
    letter-spacing: -0.2px;
}

.contacto-page .contacto-cta > p {
    margin: 0 auto 24px;
    max-width: 540px;
    color: var(--main-dark-grey-color, #394049);
    font-size: 1rem;
    line-height: 1.6;
}

.contacto-page .contacto-cta-boton {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 30px;
    background: var(--main-green-color, #01a499);
    color: #ffffff !important;        /* anula .main-default .entry-content a (0,5,0) y links legacy de .page-content/.entry-content */
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    border-radius: 10px;
    border: 2px solid var(--main-green-color, #01a499);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contacto-page .contacto-cta-boton > i {
    transition: transform 0.2s ease;
}


/* ==========================================================================
   3. HOVER (guard: solo puntero fino) + FOCO VISIBLE
   ========================================================================== */

@media (hover: hover) and (pointer: fine) {
    .contacto-page .contacto-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 24px rgba(48, 79, 85, 0.12);
        border-color: #e3e8e9;
    }
    .contacto-page .contacto-content a:hover {
        text-decoration: underline;
    }
    .contacto-page .contacto-cta-boton:hover {
        background: var(--main-darker-green-color, #304f55);
        border-color: var(--main-darker-green-color, #304f55);
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(48, 79, 85, 0.18);
    }
    .contacto-page .contacto-cta-boton:hover > i {
        transform: translateX(3px);
    }
}

.contacto-page .contacto-cta-boton:focus-visible,
.contacto-page .contacto-content a:focus-visible {
    outline: 2px solid var(--main-orange-color, #e37604);
    outline-offset: 3px;
    border-radius: 4px;
}


/* ==========================================================================
   4. RESPONSIVE — breakpoint mobile del proyecto = 600px
   ========================================================================== */

@media (max-width: 600px) {
    .contacto-page .contacto-info {
        grid-template-columns: 1fr;
    }
    /* Icono arriba + contenido debajo: todas las cards alineadas igual,
       sin importar el largo del texto (teléfono corto vs plan largo). */
    .contacto-page .contacto-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 22px;
    }
    .contacto-page .contacto-cta-boton {
        width: 100%;
        justify-content: center;
    }
}


/* ==========================================================================
   5. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .contacto-page .contacto-item,
    .contacto-page .contacto-cta-boton,
    .contacto-page .contacto-cta-boton > i {
        transition: none;
    }
}


/* ==========================================================================
   6. OVERRIDE — neutraliza los links naranja legacy de style.css:110-127
   (.main-default .entry-content a { color: orange !important }), cuya
   "excepción" de botones solo cubre [class*="btn"]/[class*="button"] en inglés
   y deja fuera "contacto-cta-boton". Especificidad (0,3,x) + !important para ganar.
   ========================================================================== */
.contacto-page .entry-content .contacto-cta-boton,
.contacto-page .entry-content .contacto-cta-boton:hover,
.contacto-page .entry-content .contacto-cta-boton:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}

.contacto-page .entry-content .contacto-content a {
    color: var(--main-green-color, #01a499) !important;
    text-decoration: none;
}


/* ==========================================================================
   7. HOME — Sección "Contáctanos" (index.php)
   --------------------------------------------------------------------------
   RESTAURADO: el home usa .section-contactanos > header (.noti-title +
   .contactanos-subtitle) > .contactanos-container > .contacto-info >
   .contacto-item (×4, iconos Font Awesome) > .contacto-content.
   Scopeado a .section-contactanos para NO colisionar con .contacto-page (la
   página de contacto, que tiene su propio diseño en las secciones 1-6).
   (.contactanos-title, .contacto-redes y .redes-sociales sí eran huérfanas —
   el home usa .noti-title y .social-icons; no se restauran.)
   ========================================================================== */

.section-contactanos {
    padding: 60px 20px;
    background: #ffffff;
}

.section-contactanos header {
    text-align: center;
    margin-bottom: 50px;
}

.section-contactanos .contactanos-subtitle {
    font-size: 1.125rem;
    color: #666666;
    margin: 0;
    font-weight: 400;
}

.section-contactanos .contactanos-container {
    max-width: 800px;
    margin: 0 auto;
}

.section-contactanos .contacto-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.section-contactanos .contacto-item {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-contactanos .contacto-item i {
    font-size: 2rem;
    color: var(--main-green-color, #01a499);
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(1, 164, 153, 0.1);
    border-radius: 50%;
}

.section-contactanos .contacto-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--main-darker-green-color, #304f55);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-contactanos .contacto-content p {
    margin: 0;
    font-size: 1rem;
    color: #555555;
    line-height: 1.5;
}

.section-contactanos .contacto-content a {
    color: var(--main-green-color, #01a499);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .section-contactanos .contacto-item:hover {
        box-shadow: 0 4px 20px rgba(1, 164, 153, 0.15);
        transform: translateY(-2px);
    }
    .section-contactanos .contacto-content a:hover {
        color: #008b83;
        text-decoration: underline;
    }
}

@media (max-width: 768px) {
    .section-contactanos {
        padding: 40px 15px;
    }
    .section-contactanos .contactanos-subtitle {
        font-size: 1rem;
    }
    .section-contactanos .contacto-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .section-contactanos .contacto-item {
        padding: 20px;
    }
    .section-contactanos .contacto-item i {
        font-size: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .section-contactanos {
        padding: 30px 10px;
    }
    .section-contactanos .contacto-item {
        padding: 15px;
        gap: 15px;
    }
    .section-contactanos .contacto-content h4 {
        font-size: 0.95rem;
    }
    .section-contactanos .contacto-content p {
        font-size: 0.9rem;
    }
}
