/* =========================================================
   BIOHEALTH SHARED COMPONENTS
   Fuente maestra: index-prueba.html
   Componentes: base, header, botones, dropdown, footer,
   widget flotante, menu movil y responsive compartido.
   ========================================================= */

:root {
    --navy: #031b2f;
    --navy-light: #062845;
    --blue: #0b527a;
    --blue-soft: #eaf2f7;
    --green: #76bd3c;
    --green-glow: rgba(118, 189, 60, 0.32);
    --ink: #193246;
    --muted: #667b89;
    --soft: #f4f8fa;
    --line: #dce6e9;
    --white: #ffffff;
    --shadow-subtle: 0 4px 20px rgba(3, 27, 47, 0.05);
    --shadow: 0 16px 40px rgba(4, 37, 61, 0.10);
    --shadow-hover: 0 22px 48px rgba(4, 37, 61, 0.16);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

.wrap {
    width: min(1200px, 92%);
    margin: auto;
}

/* RAYA DIAGONAL VERDE EN HEROES INTERIORES */
.page-header {
    overflow: hidden;
}

.page-header::after {
    content: "";
    position: absolute;
    left: 57%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
            transparent,
            var(--green),
            transparent);
    z-index: 1;
    opacity: 0.75;
    transform: skewX(-7deg);
    pointer-events: none;
}

.page-header>.wrap {
    position: relative;
    z-index: 2;
}

/* ========================= HEADER ========================= */

.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(220, 230, 233, 0.85);
    transition: all 0.3s ease;
}

.navin {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand img {
    height: 48px;
    width: auto;
    display: block;
    transition: transform 0.25s var(--ease);
}

.brand:hover img {
    transform: scale(1.02);
}

.links {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
}

.links>a {
    position: relative;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.links>a:hover {
    color: var(--blue);
}

.links a.active {
    color: var(--blue);
}

.links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: var(--green);
    border-radius: 2px;
}

.nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--navy) !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-phone:hover {
    color: var(--blue) !important;
    background: rgba(11, 82, 122, 0.06);
}

.nav-phone svg {
    display: block;
    flex-shrink: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f4f8;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #dce6ed;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1 !important;
}

.lang-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #627887;
    text-decoration: none;
    line-height: 1 !important;
    transition: color 0.2s ease;
}

.lang-item:hover {
    color: var(--navy);
}

.lang-item.active {
    color: var(--blue);
    font-weight: 900;
}

.lang-divider {
    color: #a9bac6;
    font-size: 10px;
    user-select: none;
    line-height: 1 !important;
}

.flag-icon {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    display: block;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px !important;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    white-space: nowrap;
}

.btn-green {
    background: var(--green);
    color: #fff;
    box-shadow: none !important;
}

.btn-green:hover {
    background: #68ab32;
    transform: translateY(-2px);
    box-shadow: none !important;
}

.btn-green:focus,
.btn-green:focus-visible {
    box-shadow: none !important;
}

.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    transform: translateY(-2px);
}

.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.drop-arrow {
    transition: transform 0.25s var(--ease);
}

.nav-dropdown:hover .dropdown-toggle {
    color: var(--blue);
}

