/* ==========================================================================
   CityVoice Events – Front-End Styles
   File: assets/events-front.css
   ========================================================================== */

:root {
  --tco-bg: #ffffff;
  --tco-border: #e2e8f0;
  --tco-border-subtle: #edf2f7;
  --tco-text: #1a202c;
  --tco-muted: #718096;
  --tco-accent: #2563eb;
  --tco-accent-soft: rgba(37, 99, 235, 0.08);
  --tco-danger: #e11d48;
  --tco-radius: 10px;
  --tco-radius-lg: 16px;
  --tco-shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
  --tco-shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.1);
  --tco-gap: 16px;
  --tco-transition-fast: 150ms ease-out;
  --tco-transition-med: 200ms ease;
  --tco-font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Base wrapper
   -------------------------------------------------------------------------- */

#tco-wrap {
  font-family: var(--tco-font-main);
  color: var(--tco-text);
  background: var(--tco-bg);
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  box-sizing: border-box;
}

#tco-wrap * {
  box-sizing: border-box;
}

/* Top bar
   -------------------------------------------------------------------------- */

#tco-wrap .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

#tco-wrap .tco-title {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

#tco-wrap .tco-title::before {
  content: "";
  width: 9px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

#tco-wrap .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(148,163,184,0.6);
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.85rem;
  text-decoration: none;
  gap: 0.35rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: background var(--tco-transition-fast),
              border-color var(--tco-transition-fast),
              box-shadow var(--tco-transition-fast),
              transform var(--tco-transition-fast);
}

#tco-wrap .cta::after {
  content: "↗";
  font-size: 0.8em;
  opacity: 0.7;
}

#tco-wrap .cta:hover {
  background: #e5f0ff;
  border-color: #93c5fd;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.18);
  transform: translateY(-1px);
}

/* Hero
   -------------------------------------------------------------------------- */

#tco-wrap #hero.hero {
  position: relative;
  margin-bottom: 1.75rem;
  border-radius: var(--tco-radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at top left, #dbeafe, #eff6ff);
  box-shadow: var(--tco-shadow-soft);
}

#tco-wrap .hero-track {
  position: relative;
  min-height: 220px;
}

#tco-wrap .hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.01);
  transform-origin: center;
  transition: opacity 600ms ease, transform 600ms ease;
  opacity: 0;
}

#tco-wrap .hero-slide.is-active {
  display: block;
  opacity: 1;
  transform: scale(1.03);
}

#tco-wrap .hero-overlay {
  position: absolute;
  inset: 0;
  padding: 1.8rem 1.9rem;
  background:
    radial-gradient(circle at top left, rgba(15,23,42,0.24), transparent 60%),
    linear-gradient(to top, rgba(15,23,42,0.75), rgba(15,23,42,0.15));
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
}

#tco-wrap .hero-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
}

#tco-wrap .hero-meta {
  font-size: 0.9rem;
  opacity: 0.9;
}

#tco-wrap .hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #f97316;
  color: #0b1120;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  gap: 0.4rem;
  box-shadow: 0 10px 25px rgba(248, 113, 22, 0.35);
  transition: transform var(--tco-transition-fast),
              box-shadow var(--tco-transition-fast),
              background var(--tco-transition-fast);
}

#tco-wrap .hero-link::after {
  content: "View event";
  font-weight: 500;
}

#tco-wrap .hero-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 35px rgba(248, 113, 22, 0.5);
  background: #fb923c;
}

#tco-wrap .hero-pager {
  position: absolute;
  inset-inline: 0;
  bottom: 0.8rem;
  padding-inline: 1.3rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

#tco-wrap .hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.7);
  background: rgba(15,23,42,0.3);
  padding: 0;
  cursor: pointer;
  transition: background var(--tco-transition-fast),
              width var(--tco-transition-fast),
              border-color var(--tco-transition-fast);
}

#tco-wrap .hero-dot.is-active {
  width: 18px;
  background: #f97316;
  border-color: #fed7aa;
}

/* Section titles
   -------------------------------------------------------------------------- */

#tco-wrap .section-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}

#tco-wrap .section-title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #111827;
}

#tco-wrap .section-title small {
  font-size: 0.8rem;
  color: var(--tco-muted);
}

