/* Agenda de Eventos — Carousel */
:root {
    --ae-purple: #3d2e71;
    --ae-purple-light: #5a4699;
    --ae-green: #b0d34b;
    --ae-green-dark: #8aaa2e;
    --ae-white: #ffffff;
    --ae-gray-100: #f4f2fa;
    --ae-gray-400: #9e96c0;
    --ae-gray-600: #5e5580;
    --ae-card-radius: 35px;
    --ae-gap: 30px;
}

/* Carousel */
.ae-carousel-wrapper {
    position: relative;
    padding-left: 30px;
}

@media (max-width: 640px) {
    .ae-carousel-wrapper {
        padding-left: 20px;
    }
}

.ae-carousel-track-outer {
    border-radius: 4px;
}

.ae-carousel-track {
    display: flex;
    gap: var(--ae-gap);
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}

.ae-carousel-track:active {
    cursor: grabbing;
}

/* Desktop: 3.5 visible */
.ae-event-card {
    flex: 0 0 calc((100% - 3.5 * var(--ae-gap)) / 3.5);
    min-width: 0;
}

/* Card */
.ae-card-inner {
    background: var(--ae-white);
    border-radius: var(--ae-card-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(61, 46, 113, 0.10);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease;
    cursor: pointer;
    height: 100%;
}

.ae-card-inner:hover {
    box-shadow: 0 8px 28px rgba(61, 46, 113, 0.16);
}

/* Thumb */
.ae-card-thumb {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 14px;
}

.ae-card-thumb .ae-thumb-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 18px 18px;
}

/* Thumb image overlay */
.ae-card-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Category tag */
.ae-card-tag {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    align-content: center;
    flex-direction: row;
    gap: 4px;
    background: var(--ae-green);
    color: var(--ae-purple);
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
}

.ae-card-tag .ae-dot {
    width: 6px;
    height: 6px;
    background: var(--ae-purple);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Date badge */
.ae-card-date-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    text-align: center;
    padding: 6px 10px;
    min-width: 48px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ae-card-date-badge .ae-day {
    font-size: 20px;
    font-weight: 700;
    color: var(--ae-purple);
    line-height: 1;
}

.ae-card-date-badge .ae-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ae-gray-600);
    letter-spacing: 0.05em;
}

/* Card body */
.ae-card-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ae-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ae-purple);
    line-height: 1.35;
    overflow-wrap: break-word;
}

.ae-card-desc {
    font-size: 16px;
    color: var(--ae-gray-600);
    line-height: 1.5;
    overflow-wrap: break-word;
    flex: 1;
}

.ae-card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ae-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--ae-gray-600);
}

.ae-meta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

/* Card footer */
.ae-card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--ae-gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ae-card-badge-free {
    font-weight: 600;
    color: var(--ae-green-dark);
    background: #eef7d0;
    padding: 3px 10px;
    border-radius: 100px;
}

.ae-card-badge-paid {
    font-weight: 600;
    color: #a05c00;
    background: #fff3e0;
    padding: 3px 10px;
    border-radius: 100px;
}

.ae-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--ae-purple);
    color: var(--ae-white);
    font-size: 1em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 25px;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.ae-card-cta:hover {
    background: var(--ae-purple-light);
    color: var(--ae-white);
}

.ae-card-cta svg {
    width: 10px;
    height: 10px;
}

/* Navigation */
.ae-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 20px 0 0;
}

