:root {
    --marfil: #FFFFF2;
    --verde: #40CE02;
    --azul: #094074;
    --turquesa: #00AECC;
    --azul-oscuro: #062d52;
    --azul-medio: #0d5499;
    --texto-claro: #FFFFF2;
    --texto-oscuro: #062d52;
}

.main {
    flex: 1;
    padding: 60px 40px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}



.main h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--azul);
    text-align: center;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.main h3 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--azul-medio);
    text-align: center;
    max-width: 500px;
    line-height: 1.6;
}

.filtro {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px 36px;
    margin-top: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(9, 64, 116, 0.10);
    border: 1px solid rgba(9, 64, 116, 0.08);
    width: 100%;
    max-width: 700px;
}

.filtro label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--azul);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.filtro select {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    border: 2px solid rgba(9, 64, 116, 0.2);
    border-radius: 8px;
    padding: 10px 38px 10px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--azul);
    cursor: pointer;
    outline: none;
    min-width: 160px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23094074' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.filtro select:focus {
    border-color: var(--turquesa);
    box-shadow: 0 0 0 3px rgba(0, 174, 204, 0.15);
}

.filtro select:hover {
    border-color: var(--azul-medio);
}

.filtro button {
    padding: 10px 30px;
    background: var(--verde);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(64, 206, 2, 0.3);
    text-transform: uppercase;
}

.filtro button:hover {
    background: #35b002;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(64, 206, 2, 0.4);
}

.filtro button:active {
    transform: translateY(0);
}

.horario {
    width: 100%;
    max-width: 960px;
    margin-top: 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(9, 64, 116, 0.12);
    background: white;
    box-shadow: 0 4px 30px rgba(9, 64, 116, 0.08);
}

.horario>.aviso {
    padding: 50px 30px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--azul-medio);
    background: white;
    font-weight: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.horario>.aviso::before {
    content: '📋';
    font-size: 2.2rem;
    display: block;
    margin-bottom: 4px;
    opacity: 0.7;
}

.tabla-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabla-horario {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.85rem;
}

.tabla-horario thead th {
    background-color: var(--azul);
    color: var(--marfil);
    padding: 14px 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
}

.tabla-horario .celda-hora {
    width: 92px;
    white-space: nowrap;
    background-color: rgba(9, 64, 116, 0.05);
    color: var(--azul-medio);
    font-weight: 600;
    font-size: 0.78rem;
    text-align: center;
    position: sticky;
    left: 0;
    z-index: 1;
}

.tabla-horario thead th.celda-hora {
    background-color: var(--azul);
    color: var(--marfil);
    z-index: 3;
}

.tabla-horario tbody tr:nth-child(even) .celda-hora {
    background-color: rgba(9, 64, 116, 0.09);
}

.tabla-horario td {
    border-bottom: 1px solid rgba(9, 64, 116, 0.08);
    border-right: 1px solid rgba(9, 64, 116, 0.08);
    vertical-align: middle;
    padding: 0;
}

.tabla-horario td:last-child {
    border-right: none;
}

.tabla-horario tbody tr:last-child td {
    border-bottom: none;
}

/* Celda con clase asignada */
.celda-clase {
    padding: 10px 8px !important;
    text-align: center;
    background: rgba(0, 174, 204, 0.08);
    border-left: 3px solid var(--turquesa);
    transition: background 0.15s ease;
}

.celda-clase:hover {
    background: rgba(0, 174, 204, 0.16);
}

.clase-materia {
    display: block;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--azul);
    line-height: 1.3;
    margin-bottom: 4px;
}

.clase-salon {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--turquesa);
    background: rgba(0, 174, 204, 0.12);
    border: 1px solid rgba(0, 174, 204, 0.25);
    border-radius: 20px;
    padding: 2px 10px;
}

/* Celda sin clase (espacio libre en el horario) */
.celda-vacia {
    height: 46px;
    background-image: repeating-linear-gradient(135deg,
            rgba(9, 64, 116, 0.035),
            rgba(9, 64, 116, 0.035) 6px,
            transparent 6px,
            transparent 12px);
}

@media (max-width: 600px) {
    header {
        padding: 0 20px;
        height: 60px;
    }

    .main {
        padding: 40px 20px 60px;
    }

    .filtro {
        flex-direction: column;
        align-items: stretch;
        padding: 24px 20px;
    }

    .filtro select {
        min-width: unset;
        width: 100%;
    }

    .filtro button {
        width: 100%;
    }

    .tabla-horario {
        font-size: 0.78rem;
    }

    .tabla-horario .celda-hora {
        width: 74px;
        font-size: 0.7rem;
    }

    .clase-materia {
        font-size: 0.76rem;
    }

    .clase-salon {
        font-size: 0.68rem;
    }
}