/* ============================================================
   Canarias Hoy — style.css
   Web pública — mobile-first, dark premium
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset & tokens ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0C1A2E;
  --surface:   #1A3050;
  --surface2:  #213d63;
  --text:      #E8F0FB;
  --text-dim:  rgba(232,240,251,.5);
  --orange:    #F97316;
  --yellow:    #FCD34D;
  --ocean:     #0EA5E9;
  --r-card:    1rem;
  --r-badge:   999px;
  --shadow:    0 4px 24px rgba(0,0,0,.45);
  --transition: .2s ease;
  --header-h:  64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }

/* ── Typography ──────────────────────────────────────────── */
.font-serif { font-family: 'Playfair Display', serif; }
.font-mono  { font-family: 'JetBrains Mono', monospace; }

/* ── Layout helpers ──────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.2;
}

.section-sub {
  color: var(--text-dim);
  font-size: .95rem;
  margin-bottom: 2rem;
}

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(12,26,46,.85);
  border-bottom: 1px solid rgba(232,240,251,.07);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo__sun {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 0 rgba(249,115,22,.6);
  animation: sun-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

.logo__icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  animation: sun-pulse 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(249,115,22,.4));
}

@keyframes sun-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(249,115,22,.6); filter: drop-shadow(0 0 4px rgba(249,115,22,.4)); }
  50%      { box-shadow: 0 0 0 10px rgba(249,115,22,0); filter: drop-shadow(0 0 12px rgba(249,115,22,.7)); }
}

.main-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

/* Oculto por defecto en móvil — sólo se muestra con .open */
@media (max-width: 640px) {
  .main-nav {
    display: none;
    position: fixed;
    top: var(--header-h, 56px);
    left: 0; right: 0;
    background: rgba(12,26,46,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    gap: .25rem;
    border-bottom: 1px solid rgba(232,240,251,.07);
    z-index: 99;
    margin-left: 0;
  }
  .main-nav.open {
    display: flex;
  }
}

.main-nav a {
  padding: .45rem .85rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* ── Header right area ───────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-shrink: 0;
}

.header-fav-btn {
  position: relative;
  background: rgba(232,240,251,.07);
  border: 1px solid rgba(232,240,251,.12);
  color: var(--text-dim);
  width: 38px; height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.header-fav-btn:hover,
.header-fav-btn.has-favs {
  color: #EC4899;
  border-color: rgba(236,72,153,.35);
  background: rgba(236,72,153,.1);
}
.header-fav-count {
  position: absolute;
  top: -5px; right: -5px;
  background: #EC4899;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

.island-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(232,240,251,.12);
  border-radius: 8px;
  padding: .45rem .75rem;
  font-size: .85rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}

.island-select:focus { border-color: var(--orange); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}

.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h, 80px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 0% 100%, rgba(249,115,22,.18) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 100% 0%,   rgba(14,165,233,.14) 0%, transparent 60%),
    var(--bg);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero__badge {
  display: inline-block;
  background: rgba(249,115,22,.15);
  border: 1px solid rgba(249,115,22,.35);
  color: var(--orange);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .35rem .85rem;
  border-radius: var(--r-badge);
  margin-bottom: 1.5rem;
  animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.hero__h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.hero__h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero__stats {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  color: var(--yellow);
  line-height: 1;
}

.stat__label {
  font-size: .8rem;
  color: var(--text-dim);
  margin-top: .25rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Wave divider */
.hero__wave {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 80px;
  overflow: hidden;
}

.hero__wave svg { width: 100%; height: 100%; }

/* ── Filters bar ─────────────────────────────────────────── */
.filters-section {
  padding: 1.25rem 0 .5rem;
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid rgba(232,240,251,.06);
}

.filters-top-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

/* Search */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 380px;
}
.search-icon {
  position: absolute;
  left: .85rem;
  top: 50%; transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(232,240,251,.12);
  border-radius: var(--r-badge);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  padding: .55rem 2.5rem .55rem 2.4rem;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--orange); }
.search-input::placeholder { color: var(--text-dim); }
.search-clear {
  position: absolute;
  right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-dim); font-size: .9rem;
  cursor: pointer; padding: .25rem;
  transition: color var(--transition);
}
.search-clear:hover { color: var(--text); }

