/* ============================================================
   HEI 502 — overrides (consistencia tipográfica, flotante WS,
   ajustes responsive). Cargado DESPUÉS de main.css / responsive.css
   ============================================================ */

/* --- Tipografía consistente --------------------------------- */

:root {
    --hei-green: #88bc24;
    --hei-green-dark: #6e9a1c;
    --hei-wa: #25D366;
    --hei-wa-dark: #128C7E;
    --hei-text: #333;
    --hei-text-strong: #1a1a1a;
    --font-body: 'Roboto', sans-serif;
    --font-head: 'Ubuntu', sans-serif;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--hei-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.sec-title h1, .sec-title h2,
.banner-section-four h1 {
    font-family: var(--font-head) !important;
    color: var(--hei-text-strong);
    font-weight: 700;
}

/* Pill verde de títulos de sección — mismo tratamiento siempre */
.sec-title .title,
.banner-section-four .title {
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* H1 de secciones — escala fluida (responsive sin media queries) */
.sec-title h1 {
    font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem) !important;
    line-height: 1.25 !important;
}

/* Header transparente sobre el banner */
.main-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: transparent !important;
    z-index: 50;
}
.main-header .header-upper,
.main-header .header-upper .outer-container {
    background: transparent !important;
}

/* Banner principal — escala fluida + wrap balanceado */
.banner-section-four {
    padding-top: clamp(230px, 16vw + 120px, 320px) !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center top !important;
}

.banner-section-four .content-box .title {
    font-size: clamp(0.7rem, 0.55rem + 0.6vw, 1.5rem) !important;
    line-height: 1.3 !important;
    display: inline-block !important;
    white-space: nowrap;
    max-width: 100%;
}

.banner-section-four h1 {
    font-size: clamp(2.4rem, 1.6rem + 4vw, 4.5rem) !important;
    line-height: 1.15 !important;
    margin-top: 22px !important;
    margin-bottom: 24px !important;
    text-wrap: balance;
    word-break: normal;
    overflow-wrap: break-word;
    padding: 0 12px;
}

.banner-section-four .content-box .btn-box {
    margin-top: 28px !important;
}

@media (max-width: 599px) {
    .banner-section-four .image-box { margin-top: 30px; }
    .banner-section-four .mouse-btn-down { display: none; }
}

/* Textos de secciones — Roboto consistente, sin justify forzado */
.sec-title .text,
.featured-section-four .text,
.featured-section-five .text,
.column-text,
.blog-section-two .text,
.process-section .process-block .text,
.seo-block .text,
.contact-page-section .text {
    font-family: var(--font-body) !important;
    font-size: 1.2rem !important;
    line-height: 1.7 !important;
    color: var(--hei-text) !important;
    text-align: left !important;
}

/* H2 de tarjetas de producto y bloques */
.news-block-two .lower-content h2,
.seo-block h2,
.process-block h4 {
    font-family: var(--font-head) !important;
    color: var(--hei-text-strong);
    font-weight: 600;
}

/* --- Flotante de WhatsApp ---------------------------------- */

.redes-flotantes {
    position: fixed;
    right: 22px;
    bottom: 22px;
    top: auto;
    z-index: 999;
}

/* Ocultar el HTML legacy de separators e img antiguo */
.redes-flotantes .separator { display: none; }

.wa-float {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--hei-wa);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    position: relative;
}

.wa-float i, .wa-float .fab {
    font-size: 32px;
    line-height: 1;
    color: #fff;
}

.wa-float:hover {
    background: var(--hei-wa-dark);
    transform: scale(1.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.30);
    color: #fff;
}

/* Pulso suave */
.wa-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--hei-wa);
    z-index: -1;
    animation: wa-pulse 2s infinite;
    opacity: 0.6;
}

@keyframes wa-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(1.6); opacity: 0;   }
    100% { transform: scale(1.6); opacity: 0;   }
}

/* Scroll-to-top — alineado con el flotante */
.scroll-to-top {
    right: 22px !important;
    bottom: 92px !important;
}

/* --- Ajustes responsive --------------------------------- */