#tco-wrap .tco-upcoming-header {
  margin-top: 1.2rem;
  align-items: center;
  justify-content: space-between;
}

#tco-wrap .tco-upcoming-header > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

#tco-wrap .tco-date-line {
  font-size: 0.85rem;
  color: var(--tco-muted);
}

/* Shared button style
   -------------------------------------------------------------------------- */

#tco-wrap .viewbtn {
  border-radius: 999px;
  border: 1px solid var(--tco-border);
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
  transition: background var(--tco-transition-fast),
              border-color var(--tco-transition-fast),
              box-shadow var(--tco-transition-fast),
              color var(--tco-transition-fast),
              transform var(--tco-transition-fast);
}

#tco-wrap .viewbtn:hover {
  background: #e5f0ff;
  border-color: #93c5fd;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

#tco-wrap .viewbtn.is-active {
  background: #c4953e;
  color: #eef2ff;
  border-color: #c4953e;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

#tco-wrap .tco-add-event-btn {
  background: #0f172a;
  color: #f9fafb;
  border-color: #0f172a;
  padding-inline: 1rem;
}

#tco-wrap .tco-add-event-btn:hover {
  background: #020617;
  border-color: #020617;
}

/* Filters
   -------------------------------------------------------------------------- */

#tco-wrap .tco-filters {
  margin-top: 1.35rem;
  padding: 0.95rem;
  border-radius: var(--tco-radius);
  border: 1px solid var(--tco-border);
  background: linear-gradient(135deg, #f9fafb, #f1f5f9);
  box-shadow: var(--tco-shadow-subtle);
}

#tco-wrap .tco-filters-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

#tco-wrap .tco-filters-row-1 {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1.4fr);
}

#tco-wrap .tco-filters-row-2 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#tco-wrap .tco-filters-row:last-child {
  margin-bottom: 0;
}

#tco-wrap .tco-filter {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

#tco-wrap .tco-filter-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--tco-muted);
}

/* Inputs
   -------------------------------------------------------------------------- */

#tco-wrap .tco-input {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--tco-border);
  background: #ffffff;
  font-size: 0.88rem;
  color: var(--tco-text);
  outline: none;
  transition: border-color var(--tco-transition-fast),
              box-shadow var(--tco-transition-fast),
              background var(--tco-transition-fast);
}

#tco-wrap .tco-input::placeholder {
  color: #a0aec0;
}

#tco-wrap .tco-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1);
  background: #ffffff;
}

/* Search input with icon
   -------------------------------------------------------------------------- */

#tco-wrap .tco-search-wrapper {
  position: relative;
}

#tco-wrap .tco-icon-search {
  position: absolute;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #9ca3af;
  box-sizing: border-box;
}

#tco-wrap .tco-icon-search::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  background: #9ca3af;
  border-radius: 999px;
  right: -4px;
  bottom: 0;
  transform: rotate(40deg);
}

#tco-wrap .tco-input-search {
  padding-left: 1.7rem;
}

/* Dropdowns
   -------------------------------------------------------------------------- */

#tco-wrap .tco-dropdown {
  position: relative;
}

#tco-wrap .tco-dropdown-toggle {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--tco-border);
  background: #ffffff;
  padding: 0.45rem 0.75rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--tco-transition-fast),
              box-shadow var(--tco-transition-fast),
              background var(--tco-transition-fast);
}

#tco-wrap .tco-dropdown-toggle:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

#tco-wrap .tco-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#tco-wrap .tco-dropdown-arrow {
  margin-left: 0.35rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

#tco-wrap .tco-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 15;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--tco-border);
  box-shadow: 0 16px 40px rgba(15,23,42,0.15);
  padding: 0.25rem;
  display: none;
  max-height: 260px;
  overflow: auto;
}

#tco-wrap .tco-dropdown.is-open .tco-dropdown-menu {
  display: block;
}

#tco-wrap .tco-dropdown-item {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  transition: background var(--tco-transition-fast),
              color var(--tco-transition-fast);
}

#tco-wrap .tco-dropdown-item:hover {
  background: #f2f2f2;
}

#tco-wrap .tco-dropdown-item.is-active {
  background: #c4953e;
  color: #eef2ff;
}

/* Date dropdown specifics
   -------------------------------------------------------------------------- */

