:root {
    /* Marca */
    --color-primary: #f09419;
    --color-primary-rgb: 240, 148, 25;
    --color-primary-dark: #a65d00;
    --color-primary-hover: #e18711;
    --color-primary-soft: rgba(var(--color-primary-rgb), 0.10);

    --color-primary-cesehsa: #00953a;

    /* Colores generales */
    --color-text: #252b33;
    --color-border: rgba(37, 43, 51, 0.08);
    --color-page-background: #f5f6f8;

    /* Tipografía */
    --font-family-base: system-ui, -apple-system, BlinkMacSystemFont,
                        "Segoe UI", sans-serif;

    /* Header */
    --header-max-width: 1400px;
    --header-height: 78px;
    --header-top: 18px;
    --header-side: 24px;
    --header-radius-large: 36px;
    --header-radius-small: 8px;
    --header-background: rgba(255, 255, 255, 0.96);

    /* Esquinas: superior izquierda e inferior derecha */
    --header-radius-large: 48px;

    /* Esquinas: superior derecha e inferior izquierda */
    --header-radius-small: 10px;

    /* Sombras */
    --header-shadow: 0 12px 40px rgba(25, 33, 45, 0.10);
    --dropdown-shadow: 0 18px 45px rgba(25, 33, 45, 0.12);
}

/* Base */

body {
    margin: 0;
    font-family: var(--font-family-base);
    color: var(--color-text);
    background: var(--color-page-background);
}

/* Reserva espacio para el header fijo */

.uh-main {
    padding-top: calc(var(--header-top) + var(--header-height) + 24px);
}

/* Quitamos el padding inicial - comienza desde arriba */
.uh-main {
    padding-top: 0;
}

/* Header flotante */

.uh-header {
    position: fixed;
    top: var(--header-top);
    left: 50%;
    z-index: 1030;

    width: calc(100% - var(--header-side) - var(--header-side));
    max-width: var(--header-max-width);

    transform: translateX(-50%);

    background: var(--header-background);
    border: 1px solid rgba(255, 255, 255, 0.75);

    border-radius:
        var(--header-radius-large)
        var(--header-radius-small)
        var(--header-radius-large)
        var(--header-radius-small);

    box-shadow: var(--header-shadow);

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.uh-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    min-height: var(--header-height);
    padding: 16px 32px;
}

/* Logo */

.uh-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;

    width: clamp(220px, 22vw, 300px);

    text-decoration: none;
}

.uh-brand img {
    display: block;
    width: 100%;
    height: 60px;

    object-fit: contain;
    object-position: left center;
}

/* Navegación */

.uh-navigation {
    margin-left: auto;
}

.uh-menu {
    display: flex;
    align-items: center;
    gap: 8px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.uh-menu__item {
    position: relative;
}

.uh-navlink {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 48px;
    padding: 12px 16px;

    border: 0;
    border-radius: 12px;
    background: transparent;

    color: var(--color-text);

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.uh-navlink:hover,
.uh-navlink[aria-expanded="true"],
.uh-navlink[aria-current="page"] {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
}

/* Flechas de los desplegables */

.uh-chevron {
    font-size: 10px;

    transition: transform 180ms ease;
}

.uh-navlink[aria-expanded="true"] .uh-chevron {
    transform: rotate(180deg);
}

/* Botón de contacto */

.uh-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    min-height: 50px;
    margin-left: 8px;
    padding: 13px 24px;

    border: 1px solid transparent;
    border-radius: 22px 7px 22px 7px;
    background: var(--color-primary);

    color: var(--color-text);

    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;

    box-shadow: 0 6px 16px rgba(var(--color-primary-rgb), 0.20);

    transition:
        background-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.uh-contact:hover {
    color: var(--color-text);
    background: var(--color-primary-hover);

    box-shadow: 0 9px 22px rgba(var(--color-primary-rgb), 0.28);
    transform: translateY(-2px);
}

.uh-contact i {
    font-size: 13px;

    transition: transform 180ms ease;
}

.uh-contact:hover i {
    transform: translateX(3px);
}

/* Desplegables */

.uh-dropdown {
    --bs-dropdown-spacer: 12px;

    width: 310px;
    min-width: 0;
    max-height: calc(100dvh - var(--header-top) - var(--header-height) - 32px);

    margin-top: 12px !important;
    padding: 9px;

    overflow-y: auto;

    border: 1px solid var(--color-border);
    border-radius: 22px 8px 22px 8px;

    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--dropdown-shadow);
}

.uh-dropdown--services {
    width: 380px;
}

.uh-dropdown .uh-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 56px;
    padding: 10px 12px;

    border-radius: 12px;

    color: var(--color-text);
    background: transparent;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;

    white-space: normal;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.uh-dropdown .uh-dropdown-link:hover,
.uh-dropdown .uh-dropdown-link:focus,
.uh-dropdown .uh-dropdown-link:active,
.uh-dropdown .uh-dropdown-link[aria-current="page"] {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
}

.uh-dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    border-radius: 10px;
    background: var(--color-primary-soft);

    color: var(--color-primary-dark);
    font-size: 15px;
}

