/* =====================================================================
   CanaryForecast — liquid glass, mobile-first, fara framework.
   Reguli de performanta: backdrop-filter DOAR pe carduri mici (max ~5 in
   viewport), animatii DOAR pe transform/opacity, will-change o singura data.
   ===================================================================== */

:root {
  --sky-1: #7dd3fc;
  --sky-2: #38bdf8;
  --sky-3: #0ea5e9;
  --horizon: #fde68a;
  --accent: #f59e0b;
  --accent-2: #fb923c;
  --accent-deep: #d97706;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ocean: #0c4a6e;
  --water: #0369a1;
  --danger: #dc2626;
  --live: #16a34a;
  --glass-blur: 14px;
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,.72), rgba(255,255,255,.48));
  --glass-border: rgba(255,255,255,.55);
  --radius: 16px;
  --shadow-rest: 0 1px 2px rgba(12,74,110,.10), 0 8px 24px rgba(12,74,110,.12);
  --shadow-hover: 0 2px 4px rgba(12,74,110,.14), 0 16px 40px rgba(12,74,110,.20);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #bae6fd; /* fallback sub layerul .sky */
  line-height: 1.5;
}
html, body { max-width: 100%; overflow-x: clip; }
main { max-width: 760px; margin: 0 auto; padding: 0 1rem 2rem; }
a { color: var(--accent-deep); }
img { display: inline-block; vertical-align: middle; }
.wi { vertical-align: middle; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--water); outline-offset: 2px; border-radius: 4px; }

/* ---------- cerul Atlantic animat (compositor-only) ---------- */
.sky {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(130% 70% at 85% 108%, rgba(253,230,138,.65) 0%, rgba(253,230,138,0) 55%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 48%, var(--sky-3) 100%);
}
.sky::after {
  content: ""; position: absolute; left: 50%; top: -28vmax;
  width: 58vmax; height: 58vmax; border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255,241,178,.85), rgba(255,200,90,.28) 48%, transparent 72%);
  transform: translate3d(-70%, 0, 0);
  animation: sun-drift 70s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes sun-drift {
  to { transform: translate3d(-18%, 5vmax, 0) scale(1.12); }
}

/* ---------- reteta glass ---------- */
.island-card, .today-card, .promo-card, .no-data, .hero-card, .beach-row,
.fc-card, .company-card, .faq details, .search-box ul {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  backdrop-filter: blur(var(--glass-blur)) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-rest),
    inset 0 1px 0 rgba(255,255,255,.70),
    inset 0 -1px 0 rgba(12,74,110,.06);
}
/* sub-elementele din interiorul unui glass NU primesc blur (cost dublu) */
.today-card .metric, .today-card .sky-cell {
  background: rgba(255,255,255,.55);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
/* specular highlight static */
.island-card::before, .today-card::before, .promo-card::before, .hero-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 55% at 18% -8%, rgba(255,255,255,.55), transparent 55%);
}
/* sheen sweep pe hover (doar desktop) */
.island-card, .hero-card { overflow: hidden; }
.island-card::after, .hero-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.35) 50%, transparent 62%);
  transform: translateX(-130%);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .island-card, .hero-card, .beach-row, .promo-card {
    transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
  }
  .island-card:hover, .hero-card:hover, .beach-row:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover), inset 0 1px 0 rgba(255,255,255,.8);
  }
  .island-card:hover::after, .hero-card:hover::after {
    transform: translateX(130%); transition: transform .55s ease;
  }
}
.island-card:active, .hero-card:active, .beach-row:active, .promo-cta:active {
  transform: scale(.985); transition: transform .08s ease;
}

