/*
 * diaspora.ro — homepage.css v6
 * Redesign Desktop: editorial curat, fond alb, fără elemente copilărești.
 * Mobile & tablet: neatins.
 */

/* ═══════════════════════════════════════════════════════
   1. CLOCKBAR
   ═══════════════════════════════════════════════════════ */
.clockbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 20px;
  background: #ffffff;
  border-bottom: 1px solid #f0f2f5;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: .05em;
  position: relative;
  overflow: hidden;
  z-index: 98;
}
.clockbar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #1877F2 0%, #6366F1 35%, #EC4899 65%, #1877F2 100%);
  background-size: 200% 100%;
  animation: clockbarShimmer 6s linear infinite;
}
@keyframes clockbarShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
#hud-clock { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .clockbar { display: none; } }


/* ═══════════════════════════════════════════════════════
   2. MOBILE + TABLET — neatins (max-width: 1000px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1000px) {
  .hero.hero-compact {
    padding: 16px 0 8px;
    gap: 12px;
    margin-bottom: 16px;
  }
  .hero.hero-compact .hero-compact-bar {
    padding: 20px 18px;
    border-radius: 18px;
    gap: 14px;
  }
  .hero.hero-compact .hero-compact-h1 {
    font-size: clamp(22px, 6vw, 34px);
  }
  .hero.hero-compact .hero-compact-sub {
    font-size: 14px;
  }
}


/* ═══════════════════════════════════════════════════════
   3. DESKTOP — layout corect (min-width: 1001px)
   ═══════════════════════════════════════════════════════ */
@media (min-width: 1001px) {

  body { background: #FFFFFF; }
  body::before { display: none; }

  .main {
    max-width: 1280px;
    padding: 0 52px 80px;
  }

  /* ───────────────────────────────────────────────────────
     HERO: hero-compact-bar devine grid 2 coloane
     Col 1 (stânga): geo badge + titlu + CTA
     Col 2 (dreapta): search + quick tags
     Stats: rând separat dedesubt (rămâne cum e)
  ─────────────────────────────────────────────────────── */
  .hero.hero-compact {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 32px 0 0;
    margin-bottom: 24px;
  }
  .hero.hero-compact::before { display: none; }
  .hero.hero-compact::after  { display: none; }

  /* hero-compact-bar — grid 2 col */
  .hero.hero-compact .hero-compact-bar {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: auto auto;
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
    transform: none;
    transition: none;
  }
  .hero.hero-compact .hero-compact-bar:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    border-color: transparent;
  }

  /* Geo badge — col 1, rând 1 */
  .hero.hero-compact .hero-geo {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 12px;
  }

  /* Text wrap (h1 + sub + CTA) — col 1, rând 2 */
  .hero.hero-compact .hero-compact-txt-wrap {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
  }

  /* H1 */
  .hero.hero-compact .hero-compact-h1 {
    font-size: clamp(34px, 3.5vw, 50px);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -.03em;
    margin: 0;
    color: var(--text);
  }

  /* Subtitlu */
  .hero.hero-compact .hero-compact-sub {
    font-size: 16px;
    color: var(--text2);
    line-height: 1.6;
    margin: 0;
    max-width: 500px;
  }

  /* CTA */
  .hero.hero-compact .hero-cta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .hero.hero-compact .hero-cta-btn {
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
  }
  .hero.hero-compact .hero-trust {
    font-size: 13px;
    color: var(--text3);
  }

  /* Search wrap — col 2, ambele rânduri */
  .hero.hero-compact .hero-compact-search-wrap {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
  }

  /* Search input */
  .hero.hero-compact .hero-search {
    border-radius: 10px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    display: flex;
  }
  .hero.hero-compact .hero-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(24,119,242,.15);
  }
  .hero.hero-compact .hero-search input {
    font-size: 14px;
    padding: 11px 14px;
  }
  .hero.hero-compact .hero-search button {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
  }

  /* Quick tags */
  .hero.hero-compact .hero-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
  .hero.hero-compact .hqt {
    padding: 6px 13px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    background: var(--bg2);
    color: var(--text2);
    border: 1px solid var(--border);
    transition: all .12s;
  }
  .hero.hero-compact .hqt:hover {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
  }


}
/* ═══════════════════════════════════════════════════════
   END desktop
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   HERO STAT CARDS — single source of truth
   This is the only stylesheet definition for the four first-hero cards.
   The desktop values remain the existing desktop design; mobile has equal tracks.
   ═══════════════════════════════════════════════════════════════════ */

