/*
=================================================================
    PAGINA HORARIOS ACADEMICOS - ESTILOS
=================================================================

    Diseno moderno con estetica "tablero academico"
    Colores institucionales + acentos vibrantes
    Animaciones fluidas y microinteracciones
*/

/* ========================================
   VARIABLES LOCALES
   ======================================== */
.horarios-page {
    --horarios-accent: #ff6b35;
    --horarios-accent-dark: #e55a2b;
    --horarios-accent-light: #fff0eb;
    --horarios-diurna: #ffa726;
    --horarios-sabatina: #5c6bc0;
    --horarios-gradient: linear-gradient(135deg, #ff9600 0%, #ff6b35 50%, #e55a2b 100%);
    --horarios-shadow: 0 10px 40px rgba(255, 107, 53, 0.15);
    --horarios-radius: 16px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.horarios-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--horarios-gradient);
}

.horarios-hero__bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.horarios-hero__pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.06) 0%, transparent 30%);
    animation: patternFloat 20s ease-in-out infinite;
}

.horarios-hero__pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(255,255,255,0.02) 100px,
            rgba(255,255,255,0.02) 101px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 100px,
            rgba(255,255,255,0.02) 100px,
            rgba(255,255,255,0.02) 101px
        );
}

@keyframes patternFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.02); }
}

.horarios-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 20px;
    max-width: 700px;
}

.horarios-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 10px 24px;
    border-radius: 50px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.3);
    animation: fadeSlideDown 0.6s ease forwards;
}

.horarios-hero__badge svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.horarios-hero__badge span {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.horarios-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: white;
    margin: 0 0 16px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: fadeSlideDown 0.6s ease forwards 0.1s;
    opacity: 0;
}

.horarios-hero__subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: rgba(255,255,255,0.95);
    margin: 0;
    font-weight: 400;
    animation: fadeSlideDown 0.6s ease forwards 0.2s;
    opacity: 0;
}

.horarios-hero__scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    animation: fadeSlideDown 0.6s ease forwards 0.4s, bounce 2s ease-in-out infinite 1s;
    opacity: 0;
}

.horarios-hero__scroll-hint span {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.horarios-hero__scroll-hint svg {
    width: 24px;
    height: 24px;
    fill: rgba(255,255,255,0.8);
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========================================
   NAVIGATION TABS
   ======================================== */
.horarios-nav {
    background: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.horarios-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
}

.horarios-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.horarios-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: var(--horarios-accent);
    border-radius: 4px 4px 0 0;
    transition: width 0.3s ease;
}

.horarios-tab:hover {
    background: var(--horarios-accent-light);
}

.horarios-tab--active {
    background: var(--horarios-accent-light);
}

.horarios-tab--active::before {
    width: 60%;
}

.horarios-tab__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.horarios-tab[data-jornada="diurna"] .horarios-tab__icon {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
}

.horarios-tab[data-jornada="diurna"] .horarios-tab__icon svg {
    fill: var(--horarios-diurna);
}

.horarios-tab[data-jornada="sabatina"] .horarios-tab__icon {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
}

.horarios-tab[data-jornada="sabatina"] .horarios-tab__icon svg {
    fill: var(--horarios-sabatina);
}

.horarios-tab__icon svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.horarios-tab--active .horarios-tab__icon svg {
    transform: scale(1.1);
}

.horarios-tab__text {
    text-align: left;
}

.horarios-tab__label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 2px;
}

.horarios-tab__desc {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========================================
   CONTENT SECTION
   ======================================== */
.horarios-content {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0 80px;
    min-height: 400px;
}

.horarios-panel {
    display: none;
    animation: panelFadeIn 0.4s ease;
}

.horarios-panel--active {
    display: block;
}

@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   GRID DE PROGRAMAS
   ======================================== */
.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ========================================
   TARJETAS DE PROGRAMA
   ======================================== */
.horarios-card {
    background: white;
    border-radius: var(--horarios-radius);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: cardSlideIn 0.5s ease forwards;
    animation-delay: calc(var(--card-index, 0) * 0.08s);
    opacity: 0;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.horarios-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--horarios-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.horarios-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--horarios-shadow);
}

.horarios-card:hover::before {
    transform: scaleX(1);
}

.horarios-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--horarios-accent-light), #fff);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
    transition: all 0.3s ease;
}

.horarios-card:hover .horarios-card__icon {
    transform: scale(1.08) rotate(-3deg);
}

.horarios-card__icon svg {
    width: 28px;
    height: 28px;
    fill: var(--horarios-accent);
}