/* ---------- header sticky glass ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,255,255,.34));
  border-bottom: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 1px 0 rgba(12,74,110,.06), 0 8px 24px rgba(12,74,110,.08);
  padding-top: max(0px, env(safe-area-inset-top));
}
.site-header::before {
  content: ""; position: absolute; inset: 0 0 -100% 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-mask-image: linear-gradient(to bottom, black 0 50%, transparent 50% 100%);
  mask-image: linear-gradient(to bottom, black 0 50%, transparent 50% 100%);
}
.header-row {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  max-width: 760px; margin: 0 auto; padding: .55rem 1rem .35rem;
}
.brand {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 800; font-size: 1.05rem; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.brand-sun { color: var(--accent); flex: none; }
.header-tools { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.lang-switch { display: flex; gap: .15rem; }
.lang-switch a {
  text-decoration: none; padding: .35rem .55rem; border-radius: 999px;
  color: var(--ink-soft); font-size: .85rem; font-weight: 600; line-height: 1;
}
.lang-switch a.active { background: var(--accent); color: #fff; }

/* island pills — navigare globala, scroll orizontal nativ */
.island-nav {
  display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  max-width: 760px; margin: 0 auto; padding: .25rem 1rem .6rem;
}
.island-nav::-webkit-scrollbar { display: none; }
.island-nav a {
  flex: none; scroll-snap-align: start;
  background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px; padding: .35rem .8rem;
  font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.island-nav a[aria-current="page"] { background: var(--accent); border-color: var(--accent-deep); color: #fff; }

/* search — flexibil, nu latime fixa (altfel pill-urile de limba se suprapun) */
.search-box { position: relative; flex: 1 1 90px; min-width: 0; max-width: 220px; }
.lang-switch { flex: none; }
.js-only { display: none; }
.search-box input {
  width: 100%; min-width: 0;
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
  background: rgba(255,255,255,.55); color: var(--ink);
  padding: .4rem .8rem; font-size: .9rem; font-family: inherit;
}
.search-box input::placeholder { color: var(--ink-soft); }
.search-box ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  width: min(86vw, 320px); max-height: 320px; overflow-y: auto;
  margin: 0; padding: .3rem; list-style: none;
}
.search-box li a, .search-box li.sr-empty {
  display: block; padding: .5rem .65rem; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-size: .92rem;
}
.search-box li a small { color: var(--ink-soft); }
.search-box li a:hover, .search-box li a.sr-active { background: rgba(245,158,11,.18); }

/* ---------- titluri & text ---------- */
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin: 1rem 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin-top: 1.6rem; }
/* text direct pe cer: ocean inchis, nu gri (contrastul cade pe gradient) */
.date-line { color: #1e3a5f; margin: 0 0 .75rem; font-size: .95rem; }
.intro { font-size: .92rem; color: var(--ocean); margin-top: 1.5rem; }
.breadcrumb { font-size: .85rem; color: #1e3a5f; margin-top: .75rem; }
.breadcrumb a { color: inherit; }

.badge-live {
  display: inline-flex; align-items: center; gap: .3rem; vertical-align: middle;
  background: rgba(22,163,74,.14); color: #166534;
  font-size: .65rem; font-weight: 800; letter-spacing: .04em;
  padding: .2rem .5rem; border-radius: 999px; border: 1px solid rgba(22,163,74,.3);
}
.badge-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live);
  animation: live-pulse 2.5s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: .35; } }
.badge-stale { background: rgba(71,85,105,.12); color: var(--ink-soft); border-color: rgba(71,85,105,.3); }
.badge-stale::before { background: var(--ink-soft); animation: none; }
.stale-notice { font-size: .85rem; color: var(--ink-soft); background: rgba(255,255,255,.5); border-radius: 10px; padding: .45rem .7rem; }

