:root {
    --primary-color: #05519a;
    --secondary-color: #fed442;
    --text-color: #333;
    --background-color: #f5f7fa;
    --event-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    background-color: var(--background-color);
    font-family: "PT Sans", sans-serif;
    font-size: 16px;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

#eventTable {
    background-color: white;
    border-collapse: separate;
    border-spacing: 0;
}

#eventTable th {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px 15px;
    font-weight: 600;
    border: none;
    font-size: 1.1rem;
}

#eventTable td {
    height: 150px;
    max-width: 150px;
    padding: 10px;
    vertical-align: top;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

#eventTable td:hover {
    background-color: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
}

.day-number {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-day {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.event {
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 8px;
    font-size: 0.9rem;
    box-shadow: var(--event-shadow);
    animation: fadeIn 0.5s ease;
}

.event:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.month-navigation {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.month-navigation .btn {
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.month-navigation .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.current-month-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 20px;
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Estilos para móvil */
@media (max-width: 768px) {
    .table-responsive {
        margin-top: 10px;
        border-radius: 8px;
    }

    #eventTable th {
        padding: 10px 5px;
        font-size: 0.9rem;
    }

    #eventTable td {
        height: auto;
        min-height: 100px;
        padding: 5px;
    }

    .event {
        padding: 5px;
        font-size: 0.8rem;
        margin-bottom: 5px;
    }

    .current-month-title {
        font-size: 1.2rem;
    }

    .month-navigation .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .day-number {
        font-size: 1rem;
    }

    /* Vista de calendario móvil alternativa */
    .mobile-calendar-view {
        display: none;
    }

    @media (max-width: 480px) {
        .table-responsive {
            display: none;
        }

        .mobile-calendar-view {
            display: block;
            padding: 10px;
        }

        .mobile-day-card {
            background: white;
            border-radius: 8px;
            margin-bottom: 15px;
            padding: 15px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            animation: fadeIn 0.5s ease;
        }

        .mobile-day-header {
            font-weight: bold;
            margin-bottom: 10px;
            color: var(--primary-color);
        }
    }
}

/* Mejoras en los eventos */
.pregrado-background {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.postgrado-background {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.evento-background {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.defensa-background {
    background: linear-gradient(135deg, #e1bee7, #ba68c8);
    color: white;
}

/* Sidebar */
.title {
    text-align: center;
}

#productoInfo {
    display: none;
}

.row {
    margin-right: 0%;
}

.sidebar {
    width: 300px;
    height: 100vh;
    background-color: #05519a;
    color: #fff;
    padding: 30px;
    font-size: 1rem;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
}

/* Contenido */
.content {
    flex: 1;
}

.content h1 {
    font-size: 1.5rem;
    color: #333;
}

.content p {
    font-size: 1rem;
    color: #666;
}

.navbar .container-fluid a {
    color: white;
}

.subtitulos {
    font-size: larger;
    padding-top: 1%;
    width: -webkit-fill-available;
}

/* Navbar */
.navbar {
    background-color: #05519a
}

.navbar-brand:hover {
    color: white;
}

.close-sesion:hover {
    color: white;
}

/* Selectores */
.selector-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selector-container label {
    text-align: center;
}

.selector {
    width: 15%;
}

.head-table {
    background-color: #05519a
}

.head-table tr th {
    color: white
}

/* Footer */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    background-color: #fed442;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

footer button {
    margin: 0 10px;
    padding: 5px 10px;
    background-color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.container-fluid {
    display: flex;
    justify-content: space-between;
}

.container-fluid2 {
    padding: 2%;
    justify-content: space-between;
}

.footer-left {}

.footer-right a {
    font-size: 1rem;
}

.form-group {
    padding-left: 1%
}

.form-group select {
    font-size: 16px;
}

/* Hover en tabla */
.table-hover tbody tr:hover td {
    border: 2px solid #ccc;
    border-radius: 5px;
}

/* Stepper */
.stepper {
    display: flex;
    align-items: center;
}

.cont-steps {
    display: flex;
    flex-direction: row;
}

.step {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.step-icon {
    margin-right: 8px;
}

.flecha {
    margin-right: 20px;
}

.active .step-icon {
    color: #007bff;
}

.active .label-step {
    font-weight: bold;
}

.passed .step-icon {
    color: #28a745;
}

.linea-stepper {
    flex-grow: 1;
    margin: 0 10px;
    border: 1px solid #ccc;
}

/* Detalles del Magíster */
#magisterDetails {
    text-align: center;
}

#magisterDetails ul {
    list-style-type: disc;
    padding-left: 0;
    display: inline-block;
    text-align: left;
    width: 100%;
}

#magisterDetails li {
    margin-bottom: 5px;
}

/* Calendario */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.calendar div {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header {
    font-weight: bold;
    background-color: #f4f4f4;
}

.day {
    height: 100px;
    position: relative;
}

.nav-link,
.navbar-brand {
    font-size: 1.2rem;
}

/* Vista móvil */
.mobile-calendar-view {
    display: none; /* Oculto por defecto en todas las pantallas */
}

.table-responsive {
    display: block; /* Visible por defecto en todas las pantallas */
}

/* Estilos para el modal de detalles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: none;
}

.modal-footer {
    border-top: none;
    padding: 1.5rem;
}

.info-group label {
    font-size: 0.9rem;
    color: #6c757d;
}

.info-group p {
    font-size: 1.1rem;
}

.modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.modal .btn-close:hover {
    opacity: 1;
}

.modal .btn-secondary {
    background-color: #6c757d;
    border: none;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.modal .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Estilos específicos para móvil */
@media (max-width: 480px) {
    .table-responsive {
        display: none !important; /* Forzar ocultamiento en móvil */
    }

    .mobile-calendar-view {
        display: block !important; /* Forzar visibilidad en móvil */
        padding: 10px;
    }

    .mobile-day-card {
        background: white;
        border-radius: 8px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        animation: fadeIn 0.5s ease;
    }

    .mobile-day-header {
        font-weight: bold;
        margin-bottom: 10px;
        color: var(--primary-color);
        font-size: 1.1rem;
        text-transform: capitalize;
    }

    .mobile-day-card .event {
        margin-bottom: 10px;
        padding: 12px;
    }

    .mobile-day-card .event-time {
        font-weight: bold;
        margin-bottom: 5px;
    }

    .mobile-day-card .event-title {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .mobile-day-card .event-details {
        font-size: 0.9rem;
        opacity: 0.9;
    }
}

/* Asegurar que la vista web se mantenga en pantallas más grandes */
@media (min-width: 481px) {
    .mobile-calendar-view {
        display: none !important; /* Forzar ocultamiento en pantallas grandes */
    }

    .table-responsive {
        display: block !important; /* Forzar visibilidad en pantallas grandes */
    }
}