/* ================================
   ESTILOS ESPECÍFICOS DE EXTRAESCOLARES
   ================================ */

.sa-main--extraescolares .sa-main__header {
    display: flex;
    flex-direction: column;
    align-items: center;

    max-width: 800px;
    margin: 0 auto 2rem;
    text-align: center;
}

.sa-main--extraescolares .sa-main__title,
.sa-main--extraescolares .sa-main__subtitle {
    width: 100%;
    text-align: center;
}

.sa-schedule__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.2rem;
}

/* =================================
   TARJETA DEL CALENDARIO
   ================================= */

.sa-schedule {
    position: relative;
    margin-bottom: 3rem;

    background-image: url('../img/fondo_extraescolares1.png');
    background-repeat: repeat;
    background-size: 300px; /* controla tamaño del patrón */
    background-position: center;

    border-radius: 18px;
    padding: 1.6rem;
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
    cursor:pointer;
}

.sa-schedule-expand {
    position: absolute;
    bottom: 14px;
    right: 14px;

    width: 26px;
    height: 26px;

    border-radius: 6px;
    padding: 5px;

    color: #000;
    pointer-events: none;
}

.sa-schedule-expand svg {
    width: 100%;
    height: 100%;
}


/* ==================================================
   CALENDARIO VISUAL (BASE — ESCRITORIO)
   ================================================== */

.sa-calendar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* COLUMNA DE DÍA */
.sa-calendar__day {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* CABECERA DEL DÍA */
.sa-calendar__day-title {
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.45rem 0.3rem;
    border: 3px solid #000;
    background: #fff;
    letter-spacing: 0.05em;
    border-radius: 10px;
    /* 👈 redondeo */
}

/* TARJETA CLICABLE */
.sa-calendar__activity {
    --sa-activity-color: #f472b6;
    display: block;
    background: color-mix(in srgb, var(--sa-activity-color) 20%, #ffffff 80%);
    border: 2px solid var(--sa-activity-color);
    border-radius: 14px;
    padding: 0.55rem 0.6rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
}

.sa-calendar__activity:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* TÍTULO */
.sa-calendar__activity-title {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    color: #000;
    text-decoration: none;
    margin-bottom: 0.25rem;
}

/* HORARIOS */
.sa-calendar__activity-slot {
    font-size: 0.82rem;
    line-height: 1.3;
}

/* VACÍO */
.sa-calendar__empty {
    text-align: center;
    opacity: 0.35;
    font-style: italic;
    font-size: 0.75rem;
}

.sa-layout .sa-calendar__activity {
    margin-bottom: 0 !important;
}

/* ==================================================
   RESPONSIVE (SIN TOCAR ESCRITORIO)
   ================================================== */

/* =================================
   CALENDARIO NORMAL (TABLET)
   ================================= */

@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
      .sa-main{
        padding-left:18px;
        padding-right:18px;
    }

    /* calendario */
    .sa-calendar{
        gap:0.6rem;
    }

    /* columnas */
    .sa-calendar__day{
        gap:0.2rem;
    }

    /* cabecera días */
    .sa-calendar__day-title{
        font-size:0.8rem;
        padding:0.35rem 0.2rem;
    }

    /* tarjetas */
    .sa-calendar__activity{
        padding:0.45rem 0.5rem;
    }

    /* título actividad */
    .sa-calendar__activity-title{
        font-size:0.85rem;
        line-height:1.15;
    }

    /* horas */
    .sa-calendar__activity-slot{
        font-size:0.75rem;
    }

}

/* MÓVIL */
@media (max-width: 500px) {

    .sa-calendar {
        gap: 0.1rem;
    }

    .sa-calendar__day {
        gap: 0.15rem;
    }

    /* Título del día más compacto */
    .sa-calendar__day-title {
        font-size: 0.45rem;
        padding: 0.2rem 0.15rem;
        border-width: 2px;
        letter-spacing: 0.02em;
        line-height: 1.1;
        margin: 0;
    }

    /* Tarjetas más compactas */
    .sa-calendar__activity {
        padding: 0.28rem 0.32rem;
        border-radius: 9px;

    }

    /* Texto de actividad más compacto */
    .sa-calendar__activity-title {
        font-size: 0.58rem;
        margin-bottom: 0.01rem;
        line-height: 1.1;
    }

    .sa-calendar__activity-slot {
        font-size: 0.53rem;
        line-height: 1.1;
    }

    .sa-calendar__activity strong {
        display: block;
        font-weight: 700;
    }

    .sa-schedule {
        position: relative;

        width: calc(100vw - 20px);
        left: 50%;
        transform: translateX(-50%);

        padding: 12px 6px;
        box-sizing: border-box;
    }
}


/* ==================================================
   CARRUSEL DE ACTIVIDADES (FINAL)
   ================================================== */

.sa-carousel {
    position: relative;
    margin-bottom: 0.1rem;
}

/* ======================
   TRACK
   ====================== */

.sa-carousel__track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 0.3rem;
}