/* Date filter pills */
.date-filters {
  display: flex;
  gap: .4rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.date-filters::-webkit-scrollbar { display: none; }
.date-btn {
  padding: .45rem .85rem;
  border-radius: var(--r-badge);
  border: 1px solid rgba(232,240,251,.12);
  background: var(--surface);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.date-btn:hover { color: var(--text); border-color: rgba(232,240,251,.3); }
.date-btn.active {
  background: rgba(14,165,233,.18);
  border-color: rgba(14,165,233,.4);
  color: #0EA5E9;
  font-weight: 600;
}

.filters-scroll {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar { display: none; }

.filter-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--r-badge);
  border: 1px solid rgba(232,240,251,.12);
  background: var(--surface);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}

.filter-btn:hover { color: var(--text); border-color: rgba(232,240,251,.3); }

.filter-btn.active {
  background: var(--active-bg, var(--orange));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.filter-btn[data-filter="todos"].active           { --active-bg: #F97316; }
.filter-btn[data-filter="festivos"].active        { --active-bg: #EF4444; }
.filter-btn[data-filter="romerias"].active        { --active-bg: #92400E; }
.filter-btn[data-filter="carnavales"].active      { --active-bg: #A855F7; }
.filter-btn[data-filter="conciertos"].active      { --active-bg: #0EA5E9; }
.filter-btn[data-filter="mercadillos"].active     { --active-bg: #22C55E; }
.filter-btn[data-filter="deportes"].active        { --active-bg: #F97316; }

/* ── Section spacing ─────────────────────────────────────── */
.section { padding: 4rem 0; }
.section:nth-child(even) { background: rgba(255,255,255,.02); }

/* ── Featured cards ──────────────────────────────────────── */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feat-card {
  background: var(--surface);
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid rgba(232,240,251,.07);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  cursor: pointer;
}

.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(249,115,22,.3);
}

.feat-card__cta {
  font-size: .78rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: .02em;
  margin-top: .25rem;
  opacity: 0;
  transition: opacity .2s;
}
.feat-card:hover .feat-card__cta { opacity: 1; }

.feat-card__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  border-bottom: 1px solid rgba(232,240,251,.06);
}

.feat-card__emoji {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.4));
}

.badge-soon {
  position: absolute;
  top: .75rem; right: .75rem;
  background: #22C55E;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: var(--r-badge);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.feat-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.feat-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

.feat-card__desc {
  font-size: .85rem;
  color: var(--text-dim);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feat-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  margin-top: .25rem;
}

.feat-card__isla  { color: var(--text-dim); }
.feat-card__date  {
  font-family: 'JetBrains Mono', monospace;
  color: var(--orange);
}

/* ── Category badge ──────────────────────────────────────── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .65rem;
  border-radius: var(--r-badge);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: color-mix(in srgb, var(--bc) 18%, transparent);
  color: var(--bc);
  border: 1px solid color-mix(in srgb, var(--bc) 35%, transparent);
  white-space: nowrap;
}

/* ── Event counter ───────────────────────────────────────── */
.ev-counter {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.ev-counter__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  color: var(--yellow);
}

.ev-counter__label {
  color: var(--text-dim);
  font-size: .9rem;
}

/* ── Events grid ─────────────────────────────────────────── */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.ev-card {
  background: var(--surface);
  border-radius: var(--r-card);
  border: 1px solid rgba(232,240,251,.06);
  display: flex;
  gap: 1rem;
  padding: 1rem;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ev-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(249,115,22,.3);
}

.ev-card__cta {
  display: none;
  font-size: .72rem;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: .03em;
  margin-top: .1rem;
}

.ev-card:hover .ev-card__cta { display: block; }

.ev-card__thumb {
  width: 72px;
  height: 72px;
  border-radius: .625rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border: 1px solid transparent;
}

.ev-card__body {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.ev-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-card__desc {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: .25rem;
  font-size: .75rem;
  margin-top: auto;
}

.ev-card__isla { color: var(--text-dim); flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-card__date {
  font-family: 'JetBrains Mono', monospace;
  color: var(--orange);
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── Card animation ──────────────────────────────────────── */
.anim-entry {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .4s ease, transform .4s ease;
}
.anim-entry.visible { opacity: 1; transform: translateY(0); }

.no-results {
  grid-column: 1/-1;
  text-align: center;
  color: var(--text-dim);
  padding: 3rem;
  font-size: 1rem;
}

/* ── SEO text section ────────────────────────────────────── */
.seo-section {
  background: var(--surface);
  border-top: 1px solid rgba(232,240,251,.07);
  border-bottom: 1px solid rgba(232,240,251,.07);
}

.seo-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.seo-section p {
  color: var(--text-dim);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 1.1rem;
  max-width: 900px;
}

.seo-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}

.seo-link {
  background: rgba(249,115,22,.1);
  border: 1px solid rgba(249,115,22,.25);
  color: var(--orange);
  padding: .35rem .85rem;
  border-radius: var(--r-badge);
  font-size: .82rem;
  font-weight: 500;
  transition: background var(--transition);
  cursor: pointer;
}
.seo-link:hover { background: rgba(249,115,22,.2); }

/* ── Float button ────────────────────────────────────────── */
.float-btn {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 90;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--r-badge);
  padding: .75rem 1.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(249,115,22,.45);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  gap: .45rem;
}

.float-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(249,115,22,.6);
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 520px;
  max-height: 90svh;
  overflow-y: auto;
  border: 1px solid rgba(232,240,251,.1);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  animation: modal-in .2s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 0;
}

.modal__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal__sub {
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: .25rem;
}

.modal__close {
  background: rgba(232,240,251,.08);
  border: none;
  color: var(--text);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.modal__close:hover { background: rgba(232,240,251,.15); }

.modal__body { padding: 1.5rem; }

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1rem;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(232,240,251,.06);
  border: 1px solid rgba(232,240,251,.12);
  border-radius: .625rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  padding: .65rem .85rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--orange); }

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

.form-group select option { background: #1A3050; color: var(--text); }

.form-submit {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: .75rem;
  padding: .85rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: .5rem;
  transition: opacity var(--transition), transform var(--transition);
}

.form-submit:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }
.form-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1A3050;
  border: 1px solid rgba(232,240,251,.12);
  color: var(--text);
  padding: .85rem 1.5rem;
  border-radius: var(--r-badge);
  font-size: .9rem;
  z-index: 999;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { border-color: rgba(34,197,94,.4); }
.toast--error   { border-color: rgba(239,68,68,.4); }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: #070F1C;
  border-top: 1px solid rgba(232,240,251,.07);
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: .875rem;
  margin-top: .75rem;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; }

.footer-col ul a {
  color: var(--text-dim);
  font-size: .875rem;
  transition: color var(--transition);
}

.footer-col ul a:hover { color: var(--orange); }

.footer-islands {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.isla-chip {
  background: var(--surface);
  border: 1px solid rgba(232,240,251,.1);
  color: var(--text-dim);
  padding: .3rem .7rem;
  border-radius: var(--r-badge);
  font-size: .78rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.isla-chip:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(232,240,251,.06);
  margin-top: 3rem;
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: .8rem;
}

.footer-seo {
  color: var(--text-dim);
  font-size: .75rem;
  line-height: 1.7;
  max-width: 600px;
}

/* ── Event detail modal ──────────────────────────────────── */
.modal--detail {
  max-width: 560px;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  max-height: 90svh;
  -webkit-overflow-scrolling: touch;
}

.modal__close--abs {
  position: absolute;
  top: 1rem; right: 1rem;
  z-index: 10;
  background: rgba(12,26,46,.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(232,240,251,.15);
  border-radius: 50%;
  width: 36px; height: 36px;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.modal__close--abs:hover { background: rgba(249,115,22,.3); }

.evd-hero {
  padding: 1.75rem 1.75rem 1.25rem;
}

.evd-top-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.evd-emoji-wrap {
  width: 56px; height: 56px;
  border-radius: .75rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.evd-emoji { font-size: 2rem; line-height: 1; }

.evd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.evd-badge-prox {
  background: rgba(34,197,94,.15);
  color: #22C55E;
  border: 1px solid rgba(34,197,94,.3);
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: var(--r-badge);
  letter-spacing: .03em;
}

.evd-badge-past {
  background: rgba(232,240,251,.08);
  color: var(--text-dim);
  border: 1px solid rgba(232,240,251,.15);
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: var(--r-badge);
}

.evd-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: .5rem;
}

.evd-isla-date {
  font-size: .85rem;
  color: var(--text-dim);
}

.evd-date-mono {
  font-family: 'JetBrains Mono', monospace;
  color: var(--orange);
}

.evd-body {
  padding: 1.5rem 1.75rem 2rem;
}

.evd-desc {
  color: var(--text-dim);
  font-size: .9rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.evd-info-grid {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.75rem;
  background: rgba(232,240,251,.04);
  border: 1px solid rgba(232,240,251,.08);
  border-radius: .875rem;
  padding: 1.1rem 1.25rem;
}

.evd-info-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}

.evd-info-icon { font-size: 1.15rem; line-height: 1.5; flex-shrink: 0; }

.evd-info-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-bottom: .15rem;
}

.evd-info-value {
  font-size: .88rem;
  color: var(--text);
  line-height: 1.45;
}

.evd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.evd-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.2rem;
  border-radius: .75rem;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s;
  flex-shrink: 0;
}

.evd-btn--map {
  background: rgba(14,165,233,.12);
  color: #0EA5E9;
  border: 1px solid rgba(14,165,233,.25);
}
.evd-btn--map:hover { background: rgba(14,165,233,.22); }

.evd-btn--web {
  background: rgba(232,240,251,.08);
  color: var(--text);
  border: 1px solid rgba(232,240,251,.15);
}
.evd-btn--web:hover { background: rgba(232,240,251,.14); }

.evd-btn--tickets {
  background: var(--orange);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 16px rgba(249,115,22,.35);
}
.evd-btn--tickets:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(249,115,22,.5);
}

/* ── Event grid header + tabs ────────────────────────────── */
.ev-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.ev-tabs {
  display: flex;
  gap: .35rem;
  background: var(--surface);
  padding: .3rem;
  border-radius: 12px;
  border: 1px solid rgba(232,240,251,.08);
}

.ev-tab {
  padding: .45rem 1rem;
  border-radius: 9px;
  border: none;
  background: none;
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; gap: .4rem;
  white-space: nowrap;
}
.ev-tab:hover { color: var(--text); }
.ev-tab.active {
  background: rgba(249,115,22,.15);
  color: var(--orange);
  font-weight: 600;
}
.tab-fav-badge {
  background: #EC4899;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* ── Favourite button (on cards) ─────────────────────────── */
.fav-btn {
  position: absolute;
  top: .6rem; right: .6rem;
  background: rgba(12,26,46,.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(232,240,251,.15);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  z-index: 2;
}
.fav-btn:hover { color: #EC4899; border-color: rgba(236,72,153,.4); background: rgba(236,72,153,.12); }
.fav-btn.active { color: #EC4899; border-color: rgba(236,72,153,.5); background: rgba(236,72,153,.15); }

.feat-card__visual { position: relative; }

.fav-btn--card {
  position: absolute;
  top: .5rem; right: .5rem;
  background: rgba(12,26,46,.55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(232,240,251,.12);
  color: var(--text-dim);
  width: 28px; height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  z-index: 2;
  opacity: 0;
}
.ev-card { position: relative; }
.ev-card:hover .fav-btn--card { opacity: 1; }
.fav-btn--card.active { opacity: 1; color: #EC4899; border-color: rgba(236,72,153,.45); }
.fav-btn--card:hover { color: #EC4899; border-color: rgba(236,72,153,.4); }

/* ── Fav button in detail modal ──────────────────────────── */
.evd-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .9rem;
  border-radius: var(--r-badge);
  border: 1px solid rgba(232,240,251,.15);
  background: rgba(232,240,251,.07);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: all .2s;
}
.evd-fav-btn:hover { color: #EC4899; border-color: rgba(236,72,153,.4); background: rgba(236,72,153,.1); }
.evd-fav-btn.active { color: #EC4899; border-color: rgba(236,72,153,.45); background: rgba(236,72,153,.12); }

/* ── Newsletter section ──────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, rgba(249,115,22,.12) 0%, rgba(14,165,233,.08) 100%);
  border-top: 1px solid rgba(249,115,22,.2);
  border-bottom: 1px solid rgba(249,115,22,.15);
  padding: 3rem 0;
}

.nl-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.nl-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 240px;
}

.nl-icon { font-size: 2.5rem; flex-shrink: 0; }

.nl-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .25rem;
}

.nl-sub {
  color: var(--text-dim);
  font-size: .875rem;
}

.nl-form {
  display: flex;
  gap: .5rem;
  flex: 1;
  min-width: 280px;
  max-width: 440px;
}

.nl-input {
  flex: 1;
  background: rgba(232,240,251,.08);
  border: 1px solid rgba(232,240,251,.18);
  border-radius: var(--r-badge);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  padding: .7rem 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.nl-input:focus { border-color: var(--orange); }
.nl-input::placeholder { color: var(--text-dim); }

.nl-btn {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: var(--r-badge);
  padding: .7rem 1.4rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(249,115,22,.35);
}
.nl-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(249,115,22,.5); }

/* ── PWA install banner ──────────────────────────────────── */
.pwa-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  width: calc(100% - 2rem);
  max-width: 480px;
  animation: pwa-slide-up .4s ease;
}

@keyframes pwa-slide-up {
  from { opacity:0; transform: translateX(-50%) translateY(20px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

.pwa-banner__inner {
  background: var(--surface);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 1rem;
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}

.pwa-banner__title {
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.2;
}

.pwa-banner__sub {
  font-size: .75rem;
  color: var(--text-dim);
  margin-top: .1rem;
}

.pwa-install-btn {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: .625rem;
  padding: .5rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.pwa-install-btn:hover { opacity: .9; }

.pwa-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: .9rem;
  padding: .25rem;
  flex-shrink: 0;
  transition: color var(--transition);
}
.pwa-dismiss-btn:hover { color: var(--text); }

/* ── Event detail modal fav btn top row tweak ────────────── */
.evd-top-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
  .nl-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .nl-form { max-width: 100%; min-width: 0; width: 100%; }
}

/* ── Tablet (max 768px) ──────────────────────────────────── */
@media (max-width: 768px) {
  .ev-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
}

/* ── Mobile (max 640px) ──────────────────────────────────── */
@media (max-width: 640px) {

  :root { --header-h: 56px; }

  /* Header */
  .header-inner {
    height: 56px;
    gap: .75rem;
  }

  .logo {
    font-size: 1.05rem;
  }

  .logo__icon {
    width: 28px;
    height: 28px;
  }

  .menu-toggle { display: flex; }

  .main-nav a { padding: .75rem 1rem; border-radius: 8px; font-size: .95rem; }

  .island-select { display: none; }

  .header-fav-btn {
    display: flex;
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 4rem;
  }

  .hero__content {
    padding-top: 2.5rem;
  }

  .hero__badge {
    font-size: .75rem;
    padding: .28rem .7rem;
    margin-bottom: 1rem;
  }

  .hero__h1 {
    font-size: clamp(2rem, 9vw, 2.8rem);
    margin-bottom: 1rem;
  }

  .hero__sub {
    font-size: .9rem;
    margin-bottom: 1.75rem;
  }

  .hero__stats {
    gap: 1.25rem;
    flex-wrap: nowrap;
  }

  .stat__num {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .stat__label {
    font-size: .7rem;
  }

  /* Filters */
  .filters-section {
    top: 56px;
    padding: .85rem 0 .35rem;
  }

  .filters-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    margin-bottom: .65rem;
  }

  .search-wrap {
    max-width: 100%;
    min-width: 0;
  }

  .search-input {
    font-size: .875rem;
    padding: .6rem 2.4rem .6rem 2.2rem;
  }

  .date-filters {
    gap: .3rem;
    padding-bottom: .25rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .date-btn {
    padding: .38rem .65rem;
    font-size: .72rem;
    flex-shrink: 0;
  }

  .filters-scroll {
    gap: .4rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .35rem;
  }

  .filter-btn {
    padding: .45rem .85rem;
    font-size: .78rem;
    gap: .3rem;
    flex-shrink: 0;
  }

  /* Events grid */
  .ev-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }

  .ev-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: 1.25rem;
  }

  .ev-tabs {
    align-self: flex-start;
    width: 100%;
  }

  .ev-tab {
    flex: 1;
    justify-content: center;
    font-size: .8rem;
    padding: .4rem .75rem;
  }

  /* Event cards — better mobile layout */
  .ev-card {
    padding: .85rem;
    gap: .85rem;
  }

  .ev-card__thumb {
    width: 60px;
    height: 60px;
    font-size: 1.7rem;
    border-radius: .5rem;
  }

  .ev-card__name {
    font-size: .95rem;
  }

  /* Featured cards */
  .feat-card__visual { height: 120px; }
  .feat-card__emoji { font-size: 3.25rem; }
  .feat-card__body { padding: 1rem; gap: .5rem; }
  .feat-card__name { font-size: 1.05rem; }

  /* Newsletter */
  .newsletter-section { padding: 2.25rem 0; }

  .nl-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .nl-left {
    gap: .85rem;
    min-width: 0;
  }

  .nl-icon { font-size: 2rem; }

  .nl-title {
    font-size: 1.1rem;
  }

  .nl-form {
    flex-direction: column;
    gap: .5rem;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .nl-input {
    width: 100%;
    font-size: .9rem;
    padding: .75rem 1rem;
  }

  .nl-btn {
    width: 100%;
    padding: .75rem 1rem;
    font-size: .9rem;
  }

  /* Sections */
  .section { padding: 2.5rem 0; }

  .section-title { font-size: clamp(1.4rem, 5vw, 1.9rem); }

  /* Modal */
  .modal {
    max-width: 100%;
    border-radius: 1rem 1rem 0 0;
    max-height: 92svh;
    margin-top: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
    /* Evitar que el backdrop en sí haga scroll */
    overflow: hidden;
  }

  .modal__header { padding: 1.25rem 1.25rem 0; }
  .modal__body { padding: 1.25rem; }

  .modal--detail {
    border-radius: 1rem 1rem 0 0;
    max-height: 92svh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .evd-hero { padding: 1.25rem 1.25rem 1rem; }
  .evd-body { padding: 1.25rem 1.25rem 1.75rem; }

  .evd-title { font-size: 1.25rem; }

  .evd-actions { gap: .5rem; }
  .evd-btn {
    padding: .55rem .9rem;
    font-size: .8rem;
  }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__stats { gap: 1.5rem; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .site-footer { padding: 2.5rem 0 1.75rem; margin-top: 2.5rem; }

  /* Float btn — lift above PWA banner */
  .float-btn {
    bottom: 1.25rem;
    right: 1rem;
    padding: .65rem 1.15rem;
    font-size: .85rem;
    gap: .35rem;
  }

  /* PWA banner */
  .pwa-banner {
    bottom: .75rem;
    width: calc(100% - 1.5rem);
  }

  /* Toast */
  .toast {
    bottom: 4.5rem;
    font-size: .82rem;
    padding: .75rem 1.25rem;
    max-width: calc(100vw - 2rem);
    white-space: normal;
    text-align: center;
  }

  /* SEO section */
  .seo-section { padding: 2rem 0; }
  .seo-section h2 { font-size: 1.3rem; }
  .seo-section p { font-size: .875rem; }
  .seo-links { gap: .4rem; }
  .seo-link { font-size: .78rem; padding: .3rem .7rem; }

  /* Map */
  .evd-leaflet-map { height: 180px; }
}

/* ============================================================
   LEAFLET MAP — modal integrado
   ============================================================ */

.evd-map-wrap {
  margin: 1.5rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}

.evd-leaflet-map {
  height: 220px;
  width: 100%;
  background: #0C1A2E;
  z-index: 1;
}

/* Override Leaflet dark theme */
.evd-leaflet-map .leaflet-popup-content-wrapper {
  background: #1a2a3e;
  color: #e2e8f0;
  border: 1px solid rgba(249,115,22,.3);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .85rem;
}
.evd-leaflet-map .leaflet-popup-tip { background: #1a2a3e; }
.evd-leaflet-map .leaflet-control-zoom a {
  background: #1a2a3e;
  color: #e2e8f0;
  border-color: rgba(255,255,255,.1);
}
.evd-leaflet-map .leaflet-control-zoom a:hover { background: #243348; }
.leaflet-attribution-flag { display: none !important; }





















#evDetailContent { position: relative; }


/* ── Prevenir desbordamiento horizontal en móvil ─────────── */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
  }

  /* Filtros: scroll horizontal interno con padding lateral */
  .filters-section .container {
    padding-inline: 0;
  }

  .filters-top-row {
    padding-inline: clamp(1rem, 5vw, 1.25rem);
  }

  .date-filters {
    padding-inline: clamp(1rem, 5vw, 1.25rem);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }

  .filters-scroll {
    padding-inline: clamp(1rem, 5vw, 1.25rem);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }

  /* Float btn: sube para no tapar el contenido */
  .float-btn {
    bottom: 5rem;
    right: 1rem;
    padding: .6rem 1rem;
    font-size: .82rem;
    gap: .3rem;
  }

  /* Newsletter: espacio para que el float-btn no tape el botón */
  .newsletter-section {
    padding-bottom: 4.5rem;
  }
}