/* ============================================
   CEPO - Homepage Styles
   Fiel al diseño de Figma: Homepage (145:99)
   ============================================ */

/* ============================================
   1. HERO SLIDER
   ============================================ */
.cepo-hero {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
}

.cepo-hero__track {
    width: 100%;
    height: 100%;
    position: relative;
}

.cepo-hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 1;
}

.cepo-hero__slide.is-active {
    opacity: 1;
    z-index: 2;
}

.cepo-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
    z-index: 1;
}

.cepo-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 var(--container-padding);
}

.cepo-hero__title {
    font-family: var(--font-primary);
    font-weight: var(--fw-black);
    font-size: var(--fs-3xl);
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cepo-hero__subtitle {
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-lg);
    color: var(--color-white);
    max-width: 700px;
    margin-bottom: 24px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.cepo-hero__cta {
    font-size: var(--fs-md);
    padding: 14px 32px;
}

/* Logo overlay centrado */
.cepo-hero__logo-overlay {
    position: absolute;
    bottom: 40%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0.9;
}

.cepo-hero__logo-img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Flechas de navegación */
.cepo-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
}

.cepo-hero__arrow:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.cepo-hero__arrow--prev {
    left: 20px;
}

.cepo-hero__arrow--next {
    right: 20px;
}

/* Indicadores */
.cepo-hero__indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.cepo-hero__indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cepo-hero__indicator.is-active {
    background-color: var(--color-white);
}


/* ============================================
   2. BARRA DE INFORMACIÓN
   ============================================ */
.cepo-info-bar {
    position: relative;
    margin-top: -40px;
    z-index: 10;
    padding: 0 var(--container-padding);
}

.cepo-info-bar__inner {
    display: flex;
    max-width: var(--container-max);
    margin: 0 auto;
    background-color: var(--color-green-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border-top: 5px solid var(--color-yellow);
}

.cepo-info-bar__item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 30px;
    color: var(--color-white);
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.cepo-info-bar__item:last-child {
    border-right: none;
}

.cepo-info-bar__item:hover {
    background-color: var(--color-green-medium);
    opacity: 1;
}

.cepo-info-bar__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cepo-info-bar__icon img,
.cepo-info-bar__icon svg {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.cepo-info-bar__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cepo-info-bar__text strong {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cepo-info-bar__text span {
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-xs);
    opacity: 0.9;
}


/* ============================================
   3. CALENDARIO DE ACTIVIDADES
   Fiel a Figma: Frame 24 (179:186)
   ============================================ */
.cepo-calendario {
    text-align: center;
}

.cepo-calendario__title {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xl);
    color: var(--color-text-dark);
    margin-bottom: 40px;
}

.cepo-calendario__title-accent {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-style: italic;
    color: var(--color-green-primary);
}

.cepo-calendario__content {
    display: flex;
    gap: 24px;
    align-items: stretch;
    text-align: left;
}

/* Widget del Calendario */
.cepo-calendario__widget {
    flex: 1;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-lg);
    padding: 24px 30px;
}

.cepo-calendario__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cepo-calendario__nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--color-text-dark);
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.cepo-calendario__nav-btn:hover {
    background-color: var(--color-bg-input);
}

.cepo-calendario__month {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-md);
    color: var(--color-text-dark);
    min-width: 200px;
    text-align: center;
}

.cepo-calendario__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
    margin-bottom: 4px;
}

.cepo-calendario__weekdays span {
    font-family: var(--font-primary);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-xs);
    color: var(--color-text-gray);
    text-align: center;
    padding: 8px 0;
    width: 40px;
}

.cepo-calendario__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    justify-items: center;
}

.cepo-calendario__day {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-sm);
    color: var(--color-text-dark);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.cepo-calendario__day:hover {
    background-color: var(--color-bg-input);
}

/* Día actual: círculo verde */
.cepo-calendario__day--today {
    background-color: var(--color-green-primary);
    color: var(--color-white);
    font-weight: var(--fw-bold);
}

/* Eventos con color en el número (sin fondo circular) */
.cepo-calendario__day--event-green {
    color: var(--color-green-primary);
    font-weight: var(--fw-bold);
}

.cepo-calendario__day--event-yellow {
    color: #e8a500;
    font-weight: var(--fw-bold);
}

.cepo-calendario__day--event-blue {
    color: var(--color-blue-light);
    font-weight: var(--fw-bold);
}

.cepo-calendario__day--other-month {
    color: var(--color-text-muted);
}

.cepo-calendario__day--empty {
    cursor: default;
}