/* Imagen de banner: que escale bien sin desbordar */
.banner-section-four .image-box img {
    max-width: 100%;
    height: auto;
}

/* Tablet y abajo */
@media (max-width: 991px) {
    .banner-section-four .content-box,
    .featured-section-four .content-column .inner-column,
    .featured-section-five .content-column .inner-column,
    .process-section .content-column .inner-column,
    .contact-page-section .info-column .inner-column {
        padding-left: 0;
        padding-right: 0;
    }

    .featured-section-four .image-column,
    .featured-section-five .col-lg-6:first-child {
        margin-bottom: 30px;
    }

    .process-section .col-lg-6 img {
        margin-top: 30px;
        width: 100%;
        border-radius: 35px;
    }

    /* Pedidos: pasos en columna, separación */
    .process-section .process-block {
        margin-bottom: 20px;
    }

    /* Maquila: separar columnas en stack */
    .seo-section .right-column .inner-column {
        margin-top: 30px;
    }

    /* Tarjetas de producto: padding consistente */
    .news-block-two .inner-box {
        margin-bottom: 25px;
    }
}

/* Móvil */
@media (max-width: 599px) {
    body { font-size: 15px; }

    .auto-container { padding: 0 18px; }

    /* Pill de título — un poco más chico */
    .sec-title .title,
    .banner-section-four .title {
        font-size: 12px !important;
        padding: 4px 12px !important;
    }

    /* Bloques con border-radius grande en imágenes — que no se vea raro */
    .process-section .col-lg-6 img,
    .featured-section-five img,
    .featured-section-four img {
        border-radius: 24px !important;
    }

    /* Botones del CTA en maquila — no se amontonan */
    .seo-block .btn-box .theme-btn {
        display: block;
        margin: 8px 0 !important;
        text-align: center;
    }

    /* Form contacto — padding interno */
    .contact-page-section .form-column .inner-column {
        padding: 20px !important;
    }

    /* Flotante un poco más chico en móvil */
    .wa-float { width: 54px; height: 54px; }
    .wa-float i, .wa-float .fab { font-size: 28px; }
    .redes-flotantes { right: 16px; bottom: 16px; }
    .scroll-to-top {
        right: 16px !important;
        bottom: 80px !important;
    }
}

/* Imágenes del duo: que no se aplaste en móvil */
@media (max-width: 767px) {
    .img-duo-img {
        height: 240px;
    }
}

/* --- Formulario de contacto -------------------------------- */

.contact-page-section .form-column .inner-column {
    background: #ffffff;
    border-radius: 18px;
    padding: 36px 32px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #ececec;
}

.contact-form .form-group {
    margin-bottom: 18px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="password"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    height: 54px;
    padding: 10px 48px 10px 18px !important;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    color: var(--hei-text-strong) !important;
    background-color: #f7f8fa !important;
    border: 1px solid #e1e4ea !important;
    border-radius: 12px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    box-shadow: none !important;
}

.contact-form textarea {
    height: 150px;
    padding-top: 14px !important;
    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #8a93a6 !important;
    opacity: 1;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    background-color: #ffffff !important;
    border-color: var(--hei-green) !important;
    box-shadow: 0 0 0 3px rgba(136, 188, 36, 0.18) !important;
    outline: none;
}

.contact-form .form-group .icon {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: var(--hei-green);
    font-size: 16px;
    pointer-events: none;
}

/* El textarea tiene el icon arriba, no centrado */
.contact-form .form-group:has(textarea) .icon {
    top: 18px;
    transform: none;
}

/* Botón enviar — fuerza ancho cómodo y look consistente */
.contact-form button[type="submit"] {
    width: 100%;
    background: var(--hei-green) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.2s ease !important;
    cursor: pointer;
}

.contact-form button[type="submit"]:hover {
    background: var(--hei-green-dark) !important;
    transform: translateY(-1px);
}

/* Alertas dentro del form — esquinas redondeadas igualadas */
.contact-form .alert {
    border-radius: 12px;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    font-size: 0.95rem;
}