.ae-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--ae-purple);
    background: transparent;
    color: var(--ae-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ae-nav-btn:hover {
    background: var(--ae-purple);
    color: #fff;
}

.ae-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ae-nav-btn:disabled:hover {
    background: transparent;
    color: var(--ae-purple);
}

.ae-nav-btn svg {
    width: 14px;
    height: 14px;
}

/* Dots */
.ae-carousel-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Nav position: arrows ── */
.ae-carousel-nav {
    gap: 8px;
}

.ae-carousel-nav.ae-arrows-left {
    flex-direction: row-reverse;
}

.ae-carousel-nav.ae-arrows-center {
    justify-content: center;
    margin-top: 30px;
}

.ae-carousel-nav.ae-arrows-right {
    justify-content: flex-end;
}

/* ── Nav position: dots ── */
.ae-carousel-nav.ae-dots-left .ae-carousel-dots {
    margin-right: auto;
}

.ae-carousel-nav.ae-dots-center .ae-carousel-dots {
    margin-left: auto;
    margin-right: auto;
}

.ae-carousel-nav.ae-dots-right .ae-carousel-dots {
    margin-left: auto;
    margin-right: 0;
}

/* ── Arrows visibility ── */
.ae-arrows-hide-desktop .ae-nav-btn {
    display: none;
}

.ae-arrows-hide-desktop.ae-arrows-hide-mobile .ae-nav-btn {
    display: none;
}

/* ── Dots visibility ── */
.ae-dots-hide-desktop .ae-carousel-dots {
    display: none;
}

.ae-dots-hide-desktop.ae-dots-hide-mobile .ae-carousel-dots {
    display: none;
}

/* Mobile overrides */
@media (max-width: 640px) {
    /* Show arrows on mobile even if hidden on desktop */
    .ae-arrows-hide-desktop:not(.ae-arrows-hide-mobile) .ae-nav-btn {
        display: flex;
    }

    /* Hide arrows on mobile */
    .ae-arrows-hide-mobile .ae-nav-btn {
        display: none;
    }

    /* Show dots on mobile even if hidden on desktop */
    .ae-dots-hide-desktop:not(.ae-dots-hide-mobile) .ae-carousel-dots {
        display: flex;
    }

    /* Hide dots on mobile */
    .ae-dots-hide-mobile .ae-carousel-dots {
        display: none;
    }
}

/* Desktop overrides (ensure mobile-only visibility works) */
@media (min-width: 641px) {
    .ae-arrows-hide-desktop .ae-nav-btn {
        display: none;
    }

    .ae-dots-hide-desktop .ae-carousel-dots {
        display: none;
    }
}

.ae-carousel-dots .ae-dot-nav {
    width: 6px;
    height: 6px;
    border-radius: 100px;
    background: var(--ae-gray-400);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.ae-carousel-dots .ae-dot-nav.active {
    width: 20px;
    background: var(--ae-purple);
}

/* Ghost cards (cloned to fill last slide) */
.ae-ghost-card {
    opacity: 0.4;
    pointer-events: none;
}

/* Eventos vencidos (encerrados): preto e branco e sem clique nos links */
.ae-event-card--expired .ae-card-inner {
    filter: grayscale(1);
    cursor: default;
}

.ae-event-card--expired .ae-card-inner:hover {
    box-shadow: 0 4px 20px rgba(61, 46, 113, 0.10);
}

.ae-event-card--expired a,
.ae-event-card--expired .ae-card-cta {
    pointer-events: none;
    cursor: default;
}

.ae-event-card--expired .ae-card-cta {
    background: var(--ae-gray-400);
}

/* Mensagem discreta: "Novos eventos em breve!" */
.ae-empty-msg {
    position: relative;
    z-index: 10;
    margin: 40px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--ae-gray-600);
    font-style: italic;
    opacity: 1;
}

/* Fits-all mode: when items fit visible columns, center them and disable carousel */
.ae-carousel-container.ae-fits-all .ae-carousel-wrapper {
    padding-left: 0;
}
.ae-carousel-container.ae-fits-all .ae-carousel-track {
    justify-content: center;
    transform: none !important;
    transition: none;
    cursor: default;
}
.ae-carousel-container.ae-fits-all .ae-carousel-track:active {
    cursor: default;
}
.ae-carousel-container.ae-fits-all .ae-carousel-nav {
    display: none;
}

/* Thumb colors by category */
.ae-thumb-webinar {
    background: linear-gradient(135deg, #3d2e71 0%, #5a4699 100%);
}

.ae-thumb-presencial {
    background: linear-gradient(135deg, #1a6b55 0%, #248f74 100%);
}

.ae-thumb-workshop {
    background: linear-gradient(135deg, #8a2e00 0%, #c45200 100%);
}

.ae-thumb-congresso {
    background: linear-gradient(135deg, #1b4f8a 0%, #2d72c8 100%);
}

.ae-thumb-curso {
    background: linear-gradient(135deg, #6b1a6b 0%, #a030a0 100%);
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS (must be after base styles)
   ══════════════════════════════════════════════════════ */

/* 1230-1600: reduce for medium desktops */
@media (min-width: 1230px) and (max-width: 1600px) {
    .ae-card-cta {
        font-size: 0.75em;
        letter-spacing: 1px;
        padding: 6px 14px;
    }

    .ae-card-tag {
        font-size: 0.75em;
    }

    .ae-card-badge-free,
    .ae-card-badge-paid {
        font-size: 0.75em;
    }

    .ae-card-title {
        font-size: 14px;
    }

    .ae-card-body {
        padding: 12px 14px;
    }

    .ae-card-footer {
        padding: 10px 14px;
    }
}

/* Tablet: 768-1229 */
@media (min-width: 768px) and (max-width: 1229px) {
    .ae-event-card {
        flex: 0 0 calc((100% - 2.5 * var(--ae-gap)) / 2.5);
    }

    .ae-card-cta {
        font-size: 0.7em;
        letter-spacing: 1px;
        padding: 6px 12px;
    }

    .ae-card-tag {
        font-size: 0.7em;
    }

    .ae-card-badge-free,
    .ae-card-badge-paid {
        font-size: 0.7em;
    }

    .ae-card-thumb {
        height: 190px;
    }
}

/* Cel. paisagem e retrato: 767 and below */
@media (max-width: 767px) {
    .ae-event-card {
        flex: 0 0 calc((100% - 1.15 * var(--ae-gap)) / 1.15);
    }

    .ae-card-thumb {
        height: 180px;
    }
}
