/* ==========================================================================
   OSMOSIS MEGA MENU (REVISION STABLE - 14PX FONTS)
   ========================================================================== */

:root {
    --osmosis-header-height: 72px;
    --osmosis-header-bg: #ffffff;
    --osmosis-text-primary: #1a1a1a;
    --osmosis-text-secondary: #6b7280;
    --osmosis-action-blue: #2563eb;
    --osmosis-action-blue-hover: #1d4ed8;
    --osmosis-border-color: #e5e7eb;
    --osmosis-transition: 0.2s ease;
    --osmosis-container-max: 1304px;
}

/* ==========================================================================
   HEADER BASE
   ========================================================================== */
.osmosis-header {
    position: relative; 
    width: 100%;
    height: var(--osmosis-header-height);
    background: var(--osmosis-header-bg);
    border-bottom: none; 
    z-index: 1000;
}

.osmosis-header__container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--osmosis-container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    z-index: 1002;
    background: #fff; 
}

/* ==========================================================================
   LOGO
   ========================================================================== */
.osmosis-header__logo img {
    width: 119px;
    height: auto;
    display: block;
}
@media (max-width: 400px) {
    .osmosis-header__logo img {
        width: 95px;
    }
}

/* ==========================================================================
   DESKTOP NAVIGATION
   ========================================================================== */
.osmosis-mega-menu {
    display: none;
    flex: 1;
    justify-content: flex-start; 
    margin-left: 32px; 
    margin-right: auto;
}

@media (min-width: 1200px) {
    .osmosis-mega-menu {
        display: flex;
    }
}

.osmosis-mega-menu__list {
    display: flex;
    align-items: center;
    gap: 8px; 
    list-style: none;
    margin: 0;
    padding: 0;
}

.osmosis-mega-menu__item { position: static; }

/* AQUÍ ESTÁ EL CAMBIO: 14px para igualar al Login */
.osmosis-mega-menu__toggle,
.osmosis-mega-menu__link {
    display: flex;
    align-items: center;
    gap: 0; 
    padding: 10px 24px; 
    font-size: 14px; /* <--- 14PX */
    font-weight: 600;
    color: var(--osmosis-text-primary);
    background: transparent;
    border: none;
    border-radius: 28px; 
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--osmosis-transition);
}

.osmosis-mega-menu__toggle:hover, 
.osmosis-mega-menu__toggle[aria-expanded="true"],
.osmosis-mega-menu__link:hover {
    background-color: var(--wp--preset--color--paper, #f7f7f5); 
}

.osmosis-mega-menu__arrow-wrapper { display: none; }

/* ==========================================================================
   MEGA DROPDOWN (DESKTOP)
   ========================================================================== */
.osmosis-mega-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    top: 100%; 
    background: transparent; 
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--osmosis-transition), visibility var(--osmosis-transition);
}

.osmosis-mega-menu__item.is-open .osmosis-mega-dropdown {
    opacity: 1;
    visibility: visible;
}

.osmosis-mega-dropdown__inner {
    background: #ffffff;
    border-top: 1px solid var(--osmosis-border-color);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 40px 0;
    max-height: calc(100vh - var(--osmosis-header-height));
    overflow-y: auto;
}

.osmosis-mega-dropdown__columns {
    display: flex;
    justify-content: flex-start;
    gap: 80px;
    max-width: var(--osmosis-container-max);
    margin: 0 auto;
    list-style: none;
    padding: 0 24px;
}

.osmosis-mega-dropdown__column {
    flex: 0 0 auto; 
    min-width: 240px;
}

/* HEADERS DESKTOP (Regular + Icono) */
.osmosis-mega-dropdown__column-header {
    display: flex;
    align-items: center;
    font-size: 15px; 
    font-weight: 500; /* Regular */
    color: var(--osmosis-text-primary);
    text-decoration: none;
    margin-bottom: 16px; 
    text-transform: none; /* Minúsculas */
}

/* Asegurar que no haya flechas CSS heredadas antes */
.osmosis-mega-dropdown__column-header::before {
    display: none !important;
}

/* Icono SVG Desktop */
.osmosis-mega-dropdown__column-header::after {
    content: ''; 
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 8px;
   background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='11.25' stroke='%231a1a1a' stroke-width='1.5'/%3E%3Cpath d='M8 12H16M16 12L13.5 9.5M16 12L13.5 14.5' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none !important;
}

.osmosis-mega-dropdown__links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    padding: 0;
}

/* LINKS DESKTOP (Negrita) */
.osmosis-mega-dropdown__link {
    font-size: 16px; 
    font-weight: 700; 
    color: var(--osmosis-text-primary);
    text-decoration: none;
    transition: color 0.2s;
}
.osmosis-mega-dropdown__link:hover { color: var(--osmosis-action-blue); }

