@font-face {
    font-family: Titulo;
    src: url(../Fuentes/CHICKEN\ Pie\ Height.ttf);
}

@font-face {
    font-family: Subtitulo;
    src: url(../Fuentes/KGPerfectPenmanship.ttf);
}

@font-face {
    font-family: Texto;
    src: url(../Fuentes/Random\ Wednesday.ttf);
}

@font-face {
    font-family: Principal;
    src: url(../Fuentes/Hey\ Comic.ttf);
}

/* ==================== COLORES ==================== */
:root {
    --principal: rgba(146, 99, 153);
    --crema: rgb(255, 250, 228);
    --lavanda: rgba(175, 142, 159);
    --morado-oscuro: rgba(117, 48, 134);
    --rojo: rgba(127, 57, 72);
    --hover: #f0b7e8;
    --blanco: rgb(243, 235, 237);
}

/* ==================== GLOBALES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

body {
    width: 100%;
    height: 100vh;
    margin-top: 75px;
    font-family: Principal;
    background-color: var(--blanco);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================================== */
/* ============ SECCIÓN HEADER Y SIDEBAR =============== */
/* ===================================================== */

header {
    z-index: 200;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 2rem 0.45rem 1.27rem;
    position: fixed;
    background-color: var(--principal);
    top: 0;
    left: 0;
    box-shadow: 1px 0px 10px #0f0f0f;
}

.izq {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.4rem;
    height: 18%;
    max-height: 18%;
}

.menu-container {
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.menu {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-container img {
    filter: brightness(0) invert(1);
    max-width: 2rem;
    height: auto;
}

.menu div {
    width: 2rem;
    height: 0.2rem;
    background-color: black;
}

.brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
}

.brand .logo {
    width: 2.8rem;
    max-width: 100%;
    height: auto;
}

.brand .name {
    font-family: Principal;
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 2px 3px 5px rgb(70, 21, 82);
}

.dere {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
}

.dere a {
    color: #fff;
    text-shadow: 2px 3px 5px rgb(70, 21, 82);
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease;
}

.dere a:hover {
    background-color: var(--morado-oscuro);
}

.dere img {
    width: 1.8rem;
    margin: 0.5rem;
    box-shadow: 2px 3px 5px rgb(70, 21, 82);
}

/* -------- SIDEBAR -------- */
.sidebar {
    box-shadow: 1px 0px 10px #302e2e;
    font-family: Principal;
    margin-top: 3.5rem;
    width: 4rem;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 1.1rem 0;
    overflow-y: auto;
    background-color: var(--crema);
}

.sidebar.menu-toggle {
    width: 18.75rem;
}

.sidebar a img.icono-tema {
    width: 1.8rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 1.3rem;
    padding: 0.9rem 0.7rem;
    margin: 0 0.5rem;
    border-radius: 0.5rem;
    color: #000;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.menu-toggle a {
    white-space: normal;
    line-height: 1.2;
    word-break: break-word;
}

.sidebar a:hover {
    background-color: var(--hover);
}

.sidebar a.selected {
    color: var(--morado-oscuro);
    background-color: blue;
}

.sidebar a.search {
    padding: 1rem 0.7rem;
    border-bottom: 1px solid var(--morado-oscuro);
    margin-bottom: 0.2rem;
}

.sidebar img {
    width: 1.6rem;
}

/* SUBMENÚS */
.has-submenu > a::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: auto;
    color: var(--morado-oscuro);
}

.submenu {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    list-style: none;
    padding-left: 1.5rem;
    border-left: 3px solid var(--morado-oscuro);
}

.has-submenu.open .submenu {
    max-height: 500px;
    opacity: 1;
}

.has-submenu.open > .submenu::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.8rem;
    width: 4px;
    background: var(--morado-oscuro);
    border-radius: 2px;
    box-shadow: 8px 0 12px rgba(117, 48, 134, 0.514);
}

/* Líneas separadoras */
hr {
    border: none;
    height: 1px;
    background-color: #999;
    margin: 1rem 1rem;
}

.logo {
    width: 3rem;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Corrección del ícono del menú */
#icono-menu {
    width: 2rem;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}