.stats-live {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 1;
  align-items: stretch;
}

.stat-live {
  align-self: stretch;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff;
  border: 2px solid rgba(0,0,0,.10);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s, border-color .28s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.stat-live::after { display: none; }
.stat-live:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.10);
}

.stat-live.cp { border-color: rgba(24,119,242,.30); background: linear-gradient(155deg,#fff 0%,#EFF6FF 100%); }
.stat-live.cb { border-color: rgba(22,163,74,.30); background: linear-gradient(155deg,#fff 0%,#F0FDF4 100%); }
.stat-live.cg { border-color: rgba(217,119,6,.30); background: linear-gradient(155deg,#fff 0%,#FFFBEB 100%); }
.stat-live.cn { border-color: rgba(99,102,241,.30); background: linear-gradient(155deg,#fff 0%,#F5F3FF 100%); }
.stat-stiaiCA { display: flex; flex-direction: column; }

.stat-live.cp:hover { border-color: rgba(24,119,242,.55); box-shadow: 0 10px 28px rgba(24,119,242,.14); }
.stat-live.cb:hover { border-color: rgba(22,163,74,.55); box-shadow: 0 10px 28px rgba(22,163,74,.14); }
.stat-live.cg:hover { border-color: rgba(217,119,6,.55); box-shadow: 0 10px 28px rgba(217,119,6,.14); }
.stat-live.cn:hover { border-color: rgba(99,102,241,.55); box-shadow: 0 10px 28px rgba(99,102,241,.14); }

.stat-v { font-size: 24px; font-weight: 900; letter-spacing: -.04em; line-height: 1; margin-bottom: 3px; }
.stat-l { font-size: 11px; font-weight: 700; color: #374151; letter-spacing: .05em; text-transform: uppercase; }
.stat-t { font-size: 11px; margin-top: 3px; font-weight: 600; }
.stat-sub { font-size: 12px; color: #4B5563; font-weight: 500; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(0,0,0,.07); line-height: 1.55; }
.stat-valuta .stat-v { font-size: 18px; letter-spacing: -.02em; }
#val-extra { white-space: normal; line-height: 1.9; font-size: 12px; font-weight: 600; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Plus Jakarta Sans",sans-serif; }
.stat-v-purple { background: linear-gradient(135deg,#6366F1,#818CF8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.cp .stat-v { color: #1877F2; }
.cp .stat-t { color: #1877F2; }
.cb .stat-v { color: #16A34A; }
.cb .stat-t { color: #16A34A; }
.cg .stat-v { color: #D97706; }
.cg .stat-t { color: #D97706; }
.cn .stat-v { color: #6366F1; }
.cn .stat-t { color: #6366F1; }

/* Country flags and text rows — unchanged visual treatment, one definition. */
.stats-live .hero-country-flag {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  flex: 0 0 32px;
  display: block;
  object-fit: contain;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(15,23,42,.18);
}
.stats-live > .stat.cp .stat-sub,
.stats-live > .stat.cb .stat-sub {
  align-items: center;
  text-align: center;
}
.stats-live > .stat.cp .stat-sub > div,
.stats-live > .stat.cb .stat-sub > div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  column-gap: 7px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.stats-live > .stat.cp .stat-sub > div > .hero-country-flag,
.stats-live > .stat.cb .stat-sub > div > .hero-country-flag {
  justify-self: start;
}
.stats-live > .stat.cp .stat-sub > div > span,
.stats-live > .stat.cb .stat-sub > div > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: left;
  line-height: 1.25;
}

/* Currency card internals. */
.stat-valuta #val-extra {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  line-height: 1.15;
}
.stat-valuta .hero-currency-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 78px;
  padding: 6px 3px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(217,119,6,.14);
  border-radius: 8px;
}
.stat-valuta .hero-currency-row .hero-country-flag {
  margin: 0;
}
.stat-valuta .hero-currency-row strong,
.stat-valuta .hero-currency-row .hero-currency-value {
  display: block;
  width: 100%;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  line-height: 1.15;
}
.stat-valuta .hero-currency-row strong { font-size: 10px; color: #92400E; }
.stat-valuta .hero-currency-value { font-size: 10px; font-weight: 700; color: #78350F; }

/* Tablet. */
@media (min-width: 600px) and (max-width: 1000px) {
  .stats-live { gap: 10px; }
  .stat-live { padding: 14px 16px; }
  .stat-v { font-size: 26px; }
  .stat-valuta .stat-v { font-size: 20px; }
  .stat-sub { font-size: 12.5px; }
}

/* Desktop — the existing desktop composition, isolated from mobile. */
@media (min-width: 1001px) {
  .stats-live {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 4px;
    background: none;
    border: none;
    border-radius: 0;
  }
  .stat-live {
    padding: 20px;
    border-radius: 14px;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
  }
  .stat-live:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(0,0,0,.10); }
  .stat-v { font-size: 28px; font-weight: 900; line-height: 1.1; letter-spacing: -.06em; margin-bottom: 5px; }
  .stat-l { font-size: 11px; }
  .stat-t { font-size: 11px; margin-top: 4px; }
  .stat-sub { font-size: 13.5px; margin-top: 10px; padding-top: 8px; line-height: 1.65; width: 100%; font-family: "Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Plus Jakarta Sans",system-ui,sans-serif; }
  .stat-valuta .stat-v { font-size: 22px; }
}

/* Mobile — equal two-row tracks. This is the only mobile card sizing rule. */
@media (max-width: 599px) {
  .stats-live { grid-template-rows: repeat(2, 280px); }
  .stats-live > .stat-live { align-self: stretch; height: 100%; }
  .stats-live > .stat.cp .stat-sub > div,
  .stats-live > .stat.cb .stat-sub > div {
    grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 6px;
  }
  .stats-live > .stat.cp .stat-sub > div > .hero-country-flag,
  .stats-live > .stat.cb .stat-sub > div > .hero-country-flag {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }
  .stats-live > .stat.cp .stat-sub > div > span,
  .stats-live > .stat.cb .stat-sub > div > span {
    font-size: 11px;
    line-height: 1.2;
  }
  .stat-valuta #val-extra { gap: 5px; }
  .stat-valuta .hero-currency-row { min-height: 72px; padding: 4px 1px; }
  .stat-valuta .hero-currency-row .hero-country-flag {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    flex-basis: 28px;
  }
  .stat-valuta .hero-currency-row strong,
  .stat-valuta .hero-currency-value { font-size: 9px; }
}

/* Dark mode. */
html[data-theme=dark] .stat-live { background: #242526; border-color: #3A3B3C; }
html[data-theme=dark] .stat-live.cp { background: linear-gradient(155deg,#1a1a2e 0%,#16213e 100%); }
html[data-theme=dark] .stat-live.cb { background: linear-gradient(155deg,#1a1a2e 0%,#0a2818 100%); }
html[data-theme=dark] .stat-live.cg { background: linear-gradient(155deg,#1a1a2e 0%,#2a1a00 100%); }
html[data-theme=dark] .stat-live.cn { background: linear-gradient(155deg,#1a1a2e 0%,#1a0a2e 100%); }
html[data-theme=dark] .stat-l { color: #B0B3B8; }
html[data-theme=dark] .stat-sub { color: #9CA3AF; border-top-color: rgba(255,255,255,.08); }