/* Sidebar de Eventos */
.cepo-calendario__sidebar {
    width: 300px;
    flex-shrink: 0;
    background-color: var(--color-green-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

/* Carita feliz SVG de fondo */
.cepo-calendario__sidebar-bg {
    position: absolute;
    bottom: 20px;
    right: -10px;
    width: 180px;
    height: 180px;
    opacity: 0.12;
    pointer-events: none;
}

.cepo-calendario__sidebar-bg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cepo-calendario__sidebar-title {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: 16px;
    color: var(--color-white);
    font-style: italic;
    line-height: 1.3;
}

.cepo-calendario__events {
    flex: 1;
}

.cepo-calendario__event-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cepo-calendario__event-item {
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-sm);
    color: var(--color-white);
    line-height: 1.4;
}

.cepo-calendario__event-item strong {
    font-weight: var(--fw-bold);
}

.cepo-calendario__event-item--green strong {
    color: var(--color-white);
}

.cepo-calendario__event-item--yellow strong {
    color: var(--color-yellow);
}

.cepo-calendario__event-item--blue strong {
    color: var(--color-blue-light);
}

/* Botón Ver Galería: amarillo como en Figma */
.cepo-calendario__gallery-link {
    background-color: var(--color-yellow);
    color: var(--color-text-dark);
    border: none;
    width: 100%;
    text-align: center;
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    padding: 10px 16px;
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.cepo-calendario__gallery-link:hover {
    background-color: var(--color-yellow-alt);
    color: var(--color-text-dark);
    opacity: 1;
}


/* ============================================
   4. AULA VIRTUAL CTA
   ============================================ */
.cepo-aula-virtual-cta {
    position: relative;
    width: calc(100% - 2 * var(--container-padding));
    max-width: var(--container-max);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: var(--spacing-3xl) auto;
    border-radius: var(--radius-xl);
}

.cepo-aula-virtual-cta__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cepo-aula-virtual-cta__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cepo-aula-virtual-cta__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(10, 37, 20, 0.6) 0%,
        rgba(10, 37, 20, 0.85) 100%
    );
}

.cepo-aula-virtual-cta__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px var(--container-padding);
    max-width: 700px;
}

.cepo-aula-virtual-cta__label {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    color: var(--color-yellow);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.cepo-aula-virtual-cta__title {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-xl);
    color: var(--color-white);
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.3;
}

.cepo-aula-virtual-cta__text {
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-base);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    line-height: 1.6;
}

.cepo-aula-virtual-cta__btn {
    font-size: var(--fs-base);
    padding: 14px 28px;
}


/* ============================================
   5. LISTA DE LIBROS
   ============================================ */
.cepo-libros {
    background-color: var(--color-green-primary);
    padding: var(--spacing-3xl) 0;
    padding-bottom: 140px;
    position: relative;
    overflow: hidden;
}

/* Decoraciones SVG de fondo - se insertan via PHP */
.cepo-libros__deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.cepo-libros__deco--book {
    top: 10px;
    left: 20px;
    width: 160px;
    height: 160px;
}

.cepo-libros__deco--pencil {
    top: 0;
    right: 30px;
    width: 140px;
    height: 160px;
}

.cepo-libros__deco img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cepo-libros__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

.cepo-libros__header {
    text-align: center;
    margin-bottom: 40px;
}

.cepo-libros__title {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-2xl);
    color: var(--color-white);
    margin-bottom: 4px;
}

.cepo-libros__year {
    font-family: var(--font-primary);
    font-weight: var(--fw-black);
    font-size: var(--fs-3xl);
    color: var(--color-white);
    line-height: 1;
}

.cepo-libros__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.cepo-libros__card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cepo-libros__card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.cepo-libros__card-image {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background-color: var(--color-bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cepo-libros__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cepo-libros__card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cepo-libros__card-title {
    font-family: var(--font-primary);
    font-weight: var(--fw-bold);
    font-size: var(--fs-base);
    color: var(--color-text-dark);
    text-transform: uppercase;
}

.cepo-libros__card-text {
    font-family: var(--font-primary);
    font-weight: var(--fw-regular);
    font-size: var(--fs-xs);
    color: var(--color-text-gray);
    line-height: 1.5;
}

.cepo-libros__card-btn {
    align-self: flex-start;
    font-size: var(--fs-sm);
    padding: 10px 20px;
    gap: 8px;
    margin-top: 4px;
}


/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.cepo-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.cepo-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   RESPONSIVE: Tablet (768px)
   ============================================ */
@media (max-width: 768px) {
    .cepo-hero {
        height: 450px;
    }

    .cepo-hero__logo-img {
        width: 120px;
    }

    .cepo-hero__arrow {
        width: 40px;
        height: 40px;
    }

    .cepo-info-bar {
        margin-top: -30px;
        padding: 0 24px;
    }

    .cepo-info-bar__inner {
        flex-direction: column;
    }

    .cepo-info-bar__item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 18px 24px;
    }

    .cepo-info-bar__item:last-child {
        border-bottom: none;
    }

    .cepo-calendario__content {
        flex-direction: column;
    }

    .cepo-calendario__sidebar {
        width: 100%;
    }

    .cepo-aula-virtual-cta {
        min-height: 300px;
    }

    .cepo-libros__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ============================================
   RESPONSIVE: Mobile (480px)
   ============================================ */
@media (max-width: 480px) {
    .cepo-hero {
        height: 350px;
    }

    .cepo-hero__logo-img {
        width: 90px;
    }

    .cepo-hero__arrow {
        display: none;
    }

    .cepo-info-bar {
        padding: 0 16px;
    }

    .cepo-info-bar__item {
        padding: 14px 16px;
        gap: 12px;
    }

    .cepo-calendario__widget {
        padding: 20px;
    }

    .cepo-calendario__sidebar {
        padding: 20px;
    }

    .cepo-aula-virtual-cta {
        min-height: 250px;
    }

    .cepo-aula-virtual-cta__content {
        padding: 40px 16px;
    }

    .cepo-libros__grid {
        grid-template-columns: 1fr;
    }

    .cepo-libros__card-image {
        aspect-ratio: 4/3;
    }
}
