/* ===================================
   HORARIOS ESCUELA CSS
   =================================== */

/* Hero */
.schedule-hero {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.95), rgba(18, 18, 18, 0.9)),
        url('../img/foto3.jpg') center/cover;
    height: 50vh;
    display: flex;
    align-items: center;
    color: white;
}

.schedule-hero .hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.schedule-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.schedule-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Navegación Tabs */
.schedule-navigation {
    background: var(--blanco);
    padding: 2rem 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 90;
}

.schedule-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.schedule-tab {
    padding: 1rem 2rem;
    background: var(--gris);
    color: var(--negro);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.schedule-tab:hover,
.schedule-tab.active {
    background: var(--rojo);
    color: var(--blanco);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

/* Secciones */
.schedule-section {
    padding: 5rem 0;
}

.schedule-section.alt-bg {
    background: var(--gris);
}

.sede-header {
    text-align: center;
    margin-bottom: 3rem;
}

.sede-header h2 {
    font-size: 2.5rem;
    color: var(--negro);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.sede-location {
    font-size: 1.2rem;
    color: var(--gris-medio);
}

/* Tabla de Horarios */
.schedule-table-wrapper {
    overflow-x: auto;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    position: relative;
}

/* Indicador de scroll para móvil */
.schedule-table-wrapper::after {
    content: "← Desliza para ver más →";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(230, 57, 70, 0.9);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    display: none;
    pointer-events: none;
}

.schedule-table {
    width: 100%;
    background: var(--blanco);
    border-collapse: collapse;
    border-radius: 15px;
    overflow: hidden;
}

.schedule-table thead {
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    color: var(--blanco);
}

.schedule-table th {
    padding: 1.5rem 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.schedule-table tbody tr:hover {
    background: var(--gris);
    transform: scale(1.01);
}

.schedule-table td {
    padding: 1.5rem 1rem;
    text-align: center;
    vertical-align: middle;
}

/* Celdas de Grupo */
.group-name {
    text-align: left !important;
    font-size: 1.1rem;
}

.group-name strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.group-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gris-medio);
    font-weight: normal;
}

.age-cell {
    font-weight: 600;
    color: var(--negro);
}

/* Celdas de Entrenamiento */
.training-cell {
    padding: 1rem !important;
    border-left: 4px solid transparent;
}

.training-cell.piscina {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #2196F3;
}

.training-cell.gimnasio {
    background: rgba(255, 152, 0, 0.1);
    border-left-color: #FF9800;
}

.training-cell.atletismo {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
}

.training-cell.ciclismo {
    background: rgba(156, 39, 176, 0.1);
    border-left-color: #9C27B0;
}

.training-time {
    font-weight: 700;
    font-size: 1rem;
    color: var(--negro);
    margin-bottom: 0.3rem;
}

.training-type {
    font-size: 0.85rem;
    color: var(--gris-medio);
}

.training-type i {
    margin-right: 0.3rem;
}

.empty-cell {
    color: var(--gris-medio);
    font-style: italic;
}

/* Colores de Grupos */
.group-iniciacion {
    border-left: 5px solid #4CAF50;
}

.group-tecnificacion {
    border-left: 5px solid #2196F3;
}

.group-rendimiento {
    border-left: 5px solid var(--rojo);
}

/* Leyenda */
.schedule-legend {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.schedule-legend h3 {
    font-size: 1.3rem;
    color: var(--negro);
    margin-bottom: 1.5rem;
    text-align: center;
}

.legend-items {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 5px;
}

.legend-color.piscina {
    background: #2196F3;
}

.legend-color.gimnasio {
    background: #FF9800;
}

.legend-color.atletismo {
    background: #4CAF50;
}

.legend-color.ciclismo {
    background: #9C27B0;
}

/* Información Adicional */
.info-adicional-section {
    padding: 5rem 0;
    background: var(--blanco);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--negro);
    margin-bottom: 3rem;
    font-weight: 800;
}

.section-title i {
    color: var(--rojo);
    margin-right: 0.5rem;
}

.info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card-schedule {
    background: var(--gris);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.info-card-schedule:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(230, 57, 70, 0.15);
}

.info-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    color: var(--blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.info-card-schedule h3 {
    font-size: 1.3rem;
    color: var(--negro);
    margin-bottom: 1rem;
}

.info-card-schedule p {
    color: var(--gris-medio);
    margin: 0;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, var(--negro), #2a2a2a);
    color: var(--blanco);
    padding: 5rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--rojo);
    color: var(--blanco);
}

.btn-primary:hover {
    background: var(--rojo-oscuro);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--blanco);
    border: 2px solid var(--blanco);
}

.btn-secondary:hover {
    background: var(--blanco);
    color: var(--negro);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 1024px) {
    .schedule-table {
        font-size: 0.9rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 1rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .schedule-hero {
        height: auto;
        min-height: 40vh;
        padding: 3rem 0;
    }

    .schedule-hero .hero-content {
        padding: 0 1.5rem;
    }

    .schedule-hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
    }

    .schedule-hero p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .schedule-navigation {
        top: 70px;
        padding: 1.5rem 0;
    }

    .schedule-tabs {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0 1rem;
    }

    .schedule-tab {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }

    .schedule-section {
        padding: 2.5rem 0;
    }

    .sede-header h2 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .sede-location {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .schedule-table-wrapper {
        border-radius: 10px;
        margin: 0 1rem 2rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .schedule-table-wrapper::after {
        display: block;
    }

    .schedule-table {
        font-size: 0.75rem;
        min-width: 650px;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.7rem 0.3rem;
        min-width: 80px;
    }

    .schedule-table th:first-child,
    .schedule-table td:first-child {
        min-width: 100px;
        position: sticky;
        left: 0;
        background: var(--blanco);
        z-index: 10;
    }

    .schedule-table thead th:first-child {
        background: linear-gradient(135deg, var(--rojo), var(--rojo-oscuro));
    }

    .group-name strong {
        font-size: 0.95rem;
    }

    .group-label {
        font-size: 0.7rem;
    }

    .training-time {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .training-type {
        font-size: 0.7rem;
    }

    .training-cell {
        padding: 0.6rem 0.3rem !important;
    }

    .legend-items {
        gap: 1rem;
        flex-direction: column;
    }

    .legend-item {
        justify-content: center;
    }

    .schedule-legend {
        margin: 0 1rem;
    }

    .info-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .section-title {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

    .cta-content p {
        padding: 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .schedule-hero {
        min-height: 35vh;
        padding: 2rem 0;
    }

    .schedule-hero .hero-content {
        padding: 0 1rem;
    }

    .schedule-hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .schedule-hero p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .schedule-table {
        font-size: 0.7rem;
        min-width: 600px;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 0.5rem 0.2rem;
        min-width: 70px;
    }

    .schedule-table th:first-child,
    .schedule-table td:first-child {
        min-width: 90px;
    }

    .training-cell {
        padding: 0.4rem 0.2rem !important;
    }

    .training-time {
        font-size: 0.75rem;
    }

    .training-type {
        font-size: 0.65rem;
    }

    .group-name strong {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .sede-header h2 {
        font-size: 1.5rem;
    }

    .info-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .schedule-legend h3 {
        font-size: 1.1rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.schedule-table tbody tr {
    animation: fadeInUp 0.5s ease forwards;
}

.schedule-table tbody tr:nth-child(1) {
    animation-delay: 0.1s;
}

.schedule-table tbody tr:nth-child(2) {
    animation-delay: 0.2s;
}

.schedule-table tbody tr:nth-child(3) {
    animation-delay: 0.3s;
}

.schedule-table tbody tr:nth-child(4) {
    animation-delay: 0.4s;
}