/* ============================================================
   PHILLY EVENTS CALENDAR — UI/UX Refresh  v28
   Eagles Midnight Green : #004C54
   Phillies Red          : #E81828
   Phillies Navy         : #002D72
   76ers Gold            : #F0A500
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --green:        #004C54;
    --green-dark:   #003940;
    --green-mid:    #006270;
    --green-light:  #e6f4f5;
    --red:          #E81828;
    --red-dark:     #c0101e;
    --navy:         #002D72;
    --navy-light:   #e8ecf7;
    --gold:         #E5A00D;
    --gold-light:   #fff8e6;
    --silver:       #A5ACAF;
    --flyers-orange: #F74902;
    --sixers-blue:  #006BB6;
    --union-gold:   #C4A747;
    --purple:       #4a1a6e;
    --running-green: #0d6b1a;
    --bg:          #F7F7F5;
    --bg-card:     #ffffff;
    --max-width:   1200px;
    --white:       #ffffff;
    --card-shadow: 0 2px 16px rgba(0, 44, 84, 0.06);
    --card-shadow-hover: 0 8px 28px rgba(0, 44, 84, 0.1);
    --text:        #1a1a2e;
    --text-mid:    #4a4a6a;
    --text-light:  #6b7280;
    --border:      #e5e7eb;
    --radius:      16px;
    --radius-sm:   12px;
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--green);
    color: white;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-bell {
    color: var(--gold);
    flex-shrink: 0;
}

.header-bell-img {
    width: 72px;
    height: auto;
    flex-shrink: 0;
    border: none;
    display: block;
    align-self: center;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.header-brand h1 {
    font-size: 1.45em;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.header-brand h1 .hw  { color: white; }
.header-brand h1 .red  { color: #ff6b6b; }
.header-brand h1 .gold { color: var(--gold); }

.header-tagline {
    font-size: 0.78em;
    opacity: 0.75;
    margin-top: 2px;
    font-weight: 400;
}

.header-red-line {
    height: 3px;
    background: var(--red);
}

.header-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Nav buttons */
.btn-outline-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font);
}
.btn-outline-nav:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
}

.btn-admin {
    background: var(--gold);
    color: #111;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.88em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font);
}
.btn-admin:hover { background: #f0b429; }

.header-nav .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   HERO BANNER — v0 style: left-aligned, photo + dark overlay
   ============================================================ */
.hero-banner {
    background: var(--green);
    color: white;
    overflow: hidden;
    position: relative;
}

/* Skyline background photo */
.hero-bg-image {
    display: block;
    position: absolute;
    inset: 0;
    background-image: url('/static/images/philly-skyline.jpg');
    background-size: cover;
    background-position: center 55%;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Dark teal overlay so text stays readable */
.hero-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 44, 50, 0.65) 0%,
        rgba(0, 60, 64, 0.55) 50%,
        rgba(0, 44, 50, 0.45) 100%
    );
    z-index: 1;
}

.hero-content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 64px 32px 56px;
    text-align: left;
    position: relative;
    z-index: 2;
}

/* Live event count label above headline */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
    opacity: 0.95;
}

.hero-banner h2 {
    font-size: 3em;
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    text-shadow: none;
    max-width: 560px;
}

.hero-banner h2 .accent-red  { color: var(--red); }
.hero-banner h2 .accent-gold { color: var(--gold); }

.hero-tagline {
    font-size: 1em;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 520px;
    font-weight: 400;
    opacity: 0.82;
    text-shadow: none;
}

