/* Carrusel de Eventos - Estilos */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Playfair+Display:wght@700;900&display=swap');

/* Wrapper around the container (used for positioning nav buttons) */
.ec-carrusel-wrapper {
    position: relative;
    max-width: 100%;
    /* ensure nav buttons are not clipped */
    overflow: visible;
}

/* Container */
.ec-carrusel-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
    overflow: hidden; /* required by Swiper and helps GPU compositing */
    /* Important for Swiper */
    /* Force GPU layer to prevent Safari repaint flicker */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Navigation Buttons (positioned relative to wrapper) */
.ec-carrusel-wrapper .ec-nav-buttons {
    position: absolute;
    top: -48px;
    right: 24px;
    display: flex;
    gap: 12px;
    z-index: 10;
}

@media (min-width: 768px) {
    .ec-nav-buttons {
        right: 32px;
    }
}

.ec-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-size: 18px;
    color: #374151;
}

.ec-nav-btn:hover {
    background: black;
    color: white;
    border-color: black;
}

.ec-nav-btn.swiper-button-disabled,
.ec-nav-btn.swiper-nav-disabled {
    opacity: 0.3;
    cursor: auto;
    pointer-events: none;
}

/* Scroll Container (Swiper Wrapper) */
.ec-scroll-container {
    padding: 16px 0;
    /* Optional padding */
    /* Swiper manages layout */
}

/* Card (Swiper Slide) */
.ec-card {
    position: relative;
    /* aspect-ratio: modern browsers */
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: black;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    /* GPU compositing: prevents iOS flicker on scroll/swipe */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    /* Smooth touch dragging on iOS */
    touch-action: pan-y;
}

@media (min-width: 768px) {
    .ec-card {
        aspect-ratio: 3 / 5;
    }
}



/* Background Image */
.ec-bg-image {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    min-width: 100%;
    min-height: 100%;
    filter: grayscale(100%);
    -webkit-transition: filter 0.5s ease, -webkit-transform 0.7s ease;
    transition: filter 0.5s ease, transform 0.7s ease;
    /* GPU layer so filter animation is composited, not repainted */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: filter, transform;
}

.ec-card:hover .ec-bg-image {
    filter: grayscale(0%);
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

/* Overlay */
.ec-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Safari <14.1 inset fallback */
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.1));
    opacity: 0.9;
    -webkit-transition: opacity 0.5s ease;
    transition: opacity 0.5s ease;
}

.ec-card:hover .ec-overlay {
    opacity: 0.8;
}

/* Content */
.ec-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /* Safari <14.1 inset fallback */
    inset: 0;
    padding: 24px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
    color: white;
    height: 100%;
}

@media (min-width: 768px) {
    .ec-content {
        padding: 32px;
    }
}

.ec-content-inner {
    margin-top: auto;
}

/* Location */
.ec-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ec-pin {
    width: 12px;
    height: 12px;
    fill: #0055FF;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (min-width: 768px) {
    .ec-pin {
        width: 16px;
        height: 16px;
    }
}

.ec-location-text {
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d1d5db;
}

@media (min-width: 768px) {
    .ec-location-text {
        font-size: 11px;
    }
}

/* Title */
.ec-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 24px;
    line-height: 1.1;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .ec-title {
        font-size: 30px;
    }
}

@media (min-width: 1024px) {
    .ec-title {
        font-size: 40px;
    }
}

/* RSVP Button Container */
.ec-rsvp-container {
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid rgba(128, 128, 128, 0.3);
}

.ec-rsvp-btn {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: white;
    font-family: 'Lato', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
    /* -webkit- prefix required for Safari backdrop-filter */
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    /* Prevent text size adjustment on iOS */
    -webkit-text-size-adjust: 100%;
}

@media (min-width: 768px) {
    .ec-rsvp-btn {
        font-size: 12px;
    }
}

.ec-rsvp-btn:hover {
    background: white;
    color: black;
    border-color: white;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .ec-carrusel-container {
        padding: 0 16px;
    }

    .ec-nav-buttons {
        top: -40px;
        right: 16px;
    }
}

/* Popup de evento */
.ec-evento-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 99999;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ec-evento-popup-wrap {
    max-width: 760px;
    width: 100%;
    padding: 24px;
    background: #fff;
    color: #1f2937;
    border-radius: 14px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.35);
    position: relative;
    margin: 0;
}

.ec-evento-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 20px;
    line-height: 1;
}

.ec-evento-popup-content {
    max-height: calc(100vh - 180px);
    overflow: auto;
    line-height: 1.5;
}

body.ec-evento-popup-active {
    overflow: hidden;
}