/* ============================================
   eventi.css — Blu Vita Events Page Styles
   ============================================ */

/* Body override */
.eventi-body {
    background-color: #ffffff;
}

/* ---- HERO ---- */
.eventi-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 7rem 2rem 4rem;
    margin-bottom: 0;
}

.eventi-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(-45deg, #003580, #003580, #004AAD, #1a3a6b, #003580);
    background-size: 400% 400%;
    animation: gradientShift 12s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.eventi-hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.eventi-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
    backdrop-filter: blur(6px);
}

.eventi-hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    line-height: 1.15;
}

.hero-highlight {
    position: relative;
    display: inline-block;
    color: #ffe066;
}

.eventi-hero-content p {
    font-size: 1.1rem;
    opacity: 0.88;
    max-width: 520px;
    margin: 0 auto;
}

.eventi-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}

.eventi-hero-wave svg {
    width: 100%;
    height: 70px;
}

/* ---- FILTER SECTION (glass card, sticky) ---- */
.filter-section {
    position: sticky;
    top: 0;
    z-index: 200;
    margin-top: -1px; /* close the seam with the hero wave */
    padding: 1.25rem 1.5rem 0.6rem;
    background: #ffffff;
}
.filter-section.is-sticky {
    background: rgba(244,248,255,0.92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.filter-bar {
    max-width: 1180px;
    margin: 0 auto;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(35,65,137,0.10);
    border-radius: 22px;
    padding: 0.7rem 0.7rem 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.6) inset,
        0 12px 32px rgba(35,65,137,0.10),
        0 2px 6px rgba(35,65,137,0.06);
    transition: box-shadow .25s ease, transform .25s ease;
}

.filter-section.is-sticky .filter-bar {
    box-shadow:
        0 1px 0 rgba(255,255,255,0.6) inset,
        0 18px 50px rgba(35,65,137,0.18),
        0 2px 6px rgba(35,65,137,0.08);
}

/* Top inner row: search + day */
.filter-bar-inner {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid rgba(35,65,137,0.08);
    border-radius: 16px;
    padding: 0.35rem 0.4rem;
    transition: border-color .2s, box-shadow .2s;
}
.filter-bar-inner:focus-within {
    border-color: rgba(35,65,137,0.25);
    box-shadow: 0 0 0 4px rgba(76,199,255,0.12);
}

/* Search input */
.filter-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.4rem 0.55rem 0.9rem;
    min-width: 0;
}
.search-icon-svg {
    width: 18px; height: 18px;
    color: #8a99b9;
    flex: none;
    transition: color .2s;
}
.filter-bar-inner:focus-within .search-icon-svg { color: #234189; }
.filter-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.95rem;
    color: #0c1330;
    outline: none;
    min-width: 0;
    padding: 0;
}
.filter-search input::placeholder { color: #8a99b9; font-weight: 400; }

.filter-search-clear {
    flex: none;
    width: 26px; height: 26px;
    border: none;
    background: rgba(12,19,48,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5d6478;
    cursor: pointer;
    opacity: 0;
    transform: scale(.8);
    pointer-events: none;
    transition: all .2s ease;
}
.filter-search-clear.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.filter-search-clear:hover { background: rgba(12,19,48,0.12); color: #0c1330; }

/* Vertical divider */
.filter-divider {
    width: 1px;
    align-self: stretch;
    margin: 0.35rem 0.5rem;
    background: rgba(35,65,137,0.10);
}

/* Day filter */
.filter-day {
    flex: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: transparent;
    color: #234189;
    cursor: pointer;
    position: relative;
    transition: background .18s;
}
.filter-day:hover { background: rgba(35,65,137,0.05); }
.filter-day svg:first-child { color: #234189; flex: none; }
.filter-day select {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    color: #0c1330;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0 1.2rem 0 0;
    outline: none;
    cursor: pointer;
    line-height: 1.3;
}
.filter-day-chevron {
    position: absolute;
    right: 0.85rem;
    color: #5d6478;
    pointer-events: none;
    transition: transform .2s;
}
.filter-day:focus-within .filter-day-chevron { transform: rotate(180deg); }

/* Category chips row */
.filter-chips {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.15rem 0.25rem;
    scroll-padding-left: 0.25rem;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
    flex: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(35,65,137,0.12);
    border-radius: 999px;
    background: #fff;
    color: #1a2f63;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
    line-height: 1;
}
.chip:hover {
    border-color: rgba(35,65,137,0.3);
    color: #0c1330;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35,65,137,0.08);
}
.chip.active {
    background: linear-gradient(135deg, #122146 0%, #234189 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(35,65,137,0.32);
}
.chip:active { transform: translateY(0); }

/* Meta row: result count + reset */
.filter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.1rem 0.5rem 0;
}
.filter-meta-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #5d6478;
    letter-spacing: 0.04em;
}
.filter-meta-count strong {
    color: #0c1330;
    font-weight: 700;
    font-size: 0.92rem;
    margin-right: 0.2rem;
}

.filter-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    border: none;
    color: #5d6478;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all .2s;
}
.filter-reset:hover {
    color: #d44;
    background: rgba(220,53,69,0.06);
}
.filter-reset svg { transition: transform .4s ease; }
.filter-reset:hover svg { transform: rotate(-180deg); }

/* ---- MAIN EVENTS GRID ---- */
.eventi-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 6rem;
}

.eventi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.75rem;
}