/* ==========================================================================
   BUTTONS DESKTOP (LOGIN / TRY IT FREE)
   ========================================================================== */
.osmosis-header__buttons {
    display: none;
}
@media (min-width: 1200px) {
    .osmosis-header__buttons {
        display: flex;
        gap: 12px;
        align-items: center;
    }
}
.osmosis-header__btn {
    padding: 10px 24px;
    font-weight: 600;
    border-radius: 99px;
    text-decoration: none;
    font-size: 14px !important; 
    line-height: 1.5;
    transition: all 0.2s;
}
.osmosis-header__btn--primary {
    background: var(--osmosis-action-blue);
    color: white;
}
.osmosis-header__btn--primary:hover { background: var(--osmosis-action-blue-hover); }

.osmosis-header__btn--outline {
    background: transparent;
    color: var(--osmosis-text-primary);
}
.osmosis-header__btn--outline:hover { color: var(--osmosis-action-blue); }

/* ==========================================================================
   MOBILE & BURGER
   ========================================================================== */
.osmosis-header__mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    gap: 5px; 
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
}
.osmosis-header__hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px; 
}
.osmosis-header__hamburger span {
    display: block;
    width: 24px;
    height: 2px; 
    background-color: var(--osmosis-text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}
.osmosis-header__mobile-toggle[aria-expanded="true"] .osmosis-header__hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.osmosis-header__mobile-toggle[aria-expanded="true"] .osmosis-header__hamburger span:nth-child(2) {
    opacity: 0;
}
.osmosis-header__mobile-toggle[aria-expanded="true"] .osmosis-header__hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 1200px) {
    .osmosis-header__mobile-toggle { display: none; }
}

/* Drawer Móvil */
.osmosis-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.osmosis-mobile-menu.is-open { transform: translateX(0); }

.osmosis-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px; 
    border-bottom: 1px solid var(--osmosis-border-color);
    flex-shrink: 0;
}
.osmosis-mobile-menu__logo img {
    height: 32px;
    width: auto;
    display: block;
}
.osmosis-mobile-menu__close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    position: relative;
    cursor: pointer;
}
.osmosis-mobile-menu__close::before,
.osmosis-mobile-menu__close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--osmosis-text-primary);
}
.osmosis-mobile-menu__close::before { transform: rotate(45deg); }
.osmosis-mobile-menu__close::after { transform: rotate(-45deg); }

/* Área NAVEGACIÓN Móvil */
.osmosis-mobile-menu__nav {
    flex: 1; 
    overflow-y: auto;
    padding: 0; 
}
.osmosis-mobile-menu__list,
.osmosis-mobile-menu__submenu {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.osmosis-mobile-menu__item {
    border-bottom: 1px solid var(--osmosis-border-color);
}
.osmosis-mobile-menu__item:last-child {
    border-bottom: none;
}
.osmosis-mobile-menu__submenu .osmosis-mobile-menu__item {
    border-bottom: none !important;
}
.osmosis-mobile-menu__item-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}
/* Enlaces Nivel Superior */
.osmosis-mobile-menu__link {
    display: block;
    padding: 20px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--osmosis-text-primary);
    text-decoration: none;
    flex: 1;
}

/* SUBMENÚ */
.osmosis-mobile-menu__submenu {
    display: none;
    background: #ffffff;
    padding-bottom: 20px; 
}
.osmosis-mobile-menu__item.is-open > .osmosis-mobile-menu__submenu {
    display: block;
}

/* MOBILE Nivel 2 (Headers: Product features) -> Regular + Icono */
.osmosis-mobile-menu__item--depth-1 > .osmosis-mobile-menu__item-inner > .osmosis-mobile-menu__link {
    font-weight: 500; 
    font-size: 15px; 
    color: var(--osmosis-text-primary); 
    padding-left: 24px;
    text-transform: none; 
    display: flex; 
    align-items: center;
}
/* MOBILE ICONO ÚNICO */
.osmosis-mobile-menu__item--depth-1 > .osmosis-mobile-menu__item-inner > .osmosis-mobile-menu__link::after {
    content: ''; 
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='11.25' stroke='%231a1a1a' stroke-width='1.5'/%3E%3Cpath d='M8 12H16M16 12L13.5 9.5M16 12L13.5 14.5' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none !important;
}

