@import url('https://fonts.googleapis.com/css2?family=Flamenco:wght@300;400&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --blanco: #fcfcfc;
    --negro: rgb(63, 63, 62);
    --gris: #757575;
    --grisOscuro: rgb(63, 63, 62);
    --rojo: rgb(199, 19, 49);
    --rojoIconos: rgb(194, 19, 48);
    --rojoIconosClaro: rgb(219, 5, 40);
}

body {
    font-family: "Montserrat", sans-serif;
}

.CalendarioPrincipal {
    padding: 5rem 4rem;
    /* FIX: padding lateral para que la flecha derecha no toque la pared */
    display: flex;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.ListaMeses {
    width: 12%;
    min-width: 140px;
    font-size: 1.6rem;
    padding-left: 0;
    flex-shrink: 0;
}

.boton-personalizado {
    background-color: red !important;
    font-size: 18px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
}

.titulo-grande {
    font-size: 33px;
    font-weight: bold;
}

.ventana-amplia {
    padding: 60px;
    width: 650px;
}

.texto-justificado {
    text-align: justify;
    font-size: 21px;
}

.ListaMeses p:hover {
    color: var(--rojo);
    cursor: pointer;
}

.ListaMeses p:active {
    cursor: pointer;
}

.CarruselCalendarioA {
    flex: 1;
    /* FIX: ocupa el espacio restante sin desbordar */
    min-width: 0;
    /* FIX: permite que flex shrink funcione */
    padding: 0 55px;
    /* espacio interno para las flechas */
    box-sizing: border-box;
    overflow: visible;
    /* flechas absolutas de Swiper visibles */
    position: relative;
}

.swiper {
    width: 100%;
    max-width: 850px;
    padding: 25px 0;
    overflow: visible !important;
}

.swiper-wrapper {
    overflow: visible;
}

.swiper-slide {
    width: 400px;
    height: 470px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transition: transform 0.3s, opacity 0.3s;
}

.swiper-slide-prev,
.swiper-slide-next {
    opacity: 1;
    pointer-events: auto;
    transform: scale(0.9);
    filter: grayscale(100%);
}

.swiper-slide-active {
    opacity: 1;
    pointer-events: auto;
    background-color: white;
    transform: scale(1);
    filter: grayscale(0%);
}

.icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.icons i {
    display: flex;
    justify-content: center;
    align-items: center;
    width: clamp(25px, 4vw, 33px);
    height: clamp(25px, 4vw, 33px);
    font-size: clamp(25px, 4vw, 33px);
    cursor: pointer;
    transition: transform 0.2s;
}

.icons i:hover {
    transform: scale(1.1);
}

.icons div {
    display: flex;
    gap: 5px;
    align-items: center;
}

.product-content {
    display: flex;
    width: 100%;
}

.product-img {
    flex-basis: 100%;
    text-align: center;
}

.product-img img {
    width: 100%;
}

.mes-activo {
    color: var(--rojo) !important;
    font-weight: bold;
}

/* ─────────────────────────────────────────── */
/*  RESPONSIVE                                 */
/* ─────────────────────────────────────────── */

/* A partir de 1600px todo tiene espacio de sobra */
@media screen and (max-width: 1600px) {
    .CalendarioPrincipal {
        padding: 5rem 3rem;
    }

    .swiper {
        max-width: 850px;
        padding: 25px 0;
        margin: 0;
    }

    .CarruselCalendarioA {
        padding: 0 55px;
    }

    .ListaMeses {
        padding-left: 0;
    }
}

/* ≤1300px: pantallas donde aparecen los 3 errores reportados */
@media screen and (max-width: 1300px) {
    .CalendarioPrincipal {
        padding: 4rem 3rem;
        /* FIX: padding derecho generoso para la flecha */
    }

    .CarruselCalendarioA {
        padding: 0 50px;
    }

    .swiper {
        max-width: 700px;
        /* FIX: reduce el carrusel para que la flecha no toque la pared */
    }

    .swiper-slide {
        width: 340px;
        height: 410px;
    }
}

@media screen and (max-width: 1100px) {
    .CalendarioPrincipal {
        padding: 4rem 3rem;
    }

    .CarruselCalendarioA {
        padding: 0 48px;
    }

    .swiper {
        max-width: 620px;
    }

    .swiper-slide {
        width: 300px;
        height: 370px;
    }
}

@media screen and (max-width: 1025px) {
    .ListaMeses {
        font-size: 1.35rem;
        min-width: 130px;
    }

    .CalendarioPrincipal {
        padding: 4rem 2.5rem;
    }

    .CarruselCalendarioA {
        padding: 0 45px;
    }

    .swiper {
        max-width: 580px;
    }

    .swiper-slide {
        width: 290px;
        height: 355px;
    }
}

@media screen and (min-width: 950px) {
    .listaMesesTablet {
        display: none;
    }
}

/* ── Tablet ≤950px ── */
@media screen and (max-width: 950px) {
    .CalendarioPrincipal {
        flex-direction: column;
        align-items: center;
        padding: 2rem 0 3rem 0;
    }

    .ListaMeses {
        display: none;
    }

    .listaMesesTablet {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        max-width: 100vw;
        overflow-x: hidden;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        justify-content: center;
        padding: 0 0.5rem;
    }

    .listaMesesTablet p {
        font-size: clamp(1.4rem, 2vw, 1.6rem);
        margin: 4px 2px;
        padding: 3px 6px;
        border-left: 1px var(--rojo) solid;
        border-right: none;
        /* ← quitar border-right de todos */
        ;
        white-space: nowrap;
    }

    .listaMesesTablet p:hover {
        cursor: pointer;
        color: var(--rojo);
    }

    .listaMesesTablet p:last-child {
        border-right: 1px var(--rojo) solid;
        /* ← solo el último tiene borde derecho */
    }

    .CarruselCalendarioA {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0 50px;
        box-sizing: border-box;
        overflow: visible;
    }

    .swiper {
        width: 100%;
        max-width: 560px;
    }

    .swiper-slide {
        width: 300px;
        height: 365px;
    }
}

@media screen and (max-width: 800px) {
    .swiper-slide {
        width: 300px;
        height: 370px;
        padding: 15px;
    }

    .swiper {
        width: 100%;
        max-width: 500px;
        padding: 25px 0;
        margin: 0;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}

@media screen and (min-width: 501px) {
    .ListamesesSelect {
        display: none;
    }
}

/* ── Móvil ≤500px ── */
@media screen and (max-width: 500px)  {
    .CalendarioPrincipal {
        padding: 2rem 0 5rem 0;
        flex-direction: column;
        align-items: center;
    }

    .listaMesesTablet {
        display: none;
    }

    .ListamesesSelect {
        position: relative;
        width: 80%;
        border: 2px var(--rojo) solid;
        border-radius: 15px;
        margin-top: 3rem;
        padding: 10px;
        cursor: pointer;
        align-self: center;
    }

    .MesSeleccionado {
        font-weight: bold;
        color: var(--rojo);
        text-align: center;
    }

    .ContenedorOpciones {
        position: absolute;
        width: 110%;
        top: -30%;
        left: -5%;
        right: 0;
        max-height: 100px;
        overflow-y: auto;
        background: white;
        border: 2px solid var(--rojo);
        border-radius: 20px;
        transition: max-height 0.3s ease;
        z-index: 10;
        scrollbar-width: none;
        scrollbar-color: var(--rojo) #f5f5f5;
        visibility: hidden;
        font-size: 10px;
    }

    .ListamesesSelect.open .ContenedorOpciones {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    .option {
        padding: 10px;
        text-align: center;
        color: #999;
        transition: background 0.2s;
    }

    .option:hover {
        background: #f2f2f2;
        color: #000;
    }

    .option.active {
        font-weight: bold;
        color: #e34242;
    }

    .CarruselCalendarioA {
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 0;
        box-sizing: border-box;
        overflow: visible;
    }

    .swiper-slide {
        width: 250px;
        height: 320px;
        padding: 15px;
    }

    .swiper {
        width: 100%;
        max-width: 400px;
        padding: 25px 0;
        margin: 0;
    }

    .swal2-title.titulo-grande {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .swal2-html-container.texto-justificado {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .swal2-popup.ventana-amplia {
        width: 90% !important;
        padding: 30px;
    }
    .boton-personalizado {
    background-color: red !important;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
}
}

@media screen and (max-width: 500px) {
 
    /* ── Botón principal: pequeño y centrado ── */
    .ListamesesSelect {
        width:           auto !important;
        display:         inline-flex !important;
        flex-direction:  column !important;
        align-items:     center !important;
        align-self:      center !important;
        border:          1.5px solid var(--rojo) !important;
        border-radius:   30px !important;
        padding:         6px 20px !important;
        margin-top:      2rem;
        cursor:          pointer;
        transition:      border-radius 0.25s ease, padding 0.25s ease, width 0.25s ease;
        background:      white;
        box-sizing:      border-box;
    }
 
    /* Expandido al abrir */
    .ListamesesSelect.open {
        border-radius: 14px !important;
        padding:       10px 14px !important;
        width:         92% !important;
    }
 
    /* ── Texto del mes activo ── */
    .MesSeleccionado {
        font-size:      1.2rem !important;
        font-weight:    700;
        color:          var(--rojo);
        letter-spacing: 0.05em;
        white-space:    nowrap;
        display:        flex;
        align-items:    center;
        gap:            6px;
        /* Ampliar área de clic a todo el ancho */
        width:          100%;
        justify-content: center;
        user-select:    none;
    }
 
    .ListamesesSelect.open .MesSeleccionado::after {
        transform: rotate(180deg);
    }
 
    /* ── Grid 4 columnas ── */
    .ContenedorOpciones {
        position:              static !important;
        visibility:            hidden;
        max-height:            0;
        overflow:              hidden;
        opacity:               0;
        width:                 100%;
        margin-top:            8px;
        border:                none !important;
        border-radius:         10px;
        background:            transparent;
        transition:            max-height 0.3s ease,
                               opacity    0.25s ease,
                               visibility 0s linear 0.3s;
        padding:               0 !important;
        box-sizing:            border-box;
        display:               grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap:                   5px;
    }
 
    .ListamesesSelect.open .ContenedorOpciones {
        visibility: visible;
        max-height: 300px;
        opacity:    1;
        transition: max-height 0.3s ease, opacity 0.25s ease;
    }
 
    /* ── Celda de mes ── */
    .option {
        padding:       6px 2px !important;
        text-align:    center;
        font-size:     0.78rem !important;   /* más pequeño para caber en 4 columnas */
        font-weight:   600;
        color:         var(--grisOscuro, #3f3f3e) !important;
        border-radius: 8px;
        background:    #f9f9f9;
        border:        1px solid #e8e8e8;
        transition:    background 0.15s, color 0.15s;
        cursor:        pointer;
        white-space:   nowrap;
        overflow:      hidden;
        text-overflow: ellipsis;
    }
 
    .option:hover {
        background:   #fef0f2;
        color:        var(--rojo) !important;
        border-color: var(--rojo);
    }
 
    .option.active {
        background:   var(--rojo) !important;
        color:        white !important;
        font-weight:  700;
        border-color: var(--rojo);
    }
}


@media screen and (max-width: 400px) {
    .swiper-slide {
        width: 200px;
        height: 270px;
        padding: 15px;
    }

    .swiper {
        width: 100%;
        max-width: 300px;
        padding: 20px 0;
        margin: 0;
    }
}

/* Anular el SVG como imagen de fondo */
.swiper-button-next,
.swiper-button-prev {
    background-image: none !important;
    transform:        none !important;   /* anula el rotate(180deg) del prev */
 
    /* Estilo unificado */
    width:            2.8rem !important;
    height:           2.8rem !important;
    border-radius:    50% !important;
    border:           0.15rem solid var(--rojo) !important;
    background-color: white !important;
    color:            var(--rojo) !important;
    display:          flex !important;
    align-items:      center !important;
    justify-content:  center !important;
    cursor:           pointer;
    transition:       background var(--transicion, 0.2s ease),
                      color var(--transicion, 0.2s ease);
 
    /* Reposicionar para que no se corten */
    right: auto;
    left:  auto;
}
 
.swiper-button-next { right: -38px; }
.swiper-button-prev { left:  -38px; }
 
/* Restaurar los chevrons con ::after usando content SVG inline */
.swiper-button-next::after,
.swiper-button-prev::after {
    display:     block !important;
    content:     "" !important;
    width:       1.2rem;
    height:      1.2rem;
    background-size:     contain;
    background-repeat:   no-repeat;
    background-position: center;
    flex-shrink: 0;
}
 
/* Flecha derecha (next) */
.swiper-button-next::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(199,19,49)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}
 
/* Flecha izquierda (prev) — polyline apunta a la izquierda */
.swiper-button-prev::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgb(199,19,49)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}
 
/* Hover */
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--rojo) !important;
}
 
.swiper-button-next:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
}
 
.swiper-button-prev:hover::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'/%3E%3C/svg%3E");
}
 
