﻿/* =====================================================================
   Login Honduras — estilos globales (cargado por Root.master)
   Aquí vive todo lo compartido: tokens, navbar, footer, WhatsApp,
   galería de imágenes y utilidades. Cada página solo agrega lo propio.
   ===================================================================== */

:root {
    --lh-nav-h: 64px;
    --lh-bg-dark: #070A13;
    --lh-navy: #0B1424;
    --lh-surface: #0F1A2E;
    --lh-border: rgba(148, 163, 184, 0.14);
    --lh-blue: #3B82F6;
    --lh-blue-brand: #4882D2;
    --lh-green: #10B981;
    --lh-text: #E2E8F0;
    --lh-muted: #94A3B8;
    --lh-radius: 16px;
    --lh-font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
    /* Las anclas (#servicios, #proyectos) no quedan tapadas por el navbar fijo */
    scroll-padding-top: calc(var(--lh-nav-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--lh-font);
    /* Compensa el navbar fijo en TODAS las páginas: ya no hace falta
       margin-top: 80/90/110/120px en cada una */
    padding-top: var(--lh-nav-h);
    overflow-x: hidden;
    min-height: 100vh;
}

.lh-form {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--lh-nav-h));
}

.lh-main {
    flex: 1 0 auto;
}

img {
    max-width: 100%;
}

/* ===================== NAVBAR ===================== */
.lh-navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1030;
    min-height: var(--lh-nav-h);
    padding: 0;
    background: rgba(9, 14, 26, 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.16);
    transition: background .3s ease, box-shadow .3s ease;
}

