/**
 * Header global (templates/components/simple_header.twig). Reemplaza a theme-toggle.css.
 * Sin bordes blancos: la separación entre filas se logra con tonos de fondo, y cierra con el mismo filete rojo que el footer.
 */
.site-header {
    --sh-brand: var(--bs-primary, #EF2F23);
    --sh-brand-rgb: var(--bs-primary-rgb, 239, 47, 35);
    --sh-text: rgba(255, 255, 255, .85);
    position: relative;
    color: #fff;
    background: #101215;
    border-bottom: 3px solid var(--sh-brand);
}

/* Fila principal */
.site-header .sh-top {
    background:
        radial-gradient(45% 140% at 0% 0%, rgba(var(--sh-brand-rgb), .16), transparent 70%),
        linear-gradient(180deg, #1c2025 0%, #16191d 100%);
}
.site-header .sh-logo { display: block; flex: none; }
.site-header .sh-logo img { display: block; width: auto; height: 100%; max-height: 52px; }

.site-header .sh-desktop { align-items: center; gap: 2rem; padding: 1rem 0; }
.site-header .sh-desktop .sh-logo img { max-height: 58px; }
.site-header .sh-mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; }
.site-header .sh-mobile-bar .sh-logo img { max-height: 44px; }

/* Buscador (píldora con botón integrado) */
.site-header .sh-search { position: relative; display: flex; flex: 1; max-width: 560px; margin: 0; }
.site-header .sh-search .form-control {
    height: 2.9rem;
    padding: 0 3.4rem 0 1.25rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-header .sh-search .form-control::placeholder { color: rgba(255, 255, 255, .5); }
.site-header .sh-search .form-control:focus {
    background: #fff;
    color: #212529;
    border-color: #fff;
    box-shadow: 0 0 0 .25rem rgba(var(--sh-brand-rgb), .35);
}
.site-header .sh-search .form-control:focus::placeholder { color: #6c757d; }
.site-header .sh-search-btn {
    position: absolute;
    top: 50%;
    right: .3rem;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--sh-brand);
    transition: background-color .2s ease, transform .2s ease;
}
.site-header .sh-search-btn:hover { background: #d62a1f; transform: translateY(-50%) scale(1.06); }

/* Teléfonos */
.site-header .sh-contact { display: flex; gap: .75rem; margin-left: auto; }
.site-header .sh-phone {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .35rem .9rem .35rem .4rem;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: background-color .2s ease, border-color .2s ease;
}
.site-header .sh-phone:hover { color: #fff; background: rgba(var(--sh-brand-rgb), .2); border-color: rgba(var(--sh-brand-rgb), .5); }
.site-header .sh-phone-ico {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    font-size: .9rem;
    background: var(--sh-brand);
}
.site-header .sh-phone-txt { display: flex; flex-direction: column; line-height: 1.15; }
.site-header .sh-phone-txt small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.site-header .sh-phone-txt strong { font-size: .95rem; font-weight: 600; }

/* WhatsApp: misma píldora que el teléfono, con el verde de WhatsApp (DESIGN_SYSTEM: degradado #25d366 → #128c4a) */
.site-header .sh-wa .sh-phone-ico { font-size: 1.15rem; background: linear-gradient(135deg, #25d366 0%, #128c4a 100%); }
.site-header .sh-wa:hover { background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .5); }

/* Botones de iconos (móvil) */
.site-header .sh-actions { display: flex; align-items: center; gap: .25rem; }
.site-header .sh-icon-btn {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    font-size: 1.05rem;
    color: #fff;
    background: transparent;
    transition: background-color .2s ease;
}
.site-header .sh-icon-btn:hover,
.site-header .sh-icon-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .12); }

/* Navegación */
.site-header .sh-nav { background: #101215; }
.site-header .sh-nav .navbar-nav { gap: .25rem; }
.site-header .sh-nav .nav-link,
.site-header .sh-offcanvas .nav-link {
    position: relative;
    padding: .85rem 1rem;
    font-size: .93rem;
    font-weight: 500;
    color: var(--sh-text);
    transition: color .2s ease;
}
.site-header .sh-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: .45rem;
    height: 2px;
    border-radius: 2px;
    background: var(--sh-brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.site-header .sh-nav .nav-link:hover,
.site-header .sh-nav .nav-link:focus-visible,
.site-header .sh-offcanvas .nav-link:hover { color: #fff; }
.site-header .sh-nav .nav-link:hover::after,
.site-header .sh-nav .nav-link:focus-visible::after { transform: scaleX(1); }
.site-header .nav-link i { color: #ff6a60; }

/* Menú móvil */
.site-header .sh-offcanvas { color: #fff; background: #16191d; }
.site-header .sh-offcanvas .offcanvas-header { border-bottom: 0; }
.site-header .sh-offcanvas .nav-link { padding: .8rem 0; font-size: 1.05rem; }

.site-header a:focus-visible,
.site-header button:focus-visible { outline: 2px solid #ff8b82; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .site-header * { transition: none !important; }
}
@media print { .site-header { display: none; } }

/* WhatsApp en móvil: ícono verde para distinguirlo del teléfono */
.site-header .sh-icon-btn.sh-icon-wa { color: #25d366; font-size: 1.3rem; }