/* --- Hamburguesa móvil: más grande y mejor alineada -------- */
@media (max-width: 1023px) {
    .main-header .nav-outer .mobile-nav-toggler {
        font-size: 44px !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin-top: -6px !important;
        margin-right: 18px !important;
        color: var(--hei-green) !important;
    }
}
@media (max-width: 599px) {
    .main-header .nav-outer .mobile-nav-toggler {
        font-size: 40px !important;
        margin-top: -4px !important;
        margin-right: 14px !important;
    }
}

/* --- Padding de secciones en responsive ------------------- */
@media (max-width: 991px) {
    .featured-section-four,
    .featured-section-five,
    .blog-section-two,
    .seo-section,
    .process-section,
    .contact-page-section {
        padding-top: 60px !important;
        padding-bottom: 40px !important;
    }
}

@media (max-width: 599px) {
    .featured-section-four,
    .featured-section-five,
    .blog-section-two,
    .seo-section,
    .process-section,
    .contact-page-section {
        padding-top: 45px !important;
        padding-bottom: 30px !important;
    }

    /* Reducir gap entre sec-title y contenido */
    .sec-title h1 { margin-bottom: 14px !important; }
    .sec-title .text { margin-top: 8px !important; }

    /* Imágenes hero/section: menos margen */
    .featured-section-four .image-column,
    .featured-section-five .col-lg-6:first-child {
        margin-bottom: 20px !important;
    }

    .process-section .col-lg-6 img { margin-top: 20px !important; }
}

/* --- contact-info: tamaños más razonables en móvil -------- */
@media (max-width: 767px) {
    .contact-page-section .info-column .contact-info li {
        font-size: 1rem !important;
        font-weight: 600;
        padding-left: 72px !important;
        min-height: 56px !important;
        padding-top: 4px !important;
        margin-bottom: 16px !important;
        line-height: 1.35em !important;
        word-break: break-word;
    }
    .contact-page-section .info-column .contact-info li .icon {
        width: 56px !important;
        height: 56px !important;
    }
    .contact-page-section .info-column .contact-info li .icon img {
        max-width: 28px;
    }
    .contact-page-section .info-column .contact-info li i {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }
}

@media (max-width: 599px) {
    .contact-page-section .info-column .contact-info li {
        font-size: 0.95rem !important;
        padding-left: 64px !important;
        min-height: 50px !important;
    }
    .contact-page-section .info-column .contact-info li .icon {
        width: 50px !important;
        height: 50px !important;
    }
    .contact-page-section .info-column .contact-info li .icon img {
        max-width: 24px;
    }
}

/* --- Maquila (seo-block) y Pedidos en responsive ---------- */
@media (max-width: 991px) {
    /* Maquila: el upper-box tiene min-height:100px + padding-top:25px reservado
       para un icon-box que no usamos. Lo reseteamos. */
    .seo-block .inner-box .upper-box {
        text-align: left !important;
        min-height: 0 !important;
        padding-top: 0 !important;
    }
    .seo-block .inner-box .upper-box h2 {
        font-size: 1.5rem !important;
        margin-bottom: 12px;
    }
    .seo-section .left-column .inner-column { padding-right: 0 !important; }
    .seo-section .right-column .inner-column { padding-left: 0 !important; }
    .seo-section .left-column .inner-column:before { display: none; }

    /* Pedidos: el inner-column tenía 110px de padding extra arriba */
    .process-section .content-column .inner-column {
        padding: 0 !important;
    }
    .process-section .col-lg-6 img { margin-top: 16px !important; }
}

@media (max-width: 599px) {
    .seo-block .inner-box .upper-box h2 { font-size: 1.35rem !important; }
    .seo-block { margin-bottom: 18px !important; }

    /* Pedidos: pasos más compactos */
    .process-block { margin-bottom: 16px !important; }
    .process-block .inner-box { padding-left: 70px !important; }
    .process-block .inner-box .number { font-size: 46px !important; }
    .process-block .inner-box h4 { font-size: 1.1rem !important; }
}

/* Fix overflow horizontal global */
html, body { overflow-x: hidden; }