/* MOBILE Nivel 3 (Enlaces: Flashcards) -> Negrita, SIN Icono */
.osmosis-mobile-menu__item--depth-2 > .osmosis-mobile-menu__item-inner > .osmosis-mobile-menu__link {
    font-weight: 700; 
    font-size: 16px;
    color: var(--osmosis-text-primary);
    padding-left: 24px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.osmosis-mobile-menu__item--depth-2 > .osmosis-mobile-menu__item-inner > .osmosis-mobile-menu__link::after {
    display: none !important;
}

.osmosis-mobile-menu__expand {
    background: none;
    border: none;
    padding: 20px 0 20px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.osmosis-mobile-menu__chevron {
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    transform: rotate(45deg);
    transition: 0.3s;
}
.osmosis-mobile-menu__expand[aria-expanded="true"] .osmosis-mobile-menu__chevron {
    transform: rotate(225deg);
}

/* TOP ACTIONS ROW (Sign in + Try it free at top of drawer) */
.osmosis-mobile-menu__top-actions {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--osmosis-border-color);
    flex-shrink: 0;
}
.osmosis-mobile-menu__top-signin {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1.5px solid var(--osmosis-border-color);
    border-radius: 99px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--osmosis-text-primary) !important;
    text-decoration: none;
    transition: border-color 0.2s;
    -webkit-font-smoothing: antialiased;
}
.osmosis-mobile-menu__top-signin:hover {
    border-color: var(--osmosis-text-primary);
}
.osmosis-mobile-menu__top-cta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--osmosis-action-blue);
    border-radius: 99px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none;
    transition: background 0.2s;
    -webkit-font-smoothing: antialiased;
}
.osmosis-mobile-menu__top-cta:hover {
    background: var(--osmosis-action-blue-hover);
}

body.osmosis-menu-open { overflow: hidden !important; }

/* ==========================================================================
   PARCHE DE UNIFICACIÓN VISUAL (NO BORRAR)
   ========================================================================== */

/* 1. Seleccionamos TODO: Botones de menú, Enlaces directos y Botones de Login */
.osmosis-mega-menu__toggle,        /* Professions */
.osmosis-mega-menu__list li > a,   /* Institutions (Selector genérico para asegurar) */
.osmosis-header__btn {             /* Login */
    
    /* A. FUENTE: Crucial. Obliga al botón a usar la fuente de tu web, no la del sistema */
    font-family: inherit !important; 
    
    /* B. TAMAÑO Y PESO: Fuerza a todos a ser idénticos */
    font-size: 14px !important;
    font-weight: 600 !important;
    
    /* C. ESTRUCTURA: Hace que el botón y el enlace ocupen el mismo espacio */
    display: inline-flex !important; /* Flex centra mejor el texto verticalmente */
    align-items: center;
    justify-content: center;
    line-height: normal !important; /* Evita que el botón tenga line-height extra */
    
    /* D. ESPACIADO: Mismo relleno para todos */
    padding: 10px 24px !important; 
    box-sizing: border-box;

    /* E. LIMPIEZA DE RESET */
    background: transparent;
    border: none;
    -webkit-font-smoothing: antialiased; /* Iguala el grosor visual en Mac */
}

/* 2. Excepción para el botón azul (Try it free) para que mantenga su color de fondo */
.osmosis-header__btn--primary {
    background-color: var(--osmosis-action-blue) !important;
    color: #ffffff !important;
}

/* 3. Asegurar color de texto base en los elementos transparentes */
.osmosis-mega-menu__toggle,
.osmosis-mega-menu__list li > a,
.osmosis-header__btn--outline {
    color: var(--osmosis-text-primary) !important;
}

/* ==========================================================================
   MOBILE CTA BUTTON (header, left of burger, hidden on desktop)
   ========================================================================== */
.osmosis-header__mobile-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;  /* Push group to the right */
    margin-right: 12px; /* Fixed gap from hamburger */
}
@media (min-width: 1200px) {
    .osmosis-header__mobile-actions {
        display: none;
    }
}

.osmosis-header__mobile-signin {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--osmosis-text-primary) !important;
    text-decoration: none;
    white-space: nowrap;
    -webkit-font-smoothing: antialiased;
}
.osmosis-header__mobile-signin:hover {
    color: var(--osmosis-action-blue) !important;
}
@media (max-width: 500px) {
    .osmosis-header__mobile-signin {
        display: none;
    }
}

.osmosis-header__mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--osmosis-action-blue);
    color: #ffffff !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 99px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    -webkit-font-smoothing: antialiased;
}
.osmosis-header__mobile-cta:hover {
    background: var(--osmosis-action-blue-hover);
    color: #ffffff !important;
}

/* ==========================================================================
   HIDE CTAs FOR LOGGED IN USERS (Osmosis Product)
   ========================================================================== */
/* Hide desktop CTAs when user is logged in */
body.osmosis-user-logged-in .osmosis-header__buttons {
    display: none !important;
}

/* Hide mobile CTAs when user is logged in */
body.osmosis-user-logged-in .osmosis-mobile-menu__top-actions {
    display: none !important;
}

/* Hide mobile header CTAs when user is logged in */
body.osmosis-user-logged-in .osmosis-header__mobile-actions {
    display: none !important;
}