.nav-dropdown:hover .drop-arrow {
    transform: rotate(180deg);
    stroke: var(--green);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 16px;
    background: #ffffff;
    min-width: 320px;
    border-radius: 10px;
    box-shadow: 0 22px 50px rgba(3, 27, 47, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
    border: 1px solid #e3ebee;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.24s var(--ease);
    z-index: 100;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 11px 20px;
    text-transform: none !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: #f4f8fb;
    border-left-color: var(--green);
    padding-left: 24px;
}

.dropdown-item strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

.dropdown-item:hover strong {
    color: var(--blue);
}

.dropdown-item span {
    font-size: 11px;
    color: #718491;
    margin-top: 2px;
}

/* ========================= FOOTER ========================= */

.site-footer {
    background: #031b2f !important;
    padding: 65px 0 25px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #8fa5b5 !important;
    font-size: 13px !important;
}

.footer-grid-pro {
    display: grid !important;
    grid-template-columns: 1.25fr 1fr 1.2fr 0.9fr !important;
    gap: 35px !important;
    align-items: start !important;
    padding-bottom: 45px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.f-col h4 {
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    margin: 0 0 18px !important;
}

.f-contact-cards {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.f-card-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding: 10px 14px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.f-card-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(118, 189, 60, 0.5) !important;
    transform: translateY(-2px);
}

.f-icon-box {
    width: 32px !important;
    height: 32px !important;
    border-radius: 6px !important;
    background: rgba(118, 189, 60, 0.12) !important;
    color: #76bd3c !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
}

.f-card-item small {
    display: block !important;
    font-size: 9.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #647b8a !important;
}

.f-card-item strong {
    display: block !important;
    font-size: 12.5px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}

.f-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.f-nav a {
    color: #8fa5b5 !important;
    text-decoration: none !important;
    font-size: 12.5px !important;
    transition: all 0.2s ease !important;
    display: inline-block !important;
}

.f-nav a:hover {
    color: #ffffff !important;
    transform: translateX(4px) !important;
}

.f-guardia-box {
    background: linear-gradient(145deg, rgba(11, 82, 122, 0.25), rgba(3, 27, 47, 0.5)) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 8px !important;
    padding: 18px !important;
}

.f-guardia-header {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #a0e663 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    margin-bottom: 8px !important;
}

.f-dot {
    width: 7px !important;
    height: 7px !important;
    background: #76bd3c !important;
    border-radius: 50% !important;
    display: inline-block !important;
    box-shadow: 0 0 8px #76bd3c !important;
    animation: livePulse 2s infinite ease-in-out !important;
}

.f-guardia-box p {
    font-size: 11.5px !important;
    color: #7e94a3 !important;
    line-height: 1.5 !important;
    margin: 0 0 12px !important;
}

.f-wa-btn {
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    transition: color 0.2s ease !important;
}

.f-wa-btn:hover {
    color: #76bd3c !important;
}

.f-col-logo-right {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.f-logo-wrap {
    text-align: right !important;
}

.f-logo-wrap img {
    height: 54px !important;
    width: auto !important;
    display: inline-block !important;
    margin-bottom: 8px !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.95;
}

.f-logo-wrap span {
    display: block !important;
    font-size: 10.5px !important;
    color: #637b8b !important;
    letter-spacing: 0.02em !important;
}

.footer-bottom-bar {
    padding-top: 22px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 11.5px !important;
    color: #556c7a !important;
}

.footer-bottom-bar p {
    margin: 0 !important;
}

.f-legal {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.f-legal a {
    color: #728b9c !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.f-legal a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.f-legal span {
    color: #314450 !important;
    font-size: 9px !important;
}

/* ==================== WIDGET FLOTANTE ==================== */

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

.floating-contact {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fc-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding-top: 10px;
}

.fc-pill {
    background: #ffffff;
    color: #193246;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    border-radius: 20px;
    box-shadow: 0 6px 22px rgba(3, 27, 47, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    transition: opacity 0.2s ease, transform 0.2s ease;
    user-select: none;
    white-space: nowrap;
}

.fc-pill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 7px solid #ffffff;
}

.fc-circle-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a466c, #031b2f);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 28px rgba(3, 27, 47, 0.35);
    cursor: pointer;
    transition: transform 0.2s var(--ease);
}

.fc-circle-btn:hover {
    transform: scale(1.06);
}

.fc-icon-msg {
    display: block;
}

.fc-icon-close {
    display: none;
}

.fc-menu {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 310px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 22px 55px rgba(3, 27, 47, 0.25), 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1ebf0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.22s ease;
    transition-delay: 0.25s;
}

.fc-menu::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 35px;
    background: transparent;
}

.fc-header {
    background: #031b2f;
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fc-status-dot {
    width: 9px;
    height: 9px;
    background: #76bd3c;
    border-radius: 50%;
    box-shadow: 0 0 10px #76bd3c;
    animation: livePulse 2s infinite;
}

.fc-header strong {
    display: block;
    font-size: 13px;
}

.fc-header small {
    display: block;
    font-size: 10.5px;
    color: #9cb3c2;
}

.fc-options {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #fbfdfe;
}

.fc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
    background: #ffffff;
    border: 1px solid #edf3f6;
}

.fc-item:hover {
    background: #f0f7fb;
    border-color: #b7d78a;
    transform: translateX(-3px);
}

.fc-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.fc-icon-wa {
    background: rgba(37, 211, 102, 0.14);
    color: #20b857;
}

.fc-icon-tel {
    background: rgba(11, 82, 122, 0.12);
    color: var(--blue);
}

.fc-icon-mail {
    background: rgba(118, 189, 60, 0.14);
    color: var(--green);
}

.fc-info strong {
    display: block;
    font-size: 12.5px;
    color: #031b2f;
    line-height: 1.3;
}

.fc-info span {
    display: block;
    font-size: 11px;
    color: #718491;
}

.floating-contact.active .fc-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
}

.floating-contact.active .fc-pill {
    opacity: 0;
    transform: translateX(8px);
}

.floating-contact.active .fc-icon-msg {
    display: none;
}

.floating-contact.active .fc-icon-close {
    display: block;
}

/* ======================= MENU MOVIL ======================= */

.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--navy);
    border-radius: 6px;
}