/* ---- EVENT CARD ---- */
.ev-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.5) inset,
        0 2px 8px rgba(12,19,48,0.04),
        0 12px 32px rgba(12,19,48,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s, border-color 0.35s;
    border: 1px solid rgba(35,65,137,0.06);
    animation: cardFadeIn 0.4s ease both;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ev-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.5) inset,
        0 4px 14px rgba(12,19,48,0.08),
        0 24px 50px rgba(35,65,137,0.18);
    border-color: rgba(35,65,137,0.16);
}

/* Card image */
.ev-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--paper-2, #f4f2ec);
}

.ev-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(.22,1,.36,1);
    display: block;
}

.ev-card:hover .ev-card-img-wrap img {
    transform: scale(1.07);
}

.ev-card-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(12,19,48,0.45) 100%);
    pointer-events: none;
}

/* Badge */
.ev-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px) saturate(140%);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.35);
}
.badge-hot    { background: rgba(255,90,60,0.85); color: #fff; }
.badge-urgent { background: rgba(255,160,0,0.85); color: #fff; }
.badge-new    { background: rgba(76,199,255,0.85); color: #0c1330; border-color: rgba(255,255,255,0.5); }

/* Card body */
.ev-card-body {
    padding: 1.4rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.7rem;
}

/* Meta row (date + time) */
.ev-meta {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.ev-date, .ev-time {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: #234189;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ev-time { color: #5d6478; }
.ev-date svg, .ev-time svg {
    color: currentColor;
    flex-shrink: 0;
}

/* Title */
.ev-title {
    font-family: 'Fraunces', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #0c1330;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Description */
.ev-desc {
    font-size: 0.9rem;
    color: #5d6478;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Tags */
.ev-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.ev-tag {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
}

.tag-green  { background: #e0f5ea; color: #1b7c3f; border-color: rgba(27,124,63,0.12); }
.tag-orange { background: #fff3e0; color: #d46b08; border-color: rgba(212,107,8,0.12); }
.tag-teal   { background: #e0f7f5; color: #00796b; border-color: rgba(0,121,107,0.12); }
.tag-purple { background: #f3e5f5; color: #7b1fa2; border-color: rgba(123,31,162,0.12); }
.tag-blue   { background: #e3f0ff; color: #1565c0; border-color: rgba(21,101,192,0.12); }
.tag-yellow { background: #fffde7; color: #c87a00; border-color: rgba(200,122,0,0.12); }
.tag-pink   { background: #fce4ec; color: #c2185b; border-color: rgba(194,24,91,0.12); }
.tag-indigo { background: #e8eaf6; color: #3949ab; border-color: rgba(57,73,171,0.12); }

/* Card footer */
.ev-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(35,65,137,0.08);
}

.ev-spots {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #5d6478;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-weight: 500;
}

.spots-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4caf50;
    display: inline-block;
    animation: pulse-dot 2s ease-in-out infinite;
}

.urgent-dot { background: #ff5722; }
.ev-spots.urgent { color: #ff5722; font-weight: 600; }

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76,175,80,0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(76,175,80,0); }
}

/* CTA button */
.ev-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, #122146 0%, #234189 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .25s, filter .2s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(35,65,137,0.22);
}

.ev-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(35,65,137,0.32);
    filter: brightness(1.08);
}
.ev-btn:active { transform: translateY(0); }

/* ---- EMPTY STATE ---- */
.ev-empty {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
    grid-column: 1 / -1;
}

.ev-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.ev-empty h3 {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    margin-bottom: 0.5rem;
}

/* ---- ACTIVE NAV LINK ---- */
.active-nav {
    color: var(--primary-blue) !important;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 2px;
}

header.scrolled .active-nav {
    color: var(--primary-blue) !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
    .eventi-hero { min-height: 280px; padding: 6rem 1.5rem 4rem; }
    .eventi-hero-content h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }
    .eventi-hero-content p { font-size: 0.95rem; }
    .filter-section { padding: 1rem 1rem 0.4rem; }
    .filter-bar { border-radius: 18px; padding: 0.55rem; gap: 0.55rem; }
    .filter-bar-inner { flex-direction: column; align-items: stretch; padding: 0.4rem; border-radius: 14px; }
    .filter-divider { display: none; }
    .filter-search { padding: 0.5rem 0.6rem; }
    .filter-day {
        border-top: 1px solid rgba(35,65,137,0.08);
        padding: 0.65rem 0.6rem;
        border-radius: 0 0 12px 12px;
        justify-content: flex-start;
    }
    .filter-day-chevron { right: 0.7rem; }
    .filter-meta { padding: 0.1rem 0.2rem 0; font-size: 0.78rem; }
    .filter-reset span { display: none; }

    .eventi-main { padding: 2rem 1rem 4rem; }
    .eventi-grid { grid-template-columns: 1fr; gap: 1.2rem; }
    .ev-card-img-wrap { height: 200px; }
    .ev-card-body { padding: 1.2rem 1.25rem 1.3rem; gap: 0.6rem; }
    .ev-title { font-size: 1.15rem; }
    .ev-desc { font-size: 0.88rem; }

    .ev-modal { width: 95%; max-height: 92vh; border-radius: 18px; }
    .ev-modal-img-wrap { height: 200px; border-radius: 18px 18px 0 0; }
    .ev-modal-body { padding: 1.3rem 1.4rem 1.6rem; }
    .ev-modal-title { font-size: 1.25rem; }
}

@media (max-width: 520px) {
    .eventi-hero { min-height: 240px; padding: 5rem 1rem 3rem; }
    .eventi-hero-content h1 { font-size: 1.55rem; }
    .eventi-hero-content p { font-size: 0.88rem; }
    .filter-section { padding: 0.85rem 0.75rem 0.3rem; }
    .ev-card-img-wrap { height: 180px; }
    .ev-modal-img-wrap { height: 170px; }
    .chip { font-size: 0.78rem; padding: 0.45rem 0.85rem; }
}

/* ---- EVENT DETAIL MODAL ---- */
.ev-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 20, 60, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalOverlayIn 0.25s ease;
}

.ev-modal-overlay.active {
    display: flex;
}

@keyframes modalOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.ev-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 40, 100, 0.25);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ev-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.ev-modal-close:hover {
    background: white;
    transform: scale(1.1);
}

.ev-modal-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.ev-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ev-modal-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.ev-modal-body {
    padding: 1.5rem 1.8rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ev-modal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #111;
    margin: 0;
    line-height: 1.25;
}

.ev-modal-desc {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.7;
}

.ev-modal-desc p {
    margin: 0;
}

.ev-modal-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.8rem 0;
    border-top: 1px solid #f0f4ff;
}

.ev-modal-info-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    font-family: 'Open Sans', sans-serif;
}

.ev-modal-info-item svg {
    color: #004AAD;
    flex-shrink: 0;
}

.ev-modal-footer {
    display: flex;
    justify-content: center;
    padding-top: 0.6rem;
    border-top: 1px solid #f0f4ff;
}