.lh-navbar.is-scrolled {
    background: rgba(9, 14, 26, 0.97);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.lh-navbar .container {
    min-height: var(--lh-nav-h);
}

.lh-brand {
    min-height: var(--lh-nav-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin-right: 1rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.lh-brand img {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.lh-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    min-width: 0;
}

.lh-brand-text strong {
    font-size: 1.05rem;
    letter-spacing: .5px;
    color: #fff;
}

.lh-brand-text small {
    font-size: .72rem;
    color: var(--lh-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lh-navbar .nav-link {
    position: relative;
    color: #CBD5E1;
    font-weight: 500;
    font-size: .95rem;
    padding: .55rem .8rem;
    border-radius: 8px;
    transition: color .2s ease, background-color .2s ease;
}

.lh-navbar .nav-link:hover,
.lh-navbar .nav-link:focus-visible,
.lh-navbar .nav-link.show {
    color: #fff;
}

.lh-navbar .nav-link.active {
    color: #fff;
}

/* Subrayado "láser" en escritorio */
@media (min-width: 992px) {
    .lh-navbar .nav-link:not(.dropdown-toggle)::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 2px;
        width: 0;
        height: 2px;
        border-radius: 2px;
        background: linear-gradient(90deg, var(--lh-blue), #60A5FA);
        transform: translateX(-50%);
        transition: width .3s cubic-bezier(.2, .9, .2, 1);
    }

    .lh-navbar .nav-link:not(.dropdown-toggle):hover::after,
    .lh-navbar .nav-link.active:not(.dropdown-toggle)::after {
        width: calc(100% - 1.6rem);
    }

    .lh-navbar .dropdown-toggle.active {
        box-shadow: inset 0 -2px 0 var(--lh-blue);
        border-radius: 8px 8px 0 0;
    }
}

.lh-navbar .dropdown-menu {
    background: #0F1A2E;
    border: 1px solid var(--lh-border);
    border-radius: 12px;
    padding: .4rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.lh-navbar .dropdown-item {
    color: #CBD5E1;
    border-radius: 8px;
    padding: .55rem .8rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.lh-navbar .dropdown-item:hover,
.lh-navbar .dropdown-item:focus,
.lh-navbar .dropdown-item.active {
    background: rgba(59, 130, 246, .14);
    color: #fff;
}

.lh-navbar .dropdown-item.disabled {
    color: #64748B;
}

.lh-soon {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, .4);
    border-radius: 50px;
    padding: 1px 7px;
    margin-left: auto;
}

.lh-cta {
    border-radius: 50px;
    font-weight: 600;
    padding: .5rem 1.1rem;
    white-space: nowrap;
}

.lh-toggler {
    border: 1px solid var(--lh-border);
    color: #fff;
    padding: .35rem .6rem;
    font-size: 1.4rem;
    line-height: 1;
    border-radius: 10px;
}

.lh-toggler:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .35);
}

/* Menú móvil */
@media (max-width: 991.98px) {
    .lh-navbar .navbar-collapse {
        max-height: calc(100vh - var(--lh-nav-h));
        overflow-y: auto;
        padding: .5rem 0 1rem;
        border-top: 1px solid var(--lh-border);
    }

    .lh-navbar .nav-link {
        padding: .8rem .75rem;
        font-size: 1rem;
    }

    .lh-navbar .nav-link.active {
        background: rgba(59, 130, 246, .14);
    }

    .lh-navbar .dropdown-menu {
        background: rgba(255, 255, 255, .03);
        border: 0;
        box-shadow: none;
        padding: .25rem 0 .25rem .75rem;
        margin: 0 0 .25rem;
    }

    .lh-navbar.menu-open {
        background: rgba(9, 14, 26, .98);
    }

    .lh-cta {
        width: 100%;
        margin-top: .5rem;
        padding: .75rem 1rem;
    }
}

@media (max-width: 380px) {
    .lh-brand-text small {
        display: none;
    }
}

/* ===================== FOOTER ===================== */
.lh-footer {
    flex-shrink: 0;
    margin-top: 4rem;
    background: var(--lh-navy);
    color: var(--lh-muted);
    border-top: 1px solid rgba(59, 130, 246, .14);
    font-size: .92rem;
}

.lh-footer h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: .9rem;
}

.lh-footer a {
    color: var(--lh-muted);
    text-decoration: none;
}

.lh-footer a:hover {
    color: #fff;
}

.lh-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lh-footer li {
    margin-bottom: .45rem;
}

.lh-footer-bottom {
    border-top: 1px solid var(--lh-border);
    font-size: .82rem;
}

/* ===================== WHATSAPP FLOTANTE ===================== */
.lh-whatsapp {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 1040;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(37, 211, 102, .35);
    transition: transform .25s ease, box-shadow .25s ease;
}

.lh-whatsapp:hover,
.lh-whatsapp:focus-visible {
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 12px 35px rgba(37, 211, 102, .55);
}

.lh-whatsapp-tip {
    position: absolute;
    right: 74px;
    background: #1E293B;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.lh-whatsapp:hover .lh-whatsapp-tip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 575.98px) {
    .lh-whatsapp {
        width: 54px;
        height: 54px;
        font-size: 26px;
    }

    .lh-whatsapp-tip {
        display: none;
    }
}

/* ===================== GALERÍA (Markets) ===================== */
#lhGaleria .modal-content {
    background: transparent;
    border: 0;
}

#lhGaleria .lh-gal-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

#lhGaleriaImg {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    user-select: none;
}

.lh-gal-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(15, 23, 42, .7);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lh-gal-btn:hover {
    background: var(--lh-blue);
}

.lh-gal-prev { left: 8px; }
.lh-gal-next { right: 8px; }

.lh-gal-close {
    position: absolute;
    top: -46px;
    right: 0;
    filter: invert(1);
    opacity: .9;
}

.lh-gal-count {
    color: #fff;
    text-align: center;
    margin-top: .6rem;
    font-size: .9rem;
    opacity: .85;
}

/* Contador de fotos sobre la imagen del producto */
.photo-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, .75);
    color: #fff;
    font-size: .75rem;
    border-radius: 50px;
    padding: 2px 9px;
}

[data-gallery] {
    cursor: zoom-in;
}

/* ===================== ACCESIBILIDAD ===================== */
.lh-skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 2000;
    background: #fff;
    color: #000;
    padding: .5rem 1rem;
    border-radius: 8px;
}

.lh-skip:focus {
    left: 8px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