/* Botón móvil */

.uh-menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 5px;

    width: 46px;
    height: 46px;
    padding: 10px;

    border: 1px solid var(--color-border);
    border-radius: 15px 6px 15px 6px;

    background: var(--color-primary-soft);

    cursor: pointer;
}

.uh-menu-button span {
    display: block;

    width: 22px;
    height: 2px;

    border-radius: 2px;
    background: var(--color-text);

    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.uh-menu-button[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.uh-menu-button[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.uh-menu-button[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Foco visible para navegación con teclado */

.uh-header a:focus-visible,
.uh-header button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 4px;
}

/* =========================================
   HEADER MÁS COMPACTO
========================================= */

.uh-header {
    width: calc(100% - var(--header-side) - var(--header-side));
    max-width: var(--header-max-width);
}

.uh-header__inner {
    min-height: var(--header-height);
    padding: 12px 26px;
    gap: 20px;
}

.uh-brand {
    width: 230px;
}

.uh-brand img {
    height: 48px;
}

.uh-menu {
    gap: 5px;
}

.uh-navlink {
    min-height: 44px;
    padding: 10px 13px;
    font-size: 14px;
}

/* Contacto */

.uh-contact {
    min-height: 44px;
    padding: 11px 20px;
    gap: 10px;

    border-radius: 18px 6px 18px 6px;

    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.uh-contact:hover,
.uh-contact:focus {
    color: #fff;
}

.uh-contact i {
    color: inherit;
    font-size: 16px;
}

.uh-contact:hover i {
    transform: none;
}

/* =========================================
   DESPLEGABLES PERSONALIZADOS
========================================= */

.uh-header [hidden] {
    display: none !important;
}

.uh-has-dropdown,
.uh-submenu-item {
    position: relative;
}

.uh-dropdown {
    position: absolute;
    top: 100%;
    left: 0;

    display: block;
    width: 290px;

    margin: 12px 0 0 !important;
    padding: 8px;

    list-style: none;
}

.uh-dropdown--services {
    right: 0;
    left: auto;
    width: 360px;
}

/* El desplegable de unidades permite menús laterales */

.uh-dropdown--units {
    max-height: none;
    overflow: visible;
}

.uh-dropdown .uh-dropdown-link {
    width: 100%;
    min-height: 48px;
    padding: 9px 11px;

    border: 0;

    font-family: inherit;
    font-size: 13px;
    text-align: left;

    cursor: pointer;
}

.uh-dropdown-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;

    border-radius: 9px;
    font-size: 14px;
}

.uh-submenu-toggle > span:nth-child(2) {
    flex: 1;
}

.uh-submenu-chevron {
    margin-left: auto;
    font-size: 10px;

    transition: transform 180ms ease;
}

.uh-submenu-toggle[aria-expanded="true"] {
    color: var(--color-primary-dark);
    background: var(--color-primary-soft);
}

/* =========================================
   SEGUNDO NIVEL: A MEDIDA / NACHI
========================================= */

.uh-submenu {
    position: absolute;
    top: -8px;
    left: calc(100% + 12px);
    z-index: 2;

    width: 280px;
    margin: 0;
    padding: 8px;

    overflow-y: auto;
    overscroll-behavior: contain;

    list-style: none;

    border: 1px solid var(--color-border);
    border-radius: 18px 7px 18px 7px;

    background: rgba(255, 255, 255, 0.99);
    box-shadow: var(--dropdown-shadow);
}

/* Se abre hacia la izquierda si falta espacio */

.uh-submenu-item.opens-left > .uh-submenu {
    right: calc(100% + 12px);
    left: auto;
}

.uh-submenu .uh-dropdown-link {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 13px;
}

.uh-submenu-divider {
    height: 1px;
    margin: 6px 10px;
    background: var(--color-border);
}

/******* Colorear enlace segun pagina navbar **************/

#uhMainMenu :is(a, button).uh-nav-current:not(.uh-nav-contact),
#uhMainMenu :is(a, button).uh-nav-parent-active:not(.uh-nav-contact) {
    color: var(--color-primary-dark, #a65d00);
}

#uhMainMenu a.uh-nav-current:not(.uh-nav-contact) {
    background-color: var(
        --color-primary-soft,
        rgba(240, 148, 25, 0.10)
    );
}

#uhMainMenu a.uh-nav-contact.uh-nav-current {
    color: #fff;
    background-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(240, 148, 25, 0.24);
}

/* =========================================
   TABLET Y MÓVIL
========================================= */

@media (max-width: 1199.98px) {
    :root {
        --header-height: 70px;
        --header-radius-large: 28px;
    }

    .uh-header__inner {
        padding: 10px 18px;
        gap: 0 12px;
    }

    .uh-brand {
        width: min(220px, calc(100% - 60px));
    }

    .uh-brand img {
        height: 42px;
    }

    .uh-navigation {
        margin-top: 10px;
    }

    .uh-navlink {
        min-height: 46px;
        padding: 11px 12px;
    }

    .uh-dropdown,
    .uh-dropdown--services {
        position: static !important;

        width: 100%;
        max-height: none;

        margin: 4px 0 8px !important;
        padding: 6px;

        border-radius: 14px;
        box-shadow: none;
    }

    .uh-submenu,
    .uh-submenu-item.opens-left > .uh-submenu {
        position: static;

        width: 100%;
        max-height: none;

        margin: 5px 0 8px;
        padding: 5px;

        border-radius: 12px;
        background: #fff;
        box-shadow: none;
    }

    .uh-submenu-toggle[aria-expanded="true"] .uh-submenu-chevron {
        transform: rotate(90deg);
    }

    .uh-contact {
        width: 100%;
        margin: 8px 0 0;
    }
}

@media (max-width: 575.98px) {
    .uh-header__inner {
        padding-right: 14px;
        padding-left: 14px;
    }
}

/* Escritorio */

@media (min-width: 1200px) {
    .uh-navigation {
        align-items: center;

        height: auto !important;
        overflow: visible !important;
    }
}

/* Tablet y móvil */

@media (max-width: 1199.98px) {
    :root {
        --header-height: 80px;
        --header-radius-large: 34px;
        --header-radius-small: 8px;
    }

    .uh-header {
        max-height: calc(100dvh - var(--header-top) - var(--header-top));

        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .uh-header__inner {
        flex-wrap: wrap;
        gap: 0 12px;

        padding: 12px 20px;
    }

    .uh-brand {
        width: min(260px, calc(100% - 64px));
    }

    .uh-brand img {
        height: 48px;
    }

    .uh-navigation {
        flex-basis: 100%;
        width: 100%;

        margin: 14px 0 0;
    }

    .uh-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;

        padding: 12px 0 4px;

        border-top: 1px solid var(--color-border);
    }

    .uh-navlink {
        justify-content: space-between;

        width: 100%;
        min-height: 50px;

        padding: 13px 14px;

        text-align: left;
        white-space: normal;
    }

    .uh-dropdown,
    .uh-dropdown--services {
        position: static !important;

        width: 100%;
        max-height: none;

        margin: 4px 0 8px !important;
        padding: 6px;

        transform: none !important;

        border: 1px solid var(--color-border);
        border-radius: 15px;

        background: rgba(var(--color-primary-rgb), 0.035);
        box-shadow: none;
    }

    .uh-dropdown .uh-dropdown-link {
        padding: 10px;
        font-size: 14px;
    }

    .uh-contact {
        width: 100%;
        margin: 8px 0 0;
    }
}

@media (max-width: 575.98px) {
    :root {
        --header-top: 12px;
        --header-side: 12px;
        --header-radius-large: 28px;
    }

    .uh-header__inner {
        padding-right: 16px;
        padding-left: 16px;
    }

    .uh-brand {
        width: min(225px, calc(100% - 60px));
    }

    .uh-brand img {
        height: 44px;
    }

    .uh-menu-button {
        width: 44px;
        height: 44px;
    }
}

/* Respeta la preferencia de movimiento reducido */

@media (prefers-reduced-motion: reduce) {
    .uh-header *,
    .uh-header *::before,
    .uh-header *::after {
        transition: none !important;
        animation: none !important;
    }
}