/* ===================================================================
   LEFKADA 2026 — stil „jurnal de vacanță ionian"
   Paletă: nisip cald + albastru Ionian profund + terracotta
   =================================================================== */

:root {
  --sand:        #f7f1e5;
  --sand-deep:   #efe6d3;
  --paper:       #fffdf8;
  --ink:         #12293b;
  --ink-soft:    #3d566b;
  --ink-faint:   #7d92a3;
  --ionian:      #0e5e8e;
  --ionian-soft: #d8e9f3;
  --terra:       #c4653f;
  --terra-soft:  #f6e3d9;
  --gold:        #d9a441;
  --line:        #e3d8c2;

  --c-beach:  #0e7fb8;
  --c-food:   #c4653f;
  --c-cafe:   #d9a441;
  --c-sunset: #e2543e;
  --c-boat:   #0f8f86;
  --c-hike:   #6d8f3d;
  --c-stay:   #12293b;
  --c-sight:  #7d5ba6;
  --c-travel: #8a93a0;

  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(18, 41, 59, .25);
  --tabbar-h: 64px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Karla", "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sand:        #101d29;
    --sand-deep:   #0b1621;
    --paper:       #16283a;
    --ink:         #eef3f2;
    --ink-soft:    #b9c9d4;
    --ink-faint:   #7c93a5;
    --ionian:      #5db4e4;
    --ionian-soft: #123952;
    --terra:       #e08a63;
    --terra-soft:  #3d2a20;
    --gold:        #e0b463;
    --line:        #24394c;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
    --c-beach:  #4aa8d8;
    --c-stay:   #9db8cc;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% -10%, #17547c 0%, transparent 55%),
    linear-gradient(165deg, #0c2233 0%, #0e3a58 58%, #0e5e8e 100%);
  color: #f4efe4;
  text-align: center;
  padding: clamp(2.2rem, 8vw, 4rem) 1.2rem clamp(2.6rem, 9vw, 4.4rem);
}
.hero-waves {
  position: absolute; inset: auto 0 -2px 0; height: 42px;
  background:
    radial-gradient(52px 24px at 25% 100%, var(--sand) 98%, transparent 100%),
    radial-gradient(52px 24px at 75% 100%, var(--sand) 98%, transparent 100%);
  background-size: 104px 42px;
  background-position: 0 100%, 52px 100%;
  background-repeat: repeat-x;
}
.hero-kicker {
  font-size: .8rem; letter-spacing: .35em; text-transform: uppercase;
  color: #a8cbe2; margin-bottom: .4rem;
  animation: rise .7s ease both;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 420;
  font-size: clamp(3rem, 14vw, 5.6rem);
  line-height: .95;
  letter-spacing: -.01em;
  animation: rise .7s .08s ease both;
}
.hero-year {
  display: block;
  font-style: italic;
  font-weight: 320;
  font-size: .42em;
  color: var(--gold);
  margin-top: .25em;
  letter-spacing: .28em;
}
.hero-dates {
  margin-top: .9rem;
  font-size: 1.02rem;
  letter-spacing: .18em;
  color: #cfe2ef;
  animation: rise .7s .16s ease both;
}
.hero-countdown {
  margin-top: .5rem;
  font-size: .85rem;
  color: #8fb6d0;
  font-style: italic;
  animation: rise .7s .24s ease both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ============ VEDERI ============ */
.view { display: none; }
.view.is-active { display: block; animation: fadein .35s ease both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ============ BANDA DE ZILE ============ */
.day-strip {
  display: flex;
  gap: .55rem;
  overflow-x: auto;
  padding: 1.1rem 1.2rem .9rem;
  scrollbar-width: none;
  position: sticky; top: 0; z-index: 500;
  background: linear-gradient(var(--sand) 82%, transparent);
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  border-radius: 14px;
  padding: .5rem .85rem .45rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform .15s ease, background .2s, border-color .2s;
  min-width: 62px;
}
.day-chip:active { transform: scale(.94); }
.day-chip .dow { display: block; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
.day-chip .num { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 480; line-height: 1.15; }
.day-chip.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--sand);
}
.day-chip.is-selected .dow { color: var(--gold); }
.day-chip.is-today { border-color: var(--terra); }
.day-chip.is-today .dow { color: var(--terra); }

/* ============ DETALIU ZI ============ */
.day-detail { padding: .4rem 1.2rem 2.5rem; max-width: 640px; margin: 0 auto; }
.day-heading {
  display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap;
  margin: .6rem 0 1.2rem;
}
.day-heading h2 {
  font-family: var(--font-display);
  font-weight: 460;
  font-size: clamp(1.5rem, 6vw, 2rem);
  letter-spacing: -.01em;
}
.day-heading .day-date {
  color: var(--terra);
  font-size: .85rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.today-badge {
  background: var(--terra); color: #fff;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .18rem .55rem; border-radius: 99px;
}
.home-chip {
  display: block;
  width: fit-content;
  margin-top: .5rem;
  font-size: .8rem; font-weight: 700;
  color: var(--ink-soft); text-decoration: none;
  border: 1.5px dashed var(--line);
  padding: .3rem .75rem; border-radius: 99px;
}
.home-chip:active { transform: scale(.97); }

/* cronologie */
.timeline { position: relative; padding-left: 1.65rem; }
.timeline::before {
  content: ""; position: absolute; left: .48rem; top: .6rem; bottom: .6rem;
  width: 2px;
  background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px);
}
.tl-item {
  position: relative;
  margin-bottom: .85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .85rem 1rem .8rem;
  box-shadow: var(--shadow);
}
.tl-item::before {
  content: "";
  position: absolute; left: -1.65rem; top: 1.05rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--dot, var(--ionian));
  outline: 3px solid var(--sand);
}
.tl-head { display: flex; align-items: baseline; gap: .6rem; }
.tl-time {
  font-family: var(--font-display);
  font-weight: 540; font-size: 1rem;
  color: var(--terra);
  min-width: 3.1rem;
  font-variant-numeric: tabular-nums;
}
.tl-time.tl-time-empty { color: var(--ink-faint); font-style: italic; font-weight: 320; font-size: .85rem; }
.tl-title { font-weight: 700; font-size: 1.02rem; flex: 1; }
.tl-ico { font-size: 1.05rem; }
.tl-notes { margin: .45rem 0 0 3.7rem; padding: 0; list-style: none; }
.tl-notes li {
  font-size: .86rem; color: var(--ink-soft);
  position: relative; padding-left: .95rem; margin-top: .15rem;
}
.tl-notes li::before { content: "◦"; position: absolute; left: 0; color: var(--terra); }
.tl-nav {
  margin: .5rem 0 0 3.7rem;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 700;
  color: var(--ionian); text-decoration: none;
  border: 1.5px solid var(--ionian-soft);
  background: var(--ionian-soft);
  padding: .28rem .7rem; border-radius: 99px;
}
.tl-nav:active { transform: scale(.96); }

/* ============ HARTA ============ */
.view-map { position: relative; }
.view-map .day-strip { position: static; background: none; padding: 1rem 1.2rem .6rem; }
#map {
  /* înălțimea reală se calculează în JS (sizeMap), ca să se adapteze la banda de zile */
  height: 60vh;
  min-height: 320px;
  z-index: 1;
}
.map-controls {
  padding: .8rem 1.2rem;
  display: flex; justify-content: center;
}
.map-filter {
  display: inline-flex; background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 99px;
  padding: .22rem; gap: .15rem;
  overflow-x: auto; max-width: 100%;
  scrollbar-width: none;
}
.map-filter::-webkit-scrollbar { display: none; }
.map-filter button {
  border: 0; background: transparent; color: var(--ink-soft);
  font-family: var(--font-body); font-weight: 700; font-size: .8rem;
  padding: .35rem .8rem; border-radius: 99px; cursor: pointer;
  white-space: nowrap;
}
.map-filter button.is-on { background: var(--ink); color: var(--sand); }
.map-legend {
  display: flex; flex-wrap: wrap; gap: .35rem .85rem;
  justify-content: center;
  padding: .6rem 1rem calc(.6rem + 4px);
  font-size: .72rem; color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: .32rem; }