.hero-tagline .accent-gold { color: var(--gold); font-weight: 600; opacity: 1; }
.hero-tagline .accent-red  { color: #ff8080;    font-weight: 600; }

.hero-sub {
    font-size: 0.85em;
    opacity: 0.6;
    margin: 0 0 24px;
    letter-spacing: 0.01em;
}

.hero-close { display: none; }

.hero-cats {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-cat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 0.88em;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
}

.hero-cat svg { flex-shrink: 0; }

/* Semi-transparent fills — skyline shows through, matching v0 frosted look */
.hero-cat[data-cat="running"]        { background: rgba(22, 101, 52, 0.60); }
.hero-cat[data-cat="music"]          { background: rgba(100, 30, 30, 0.60); }
.hero-cat[data-cat="artsAndCulture"] { background: rgba(88, 28, 135, 0.65); }
.hero-cat[data-cat="foodAndDrink"]   { background: rgba(101, 78, 22, 0.60); }
.hero-cat[data-cat="community"]      { background: rgba(255, 255, 255, 0.10); }

.hero-cat:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    color: white;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.page-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 32px 64px;
}

/* ============================================================
   PHILLY LANDMARKS SECTION
   ============================================================ */

/* Event count badge on landmark cards */
.landmark-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 0.72em;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    flex-shrink: 0;
    align-self: flex-end;
}

.landmarks-section {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 40px 0 36px;
}

.landmarks-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* Section header row: "Explore Philly" + "Events near iconic spots" */
.landmarks-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}

.landmarks-title {
    font-size: 1.25em;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.landmarks-subtitle {
    font-size: 0.85em;
    color: var(--text-light);
    font-weight: 400;
}

/* Hide old italic quote */
.landmarks-quote { display: none; }

.landmarks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
}

.landmark-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.landmark-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}

.landmark-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.landmark-card:hover img {
    transform: scale(1.04);
}

.landmark-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
}

.landmark-label-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.landmark-title {
    color: white;
    font-weight: 700;
    font-size: 0.95em;
    line-height: 1.2;
}

.landmark-sub {
    color: rgba(255,255,255,0.75);
    font-size: 0.78em;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 700px) {
    .landmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .landmarks-section {
        padding: 24px 20px 28px;
    }
}

/* ============================================================
   STATS BAR
   ============================================================ */
/* Neighborhood Strip */
.neighborhood-strip {
    background: white;
    border-bottom: 1px solid var(--border);
}

.neighborhood-strip-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 32px;
}

.neighborhood-strip-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-mid);
    text-transform: uppercase;
    margin-bottom: 12px;
    justify-content: center;
}

/* Marquee wrapper — clips overflow so pills slide in/out */
.neighborhood-pills-scroll {
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* The track holds two identical sets of pills end-to-end */
.neighborhood-pills-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: nbhd-marquee 28s linear infinite;
}

/* Pause on hover so users can click a pill */
.neighborhood-pills-scroll:hover .neighborhood-pills-track {
    animation-play-state: paused;
}

@keyframes nbhd-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .neighborhood-pills-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
    }
}

.nbhd-pill {
    white-space: nowrap;
    padding: 7px 18px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: white;
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s;
    font-family: var(--font);
    flex-shrink: 0;
}
.nbhd-pill:hover {
    border-color: var(--green);
    color: var(--green);
    background: var(--green-light);
}
.nbhd-pill.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 76, 84, 0.3);
}

/* ============================================================
   ACTIVE FILTERS BAR
   ============================================================ */
.active-filters-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: white;
    border: 1.5px solid var(--green);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 76, 84, 0.08);
}

.active-filters-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.active-filter-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid rgba(0, 76, 84, 0.2);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.active-filter-tag:hover {
    background: var(--green);
    color: white;
    border-color: var(--green);
}
.active-filter-tag .tag-x {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 700;
}

.clear-all-btn {
    margin-left: auto;
    background: none;
    border: 1.5px solid var(--red);
    color: var(--red);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    font-family: var(--font);
}
.clear-all-btn:hover {
    background: var(--red);
    color: white;
}

/* ============================================================
   CONTROLS PANEL
   ============================================================ */