.sa-carousel__track::-webkit-scrollbar {
    display: none;
}

/* ======================
   TARJETA
   ====================== */

.sa-carousel__card {
    flex: 0 0 180px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

/* ======================
   IMAGEN
   ====================== */

.sa-carousel__image {
    height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: 12px 12px 0 0;
}

/* ======================
   CONTENIDO
   ====================== */

.sa-carousel__content {
    padding: 0.5rem 0.6rem 0.7rem;
}

.sa-carousel__tag {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #777;
    margin-bottom: 0.2rem;
}

.sa-carousel__title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #000;
}

.sa-carousel__excerpt {
    font-size: 0.75rem;
    line-height: 1.35;
    color: #555;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================
   FLECHAS (BASE)
   ====================== */

.sa-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.sa-carousel__arrow--prev {
    left: -12px;
}

.sa-carousel__arrow--next {
    right: -12px;
}

/* ======================
   ESCRITORIO → 5 TARJETAS
   ====================== */

@media (min-width: 1025px) {

    .sa-carousel__card {
        flex: 0 0 calc((100% - (4 * 0.75rem)) / 5);
    }

    .sa-carousel__arrow {
        width: 38px;
        height: 38px;
        font-size: 1.4rem;
    }

    .sa-carousel__excerpt {
        -webkit-line-clamp: unset;
    }
}

/* ======================
   TABLET → 3 TARJETAS
   ====================== */

@media (max-width: 1024px) and (min-width: 501px) {

    .sa-carousel__card {
        flex: 0 0 calc((100% - (2 * 0.75rem)) / 3);
    }

    .sa-carousel__arrow {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .sa-layout.sa-carousel__title {
        font-size: 0.82rem !important;
        line-height: 1.2;
    }

    .sa-carousel__tag {
        font-size: 0.58rem;
        letter-spacing: 0.03em;
    }

    .sa-layout .sa-carousel__excerpt {
        font-size: 0.70rem !important;
        line-height: 1.3;
        -webkit-line-clamp: 3;
    }
}

/* ======================
   MÓVIL → 2 TARJETAS
   ====================== */

@media (max-width: 500px) {

    .sa-carousel__card {
        flex: 0 0 calc((100% - 0.75rem) / 2);
    }

    .sa-carousel__arrow {
        width: 26px;
        height: 26px;
        font-size: 0.95rem;
    }

    .sa-layout .sa-carousel__title {
        font-size: 0.75rem !important;
        line-height: 1.15 !important;
    }

    .sa-carousel__tag {
        font-size: 0.45rem;
        letter-spacing: 0.03em;
    }

    .sa-carousel__arrow--prev {
        left: -8px;
    }

    .sa-carousel__arrow--next {
        right: -8px;
    }

    .sa-layout .sa-carousel__excerpt {
        font-size: 0.7rem !important;
        line-height: 1.25 !important;
        -webkit-line-clamp: 3;
    }
}

/* ==================================================
   SECCIONES POR NIVEL
   ================================================== */

.sa-level {
    margin-bottom: 1rem !important;
}

.sa-level__header {
    margin-bottom: 1.5rem !important;
}

.sa-level__title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
}


/* Colores por nivel (opcional pero recomendable) */

.sa-level--primaria .sa-level__title {
    color: #2563eb !important;
    /* azul */
}

.sa-level--infantil .sa-level__title {
    color: #16a34a !important;
    /* verde */
}

/* ==================================================
   ENLACE "VER TODAS LAS ACTIVIDADES" (DEBAJO DEL CARRUSEL)
   ================================================== */

.sa-level__actions--forward {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem !important;
}

/* Estilo base */
.sa-forward-link {
    font-family: 'Quicksand_Bold';
    font-size: 0.8rem;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.sa-forward-link:hover {
    text-decoration: underline;
}

/* ======================
   TABLET → TEXTO MÁS PEQUEÑO
   ====================== */

@media (max-width: 1024px) {
    .sa-forward-link {
        font-size: 0.75rem;
    }
}

/* ======================
   MÓVIL → AÚN MÁS DISCRETO
   ====================== */

@media (max-width: 600px) {
    .sa-forward-link {
        font-size: 0.70rem;
    }
}

/* LIGHTBOX ACTIVIDADES */

.sa-actividad-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.sa-actividad-lightbox.active {
    display: flex;
}

.sa-actividad-lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sa-actividad-big {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    width: 98vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}

.sa-actividad-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
}

/* TEXTO GIRAR MÓVIL */

.sa-actividad-rotate-hint {
    color: white;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    opacity: .9;
    display: none;
}

/* CALENDARIO GRANDE EN LIGHTBOX */

.sa-actividad-big .sa-calendar {
    gap: 1.2rem;
}

.sa-actividad-big .sa-calendar__activity {
    padding: 0.7rem 0.8rem;
}

.sa-actividad-big .sa-calendar__activity-title {
    font-size: 1.1rem;
}

.sa-actividad-big .sa-calendar__activity-slot {
    font-size: 0.95rem;
}

.sa-actividad-big .sa-calendar__day-title {
    font-size: 1rem;
}

@media (max-width:600px) {

    .sa-actividad-big {
        width: 99vw;
        padding: 12px 6px;
    }

    .sa-actividad-big .sa-calendar {
        gap: 0.5rem;
    }

    .sa-actividad-big .sa-calendar__activity-title {
        font-size: 0.9rem;
    }

    .sa-actividad-big .sa-calendar__activity-slot {
        font-size: 0.8rem;
    }

}

/* =================================
   CALENDARIO EN LIGHTBOX (MÓVIL)
   ================================= */

@media (max-width:500px) {

    .sa-actividad-big .sa-calendar {
        gap: 0.1rem;
    }

    .sa-actividad-big .sa-calendar__day {
        gap: 0.15rem;
    }

    .sa-actividad-big .sa-calendar__day-title {
        font-size: 0.45rem;
        padding: 0.2rem 0.15rem;
        border-width: 2px;
        letter-spacing: 0.02em;
        line-height: 1.1;
        margin: 0;
    }

    .sa-actividad-big .sa-calendar__activity {
        padding: 0.28rem 0.32rem;
        border-radius: 9px;
    }

    .sa-actividad-big .sa-calendar__activity-title {
        font-size: 0.58rem;
        margin-bottom: 0.01rem;
        line-height: 1.1;
    }

    .sa-actividad-big .sa-calendar__activity-slot {
        font-size: 0.53rem;
        line-height: 1.1;
    }

    .sa-actividad-big .sa-schedule {
        padding: 0;
        box-shadow: none;
        margin-bottom: 0;
    }

}

/* MÓVIL VERTICAL */

@media (max-width:767px) and (orientation:portrait) {

    .sa-actividad-rotate-hint {
        display: block;
    }

    .sa-schedule__header {
        margin-bottom: 0.5rem !important;
    }


}

/* MÓVIL HORIZONTAL */

@media (orientation:landscape) and (max-width:1024px) {

    .sa-schedule__header {
        margin-bottom: 0.5rem !important;
    }

    /* tarjeta del lightbox */
    .sa-actividad-big {
        width: 94vw;
        padding: 8px 6px;
    }

    /* calendario */
    .sa-actividad-big .sa-calendar {
        gap: 0.2rem;
    }

    /* columnas */
    .sa-actividad-big .sa-calendar__day {
        gap: 0.08rem;
    }

    /* cabecera días */
    .sa-actividad-big .sa-calendar__day-title {
        font-size: 0.6rem;
        padding: 0.18rem 0.12rem;
    }

    /* tarjetas actividad */
    .sa-actividad-big .sa-calendar__activity {
        padding: 0.25rem 0.27rem;
    }

    /* texto actividad */
    .sa-actividad-big .sa-calendar__activity-title {
        font-size: 0.8rem;
        line-height: 1;
    }

    /* horas */
    .sa-actividad-big .sa-calendar__activity-slot {
        font-size: 0.7rem;
        line-height: 1;
    }


}

/* =================================
   CALENDARIO EN LIGHTBOX (TABLET)
   ================================= */

@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){

    /* tarjeta del lightbox */
    .sa-actividad-big{
        width:98vw;
        padding:16px 14px;
    }

    /* calendario */
    .sa-actividad-big .sa-calendar{
        gap:0.6rem;
    }

    /* columnas */
    .sa-actividad-big .sa-calendar__day{
        gap:0.2rem;
    }

    /* cabecera días */
    .sa-actividad-big .sa-calendar__day-title{
        font-size:0.8rem;
        padding:0.35rem 0.2rem;
    }

    /* tarjetas */
    .sa-actividad-big .sa-calendar__activity{
        padding:0.45rem 0.5rem;
    }

    /* título actividad */
    .sa-actividad-big .sa-calendar__activity-title{
        font-size:0.85rem;
        line-height:1.15;
    }

    /* horas */
    .sa-actividad-big .sa-calendar__activity-slot{
        font-size:0.75rem;
    }

}

/* ESCRITORIO */

@media (min-width:1025px) {

    .sa-actividad-rotate-hint {
        display: none;
    }

}
/* ocultar icono ampliar dentro del lightbox */
.sa-actividad-big .sa-schedule-expand{
    display:none;
}