html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #24b6e6;
    --secondary-color: #f8f9fa;
    --text-color: #6c757d;
    --accent-color: #1ba0cc;
}

.navbar {
    background-color: #fff !important;
    padding: 0.5rem 0 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand img {
    height: 60px;
    width: auto;
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 45px; /* Logo más pequeño en móviles */
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.navbar-nav .nav-link {
    color: #6c757d !important;
    font-weight: 500;
    padding: 0.5rem 10px !important;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

/* Mejoras para el Menú en Celulares */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #ffffff;
        padding: 1.5rem;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        margin-top: 15px;
    }
    .navbar-nav {
        text-align: center;
        gap: 10px;
    }
}

/* Ajustes para el Menú Lateral de Admin en Móviles */
@media (max-width: 768px) {
    .admin-sidebar {
        position: static;
        width: 100%;
        margin-bottom: 20px;
    }
    .admin-content {
        padding: 10px;
    }
    /* Asegura que los botones de acción en las tablas sean fáciles de presionar */
    .btn-sm {
        padding: 8px 12px;
        margin-bottom: 5px;
    }
}

/* Estilos para que las tablas no se corten y muestren todo el contenido */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
}
.table td {
    white-space: normal !important; /* Permite que el texto largo baje de línea */
    min-width: 120px;
}

.btn-acceder {
    background-color: white;
    color: #24b6e6 !important;
    border: 2px solid #24b6e6;
    border-radius: 50px;
    padding: 7px 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 576px) {
    .btn-acceder {
        padding: 5px 15px;
        font-size: 0.8rem;
    }
}

.btn-acceder:hover {
    background-color: #24b6e6;
    color: white !important;
    transform: translateY(-1px);
}

.btn-agendar {
    background-color: #24b6e6;
    color: white !important;
    border-radius: 50px;
    padding: 9px 25px;
    font-weight: 600;
    border: 2px solid #24b6e6;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

@media (max-width: 576px) {
    .btn-agendar {
        padding: 7px 15px;
    }
}

.btn-agendar:hover {
    background-color: #1ba0cc;
    border-color: #1ba0cc;
    box-shadow: 0 4px 15px rgba(36, 182, 230, 0.4);
    transform: translateY(-2px);
}

.auth-link {
    color: #6c757d;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}
.auth-link:hover { color: #24b6e6; }

.btn-acceder:hover {
    background-color: var(--primary-color);
    color: white !important;
}

/* Dropdown simple para el usuario */
.nav-user {
    position: relative;
    cursor: pointer;
}

/* Corregimos el contenedor del perfil para que sea transparente y no tape nada */
#userProfileContainer {
    position: relative !important;
    background: transparent !important;
    border: none !important;
}

/* Quitamos la flechita negra predeterminada de Bootstrap */
#userProfileContainer .dropdown-toggle::after {
    display: none !important;
}

#userProfileContainer .dropdown-toggle {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Restaurar la flechita (caret) al lado del nombre del usuario */
#userGreeting::after {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

.dropdown li a {
    padding: 10px;
    display: block;
    text-decoration: none;
    color: var(--text-color);
}

.dropdown li a:hover {
    background-color: var(--secondary-color);
}

/* Ajuste para que el menú fijo no tape el contenido al desplazarse */
section[id] {
    scroll-margin-top: 90px;
}

/* Ajuste de altura del carrusel */
.carousel-item {
    height: 50vh; /* Altura reducida para móviles (evita el recorte excesivo) */
    min-height: 350px;
    transition: transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

@media (min-width: 992px) {
    .carousel-item {
        height: 80vh; /* Altura original para pantallas grandes */
    }
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-position: center;
    background-size: cover;
    background-color: rgba(0, 0, 0, 0.4); 
    background-blend-mode: overlay;
    width: 100%;
    height: 100%;
}

.carousel-caption {
    padding-bottom: 2rem;
}

.carousel-caption h1 {
    font-size: 1.6rem; /* Título legible en móviles */
    font-weight: 700;
}

@media (min-width: 768px) {
    .carousel-caption h1 {
        font-size: 3.5rem;
    }
}