/* Section title above events list */
.events-section-title {
    font-size: 1.35em;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.controls-panel {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: none;
    border: none;
}

/* Search bar — full width, flat, prominent like v0 */
.search-bar-wrap {
    position: relative;
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-bar-wrap input {
    flex: 1;
    padding: 15px 18px 15px 50px;
    font-size: 15px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.search-bar-wrap input::placeholder { color: var(--text-light); }
.search-bar-wrap input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0,76,84,0.08);
}

/* Filters button next to search bar */
.filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 15px 20px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.18s;
}
.filters-toggle-btn:hover {
    border-color: var(--green);
    color: var(--green);
}
.filters-toggle-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* ✕ clear button inside search input */
.search-clear-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}
.search-clear-btn:hover { color: var(--red); }

/* Inline "Clear filters" button at end of filter row */
.inline-clear-btn {
    background: none;
    border: 1.5px solid var(--red);
    color: var(--red);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s;
    font-family: var(--font);
    margin-left: 4px;
}
.inline-clear-btn:hover {
    background: var(--red);
    color: white;
}

/* Filter row — always visible below search, scrollable on mobile */
.filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.filter-row::-webkit-scrollbar { display: none; }

@media (max-width: 700px) {
    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filter-row::-webkit-scrollbar { display: none; }
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--border);
    background: white;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: var(--font);
}

.filter-btn:hover {
    border-color: var(--green);
    color: var(--green);
}

.filter-btn.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.filter-btn[data-category="running"].active   { background: var(--running-green); border-color: var(--running-green); }
.filter-btn[data-category="music"].active     { background: var(--red); border-color: var(--red); }
.filter-btn[data-category="artsAndCulture"].active { background: var(--purple); border-color: var(--purple); }
.filter-btn[data-category="foodAndDrink"].active   { background: var(--sixers-blue); border-color: var(--sixers-blue); }
.filter-btn[data-category="community"].active { background: var(--navy); border-color: var(--navy); }

.filter-btn[data-category="running"]:not(.active):hover   { border-color: var(--running-green); color: var(--running-green); }
.filter-btn[data-category="music"]:not(.active):hover     { border-color: var(--red); color: var(--red); }
.filter-btn[data-category="artsAndCulture"]:not(.active):hover { border-color: var(--purple); color: var(--purple); }
.filter-btn[data-category="foodAndDrink"]:not(.active):hover   { border-color: var(--sixers-blue); color: var(--sixers-blue); }
.filter-btn[data-category="community"]:not(.active):hover { border-color: var(--navy); color: var(--navy); }

/* Controls bottom row */
.controls-bottom {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 180px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
}

.month-select,
.source-select {
    flex: 1;
    border: none;
    font-size: 14px;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    outline: none;
    padding: 0;
}

.action-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-family: inherit;
}

.btn:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--green);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 76, 84, 0.2);
}
.btn-primary:hover:not(:disabled) {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 76, 84, 0.3);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-mid);
    border: 2px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--navy-light);
    color: var(--navy);
    border-color: var(--navy);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--red);
    color: white;
    box-shadow: 0 2px 10px rgba(232, 24, 40, 0.25);
}
.btn-success:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--gold);
    color: #1a1a00;
    box-shadow: 0 2px 10px rgba(229, 160, 13, 0.25);
}
.btn-warning:hover {
    background: #c98a0b;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--green);
}
.btn-ghost:hover {
    background: var(--green-light);
}

/* ============================================================
   LOADING
   ============================================================ */
.loading {
    text-align: center;
    padding: 56px 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

.spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 18px;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   EVENT LIST
   ============================================================ */
.events-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-bottom: 36px;
}