/* Ocultar en ≤800px (igual que antes) */
@media screen and (max-width: 800px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
    }
}
 

/* ─────────────────────────────────────────── */
/*  ICONO ENLACE                               */
/* ─────────────────────────────────────────── */

.bi-send::before {
    content: "";
    display: inline-block;
    width: 100%;
    height: 100%;
    background-image: url("../images/CalendarioA/Enlace.svg");
    background-size: contain;
    background-repeat: no-repeat;
}

.bi-send {
    font-size: 0;
}

/* ═══════════════════════════════════════════════════════
   LIGHTBOX — Calendario Ambiental
   Pegar al final del CSS principal.
═══════════════════════════════════════════════════════ */
 
#lb-overlay {
    display:         flex;
    align-items:     center;
    justify-content: center;
    position:        fixed;
    inset:           0;
    background:      rgba(0, 0, 0, 0.85);
    z-index:         9999;
    gap:             2rem;
    padding:         2rem;
    box-sizing:      border-box;
 
    /* oculto por defecto */
    opacity:         0;
    pointer-events:  none;
    transition:      opacity 0.25s ease;
}
 
#lb-overlay.activo {
    opacity:        1;
    pointer-events: auto;
}
 
/* ── Imagen central ── */
.lb-contenido {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            1rem;
    max-width:      min(700px, 80vw);
    max-height:     90vh;
}
 
