.navbar-root {
    width: 100%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    z-index: 50;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}
/* --- Estructura base del navbar (opcional) --- */
.cdd-navbar {
    width: 100%;
}

/* Topbar */
.cdd-topbar {
    background: #008f4a;
    color: #fff;
    font-size: 14px;
}
.cdd-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cdd-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.cdd-brand-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
}
.cdd-brand-title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cdd-topbar-right {
    display: none;
    align-items: center;
    gap: 16px;
}
.cdd-contact-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cdd-contact-link:hover {
    text-decoration: underline;
}

.cdd-socials {
    display: inline-flex;
    gap: 8px;
}
.cdd-social-link {
    color: #fff;
    text-decoration: none;
    opacity: 0.95;
}
.cdd-social-link:hover {
    opacity: 1;
}

/* Idioma móvil compacto */
.cdd-lang-mobile {
    display: block;
    max-width: 180px;
    width: 36%;
}

/* Menubar */
.cdd-menubar {
    background: #00a657;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.45);
}
.cdd-menubar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 16px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Desktop menu */
.cdd-menu-desktop {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
    font-weight: 700;
    color: #fff;
}
.cdd-menu-item {
    position: relative;
}
.cdd-menu-link {
    color: #fff;
    text-decoration: none;
}
.cdd-menu-link:hover {
    color: #5f4191;
}
.cdd-caret {
    font-size: 10px;
    opacity: 0.9;
}

.cdd-submenu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    margin-top: 8px;
    min-width: 220px;
    background: #fff;
    color: #008f4a;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    list-style: none;
    padding: 6px 0;
    visibility: hidden;
    opacity: 0;
    transition: 0.2s;
    z-index: 50;
}
.cdd-menu-item:hover > .cdd-submenu {
    visibility: visible;
    opacity: 1;
}

.cdd-submenu--right {
    position: absolute;
    left: 100%;
    top: 0;
    transform: none;
}

/* Submenu items */
.cdd-submenu-item {
}
.cdd-submenu-link {
    display: block;
    padding: 8px 12px;
    color: #008f4a;
    text-decoration: none;
    font-weight: 600;
}
.cdd-submenu-link:hover {
    background: #008f4a;
    color: #fff;
}

/* Mobile hamburger + menu */
.cdd-hamburger {
    background: none;
    border: 0;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}
.cdd-menu-mobile {
    display: none;
    list-style: none;
    margin: 0;
    padding: 10px 16px;
    font-weight: 700;
    color: #fff;
}
.cdd-menu-mobile.hidden {
    display: none;
}
.cdd-menu-mobile.is-open {
    display: block;
}

.cdd-m-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 0;
}
.cdd-m-link,
.cdd-m-sublink {
    color: #fff;
    text-decoration: none;
}
.cdd-m-acc-btn {
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 6px;
}
.cdd-m-sub.hidden {
    display: none;
}

/* Breakpoints */
@media (min-width: 992px) {
    .cdd-topbar-right {
        display: inline-flex;
    }
    .cdd-lang-mobile {
        display: none;
    }
    .cdd-menu-desktop {
        display: flex;
    }
    .cdd-hamburger,
    .cdd-menu-mobile {
        display: none;
    }
}

/* Botón tipo píldora */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    background: #00a657;
    color: #fff;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.85);
    transition:
        filter 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}
.lang-btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}
.lang-btn:active {
    transform: translateY(1px);
}

/* Dropdown base */
.lang-dropdown {
    position: relative;
}
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    min-width: 100px;
    border-radius: 10px;
    background: #00a657;
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0;
    z-index: 50;
}
.lang-menu.show {
    display: block;
}
.lang-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
}
.lang-menu .dropdown-item:hover {
    background: #008f4a;
}

/* Ocultar el banner/iframe de Google */
.goog-te-banner-frame.skiptranslate,
body > .skiptranslate,
body > iframe.skiptranslate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
}
body {
    top: 0 !important;
}

/* Limpiar gadget de GT si llega a mostrarse */
#google_translate_element .goog-te-gadget {
    font-size: 0 !important;
}
#google_translate_element img.goog-te-gadget-icon {
    display: none !important;
}
#google_translate_element .goog-te-combo {
    font-size: 14px !important;
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
}

/* Responsive: en móvil el menú se integra al flujo, y ocultamos el ícono */
@media (max-width: 991.98px) {
    .lang-menu {
        position: static !important;
        display: none;
        margin-top: 0.25rem;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }
    .lang-menu.show {
        display: block;
    }
    .lang-icon {
        display: none;
    } /* sin icono en pantallas pequeñas */
}

