/*
 Theme Name:   Laynox Child
 Theme URI:    https://laynox.com
 Description:  Tema hijo de Neve para Laynox — Servicio técnico de calderas
 Author:       Cercai (Dorian)
 Author URI:   https://cercai.com
 Template:     neve
 Version:      2.1.3
 License:      GNU General Public License v2 or later
 Text Domain:  laynox-child
*/

/* ============================================
   LAYNOX DESIGN SYSTEM — Variables globales
   Mismo sistema que /cotizar-servicio/
   ============================================ */

:root {
    --lx-red: #e83f20;
    --lx-orange: #fa904c;
    --lx-black: #1f2025;
    --lx-gray: #f4f6f8;
    --lx-white: #ffffff;
    --lx-whatsapp: #25d366;
}

/* ============================================
   1. CUSTOM HEADER — Laynox
   ============================================ */

/* Ocultar header default de Neve completamente */
.header .hfg_header,
#header-menu-sidebar,
.header-menu-sidebar-overlay {
    display: none !important;
}

/* Header custom */
.lx-header {
    position: sticky;
    top: 0;
    z-index: 9998;
    background: var(--lx-white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.lx-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    min-height: 70px;
}

/* Logo */
.lx-logo img {
    width: 120px;
    height: auto;
    display: block;
}

/* Desktop nav */
.lx-nav-desktop {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.lx-nav-desktop > li {
    position: relative;
}

.lx-nav-desktop > li > a {
    display: block;
    padding: 10px 16px;
    color: var(--lx-black);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s;
}

.lx-nav-desktop > li > a:hover {
    color: var(--lx-red);
}

/* CTA button in nav */
.lx-nav-cta a {
    background: var(--lx-red) !important;
    color: var(--lx-white) !important;
    padding: 10px 24px !important;
    border-radius: 4px !important;
    font-weight: 700 !important;
    transition: background 0.3s !important;
}

.lx-nav-cta a:hover {
    background: var(--lx-orange) !important;
}

/* Dropdown */
.lx-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--lx-white);
    border-top: 3px solid var(--lx-red);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 4px 4px;
    min-width: 250px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 100;
}

.lx-nav-desktop > li:hover > .lx-dropdown,
.lx-nav-desktop > li:focus-within > .lx-dropdown {
    display: block;
}

.lx-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--lx-black);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.lx-dropdown li a:hover {
    background: var(--lx-gray);
    color: var(--lx-red);
}

/* Hamburger button */
.lx-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.lx-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--lx-black);
    transition: transform 0.3s, opacity 0.3s;
}