#tco-wrap .tco-date-menu {
  padding: 0.5rem 0.55rem 0.6rem;
}

#tco-wrap .tco-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

#tco-wrap .tco-date-title {
  font-size: 0.9rem;
  font-weight: 600;
}

#tco-wrap .tco-date-nav {
  border-radius: 999px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--tco-border);
  background: #f8fafc;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#tco-wrap .tco-date-nav:hover {
  background: #e5f0ff;
}

#tco-wrap .tco-date-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  font-size: 0.7rem;
  color: var(--tco-muted);
  text-align: center;
  margin-bottom: 0.3rem;
}

#tco-wrap .tco-date-day-name {
  padding: 0.2rem 0;
}

#tco-wrap .tco-date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.15rem;
}

#tco-wrap .tco-date-cell {
  border-radius: 999px;
  border: 0;
  padding: 0.3rem 0;
  font-size: 0.8rem;
  cursor: pointer;
  background: #f2f2f2;
  color: var(--tco-text);
}

#tco-wrap .tco-date-cell.is-empty {
  background: transparent;
  cursor: default;
}

#tco-wrap .tco-date-cell.is-today {
  border: 1px solid #60a5fa;
}

#tco-wrap .tco-date-cell.is-selected {
  background: #f2f2f2;
  color: #eef2ff;
}

/* View switcher group
   -------------------------------------------------------------------------- */

#tco-wrap .tco-filter-views .tco-view-modes {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
}

/* Views container
   -------------------------------------------------------------------------- */

#tco-wrap .tco-view {
  display: none;
  margin-top: 1.15rem;
}

#tco-wrap .tco-view.is-active {
  display: block;
}

/* Top 3 & cards
   -------------------------------------------------------------------------- */

#tco-wrap .top3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}

#tco-wrap .tco-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--tco-border-subtle);
  box-shadow: 0 10px 26px rgba(15,23,42,0.10);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#tco-wrap .tco-card-top3 {
  position: relative;
}

#tco-wrap .tco-card-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

#tco-wrap .tco-card-body {
  padding: 0.7rem 0.9rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

#tco-wrap .tco-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

#tco-wrap .tco-card-meta {
  font-size: 0.82rem;
  color: var(--tco-muted);
}

#tco-wrap .tco-card-host {
  font-size: 0.8rem;
  color: #4b5563;
}

#tco-wrap .tco-card-link {
  margin-top: 0.3rem;
  align-self: flex-start;
  font-size: 0.82rem;
  font-weight: 500;
  color: #1d4ed8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#tco-wrap .tco-card-link::after {
  content: "→";
  font-size: 0.8em;
}

#tco-wrap .tco-card-link:hover {
  text-decoration: underline;
}

/* Events – list view
   -------------------------------------------------------------------------- */

#tco-wrap #tco-events-list .events {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

#tco-wrap .tco-event {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--tco-border-subtle);
  box-shadow: 0 8px 20px rgba(15,23,42,0.10);
  padding: 0.8rem 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
}

#tco-wrap .tco-event-header {
  margin-bottom: 0.25rem;
}

#tco-wrap .tco-event-title {
  margin: 0 0 0.1rem;
  font-size: 1rem;
  font-weight: 700;
}

#tco-wrap .tco-event-meta {
  font-size: 0.82rem;
  color: var(--tco-muted);
}

#tco-wrap .tco-event-thumb img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
}

#tco-wrap .tco-event-body {
  font-size: 0.88rem;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

#tco-wrap .tco-event-host {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4b5563;
}

#tco-wrap .tco-event-excerpt {
  margin: 0;
  font-size: 0.86rem;
  color: #4b5563;
}

#tco-wrap .tco-event-actions {
  margin-top: 0.35rem;
}

/* Events – paragraph view
   -------------------------------------------------------------------------- */

#tco-wrap .events-para {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}

#tco-wrap .tco-event-para-item {
  border-radius: 999px;
  background: #f2f2f2;
  padding: 0.35rem 0.75rem;
  border: 1px solid #e2e8f0;
}

/* Events – tile/grid view
   -------------------------------------------------------------------------- */

#tco-wrap .events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

/* Map view
   -------------------------------------------------------------------------- */

