* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: #ffffff;
}

/*
//////////////////////
SIDEBAR STYLES
//////////////////////
*/

.sidebar {
    position: fixed;
    min-height: 100vh;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    padding: 6px 14px;
    background: #9c203d;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

/* ===== ENCABEZADO INSTITUCIONAL ===== */

.sidebar-header {
    padding: 5px 5px 5px 5px;
    text-align: left;
    opacity: 1;
    transition: 0.25s ease;
}

.sidebar-logo-img {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.title-main {
    font-size: 25px;
    font-weight: 750;
    color: #ffffff;
    line-height: 1.15;
    text-align: center;
    
}

.title-sub {
    font-size: 13px;
    color: #f2d091;
    margin-top: 3px;
    text-align: center;
}

/* ===== DIVISOR ===== */

.sidebar-divider {
    width: 85%;
    height: 1px;
    background: rgba(255,255,255,0.25);
    margin: 7px auto 12px auto;
    opacity: 1;
    transition: 0.25s ease;
}

/* ===== OCULTAR TODO AL CERRAR ===== */

.sidebar:not(.active) .sidebar-header,
.sidebar:not(.active) .sidebar-divider,
.sidebar:not(.active) .sidebar-footer,
.sidebar:not(.active) .sidebar-logo-img,
.sidebar:not(.active) .title-main{
    opacity: 0;
    margin: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ===== FOOTER ===== */

.sidebar-footer {
    margin-top: auto;
    padding: 12px 8px;
    font-size: 10px;
    font-weight: 500;
    color: #f7e4c5;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.25);
    transition: 0.25s ease;

    line-height: 1.5;           /* 👈 separa las líneas */
    letter-spacing: 0.2px;      /* 👈 más elegante */
    white-space: normal;        /* 👈 evita que se amontone */
}

.sidebar-footer .footer-link {
    color: inherit;              
    text-decoration: none;       
    cursor: pointer;             
    display: inline-block;
}

.sidebar-footer .footer-link:hover {
    opacity: 0.9;                /* opcional: suave efecto */
}


/* ===== BOTÓN HAMBURGUESA ===== */

.sidebar.active {
    width: 260px;
    overflow-y: auto;
    overflow-x: visible;
    z-index: 500;
}

.sidebar .logo-menu {
    display: flex;
    align-items: center;
    width: 100%;
    height: 70px;
    justify-content: space-between;
    padding: 5px 5px 5px 5px;
    text-align: left;
    opacity: 1;
    transition: 0.25s ease;
}

.sidebar .logo-menu .toggle-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
    transition: 0.5s;
}

.sidebar.active .logo-menu .toggle-btn {
    left: 90%;
}


/* ===== LISTA DE BOTONES ===== */

.sidebar .list {
    margin-top: 10px;
}

.list .list-item {
    list-style: none;
    width: 100%;
    height: 50px;
    margin: 5px 0;
    line-height: 50px;
}

.list .list-item a {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 18px;
    color: #fff;

    background: #cb2b50;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;

    transition: 0.5s;
    
}

.list .list-item a:hover,
.list .list-item.active a {
    background: #bd955c;
}

.list .list-item a i {
    min-width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
}

/* ===== TEXTO DE LINKS ===== */

.sidebar .link-name {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sidebar.active .link-name {
    opacity: 1;
    pointer-events: auto;
    transition-delay: calc(0.1s * var(--i));
}

/* ===== TOOLTIP CUANDO ESTÁ CERRADO ===== */

.sidebar:not(.active) .list .list-item a::after {
    content: attr(data-title);
    position: absolute;
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    color: #9c203d;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    transition: 0s;
    z-index: 100;
    margin-top: 10px;
}

.sidebar:not(.active) .list .list-item a:hover::after {
    opacity: 1;
    visibility: visible;
    left: 100%;
    transition: all 0.4s ease;
}


/* ========================================
   SUBMENÚ TOMO II 
   ======================================== */

.has-submenu .arrow {
    margin-left: auto;
    margin-right: 12px;
    transition: transform 0.25s ease;
}

.list-item.has-submenu.open .arrow {
    transform: rotate(180deg);
}

.submenu-tomo {
    display: none;
    flex-direction: column;
    background: rgba(255,255,255,0.07);
    margin-left: 15px;
    margin-top: 6px;
    padding: 8px 12px;
    border-left: 3px solid #bd955c;
    border-radius: 5px;

    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.25s ease;
}

.list-item.open .submenu-tomo {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}

.submenu-tomo a {
    font-size: 14px;
    padding: 6px 0;
    color: #fee7d2;
}

.submenu-tomo a:hover {
    color: #fff;
    text-decoration: underline;
}

.active-submenu {
    color: white !important;
    font-weight: 600;
}


/*
//////////////////////
CONTENT CONTAINER
//////////////////////
*/

.content-container {
    margin-left: 80px;        
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
    border-left: none;
    position: relative;
}

.sidebar.active ~ .content-container {
    margin-left: 260px;
}

#dynamic-content-wrapper {
    min-height: calc(100vh - 40px);
    height: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    
}


/*
//////////////////////
BACKGROUND ANIMATION
//////////////////////
*/

.box {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.box div {
    position: absolute;
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 6px solid rgba(119, 119, 119, 0.315);
}

.box div:nth-child(1){ top: 15%; left: 40%; animation: animate 7s linear infinite; }
.box div:nth-child(2){ top: 40%; left: 80%; animation: animate 14s linear infinite; }
.box div:nth-child(3){ top: 70%; left: 40%; animation: animate 10s linear infinite; }
.box div:nth-child(4){ top: 50%; left: 60%; animation: animate 9s linear infinite; }
.box div:nth-child(5){ top: 15%; left: 65%; animation: animate 11s linear infinite; }
.box div:nth-child(6){ top: 40%; left: 20%; animation: animate 15s linear infinite; }
.box div:nth-child(7){ top: 25%; left: 50%; animation: animate 8s linear infinite; }
.box div:nth-child(8){ top: 55%; left: 30%; animation: animate 9s linear infinite; }
.box div:nth-child(9){ top: 8%; left: 85%; animation: animate 7s linear infinite; }
.box div:nth-child(10){ top: 80%; left: 20%; animation: animate 11s linear infinite; }
.box div:nth-child(11){ top: 15%; left: 20%; animation: animate 13s linear infinite; }
.box div:nth-child(12){ top: 80%; left: 75%; animation: animate 8s linear infinite; }
.box div:nth-child(13){ top: 75%; left: 60%; animation: animate 15s linear infinite; }
.box div:nth-child(14){ top: 70%; left: 10%; animation: animate 12s linear infinite; }
.box div:nth-child(15){ top: 50%; left: 8%; animation: animate 8s linear infinite; }
.box div:nth-child(16){ top: 70%; left: 85%; animation: animate 10s linear infinite; }

@keyframes animate {
    0%{
        transform: scale(0) translateY(0) rotate(0);
        opacity: 0;
    }
    100%{
        transform: scale(1.3) translateY(-90px) rotate(360deg);
        opacity: 1;
    }
}
/* ========================================
   FIN CSS
   ======================================== */