body {
    overflow-x: hidden;
}

/* SIDEBAR BASE (PC por defecto visible) */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    border-right: 1px solid #ddd;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;      /* 🔥 permite scroll vertical */
    overflow-x: hidden;    /* evita scroll horizontal */
}

/* cuando se abre */
.sidebar.active{
    left: 0;
}

/* CONTENIDO */
#content {
    margin-left: 280px;
    padding: 20px;
}

/* OVERLAY */
#overlay {
    display: none;
}

/* 📱 MÓVIL */
@media (max-width: 768px) {

    /* sidebar oculta por defecto */
    .sidebar {
        transform: translateX(-100%);
    }

    /* cuando se activa */
    .sidebar.active {
        transform: translateX(0);
    }

    /* contenido ocupa todo */
    #content {
        margin-left: 0;
    }

    /* overlay visible */
    #overlay.active {
        display: block;
        position: fixed;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        top: 0;
        left: 0;
        z-index: 999;
    }
}

/* TÍTULO */
.sidebar .fs-5 {
    color: #0d6efd;
    font-weight: bold;
    letter-spacing: 1px;
}

/* BOTONES PRINCIPALES (Practicas, etc) */
.sidebar .btn-toggle {
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.sidebar .btn-toggle:hover {
    background-color: #0d6efd;
    color: #fff;
    border-radius: 8px;
}

/* LINKS INTERNOS */
.sidebar a {
    display: block;
    padding: 8px 10px;
    text-decoration: none;
    color: #555;
    border-radius: 6px;
    transition: all 0.25s ease;
}

/* HOVER LINKS */
.sidebar a:hover {
    background-color: #e9f2ff;
    color: #0d6efd;
    padding-left: 15px; /* animación lateral */
}

/* LINK ACTIVO */
.sidebar a.active {
    background-color: #0d6efd;
    color: white;
    font-weight: 500;
}

/* SEPARACIÓN ENTRE ELEMENTOS */
.sidebar ul li {
    margin-bottom: 5px;
}

/* EFECTO SUAVE AL ABRIR MENÚ */
.collapse {
    transition: all 0.3s ease;
}


.carousel {
    width: 100%;
}

/* Altura responsive */
.carousel-item {
    height: 250px;
}

@media (min-width: 768px) {
    .carousel-item {
        height: 400px;
    }
}

/* Ajuste de imagen */
.carousel-item img {
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .carousel-item img {
        height: 400px;
        object-fit: cover;
    }
}