#tco-wrap .tco-view-map {
  margin-top: 1.1rem;
}

#tco-wrap .tco-map {
  width: 100%;
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--tco-border);
  box-shadow: 0 8px 25px rgba(15,23,42,0.12);
}

/* Status, errors, load more
   -------------------------------------------------------------------------- */

#tco-wrap #tco-status {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  color: var(--tco-muted);
}

#tco-wrap #tco-error {
  margin-top: 0.35rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.82rem;
}

#tco-wrap #btnLoadMore.loadmore {
  margin-top: 1rem;
  display: inline-flex;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--tco-border);
  background: #f9fafb;
  font-size: 0.9rem;
  cursor: pointer;
}

/* JSON-LD script – no styles needed but keep display block if inspected */

#tco-wrap #eventSchema {
  display: none;
}

/* ===========================================================
   List view: image LEFT, text RIGHT
   =========================================================== */

#tco-wrap .tco-event {
  /* two columns: image (fixed-ish) + flexible text */
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  column-gap: 0.85rem;
}

/* Put the thumbnail in the LEFT column */
#tco-wrap .tco-event-thumb {
  grid-column: 1;
}

/* Put everything else (header, body, etc.) in the RIGHT column */
#tco-wrap .tco-event > :not(.tco-event-thumb) {
  grid-column: 2;
}

/* Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  #tco-wrap {
    padding-inline: 0.75rem;
  }

  #tco-wrap .tco-filters-row-1,
  #tco-wrap .tco-filters-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tco-wrap .tco-view-modes {
    flex-wrap: wrap;
  }

  #tco-wrap .tco-event {
    grid-template-columns: 1fr;
  }

  #tco-wrap .tco-event-thumb img {
    height: 170px;
  }

  #tco-wrap #hero.hero {
    margin-bottom: 1.1rem;
  }

  #tco-wrap .hero-overlay {
    padding: 1.25rem 1.3rem;
  }

  #tco-wrap .hero-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 640px) {
  #tco-wrap .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  #tco-wrap .tco-filters {
    padding: 0.85rem;
  }

  #tco-wrap .tco-filters-row-1,
  #tco-wrap .tco-filters-row-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  #tco-wrap .tco-event-para-item {
    border-radius: 12px;
  }

  #tco-wrap .tco-map {
    height: 320px;
  }

  #tco-wrap .top3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ================================================================
   CitySpark-Style Filter Field Layout — Perfect Width Matching
   ================================================================ */

/* Remove filter box background and boxy layout */
#tco-wrap .tco-filters {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin-top: 8px !important;
}

/* Two filter rows should have breathing room like CitySpark */
#tco-wrap .tco-filters-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px; /* spacing between rows */
}

/* Remove labels entirely */
#tco-wrap .tco-filter-label {
  display: none !important;
}

/* Compact CitySpark-like input appearance */
#tco-wrap .tco-input,
#tco-wrap .tco-dropdown-toggle {
  height: 36px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.9rem;
  border: 1px solid #d2d6dc;
  background: #ffffff;
  color: #000;                  /* <-- default text black */
  width: auto;                  /* important: do NOT stretch */
  flex: 0 0 auto;               /* important: natural width only */
}

/* Make dropdown label text black */
#tco-wrap .tco-dropdown-label {
  color: #000 !important;
}


/* Search field same behavior as CitySpark */
#tco-wrap .tco-filter-search {
  flex: 0 0 auto !important;     /* no expanding */
  width: auto !important;
}

#tco-wrap .tco-input-search {
  width: 160px;                   /* exact CitySpark width */
}

/* Dropdowns match CitySpark sizing */
#tco-wrap .tco-dropdown {
  flex: 0 0 auto !important;
}

#tco-wrap .tco-dropdown-toggle {
  width: 150px;                   /* category, sort, view */
}

/* View dropdown should not slide off screen */
#tco-wrap .tco-filter-views .tco-dropdown-toggle {
  width: 140px !important;
}

/* Prevent rows from stretching to full width */
#tco-wrap .tco-filters-row-1,
#tco-wrap .tco-filters-row-2 {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

/* Remove field background hover bulkiness */
#tco-wrap .tco-input:hover,
#tco-wrap .tco-dropdown-toggle:hover {
  background: #f7f8fa;
  border-color: #c8ccd2;
}