.day-group {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

/* Day header — clean flat style like v0 */
.day-header {
    background: var(--green);
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.day-header.today {
    background: var(--red);
}

.day-header-left {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
}

.day-weekday {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.day-date {
    font-size: 13px;
    opacity: 0.85;
    font-weight: 400;
}

.day-count {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* Event row — v0 inspired: time | title + badge | location + price | chevron */
.event-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    color: inherit;
    text-decoration: none;
    position: relative;
    background: white;
}

.event-row:last-child { border-bottom: none; }

/* No alternating rows — all white like v0 */

.event-row:hover {
    background: var(--green-light);
}

.event-row:hover .event-row-title { color: var(--green); }
.event-row:hover .chevron { color: var(--green); transform: translateX(3px); }

/* Time column — hidden, time removed from event rows */
.event-time-col { display: none; }
.event-time { display: none; }
.event-time-tbd { display: none; }

/* No divider — cleaner like v0 */
.event-row-divider { display: none; }

/* Details column — takes all remaining space */
.event-details-col {
    flex: 1;
    min-width: 0;
}

/* Title row: name + badge side by side */
.event-row-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: nowrap;
}

.event-row-title {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
    line-height: 1.3;
    transition: color 0.15s;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Badge — colored pill with light background matching v0 */
.event-category {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.01em;
    text-transform: capitalize;
    background: #f3f4f6;
    color: #374151;
}

/* Meta row: location · price — clean single line */
.event-row-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: nowrap;
    overflow: hidden;
}

/* Dot separator between location and price — hidden on mobile */
.meta-dot {
    color: var(--border);
    flex-shrink: 0;
}

.event-row-location {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
}

.event-row-price {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Chevron — right side indicator */
.chevron {
    flex-shrink: 0;
    color: var(--border);
    font-size: 1.1em;
    align-self: center;
    margin-left: 10px;
    transition: color 0.15s, transform 0.15s;
}

/* Category colors */
.category-running        { background: #d1fae5; color: #065f46; }
.category-artsAndCulture { background: #ede9fe; color: #5b21b6; }
.category-music          { background: #fce7f3; color: #9d174d; }
.category-foodAndDrink   { background: #fef3c7; color: #92400e; }
.category-community      { background: #dbeafe; color: #1e40af; }
.category-other          { background: #f3f4f6; color: #4b5563; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 56px 32px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    font-size: 1.05em;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.empty-state .empty-icon {
    font-size: 3em;
    margin-bottom: 16px;
    line-height: 1;
}

.empty-state .empty-title {
    font-weight: 700;
    font-size: 1.15em;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state .empty-desc {
    margin-bottom: 20px;
}

.empty-state .btn {
    margin-top: 8px;
}

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 32px 16px 16px;
}

.load-more-btn {
    background: var(--green);
    color: white;
    padding: 14px 36px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 10px rgba(0, 76, 84, 0.2);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.load-more-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 76, 84, 0.3);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 48px auto;
    padding: 32px;
    border-radius: 20px;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border);
    border-top: 4px solid var(--green);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

.modal .close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    border: none;
    background: transparent;
    border-radius: 50%;
}
.modal .close:hover {
    color: var(--red);
    background: var(--green-light);
}
.modal .close:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.modal-title {
    font-size: 1.5em;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
    padding-right: 48px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.modal-detail {
    margin-bottom: 14px;
    padding: 14px 18px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 0.94em;
    line-height: 1.55;
    border-left: 3px solid var(--border);
}

.modal-detail a {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
}
.modal-detail a:hover { text-decoration: underline; }

.event-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.event-detail-actions .btn { flex: 1; padding: 13px; font-size: 14px; }

/* ============================================================
   FORM (Add/Edit modal)
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: var(--bg);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(0, 76, 84, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 88px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}
.form-actions .btn { flex: 1; padding: 14px; font-size: 14px; }

/* ============================================================
   BOOKMARKS
   ============================================================ */
.bookmarks-list { margin-top: 16px; }

.bookmark-row {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: var(--bg);
    transition: background 0.15s, border-color 0.15s;
    cursor: pointer;
    border: 2px solid transparent;
}

.bookmark-row:hover {
    background: var(--green-light);
    border-color: rgba(0, 76, 84, 0.2);
}

.bookmark-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 1em;
}

.bookmark-date,
.bookmark-loc {
    font-size: 0.84em;
    color: var(--text-light);
    margin-top: 2px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(180deg, #003a42 0%, #002d35 100%);
    color: rgba(255,255,255,0.75);
    text-align: center;
    font-size: 0.88em;
    border-top: 3px solid var(--red);
    margin-top: 48px;
}

/* PHILLY letter circles */
.footer-philly-letters {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px 32px;
}

.philly-letter {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6em;
    font-weight: 900;
    color: white;
    letter-spacing: 0;
}

/* Neighborhood grid */
.footer-neighborhoods {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    padding: 0 24px 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-neighborhoods span {
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
}

/* Bottom footer bar */
.footer-bottom {
    padding: 28px 20px;
}

.footer-brand {
    font-size: 1.05em;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.footer-url a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
}
.footer-url a:hover { text-decoration: underline; }
.footer-url { margin-bottom: 10px; }

.footer-sub {
    font-size: 0.85em;
    opacity: 0.6;
    margin-top: 4px;
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
#scrollTopBtn {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    border: none;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 76, 84, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.2s, background 0.2s;
    line-height: 1;
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
}

#scrollTopBtn:hover {
    background: var(--red);
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(232, 24, 40, 0.4);
}

#scrollTopBtn:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ============================================================
   HAMBURGER MENU — hidden by default, visible on mobile only
   ============================================================ */
.hamburger-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s;
    font-family: var(--font);
}
.hamburger-menu-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.7);
}

/* Mobile nav drawer — slides down from header */
.mobile-nav-drawer {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--green-dark);
    border-top: 1px solid rgba(255,255,255,0.12);
}
.mobile-nav-drawer.open {
    display: flex;
}
.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: white;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    text-align: left;
    transition: background 0.15s;
}
.mobile-nav-item:last-child { border-bottom: none; }
.mobile-nav-item:hover { background: rgba(255,255,255,0.08); }
.mobile-nav-item.admin {
    color: var(--gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {

    /* --- HEADER --- */
    .header-inner {
        padding: 8px 14px;
        gap: 8px;
    }
    .header-bell-img {
        width: 32px;
    }
    .header-brand {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }
    .header-inner { padding: 10px 16px; }
    .header-bell-img { width: 44px; }
    .header-brand { gap: 8px; }
    .header-brand h1 {
        font-size: 18px;
        letter-spacing: -0.01em;
        white-space: nowrap;
    }
    .header-tagline {
        display: block;
        font-size: 11px;
        margin-top: 4px;
        opacity: 0.75;
    }
    /* Hide desktop nav buttons on mobile — replaced by hamburger */
    .header-nav {
        display: none;
    }
    /* Show hamburger button on mobile */
    .hamburger-menu-btn {
        display: flex;
    }

    /* --- HERO --- */
    .hero-content { padding: 20px 16px 20px; }
    .hero-banner h2 {
        font-size: 28px;
        margin-bottom: 10px;
    }
    .hero-tagline {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 6px;
    }
    .hero-sub { font-size: 12px; margin-bottom: 16px; }
    .hero-eyebrow { font-size: 12px; margin-bottom: 12px; }
    .hero-cats { gap: 7px; }
    .hero-cat {
        padding: 7px 12px;
        font-size: 13px;
        gap: 5px;
    }

    /* --- PAGE WRAPPER --- */
    .page-wrapper { padding: 16px 12px 56px; }

    /* --- LANDMARKS --- */
    .landmarks-section { padding: 20px 0 18px; }
    .landmarks-inner { padding: 0 12px; }
    .landmarks-header { margin-bottom: 12px; }
    .landmarks-title { font-size: 16px; }
    .landmarks-subtitle { font-size: 12px; }
    .landmarks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .landmark-title { font-size: 13px; }
    .landmark-sub { font-size: 11px; }
    .landmark-event-badge { font-size: 11px; padding: 3px 7px; }
    .events-section-title { font-size: 17px; margin-bottom: 12px; }

    /* --- NEIGHBORHOOD STRIP — static scroll on mobile (no marquee) --- */
    .neighborhood-strip-inner { padding: 10px 12px; }
    .neighborhood-strip-label { font-size: 10px; margin-bottom: 8px; }
    /* Stop marquee animation on mobile — static horizontal scroll instead */
    .neighborhood-pills-track {
        animation: none;
        flex-wrap: nowrap;
        width: auto;
    }
    .neighborhood-pills-scroll {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .neighborhood-pills-scroll::-webkit-scrollbar { display: none; }
    /* Hide the duplicated pills (used for marquee loop) on mobile */
    .nbhd-pill[aria-hidden="true"] { display: none; }
    .nbhd-pill {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* --- CONTROLS PANEL --- */
    .controls-panel { padding: 0; margin: 0 0 14px; border-radius: 0; box-shadow: none; }
    .events-container { padding: 0; gap: 14px; }
    .active-filters-bar { margin: 0 0 10px; }
    .empty-state { margin: 0; }
    /* Day groups fill full width inside the container */
    .day-group { border-radius: 12px; }
    .search-bar-wrap { margin-bottom: 10px; }
    .search-bar-wrap input { padding: 12px 14px 12px 44px; font-size: 14px; }
    .search-icon { left: 14px; }
    .filters-toggle-btn { padding: 12px 14px; font-size: 13px; }

    /* --- HERO mobile --- */
    .hero-banner { min-height: unset; }

    .filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 6px;
        margin-bottom: 10px;
    }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-btn {
        padding: 7px 12px;
        font-size: 12px;
        gap: 4px;
    }
    .filter-btn svg { width: 12px; height: 12px; }

    .controls-bottom {
        flex-direction: column;
        gap: 8px;
    }
    .select-wrap {
        width: 100%;
        min-width: 0;
        padding: 10px 14px;
    }
    .month-select,
    .source-select { font-size: 13px; }

    /* --- EVENT ROWS — v0 mobile style --- */
    .day-header { padding: 10px 16px; }
    .day-weekday { font-size: 13px; }
    .day-date { font-size: 13px; }
    .day-count { font-size: 12px; padding: 3px 10px; }

    /* Row: align top so time sits next to first line of title */
    .event-row { padding: 14px 16px; align-items: flex-start; }

    /* Title + badge: allow title to wrap fully, badge below title */
    .event-row-top {
        gap: 6px;
        margin-bottom: 5px;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .event-row-title {
        font-size: 15px;
        font-weight: 600;
        color: #111827;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        display: block;
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
        line-height: 1.35;
        flex: 1 1 100%;
        text-align: left;
    }
    .event-category {
        font-size: 11px;
        font-weight: 500;
        padding: 3px 10px;
        flex-shrink: 0;
    }

    /* Meta: location on own line, price on own line — matches v0 */
    .event-row-meta {
        font-size: 13px;
        flex-direction: column;
        gap: 3px;
        align-items: flex-start;
        flex-wrap: nowrap;
        overflow: visible;
    }
    .event-row-location {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        max-width: 100%;
        font-size: 13px;
        color: var(--text-light);
    }
    .event-row-price {
        color: var(--text-light);
        font-weight: 400;
        font-size: 13px;
        white-space: nowrap;
    }
    .meta-dot { display: none; }

    /* Show chevron on mobile like v0 */
    .chevron {
        display: flex;
        align-self: center;
        margin-left: 8px;
        font-size: 1.2em;
        color: #9ca3af;
    }

    /* --- ACTIVE FILTERS BAR --- */
    .active-filters-bar { padding: 8px 12px; gap: 6px; margin-bottom: 10px; }
    .active-filters-label { font-size: 11px; }
    .active-filter-tag { font-size: 11px; padding: 3px 8px; }
    .clear-all-btn { font-size: 11px; padding: 3px 10px; }

    /* --- MODAL --- */
    .modal-content { margin: 12px; padding: 20px; max-height: 92vh; border-radius: 16px; }
    .modal-title { font-size: 1.15em; padding-right: 36px; }
    .form-row { grid-template-columns: 1fr; }
    .form-actions, .event-detail-actions { flex-direction: column; }

    /* --- SCROLL TO TOP --- */
    #scrollTopBtn { width: 44px; height: 44px; bottom: 20px; right: 16px; font-size: 1.15em; }

    /* --- FOOTER --- */
    .footer-philly-letters { gap: 8px; padding: 28px 16px 24px; }
    .philly-letter { width: 44px; height: 44px; font-size: 1.1em; }
    .footer-neighborhoods { gap: 4px 14px; padding: 0 16px 24px; }
    .footer-neighborhoods span { font-size: 0.72em; }
    .footer-bottom { padding: 20px 16px; }
    .footer-brand { font-size: 0.95em; }
    .footer-sub { font-size: 0.78em; }
}

/* Hero category pills hover — brightness lift, defined above with solid fills */

/* ============================================================
   STAT CARDS — TEAM COLOR BORDERS + WATERMARK ICONS
   ============================================================ */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    opacity: 0.07;
    pointer-events: none;
}

/* Card 1 (Total Events): Eagles green border + Liberty Bell watermark */
.stat-card:nth-child(1) { border-top-color: var(--green); }
.stat-card:nth-child(1)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 32'%3E%3Crect x='10' y='1' width='8' height='5' rx='2' fill='%23004C54'/%3E%3Cpath d='M5 6 C3 10 2 15 2 19 C2 24 7 29 14 29 C21 29 26 24 26 19 C26 15 25 10 23 6Z' fill='%23004C54'/%3E%3Crect x='5' y='29' width='18' height='3' rx='1.5' fill='%23004C54'/%3E%3Cline x1='9' y1='18' x2='19' y2='18' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* Card 2 (Upcoming): Phillies red border + running figure watermark */
.stat-card:nth-child(2) { border-top-color: var(--red); }
.stat-card:nth-child(2) .stat-number { color: var(--red); }
.stat-card:nth-child(2)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 32'%3E%3Ccircle cx='14' cy='4' r='3.5' fill='%23E81828'/%3E%3Cpath d='M14 8 L9 20 L13 20 L14 15 L18 20 L22 20 L17 8Z' fill='%23E81828'/%3E%3Cpath d='M9 20 L6 30 L10 30 L13 20' fill='%23E81828'/%3E%3Cpath d='M18 20 L21 30 L25 30 L22 20' fill='%23E81828'/%3E%3C/svg%3E");
}

/* Card 3 (Last Updated): Sixers blue border + clock watermark */
.stat-card:nth-child(3) { border-top-color: var(--sixers-blue); }
.stat-card:nth-child(3) .stat-number { color: var(--sixers-blue); }
.stat-card:nth-child(3)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='11' fill='none' stroke='%23006BB6' stroke-width='2'/%3E%3Cline x1='14' y1='14' x2='14' y2='7' stroke='%23006BB6' stroke-width='2' stroke-linecap='round'/%3E%3Cline x1='14' y1='14' x2='19' y2='17' stroke='%23006BB6' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ============================================================
   EVENT CATEGORY BADGES — LIGHT COLORED PILLS (v0 style)
   ============================================================ */

/* Per-category: light bg + matching text color */
.category-running        { background: #dcfce7; color: #166534; }
.category-music          { background: #fee2e2; color: #991b1b; }
.category-artsAndCulture { background: #ede9fe; color: #5b21b6; }
.category-foodAndDrink   { background: #fef3c7; color: #92400e; }
.category-community      { background: #dbeafe; color: #1e40af; }
.category-other          { background: #f3f4f6; color: #374151; }

/* (old philly-pride-strip and marquee removed — replaced by neighborhood-strip and footer-philly-letters) */