.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 27, 47, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(3, 27, 47, 0.2);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: right 0.35s var(--ease);
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer.active {
    right: 0;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #e3ebee;
    margin-bottom: 20px;
}

.mobile-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--navy);
    padding: 4px;
    display: grid;
    place-items: center;
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-links a {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--navy);
    text-decoration: none;
    padding: 15px 0;
    border-bottom: 1px solid #f0f4f8;
    transition: color 0.2s ease;
}

.mobile-links a:hover,
.mobile-links a.active {
    color: var(--blue);
}

.mobile-drawer-footer {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    padding: 15px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--navy);
    cursor: pointer;
    font-family: inherit;
}

.mobile-accordion-toggle svg {
    transition: transform 0.25s ease;
}

.mobile-accordion-toggle.open svg {
    transform: rotate(180deg);
    stroke: var(--green);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: max-height 0.35s var(--ease), padding 0.35s ease;
}

.mobile-submenu.open {
    max-height: 350px;
    padding: 12px 14px;
    margin: 6px 0 10px;
}

.mobile-submenu a {
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    color: #556c7a !important;
    border-bottom: none !important;
    padding: 4px 0 !important;
}

.mobile-submenu a:hover {
    color: var(--blue) !important;
}

/* ======================= RESPONSIVE ======================= */

@media (max-width: 950px) {
    .links {
        display: none;
    }

    .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .footer-grid-pro {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px !important;
    }

    .f-col-logo-right {
        justify-content: flex-start !important;
    }

    .f-logo-wrap {
        text-align: left !important;
    }
}

@media (max-width: 650px) {
    .nav {
        position: sticky !important;
        top: 0;
        z-index: 1200;
    }

    .hamburger-btn {
        position: relative;
        z-index: 1201;
        pointer-events: auto;
    }

    .mobile-drawer-overlay {
        z-index: 1500;
    }

    .mobile-drawer {
        z-index: 1501;
        right: 0;
        transform: translateX(105%);
        transition: transform 0.35s var(--ease);
    }

    .mobile-drawer.active {
        right: 0;
        transform: translateX(0);
    }

    main,
    footer {
        max-width: 100%;
        overflow-x: clip;
    }

    .footer-grid-pro {
        grid-template-columns: 1fr !important;
    }

    .footer-bottom-bar {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }

}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}