/* Dropdown menu matches CitySpark */
#tco-wrap .tco-dropdown-menu {
  border-radius: 8px;
  border: 1px solid #d2d6dc;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

#tco-wrap #hero.hero {
  display: none !important;
  margin-bottom: 0 !important;
}

/* ----------------------------------------------
   TOP 3 — MOVE TEXT INTO IMAGE (LEFT, WHITE)
   ---------------------------------------------- */

#tco-wrap .top3 .tco-card {
  position: relative;
  overflow: hidden;
}

/* Darken image slightly for readability */
#tco-wrap .top3 .tco-card-img {
  filter: brightness(0.45);
}

/* Move card body on top of the image */
#tco-wrap .top3 .tco-card-body {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  color: #fff;
  text-align: left;
}

/* Title in white */
#tco-wrap .top3 .tco-card-title {
  color: #fff;
}

/* Meta text in light white */
#tco-wrap .top3 .tco-card-meta {
  color: #e5e7eb !important;
}

/* Host line in white */
#tco-wrap .top3 .tco-card-host {
  color: #f3f4f6 !important;
}

/* ============================================================
   FEATURED TOP 3 — TEXT OVER IMAGE + LINK BELOW IMAGE
   ============================================================ */

#tco-wrap .top3 .tco-card {
  position: relative;
  overflow: visible; /* allow the link to sit below the image */
}

/* Light darkening — keep image visible */
#tco-wrap .top3 .tco-card-img {
  filter: brightness(0.78);
}

/* Softer, lighter gradient over image */
#tco-wrap .top3 .tco-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0) 20%,
    rgba(0,0,0,0.35) 90%
  );
  z-index: 3;
  pointer-events: none;
}

/* Overlay text (title/meta/host) on the image */
#tco-wrap .top3 .tco-card-body {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 5;
  color: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px; /* tight spacing */
}

/* Title */
#tco-wrap .top3 .tco-card-title {
  color: #fff !important;
  margin: 0;
  line-height: 1.1;
}

/* Meta details */
#tco-wrap .top3 .tco-card-meta {
  color: #e8e8e8 !important;
  margin: 0;
  line-height: 1.1;
}

/* Host organization */
#tco-wrap .top3 .tco-card-host {
  color: #f0f0f0 !important;
  margin: 0;
  line-height: 1.1;
}

/* --------------------------------------------
   Move "View Details" link BELOW the image
   -------------------------------------------- */

#tco-wrap .top3 .tco-card-link {
  position: absolute;
  left: 10px;
  bottom: -26px;              /* pushes it just below the image */
  z-index: 6;
  color: #1d4ed8 !important;  /* blue link color */
  text-decoration: none;
  font-weight: 500;
}

#tco-wrap .top3 .tco-card-link:hover {
  text-decoration: underline;
}

/* ============================================================
   MOBILE POLISH – snug layout on small screens
   ============================================================ */

@media (max-width: 640px) {

  /* A bit tighter padding on mobile */
  #tco-wrap {
    padding-inline: 0.75rem;
  }

  /* Filters: stack nicely instead of forcing fixed widths */
  #tco-wrap .tco-filters-row {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
  }

  #tco-wrap .tco-filter {
    flex: 1 1 100%;
  }

  /* Inputs & dropdowns should span full width on mobile */
  #tco-wrap .tco-input,
  #tco-wrap .tco-dropdown-toggle {
    width: 100% !important;
    flex: 1 1 100% !important;
  }

  #tco-wrap .tco-input-search {
    width: 100% !important;
  }

  #tco-wrap .tco-filter-views .tco-dropdown-toggle {
    width: 100% !important;
  }

  /* Top 3: single column and snug overlay/link positions */
  #tco-wrap .top3 {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }

  #tco-wrap .top3 .tco-card-img {
    height: 190px; /* a bit taller for readability on phones */
  }

  #tco-wrap .top3 .tco-card-body {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  #tco-wrap .top3 .tco-card-link {
    left: 12px;
    bottom: -24px; /* keep link close to image but not touching */
  }

  /* Events list: slightly tighter padding on mobile */
  #tco-wrap .tco-event {
    padding: 0.75rem 0.8rem;
  }
}
