/* Estilos generales */
body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8fafc;
    color: #334155;
    font-size: 16px;
    line-height: 1.6;
}

/* Contenedor de tabla */
.schedule-container {
    background: white;
    padding: 2rem;
    margin: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

/* Tabla */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    min-width: 700px;
    color: #334155;
    table-layout: fixed;
}

th,
td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    word-wrap: break-word;
    vertical-align: middle;
    min-width: 100px;
}

th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #1e3a8a;
    font-size: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
    letter-spacing: 0.5px;
}

.day-header {
    background-color: #e2e8f0;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #475569;
    font-weight: 700;
    height: 40px;
}

.department-name {
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #3b82f6, #1d4ed8);
    color: white;
    padding: 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.concept-row {
    background-color: #f8fafc;
    font-size: 0.95rem;
    color: #475569;
    height: 40px;
}

.schedule-row {
    background-color: white;
    font-weight: 500;
    height: 40px;
}

.hours-row {
    background-color: #f0fdf4;
    color: #166534;
    font-weight: 600;
    height: 40px;
}

.empty-row {
    height: 10px;
    background-color: #f8fafc;
}

/* Hover */
tr:hover:not(.department-row) {
    background-color: #f1f5f9;
    transition: background-color 0.2s ease;
}

/* Animaciones suaves */
table,
td {
    transition: all 0.3s ease;
}

/* Estilos para celdas con datos */
.data-cell {
    background-color: #f0fdf4;
    border-radius: 4px;
    padding: 0.5rem;
    font-weight: 500;
}

.date-header {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    height: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .schedule-container {
        margin: 1rem;
        padding: 1rem;
    }

    table {
        font-size: 0.9rem;
        min-width: 100%;
    }

    th,
    td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }

    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .header-buttons {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    h1 {
        font-size: 1.5rem;
    }

    .department-name {
        font-size: 1rem;
        padding: 0.6rem;
    }
}

/* Efectos visuales adicionales */
tr:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

td:first-child {
    font-weight: 500;
    color: #475569;
    background-color: #f8fafc;
    width: 120px;
}

@media (max-width: 430px) {
    body {
        font-size: 15px;
    }

    header {
        padding: 1rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .schedule-container {
        padding: 1rem;
        margin: 1rem 0.5rem;
        border-radius: 12px;
    }

    table {
        font-size: 0.8rem;
        min-width: 100%;
    }

    th {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
        min-width: 80px;
    }

    td {
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
        min-width: 80px;
    }

    .department-name {
        font-size: 0.95rem;
        padding: 0.5rem;
    }

    .header-buttons {
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Navegacion */

/* Estilos para la navegación entre semanas - Versión mejorada */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.week-navigation-container {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: center;
}

.week-navigation button {
    padding: 0.6rem 1.2rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.95rem;
}

.week-navigation button:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.week-navigation button:active {
    transform: translateY(0);
}

#weekRange {
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    color: #334155;
    padding: 0.5rem 1rem;
    background-color: #f1f5f9;
    border-radius: 8px;
    margin: 0 0.5rem;
    font-size: 0.95rem;
}

/* Responsive para navegación */
@media (max-width: 768px) {
    .week-navigation {
        flex-direction: column;
        gap: 0.8rem;
        margin: 1.2rem 0;
    }

    .week-navigation-container {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .week-navigation button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    #weekRange {
        order: -1;
        width: 100%;
        margin: 0;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 430px) {
    .week-navigation {
        margin: 1rem 0;
    }

    .week-navigation button {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    #weekRange {
        font-size: 0.85rem;
        min-width: 160px;
    }

    .week-navigation-container {
        gap: 0.5rem;
    }
}

/* Estilo para iconos (opcional) */
.week-navigation button i {
    font-size: 1rem;
    margin: 0 0.2rem;
}

@media (max-width: 430px) {
    .week-navigation button i {
        font-size: 0.9rem;
    }
}

/* Menú Hamburguesa Estilos */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 2010;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-header {
    padding: 1.5rem;
    background: #1e3a8a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header img {
    height: 40px;
}

.close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-menu-links {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu-links a {
    padding: 1.2rem 2rem;
    text-decoration: none;
    color: #334155;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-links a:hover {
    background: #f8fafc;
    color: #1e3a8a;
}

.mobile-menu-links hr {
    margin: 1rem 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2009;
    display: none;
    pointer-events: none;
}

.mobile-menu-overlay.active {
    display: block;
    pointer-events: auto;
}

@media (max-width: 900px) {
    header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.8rem 1.2rem !important;
    }

    .header-buttons {
        display: none !important;
    }
    
    .menu-toggle {
        display: block !important;
        color: white !important;
        margin-left: auto !important; /* Forzar a la derecha */
    }
    
    h1 {
        font-size: 1.2rem !important;
    }
}