/* ---------- homepage: hero + ranking ---------- */
.hero-card {
  display: block; text-decoration: none; color: var(--ink);
  padding: 1rem 1.1rem 1.1rem; margin: .75rem 0 .9rem;
  background: linear-gradient(150deg, rgba(254,243,199,.85), rgba(251,191,36,.55) 60%, rgba(245,158,11,.45)),
              var(--glass-bg);
}
.hero-label {
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #92400e;
}
.hero-row { display: flex; align-items: center; gap: .5rem; margin: .35rem 0 .1rem; }
.hero-icon { flex: none; }
.hero-name {
  font-size: clamp(1.05rem, 5vw, 1.9rem); font-weight: 800; letter-spacing: -.02em;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-pct { margin-left: auto; flex: none; font-size: clamp(1.4rem, 7vw, 2.6rem); font-weight: 800; color: #92400e; }
.hero-pct i { font-style: normal; font-size: 1.3rem; }
.hero-stats { display: block; font-size: .92rem; color: #78350f; margin-bottom: .5rem; }
.hero-cta {
  display: inline-block; margin-top: .6rem; font-size: .85rem; font-weight: 700;
  color: #92400e; background: rgba(255,255,255,.45);
  border: 1px solid rgba(146,64,14,.3); border-radius: 999px; padding: .3rem .8rem;
}

.island-ranking { list-style: none; padding: 0; margin: 0; counter-reset: rank 1; }
.island-card { margin-bottom: .6rem; counter-increment: rank; }
.island-card a {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .1rem .75rem;
  padding: .7rem 1rem .7rem 2.4rem; text-decoration: none; color: var(--ink);
  position: relative;
}
.island-card a::before {
  content: counter(rank); position: absolute; left: .85rem; top: 50%;
  transform: translateY(-50%); font-weight: 800; color: var(--accent-deep);
}
.island-name { font-weight: 700; }
.island-stats { font-size: .85rem; color: var(--ink-soft); grid-row: 2; grid-column: 1; }
.pct-label { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 800; color: var(--accent-deep); }
.pct-bar {
  grid-column: 1 / -1; grid-row: 3; height: 8px;
  background: rgba(255,255,255,.55); border-radius: 4px; overflow: hidden; margin-top: .35rem;
}
.pct-fill {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #fbbf24, var(--accent));
  transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
  .pct-fill { animation: fill-in .6s cubic-bezier(.2,.8,.2,1) backwards; }
}
@keyframes fill-in { from { transform: scaleX(0); } }

/* ---------- island page: summary + beach rows ---------- */
.summary-chip {
  display: inline-block; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px; padding: .4rem .9rem; font-size: .9rem; font-weight: 600;
}
.beach-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.beach-list li { margin-bottom: .5rem; }
.beach-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .6rem;
  min-height: 56px; padding: .55rem .9rem;
  text-decoration: none; color: var(--ink);
}
.beach-row.is-sunny { border-left: 3px solid var(--accent); }
.b-main { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.b-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-sky { display: inline-flex; align-items: center; gap: .1rem; flex: none; }
.b-sky-arrow { color: var(--ink-soft); font-size: .75rem; }
.b-temps { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; flex: none; }
.b-temps b { font-size: 1.05rem; }
.b-temps i { font-style: normal; font-size: .78rem; color: var(--water); font-weight: 600; }
.b-temps em { font-style: normal; font-size: .72rem; color: var(--ink-soft); }

/* ---------- beach page ---------- */
.today-card { padding: 1rem; margin-top: .5rem; }
.sky-row { display: flex; gap: .75rem; margin-bottom: .75rem; }
.sky-cell {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .6rem; text-align: center; font-weight: 600; font-size: .9rem;
}
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 560px) { .metrics { grid-template-columns: repeat(3, 1fr); } }
.metric { padding: .55rem .7rem; }
.metric .label, .sky-cell .label {
  display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-soft); font-weight: 700;
}
.metric .value { font-size: 1.4rem; font-weight: 800; }
.metric .value-big { color: var(--water); }
.metric .value-sm { font-size: .95rem; font-weight: 600; }
.uv-extreme { color: var(--danger); }
.uv-high { color: var(--accent-deep); }
.uv-warning {
  display: flex; align-items: center; gap: .5rem;
  margin: .75rem 0 0; padding: .5rem .75rem; border-radius: 10px; font-size: .9rem;
  background: rgba(254,242,242,.92); border: 1px solid rgba(220,38,38,.25);
}

.forecast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.fc-card {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .7rem .4rem; text-align: center;
}
.fc-today { border-color: rgba(245,158,11,.6); }
.fc-day { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.fc-tmax { font-size: 1.25rem; font-weight: 800; }
.fc-sea { font-size: .8rem; color: var(--water); font-weight: 600; }
.fc-uv { font-size: .72rem; color: var(--ink-soft); }

.nearby-chips {
  display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 0 .5rem; margin: .5rem 0 0;
  list-style: none; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nearby-chips::-webkit-scrollbar { display: none; }
.nearby-chips li { flex: none; }
.nearby-chips a {
  display: flex; flex-direction: column; gap: .1rem;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7);
  border-radius: 12px; padding: .5rem .75rem;
  text-decoration: none; color: var(--ink); font-size: .85rem;
}
.nc-name { font-weight: 700; white-space: nowrap; }
.nc-meta { color: var(--ink-soft); font-size: .78rem; white-space: nowrap; }

/* ---------- promo (afiliere) ---------- */
.promo-card { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; margin: 1.25rem 0; }
.promo-card > div { min-width: 0; }
.promo-icon { flex: none; }
.promo-card p { margin: .25rem 0 .55rem; font-size: .88rem; color: var(--ink-soft); }
.promo-cta {
  display: inline-block; color: #fff !important; text-decoration: none;
  font-weight: 700; font-size: .92rem; padding: .55rem 1.1rem; border-radius: 12px;
  background: linear-gradient(180deg, #fbbf24, var(--accent) 55%, var(--accent-deep));
  border: 1px solid rgba(217,119,6,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px rgba(245,158,11,.35);
  text-shadow: 0 1px 1px rgba(120,53,15,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
@media (hover: hover) {
  .promo-cta:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 10px 22px rgba(245,158,11,.45);
  }
}

/* ---------- car hire ---------- */
.pickup-list { list-style: none; padding: 0; }
.pickup-item { background: rgba(255,255,255,.55); border-radius: 10px; padding: .5rem .8rem; margin-bottom: .4rem; }
.company-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (max-width: 480px) { .company-grid { grid-template-columns: 1fr; } }
.company-card { padding: .7rem .9rem; }
.company-card p { margin: .25rem 0 0; font-size: .85rem; color: var(--ink-soft); }
.tips-list { padding-left: 1.2rem; }
.tips-list li { margin-bottom: .35rem; font-size: .92rem; }
.faq details { margin-bottom: .5rem; padding: 0; overflow: hidden; }
.faq summary {
  cursor: pointer; font-weight: 700; padding: .7rem .9rem; font-size: .95rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 800; color: var(--accent-deep); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 .9rem .8rem; font-size: .9rem; color: var(--ink-soft); }
.back-link { margin-top: 1.5rem; font-weight: 600; }
.cta-repeat { margin-top: 1.25rem; }
.aff-note { font-size: .75rem; color: var(--ink-soft); margin: .4rem 0 0; }
.attribution-page, .attribution { overflow-wrap: anywhere; }

/* respiratie pe desktop */
@media (min-width: 760px) {
  .hero-card { padding: 1.5rem 1.75rem; }
  .island-card a { padding: .85rem 1.25rem .85rem 2.6rem; }
}

/* ---------- stari & misc ---------- */
.no-data { padding: 1.5rem 1rem; text-align: center; }
.nf-404 h1 { margin: .25rem 0; }
.nf-islands { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.nf-islands a {
  display: inline-block; background: rgba(255,255,255,.6); border-radius: 999px;
  padding: .3rem .75rem; text-decoration: none; color: var(--ink); font-size: .85rem; font-weight: 600;
}
.updated, .attribution-page { font-size: .8rem; color: var(--ink-soft); margin-top: 1.5rem; }
.page-body p { max-width: 65ch; }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 2.5rem;
  background: rgba(255,255,255,.45);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  backdrop-filter: blur(10px) saturate(150%);
  border-top: 1px solid rgba(255,255,255,.6);
  font-size: .85rem; color: var(--ink-soft);
}
.footer-grid {
  max-width: 760px; margin: 0 auto; padding: 1.25rem 1rem 2rem;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { font-weight: 800; color: var(--ink); }
.footer-h { font-weight: 800; color: var(--ink); margin-bottom: .25rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .2rem; }
.site-footer a { color: var(--ink-soft); }
.footer-langs a { margin-right: .45rem; font-weight: 600; }
.footer-langs a[aria-current="page"] { color: var(--accent-deep); }
.attribution { font-size: .78rem; }

/* ---------- entrance animations ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: no-preference) {
  .hero-card { animation: rise .5s cubic-bezier(.2,.8,.2,1) backwards; }
  .island-card { animation: rise .5s cubic-bezier(.2,.8,.2,1) backwards; }
  .island-card:nth-child(1) { animation-delay: .05s; }
  .island-card:nth-child(2) { animation-delay: .10s; }
  .island-card:nth-child(3) { animation-delay: .15s; }
  .island-card:nth-child(n+4) { animation-delay: .2s; }
  .today-card { animation: rise .45s cubic-bezier(.2,.8,.2,1) backwards; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .promo-card, .fc-card, .company-card {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
      animation-delay: 0s;
    }
  }
}

/* ---------- fallbacks obligatorii ---------- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .island-card, .today-card, .promo-card, .no-data, .hero-card, .beach-row,
  .fc-card, .company-card, .faq details, .search-box ul, .site-header, .site-footer {
    background: rgba(255,255,255,.93);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .island-card, .today-card, .promo-card, .no-data, .hero-card, .beach-row,
  .fc-card, .company-card, .faq details, .search-box ul, .site-header, .site-footer {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: rgba(255,255,255,.95);
  }
  .site-header::before { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sky::after { animation: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