.lx-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.lx-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.lx-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav panel */
.lx-nav-mobile {
    display: none;
    background: var(--lx-black);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.lx-nav-mobile.active {
    display: block;
    max-height: 500px;
}

.lx-nav-mobile ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lx-nav-mobile > ul > li > a {
    display: block;
    padding: 14px 20px;
    color: var(--lx-white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-transform: uppercase;
}

.lx-nav-mobile > ul > li > a:hover {
    color: var(--lx-orange);
}

.lx-mobile-sub {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lx-mobile-sub li a {
    display: block;
    padding: 10px 20px 10px 35px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.lx-mobile-sub li a:hover {
    color: var(--lx-orange);
}

.lx-mobile-cta {
    padding: 15px 20px;
}

.lx-mobile-cta a {
    display: block;
    background: var(--lx-red);
    color: var(--lx-white) !important;
    text-align: center;
    padding: 14px 20px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 960px) {
    .lx-nav-desktop {
        display: none !important;
    }
    .lx-hamburger {
        display: flex !important;
    }
    .lx-logo img {
        width: 90px;
    }
    .lx-header-inner {
        min-height: 55px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .lx-logo img {
        width: 75px;
    }
}

/* Ocultar "Skip to content" visualmente */
.neve-skip-link,
.skip-link,
a[href="#content"].show-on-focus,
a.skip-link {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
}

.neve-skip-link:focus,
a.skip-link:focus {
    position: fixed !important;
    top: 5px !important;
    left: 5px !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    z-index: 99999;
    background: var(--lx-white);
    padding: 10px 15px;
    font-weight: 700;
}

/* ============================================
   4. FIX: Contenido con HTML completo dentro de WP
   Páginas que tienen <!DOCTYPE html> en el content
   ============================================ */

/* Ocultar los tags HTML rotos que WP wrappea en <p> */
.neve-main > .container .nv-content-wrap > p:first-child {
    display: none;
}

/* Fix para páginas que tienen un HTML doc completo como contenido */
.nv-content-wrap > p > br:first-child {
    display: none;
}

/* Páginas con laynox-full-landing: quitar padding del contenedor padre */
.page .nv-content-wrap:has(.laynox-full-landing),
.page .nv-single-page-wrap:has(.laynox-full-landing) {
    padding: 0 !important;
    max-width: 100% !important;
}

/* Full width para las landing pages */
.laynox-full-landing {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow-x: hidden;
}

/* ============================================
   5. STICKY CTA MOBILE — WhatsApp bottom bar
   ============================================ */

.lx-sticky-cta-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--lx-red);
    padding: 12px 20px;
    text-align: center;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.lx-sticky-cta-mobile a {
    color: white;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .lx-sticky-cta-mobile {
        display: block;
    }

    body {
        padding-bottom: 60px;
    }
}

/* ============================================
   6. FULL WIDTH para pagebuilder pages
   ============================================ */

.page-template-template-pagebuilder-full-width .nv-sidebar-wrap {
    display: none !important;
}

.page-template-template-pagebuilder-full-width .nv-single-page-wrap {
    max-width: 100% !important;
    padding: 0 !important;
}

/* Container de Neve: full width en pages */
.page .neve-main > .container {
    max-width: 100% !important;
    padding: 0 !important;
}

.page .nv-single-page-wrap.col {
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

/* ============================================
   7. FOOTER — Consistente con marca
   ============================================ */

.footer-top {
    --bgcolor: var(--lx-black) !important;
}

.footer-bottom {
    --bgcolor: #0a0a0a !important;
}

/* Fix: Neve renderiza footer-bottom 2 veces (desktop + mobile) */
@media (max-width: 960px) {
    .footer--row.footer-bottom.hide-on-mobile,
    .footer--row.footer-bottom.hide-on-tablet {
        display: none !important;
    }
}
@media (min-width: 961px) {
    .footer--row.footer-bottom.hide-on-desktop {
        display: none !important;
    }
}

/* ============================================
   8. ELEMENTOR FIXES — Elementos rotos
   ============================================ */

/* Bloques negros de Elementor que no cargan (licencia vencida) */
.elementor-widget-container img[src=""] {
    display: none !important;
}

/* Elementor sections vacías */
.e-con:empty {
    display: none !important;
}

/* Fix para secciones de Elementor con fondo negro sin contenido visible */
.elementor-section .elementor-background-overlay {
    pointer-events: none;
}

/* ============================================
   9. GENERAL — Tipografía y espaciado
   ============================================ */

body {
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Links globales */
a {
    transition: color 0.2s ease;
}

/* Imágenes responsive */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   10b. TEXT CONTRAST — Subtítulos en secciones con fondo claro
   Las páginas de servicio usan #666 que queda muy claro sobre blanco
   ============================================ */

.section-header p {
    color: #444 !important;
}

.why-card p {
    color: #444 !important;
}

.content-section p {
    color: #444 !important;
}

/* ============================================
   10. MOBILE-FIRST ADJUSTMENTS
   ============================================ */

@media (max-width: 960px) {
    /* Header compacto en mobile */
    .header-main {
        --height: 60px !important;
    }

    /* Ocultar header-bottom en mobile/tablet (ya se oculta por Neve) */
    .header-bottom {
        display: none;
    }

    /* Full width content */
    .page .neve-main > .container {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Ajustes extra para pantallas muy pequeñas */
    .header-main {
        --height: 55px !important;
    }

    .builder-item--logo {
        --maxwidth: 80px !important;
    }

    .site-logo img.neve-site-logo {
        width: 80px !important;
        max-width: 80px !important;
    }
}