/* ===== Topbar más baja y contenidos a los extremos ===== */
.cdd-topbar {
    background: #008f4a;
    color: #fff;
    font-size: 14px;
}

/* Menor altura: reduce padding y define min-height */
.cdd-topbar-inner {
    max-width: 1200px; /* si no usas container, quítalo */
    margin: 0 auto;
    padding: 4px 16px; /* ↓ antes 8px; ahora más bajo */
    min-height: 36px; /* asegura franja delgada */
    display: flex;
    align-items: center;
    justify-content: space-between; /* extremos */
    gap: 12px;
}

/* Marca compacta */
.cdd-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}
.cdd-brand-logo {
    width: 20px; /* ↓ era 24px */
    height: 20px;
    object-fit: contain;
    background: #fff;
    border-radius: 4px;
}
.cdd-brand-title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bloque derecho de topbar (visible en desktop) */
.cdd-topbar-right {
    display: none;
    align-items: center;
    gap: 14px;
}
.cdd-contact-link {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cdd-contact-link:hover {
    text-decoration: underline;
}
.cdd-socials {
    display: inline-flex;
    gap: 8px;
}
.cdd-social-link {
    color: #fff;
    text-decoration: none;
    opacity: 0.95;
}
.cdd-social-link:hover {
    opacity: 1;
}

/* Idioma móvil compacto (tercer elemento de la fila en mobile) */
.cdd-lang-mobile {
    display: block;
    max-width: 180px;
    width: 36%;
}

/* ===== Menubar: hamburger a la derecha ===== */
.cdd-menubar {
    background: #00a657;
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.45);
}
.cdd-menubar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
}

/* Menú desktop centrado (si lo quieres centrado) */
.cdd-menu-desktop {
    display: none; /* se habilita en desktop más abajo */
    list-style: none;
    margin: 0 auto; /* << centra el ul */
    padding: 0;
    gap: 24px;
    font-weight: 700;
    color: #fff;
}

/* Empuja SIEMPRE la hamburguesa a la derecha */
.cdd-hamburger {
    background: none;
    border: 0;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    margin-left: auto; /* << clave para que quede a la derecha */
}

/* Menú móvil (acordeón) */
.cdd-menu-mobile {
    display: none;
    list-style: none;
    margin: 0;
    padding: 10px 16px;
    font-weight: 700;
    color: #fff;
}
.cdd-menu-mobile.hidden {
    display: none;
}
.cdd-menu-mobile.is-open {
    display: block;
}
.cdd-m-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 0;
}
.cdd-m-link,
.cdd-m-sublink {
    color: #fff;
    text-decoration: none;
}
.cdd-m-acc-btn {
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: 6px;
}
.cdd-m-sub.hidden {
    display: none;
}

/* ================== MODO "MEGA MENÚ" SOLO SI HAY SUB-SUBMENÚS ================== */
@media (min-width: 992px) {
    /* Panel completo: ahora BLANCO (antes lila) */
    .cdd-submenu:has(.cdd-submenu--right) {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(180px, 1fr);
        column-gap: 32px;
        row-gap: 6px;
        padding: 12px 18px;

        max-width: min(100vw - 32px, 1200px);

        background: #ffffff; /* 🔁 antes #5f4191 */
        color: #111827; /* texto oscuro */
        border-radius: 10px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
        box-sizing: border-box;
    }

    /* Cada hijo directo (columna) */
    .cdd-submenu:has(.cdd-submenu--right) > .cdd-submenu-item {
        padding: 4px 0;
    }

    /* Link principal de la columna: ahora PLOMO (antes verde) */
    .cdd-submenu:has(.cdd-submenu--right)
        > .cdd-submenu-item
        > .cdd-submenu-link {
        display: block;
        font-weight: 700;
        padding: 6px 10px;
        border-radius: 6px;
        background: #00a657; /* plomo */
        color: #ffffff;
        margin-bottom: 4px;

        /* por si es muy largo */
        white-space: normal;
        line-height: 1.2;
        word-break: break-word;
    }

    .cdd-submenu:has(.cdd-submenu--right)
        > .cdd-submenu-item
        > .cdd-submenu-link:hover {
        background: #4b5563; /* plomo más oscuro */
        color: #ffffff;
    }

    /* Lista de sub-submenú debajo del título, sobre fondo blanco */
    .cdd-submenu:has(.cdd-submenu--right) .cdd-submenu--right {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        margin: 2px 0 0;
        padding: 0;
        min-width: 0;
        list-style: none;

        background: transparent; /* usamos el blanco del panel */
        box-shadow: none;
        visibility: visible;
        opacity: 1;
    }

    /* Links del sub-submenú (sobre blanco) */
    .cdd-submenu:has(.cdd-submenu--right)
        .cdd-submenu--right
        .cdd-submenu-link {
        padding: 2px 0;
        font-weight: 400;
        font-size: 13px;
        color: #374151;
        background: transparent;
        border-radius: 4px;

        white-space: normal;
        line-height: 1.2;
        word-break: break-word;
    }

    .cdd-submenu:has(.cdd-submenu--right)
        .cdd-submenu--right
        .cdd-submenu-link:hover {
        background: #f3f4f6; /* gris clarito en hover */
        color: #111827;
    }
}