.map-legend i {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; background: var(--lc);
}

/* pin-uri */
.pin {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--pc, var(--ionian));
  border: 2.5px solid #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
  display: grid; place-items: center;
}
.pin span { transform: rotate(45deg); font-size: .72rem; }
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  font-family: var(--font-body);
}
.leaflet-popup-content { margin: .8rem .95rem; }
.popup-name { font-weight: 800; font-size: .95rem; margin-bottom: .15rem; }
.popup-days { font-size: .78rem; color: #667; margin-bottom: .45rem; }
.popup-approx { font-size: .7rem; color: #a86; font-style: italic; margin-bottom: .3rem; }
.popup-nav {
  display: inline-block; font-size: .78rem; font-weight: 800;
  color: #0e5e8e; text-decoration: none;
}

/* ============ REZUMAT ============ */
.overview-list { padding: 1.3rem 1.2rem 2.5rem; max-width: 680px; margin: 0 auto; }
.ov-day {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: .9rem;
  padding: .8rem .35rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  border-radius: 10px;
  transition: background .15s;
}
.ov-day:active { background: var(--sand-deep); }
.ov-date {
  text-align: center;
  font-family: var(--font-display);
}
.ov-date .num { font-size: 1.6rem; font-weight: 480; line-height: 1.05; color: var(--terra); }
.ov-date .dow { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.ov-body h3 { font-size: 1rem; font-weight: 800; margin-bottom: .1rem; }
.ov-body p { font-size: .84rem; color: var(--ink-soft); }
.ov-day.is-today { background: var(--terra-soft); border-radius: 12px; border-bottom-color: transparent; }

/* ============ TAB BAR ============ */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 800;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .1rem; color: var(--ink-faint);
  font-family: var(--font-body);
}
.tab-ico { font-size: 1.25rem; filter: grayscale(1) opacity(.6); transition: filter .2s; }
.tab-label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tab.is-active { color: var(--terra); }
.tab.is-active .tab-ico { filter: none; }

/* desktop: mai aerisit */
@media (min-width: 760px) {
  .hero-title { font-size: 5.2rem; }
  .day-detail, .overview-list { padding-top: 1rem; }
  #map { height: calc(100dvh - var(--tabbar-h) - 130px); }
}