/* Icon variations */
.horarios-card__icon--administracion { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.horarios-card__icon--administracion svg { fill: #1976d2; }

.horarios-card__icon--contabilidad { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.horarios-card__icon--contabilidad svg { fill: #388e3c; }

.horarios-card__icon--sistemas { background: linear-gradient(135deg, #fce4ec, #f8bbd9); }
.horarios-card__icon--sistemas svg { fill: #c2185b; }

.horarios-card__icon--mercadeo { background: linear-gradient(135deg, #fff3e0, #ffe0b2); }
.horarios-card__icon--mercadeo svg { fill: #f57c00; }

.horarios-card__icon--salud { background: linear-gradient(135deg, #e0f7fa, #b2ebf2); }
.horarios-card__icon--salud svg { fill: #00838f; }

.horarios-card__icon--turismo { background: linear-gradient(135deg, #f3e5f5, #e1bee7); }
.horarios-card__icon--turismo svg { fill: #7b1fa2; }

.horarios-card__icon--gastronomia { background: linear-gradient(135deg, #ffebee, #ffcdd2); }
.horarios-card__icon--gastronomia svg { fill: #d32f2f; }

.horarios-card__content {
    flex: 1;
}

.horarios-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}

.horarios-card__desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.horarios-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--horarios-gradient);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.horarios-card__btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.horarios-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.horarios-card__btn:hover svg {
    transform: translateY(2px);
}

.horarios-card__btn--disabled {
    background: #e9ecef;
    color: #868e96;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.horarios-card__btn--disabled svg {
    fill: #868e96;
}

/* ========================================
   NOTA INFORMATIVA
   ======================================== */
.horarios-note {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    border: 1px solid #ffe082;
    border-radius: 12px;
    animation: fadeSlideDown 0.5s ease forwards 0.3s;
    opacity: 0;
}

.horarios-note svg {
    width: 24px;
    height: 24px;
    fill: #f9a825;
    flex-shrink: 0;
    margin-top: 2px;
}

.horarios-note p {
    margin: 0;
    color: #5d4037;
    font-size: 15px;
    line-height: 1.6;
}

/* ========================================
   ESTADO VACIO
   ======================================== */
.horarios-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: var(--horarios-radius);
    border: 2px dashed #dee2e6;
}

.horarios-empty__icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.horarios-empty__icon svg {
    width: 48px;
    height: 48px;
    fill: #adb5bd;
}

.horarios-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.horarios-empty p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* ========================================
   SECCION CONTACTO
   ======================================== */
.horarios-contact {
    background: #1a1a2e;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.horarios-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 90% 50%, rgba(255, 150, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.horarios-contact__card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 48px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
}

.horarios-contact__icon {
    width: 70px;
    height: 70px;
    background: var(--horarios-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.horarios-contact__icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.horarios-contact__content {
    flex: 1;
}

.horarios-contact__content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: white;
    margin: 0 0 6px;
}

.horarios-contact__content p {
    font-size: 15px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.horarios-contact__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: #25d366;
    color: white;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    white-space: nowrap;
}

.horarios-contact__btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.horarios-contact__btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    background: #20bd5a;
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (max-width: 900px) {
    .horarios-contact__card {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }

    .horarios-contact__content {
        flex: none;
    }
}

@media (max-width: 768px) {
    .horarios-hero {
        min-height: 320px;
    }

    .horarios-hero__content {
        padding: 40px 20px;
    }

    .horarios-tabs {
        flex-direction: row;
    }

    .horarios-tab {
        flex-direction: column;
        padding: 20px 16px;
        gap: 10px;
    }

    .horarios-tab__icon {
        width: 44px;
        height: 44px;
    }

    .horarios-tab__icon svg {
        width: 20px;
        height: 20px;
    }

    .horarios-tab__text {
        text-align: center;
    }

    .horarios-tab__label {
        font-size: 0.95rem;
    }

    .horarios-tab__desc {
        font-size: 12px;
    }

    .horarios-content {
        padding: 40px 0 60px;
    }

    .horarios-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .horarios-card {
        padding: 24px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 480px) {
    .horarios-hero {
        min-height: 280px;
    }

    .horarios-hero__badge {
        padding: 8px 16px;
        font-size: 12px;
    }

    .horarios-hero__scroll-hint {
        display: none;
    }

    .horarios-tab {
        padding: 16px 12px;
    }

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

    .horarios-note {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .horarios-empty {
        padding: 50px 24px;
    }

    .horarios-contact {
        padding: 40px 0;
    }

    .horarios-contact__card {
        padding: 24px;
    }

    .horarios-contact__icon {
        width: 56px;
        height: 56px;
    }

    .horarios-contact__icon svg {
        width: 26px;
        height: 26px;
    }

    .horarios-contact__content h3 {
        font-size: 1.25rem;
    }

    .horarios-contact__btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .horarios-hero__pattern,
    .horarios-card,
    .horarios-tab,
    .horarios-card__btn,
    .horarios-contact__btn,
    .horarios-hero__scroll-hint {
        animation: none !important;
        transition: none !important;
    }

    .horarios-card {
        opacity: 1;
    }

    .horarios-hero__badge,
    .horarios-hero__title,
    .horarios-hero__subtitle,
    .horarios-note {
        opacity: 1;
        animation: none !important;
    }
}

/* Focus styles for keyboard navigation */
.horarios-tab:focus-visible,
.horarios-card__btn:focus-visible,
.horarios-contact__btn:focus-visible {
    outline: 3px solid var(--horarios-accent);
    outline-offset: 3px;
}