/* Breakpoint desktop */
@media (min-width: 992px) {
    .cdd-topbar-right {
        display: inline-flex;
    }
    .cdd-lang-mobile {
        display: none;
    }
    .cdd-menu-desktop {
        display: flex;
    }
    .cdd-menu-mobile,
    .cdd-menu-mobile.is-open {
        display: none;
    }
}

/* Utilidad */
.hidden {
    display: none !important;
}

/* Menú móvil contenedor */
.cdd-menu-mobile {
    background: #00a657;
    list-style: none;
    margin: 0;
    padding: 10px 16px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
    position: relative;
    z-index: 1000;
}
.cdd-menu-mobile.is-open {
    max-height: 70vh;
    opacity: 1;
}

/* Submenús móviles */
.cdd-m-sub {
    list-style: none;
    padding-left: 16px;
    margin: 6px 0 8px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
}
.cdd-m-sub.is-open {
    max-height: 600px; /* suficiente */
    opacity: 1;
}

/* Submenús móviles (ya lo tienes) */
.cdd-m-sub {
    list-style: none;
    padding-left: 16px;
    margin: 6px 0 8px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
}
.cdd-m-sub.is-open {
    max-height: 600px; /* suficiente */
    opacity: 1;
}

/* Fila del segundo nivel */
.cdd-m-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
}

/* Botón de acordeón interno (nivel 2→3) */
.cdd-m-acc-btn--inner {
    padding: 4px;
    font-size: 12px;
}

/* Tercer nivel un poco más sangrado */
.cdd-m-sub--inner {
    padding-left: 20px;
}

/* Link de tercer nivel */
.cdd-m-sublink2 {
    display: block;
    padding: 2px 0;
    font-size: 13px;
    color: #f9fafb; /* blanco suave */
    text-decoration: none;
    opacity: 0.9;
}
.cdd-m-sublink2:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Fila extra al final del menú móvil: idioma + redes */
.cdd-m-extra-row {
    margin-top: 10px;
    padding-top: 10px;
    text-align: center; /* centra contenido inline */
}

/* Contenedor interno (idioma + redes) */
.cdd-m-lang-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center; /* centra hijos (botón y redes) */
}

/* Redes sociales centradas en móvil */
.cdd-m-socials {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* En móviles la fila ocupa todo el ancho del menú */
@media (max-width: 991.98px) {
    .cdd-m-extra-row {
        display: block; /* el <li> ocupa toda la línea */
    }
}

/* En desktop no se ve el menú móvil, pero por si acaso: */
@media (min-width: 992px) {
    .cdd-m-extra-row {
        display: none;
    }
}

/* ===== Scroll behavior (2 filas) ===== */
.navbar-root {
    transition: transform 0.2s ease;
}

/* transición suave de la topbar */
.cdd-topbar {
    transition:
        max-height 0.22s ease,
        opacity 0.18s ease,
        padding 0.22s ease;
    max-height: 80px;
    opacity: 1;
    overflow: hidden;
}

/* Logo compacto en menubar: por defecto oculto */
.cdd-brand--compact {
    display: none;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

/* cuando topbar se oculta */
.navbar-root.is-condensed .cdd-topbar {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* cuando topbar se oculta, mostramos logo compacto */
.navbar-root.is-condensed .cdd-brand--compact {
    display: inline-flex;
}

/* Ajuste layout: al mostrar el logo compacto, el menú/hamburger siguen bien */
.cdd-menubar-inner {
    gap: 12px;
}

/* En desktop, si quieres menú centrado y logo a la izquierda */
@media (min-width: 992px) {
    .navbar-root.is-condensed .cdd-menu-desktop {
        margin: 0 auto;
    }
}