#lb-img {
    max-width:  100%;
    max-height: 80vh;
    border-radius: 0.5rem;
    object-fit: contain;
    box-shadow: 0 0.8rem 3rem rgba(0, 0, 0, 0.5);
    animation:  lbEntrada 0.25s ease;
}
 
@keyframes lbEntrada {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
 
#lb-label {
    color:       rgba(255, 255, 255, 0.75);
    font-size:   0.85em;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align:  center;
    margin:      0;
}
 
/* ── Flechas — mismo estilo unificado del proyecto ── */
.lb-flecha {
    width:         2.8rem;
    height:        2.8rem;
    border-radius: 50%;
    border:        0.15rem solid white;
    background:    transparent;
    color:         white;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    flex-shrink:   0;
    transition:    background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
 
.lb-flecha:hover {
    background:   white;
    color:        var(--rojo, rgb(199, 19, 49));
    border-color: white;
}
 
.lb-flecha svg {
    width:        1.2rem;
    height:       1.2rem;
    stroke:       currentColor;
    fill:         none;
    flex-shrink:  0;
}
 
/* ── Responsive ── */
@media (max-width: 600px) {
    #lb-overlay {
        gap:     1rem;
        padding: 1rem 0.5rem;
    }
 
    .lb-contenido {
        max-width: 90vw;
    }
 
    .lb-flecha {
        width:  2.2rem;
        height: 2.2rem;
    }
}