/* --- GLOBAL TOPBAR (BLACK) --- */
.global-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 46px;
    background: #000;
    z-index: 1100;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;           /* tamaño texto links */
    font-weight: 400;           /* peso normal */
    letter-spacing: 0.03em;    /* ligero tracking */
}

/* Contenedor flex */
.global-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;

    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* Lista */
.global-topbar-list {
    list-style: none;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.global-topbar-list li {
    display: flex;
    align-items: center;
}

/* Links */
.global-topbar a {
    color: #fff;
    font-family: inherit;       /* hereda Arial, Helvetica */
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;

    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.global-topbar a:hover {
    text-decoration: underline;
}

/* Iconos Font Awesome */
.global-topbar i {
    font-size: 1.4em;
}

/* Icon-only items */
.global-topbar-list li.icon a {
    padding: 0;
}

/* Añadir separadores entre los links de texto (no iconos) */
.global-topbar-list li:not(.icon):not(:last-child)::after {
    content: "|";           /* el separador */
    color: #fff;            /* mismo color que el texto */
    margin: 0 0.6rem;       /* espacio antes y después del "|" */
    font-weight: 400;       /* mismo peso que los links */
}

/* --- TOPBAR BASE --- */
.project-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 2rem;
    height: 100px;

    position: fixed;
    top: 46px; /* height of global topbar */
    left: 0;
    right: 0;
    z-index: 1000;
}

/* --- LEFT / RIGHT --- */
.project-topbar .topbar-left,
.project-topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}
/* .project-topbar .topbar-left {
    padding-left: 5rem;
}
.project-topbar .topbar-right {
    padding-right: 5rem;
} */
.project-topbar .topbar-right a,
.project-topbar .topbar-right button {
    white-space: nowrap;
}

/* --- LINKS --- */
.project-topbar a,
.project-topbar button {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0;
    margin: 0;
    line-height: inherit;
}

.project-topbar a:hover,
.project-topbar button:hover {
    color: #0072ce;
}

/* --- LOGO --- */
.project-topbar .logo img {
    height: 60px;
    max-width: 200px;
    display: block;
}

/* --- DROPDOWNS --- */
.project-topbar .dropdown {
    position: relative;
}

.project-topbar .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    background-color: white;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
    z-index: 2000;
}

/* Mostrar dropdown en hover o focus */
.project-topbar .dropdown:hover .dropdown-content,
.project-topbar .dropdown:focus-within .dropdown-content {
    display: block;
}

.project-topbar .dropdown-content a {
    color: #333;
    padding: 8px 12px;
    display: block;
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 14px;
}

.project-topbar .dropdown > button::after {
    content: "▾";
    margin-left: 0.4rem;
    font-size: 0.8em;
}

/* Debugging outlines */
/* .project-topbar > div {
    border: 2px solid red !important;
} */

/* Setting padding of nav side */
.wy-nav-side {
    padding-top: 146px;
    scroll-padding-top: 146px;
    box-sizing: border-box;
}


/* Setting padding of main content */
.wy-nav-content {
    padding-top: 146px;
    scroll-padding-top: 146px;
    max-width: none !important;
}

/* Adjust scroll for anchors with fixed topbar */
.wy-nav-content h1,
.wy-nav-content h2,
.wy-nav-content h3,
.wy-nav-content h4 {
    scroll-margin-top: 166px;
}

/* --- MOBILE --- */
@media (max-width: 768px) {
    .project-topbar {
        height: 56px;
        padding: 0 1rem;
    }

    .project-topbar .topbar-right {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .project-topbar .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
    }
    .wy-nav-content,
    .wy-nav-side {
        padding-top: 102px;
    }
    .wy-nav-content h1,
    .wy-nav-content h2,
    .wy-nav-content h3,
    .wy-nav-content h4,
    .wy-nav-content h5,
    .wy-nav-content h6 {
        scroll-margin-top: 116px;
    }
}
