html {
    font-size: 14px;
    height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('/images/back.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    overflow-y:hidden;
}

.container {
    position: relative;
    z-index: 1;
}

.container-fluid {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Ocupa toda la pantalla */
}

footer {
    width: 100%;
    text-align: center;
    margin-bottom: -15px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.5); /* Más transparente */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* Efecto difuminado */
}

.consentimiento-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80%;
    max-width: 80vh; /* Evita que sea demasiado grande en pantallas grandes */
}

.consentimiento-card {
    background: rgba(255, 255, 255, 0.5); /* Más transparente */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); /* Efecto difuminado */
    max-height: 70vh;
    width: 100%; /* Ocupa todo el ancho del contenedor */
}

.consentimiento-table-container {
    width: 100%;
    padding: 5px;
    flex-grow: 1;
    max-height: 50vh; /* Limita la altura y permite scroll vertical */
    overflow-y: auto;
    margin-bottom: 110px; /* Espacio adicional debajo de la tabla */
}

.btn-primary {
    background-color: #007bff;
    border: none;
}

    .btn-primary:hover {
        background-color: #0056b3;
    }

/* Contenedor principal centrado */
/* Contenedor principal centrado y con ancho correcto */
.index-container {
    width: 94vw; /* 80% del ancho de la ventana */
    height: 86vh; /* 80% del alto de la pantalla */
    margin: auto; /* Centrado horizontal */
    position: absolute; /* Para centrar verticalmente */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centra completamente */
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8); /* Transparente */
    backdrop-filter: blur(10px); /* Efecto difuminado */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Ajustes para el contenido */
.index-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Cabecera */
.index-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2); /* Un poco más oscuro para contraste */
    padding: 15px 20px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

/* Logotipo */
.index-logo {
    height: 40px;
}

/* Título centrado */
.index-title {
    flex: 1;
    text-align: center;
    font-size: 24px;
    color: white;
}

/* Botón */
.index-btn-action {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

    .index-btn-action:hover {
        background: #0056b3;
    }

/* Contenedor principal de las tarjetas */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
    overflow-y: auto; /* Solo habilita el scroll vertical */
}

/* Estilo de cada tarjeta */
.certificate-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    min-height: 200px;
    border: solid 1px black;
}
    /* Elimina el subrayado de los enlaces dentro de las tarjetas */
    .certificate-card a {
        text-decoration: none;
    }

    /* Al pasar el ratón sobre la tarjeta */
    .certificate-card:hover {
        transform: translateY(-10px);
    }

/* Cabecera de la tarjeta (imagen) */
.card-header {
    padding: 10px;
    text-align: center;
    position: relative;
}

    .card-header img:not(.small-icon) {
        width: 80px;
        height: 80px;
        object-fit: cover;
    }

.small-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
}

/* Cuerpo de la tarjeta (título y duración) */
.card-body {
    padding: 15px;
    text-align: left;
}

    .card-body h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

.estimate-duration h5 {
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
}

/* Icono de duración */
.estimate-duration .estimate-duration-icon {
    margin-right: 8px;
}

.header-content {
    text-align: center;
}

.user-name {
    text-transform: lowercase;
    font-size: 0.8em;
}

/* ----------------------------------- tabla -------------------------------------------- */

/* Contenedor responsivo de la tabla */
.table-container {
    width: 100%;
    padding:5px;
    flex-grow: 1;
    max-height: 70vh; /* Limita la altura y permite scroll vertical */
    overflow-y: auto;
    margin-bottom: 110px; /* Espacio adicional debajo de la tabla */
}

/* Estilos generales de la tabla */
.table-custom {
    width: 100%;
    margin-bottom: 110px;
}

    /* Estilos para el encabezado de la tabla */
    .table-custom thead {
        background-color: #f8f9fa; /* Color de fondo */
    }

    /* Estilos de las columnas */
    .table-custom th {
        text-align: left;
    }

    /* Asegura que el texto se ajuste y salte de línea */
    .table-custom td {
        word-wrap: break-word;
        white-space: normal;
    }

    /* Mantiene los botones en una línea en pantallas grandes */
    .table-custom .col-acciones {
        width: 10%;
        text-align: center;
        white-space: nowrap; /* Evita que se apilen en pantallas grandes */
    }

/* Apila los botones en dispositivos móviles */
@media (max-width: 576px) {
    /* Columnas específicas */
    .table-custom .col-col30 {
        width: 30%;
    }

    .table-custom .col-col60 {
        width: 60%;
    }

    .table-custom .col-acciones a {
        display: flex;
        flex-direction: column;
        width: 36px;
        margin-bottom: 5px; /* Espacio entre botones cuando están apilados */
    }

    .table-custom .col-acciones a {
        margin-left: 15px;
    }

    .consentimiento-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 80vh; /* Evita que sea demasiado grande en pantallas grandes */
    }
}
/* ----------------------------------- tabla -------------------------------------------- */

.scroll-container {
    max-height: 75vh; /* Ajusta la altura máxima del contenedor */
    overflow-y: auto; /* Habilita el scroll vertical */
    padding-right: 10px; /* Para evitar solapamiento con la barra de scroll */
    padding-bottom: 180px;
}

/* ----------------------------------- calendar -------------------------------------------- */
/* Estilos para las fechas en el calendario */
.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

    .calendar-header button {
        background: none;
        border: none;
        font-size: 1.5em;
        cursor: pointer;
    }

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day, .empty-day {
    padding: 10px;
    text-align: center;
    border-radius: 4px;
}

    .calendar-day.available {
        background-color: #a3d4a5;
    }

    .calendar-day.confirmed {
        background-color: #e57373;
        color: white;
    }

    .calendar-day.pending {
        background-color: #ffb74d;
        color: white;
    }

    .calendar-day.selected {
        background-color: #f0ad4e;
        color: white;
    }

    .calendar-day.past {
        background-color: #d3d3d3; /* Gris claro */
        color: #888; /* Texto en gris */
        pointer-events: none; /* Deshabilita interacciones */
    }

.leyenda {
    margin-top: 20px;
}

    .leyenda div {
        display: flex;
        align-items: center;
        margin-bottom: 5px; /* Espacio entre filas de la leyenda */
    }

        .leyenda div div {
            width: 20px;
            height: 20px;
            margin-right: 10px;
        }
/* ----------------------------------- calendar -------------------------------------------- */
