@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700&family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────────
   ORAN DOLAR — Premium minimal: editorial type + carbón grafito
   ───────────────────────────────────────────────────────────── */
:root {
  --bg-base:        #ffffff;
  --bg-surface:     #f9f9fb;
  --bg-surface-2:   #f1f2f5;
  --bg-surface-3:   #e7e9ed;

  --accent:         #111827;
  --accent-soft:    #374151;
  --accent-glow:    rgba(17,24,39,0.08);

  /* Alias retro-compatibles */
  --gold:           #111827;
  --gold-lt:        #374151;
  --gold-glow:      rgba(17,24,39,0.08);

  --text:           #111827;
  --text-muted:     #4b5563;
  --text-dim:       #9ca3af;

  --border:         #e5e7eb;
  --border-soft:    #eceef1;
  --border-bright:  #111827;

  --green:          #15803d;
  --green-dk:       #dcfce7;
  --green-soft:     rgba(34,197,94,0.55);
  --red:            #b91c1c;
  --red-dk:         #fee2e2;
  --blue:           #1d4ed8;

  --shadow:         0 1px 2px rgba(17,24,39,0.04), 0 8px 24px -12px rgba(17,24,39,0.08);
  --shadow-soft:    0 1px 2px rgba(17,24,39,0.04), 0 12px 32px -16px rgba(17,24,39,0.08);
  --shadow-hover:   0 4px 8px rgba(17,24,39,0.04), 0 24px 56px -20px rgba(17,24,39,0.14);
  --shadow-lg:      0 4px 12px rgba(17,24,39,0.06), 0 24px 48px -16px rgba(17,24,39,0.12);

  --radius:         14px;
  --radius-sm:      6px;
  --radius-pill:    999px;

  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
  --font-title:     'Outfit', 'Inter', sans-serif;
  --font-display:   'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-number:    'Inter', system-ui, sans-serif;

  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:    cubic-bezier(0.22, 1, 0.36, 1);

  --dot-color:      #111827;
  --mesh-1:         rgba(99,102,241,0.06);
  --mesh-2:         rgba(244,114,182,0.05);
}

/* ── Dark mode (Apple/Vercel: negros orgánicos) ── */
[data-theme="dark"] {
  --bg-base:        #0a0a0b;
  --bg-surface:     #131316;
  --bg-surface-2:   #1c1c20;
  --bg-surface-3:   #24242a;

  --accent:         #f5f5f7;
  --accent-soft:    #d4d4d8;
  --accent-glow:    rgba(245,245,247,0.08);

  --gold:           #f5f5f7;
  --gold-lt:        #d4d4d8;
  --gold-glow:      rgba(245,245,247,0.08);

  --text:           #f5f5f7;
  --text-muted:     #a1a1a6;
  --text-dim:       #6e6e73;

  --border:         #2a2a2e;
  --border-soft:    #2a2a2e;
  --border-bright:  #f5f5f7;

  --green:          #34d399;
  --green-dk:       rgba(52,211,153,0.15);
  --green-soft:     rgba(52,211,153,0.55);
  --red:            #f87171;
  --red-dk:         rgba(248,113,113,0.15);
  --blue:           #60a5fa;

  --shadow:         0 1px 2px rgba(0,0,0,0.5), 0 8px 24px -12px rgba(0,0,0,0.6);
  --shadow-soft:    0 1px 2px rgba(0,0,0,0.4), 0 12px 32px -16px rgba(0,0,0,0.5);
  --shadow-hover:   0 4px 8px rgba(0,0,0,0.4), 0 24px 56px -20px rgba(0,0,0,0.7);
  --shadow-lg:      0 4px 12px rgba(0,0,0,0.5), 0 24px 48px -16px rgba(0,0,0,0.7);

  --dot-color:      #f5f5f7;
  --mesh-1:         rgba(99,102,241,0.10);
  --mesh-2:         rgba(168,85,247,0.08);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.price-value, .rate-value, .weather-temp, .converter-result,
.casa-rate-value, .forecast-max, .forecast-min {
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.18s ease; }
a:hover { opacity: 0.7; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

img { max-width: 100%; height: auto; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: #cfcfcd; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a6; }

/* ── Animaciones ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes slideIn {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.animate-in { animation: fadeInUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── Alert Banner ── */
#alert-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--red-dk);
  border-bottom: 1px solid var(--red);
  padding: 10px 20px;
  align-items: center;
  gap: 12px;
}
#alert-banner.visible { display: flex; }
#alert-banner .alert-icon { font-size: 18px; flex-shrink: 0; }
#alert-banner .alert-text { flex: 1; font-size: 13px; line-height: 1.4; color: var(--red); }
#alert-banner .alert-text strong { display: block; font-size: 14px; }
#alert-dismiss {
  background: var(--red);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
#alert-dismiss:hover { background: #991b1b; }

/* ── Navbar ── */
#navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-logo {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--text-muted); font-weight: 400; }
.nav-badge {
  background: var(--green-dk);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--accent); background: var(--bg-surface-2); opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.update-badge {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
}
.update-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
#refresh-btn {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  display: flex; align-items: center;
}
#refresh-btn:hover { color: var(--accent); background: var(--bg-surface-2); }
#refresh-btn.spinning svg { animation: spin .8s linear infinite; }
.hamburger { display: none; color: var(--text-muted); padding: 6px; border-radius: var(--radius-sm); }
.hamburger:hover { color: var(--accent); background: var(--bg-surface-2); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--border); }

/* ── Section Header ── */
.section-header { margin-bottom: 36px; }
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 0 8px 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  line-height: 1.15;
}
.section-header p {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 12px;
  background: transparent;
  padding: 0;
  max-width: 560px;
}

/* ── Rate Cards ── */
.rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.rate-info { display: flex; flex-direction: column; gap: 6px; }
.rate-info > span:first-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: transparent;
  padding: 0;
}
.rate-info > .rate-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  padding: 0;
}

.rate-card {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 280ms var(--ease-spring),
              box-shadow 280ms var(--ease-spring),
              border-color 200ms ease;
  position: relative;
  overflow: hidden;
}
.rate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}
.rate-card.highlight { border-color: var(--accent); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.card-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-flag svg { display: block; }

.card-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.price-block { display: flex; flex-direction: column; gap: 2px; }
.price-value {
  font-family: var(--font-number);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  white-space: nowrap;
  color: var(--text);
  letter-spacing: -0.02em;
  order: 1;
}
.price-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 0;
  order: 2;
  margin-top: 4px;
}
.price-value.buy  { color: var(--green); }
.price-value.sell { color: var(--red); }
.price-value.single { color: var(--blue); font-size: 32px; }

.card-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-time { font-size: 10px; color: var(--text-dim); }
.card-change {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}
.card-change.up      { background: var(--red-dk); color: var(--red); }
.card-change.down    { background: var(--green-dk); color: var(--green); }
.card-change.neutral { background: var(--bg-surface-2); color: var(--text-dim); }

/* Cambio rate-change global ya usado en index */
.rate-change {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

/* ── Shimmer (loading) ── */
.shimmer {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-2) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Ad Slots ── */
.ad-slot {
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: 0.5px;
  min-height: 90px;
  overflow: hidden;
}
.ad-slot ins.adsbygoogle { display: block; width: 100%; }
.ad-slot-banner { min-height: 90px; margin: 24px 0; }
.ad-slot-rect   { min-height: 250px; }

/* ── Converter ── */
.converter-widget {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.converter-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.converter-input-group, .converter-result-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}
.converter-input-group label, .converter-result-group label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.converter-input-group input,
.converter-input-group select {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.converter-input-group input:focus,
.converter-input-group select:focus { border-color: var(--accent); }
.converter-input-group select { appearance: none; cursor: pointer; }
.converter-arrow { color: var(--text-dim); font-size: 18px; padding-bottom: 10px; flex-shrink: 0; }
.converter-result {
  font-family: var(--font-number);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.converter-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; }

/* ── Weather Cards ── */
.weather-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.weather-card {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 280ms var(--ease-spring),
              box-shadow 280ms var(--ease-spring),
              border-color 200ms ease;
}
.weather-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}
.weather-city {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.weather-main { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.weather-icon { font-size: 44px; line-height: 1; }
.weather-temp { font-family: var(--font-number); font-size: 44px; font-weight: 700; color: var(--text); line-height: 1; }
.weather-temp span { font-size: 20px; color: var(--text-muted); }
.weather-desc { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.weather-details { display: flex; gap: 14px; flex-wrap: wrap; }
.weather-detail { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.weather-detail strong { color: var(--text); }

/* ── Accordion ── */
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion-item {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  text-align: left;
  background: transparent;
}
.accordion-header:hover { background: var(--bg-surface); }
.accordion-title { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 10px; }
.accordion-icon { font-size: 18px; }
.accordion-chevron { color: var(--text-dim); transition: transform 0.25s; flex-shrink: 0; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 20px 20px; border-top: 1px solid var(--border); }
.accordion-item.open .accordion-body { display: block; }

.info-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.info-table th, .info-table td {
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.info-table th { color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.info-table td { color: var(--text); }
.info-table tr:last-child td { border-bottom: none; }

.info-list { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.info-list li {
  font-size: 14px;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.6;
}
.info-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.info-disclaimer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
}

/* ── Casas de Cambio ── */
.casas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.casa-card {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform 280ms var(--ease-spring),
              box-shadow 280ms var(--ease-spring),
              border-color 200ms ease;
}
.casa-card.verified { border-color: var(--accent); }
.casa-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}
.casa-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.casa-name { font-size: 15px; font-weight: 700; color: var(--text); }
.casa-verified {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.casa-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.casa-rate-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.casa-rate-value { font-family: var(--font-number); font-size: 22px; font-weight: 700; color: var(--text); }
.casa-rate-value.buy  { color: var(--green); }
.casa-rate-value.sell { color: var(--red); }
.casa-rate-value.unknown { color: var(--text-dim); font-size: 14px; }
.casa-info { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.casa-info span { display: flex; align-items: center; gap: 5px; }

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  transition: background 0.15s;
}
.btn-whatsapp:hover { background: #1ea951; color: #fff; opacity: 1; }

.casas-cta {
  margin-top: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.casas-cta p { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.btn-contact:hover { background: var(--accent-soft); color: #fff; opacity: 1; }

/* ── Footer ── */
#footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-brand .nav-logo { font-size: 18px; }
.footer-brand p { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.footer-links a:hover { color: var(--accent); opacity: 1; }
.footer-copy { font-size: 11px; color: var(--text-dim); }

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
  max-width: 320px;
}
.toast.error   { border-color: var(--red);   background: var(--red-dk);   color: var(--red); }
.toast.success { border-color: var(--green); background: var(--green-dk); color: var(--green); }

/* ── Hero Layout ── */
.section-hero { padding: 24px 0 32px; }
.hero-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-rows: auto auto;
  grid-template-areas:
    "rates  right"
    "conv   right";
  gap: 20px;
  align-items: start;
}
.hero-rates    { grid-area: rates; }
.hero-right    { grid-area: right; display: flex; flex-direction: column; }
.hero-conversor { grid-area: conv; }

.section-header-sm { margin-bottom: 14px; }
.section-header-sm h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.rates-grid-compact { grid-template-columns: repeat(2, 1fr); }
.rates-grid-compact .rate-card { padding: 18px 18px; }
.rates-grid-compact .price-value { font-size: 24px; }
.rates-grid-compact .price-value.single { font-size: 26px; }

.weather-grid-stacked { grid-template-columns: 1fr; gap: 10px; }
.weather-grid-stacked .weather-card { padding: 18px; }
.weather-grid-stacked .weather-icon { font-size: 34px; }
.weather-grid-stacked .weather-temp { font-size: 34px; }
.weather-grid-stacked .weather-temp span { font-size: 16px; }
.weather-grid-stacked .weather-main { gap: 12px; margin-bottom: 10px; }

/* Pronóstico semanal */
.weather-forecast {
  display: flex;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.weather-forecast::-webkit-scrollbar { display: none; }
.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  min-width: 38px;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
}
.forecast-day.forecast-rain { background: var(--red-dk); }
.forecast-name { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.forecast-icon { font-size: 14px; line-height: 1; }
.forecast-max  { font-size: 11px; font-weight: 700; color: var(--text); }
.forecast-min  { font-size: 10px; color: var(--text-dim); }

/* ── FAQ ── */
.faq-container { display: grid; gap: 12px; }
.faq-item {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition: background 0.15s;
}
.faq-question:hover { background: var(--bg-surface); }
.faq-question::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
  transition: transform 0.25s;
  margin-left: 12px;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 20px 20px; }
.faq-item.open .faq-answer { display: block; }
.faq-answer p { color: var(--text-muted); line-height: 1.7; }

/* ── Cookie Banner ── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 16px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.cookie-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.cookie-content p { font-size: 13px; color: var(--text-muted); flex: 1; margin: 0; }
.cookie-buttons { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.cookie-link { font-size: 13px; color: var(--accent); text-decoration: underline; }
.cookie-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.cookie-btn:hover { background: var(--accent-soft); }
@media (max-width: 600px) {
  .cookie-content { flex-direction: column; text-align: center; }
  .cookie-buttons { width: 100%; justify-content: center; }
}

/* ── Noticias Locales ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.news-card {
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 280ms var(--ease-spring),
              box-shadow 280ms var(--ease-spring),
              border-color 200ms ease;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border);
}
.news-img { width: 100%; height: 180px; object-fit: cover; background: var(--bg-surface-2); }
.news-content { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.news-source {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  margin-bottom: 8px;
}
.news-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta { margin-top: auto; font-size: 11px; color: var(--text-dim); display: flex; justify-content: space-between; align-items: center; }
.news-link { color: var(--text-muted); text-decoration: none; }
.news-link:hover .news-title { color: var(--accent); }

/* ── Home post cards (sección "Últimas Guías" en home) ── */
.home-post-card > div {
  background: var(--bg-base) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: var(--shadow-soft);
  transition: transform 280ms var(--ease-spring),
              box-shadow 280ms var(--ease-spring),
              border-color 200ms ease;
}
.home-post-card:hover > div {
  border-color: var(--border) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.home-post-card h3 { color: var(--text) !important; }
.home-post-card p { color: var(--text-muted) !important; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .hero-rates     { order: 1; }
  .hero-right     { order: 2; }
  .hero-conversor { order: 3; }
  .weather-grid-stacked { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg-base);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    z-index: 98;
    box-shadow: var(--shadow);
  }
  .hamburger { display: flex; }
  .weather-grid { grid-template-columns: 1fr; }
  .weather-grid-stacked { grid-template-columns: 1fr; }
  .converter-row { flex-direction: column; align-items: stretch; }
  .converter-arrow { padding: 4px 0; transform: rotate(90deg); align-self: center; }
  .converter-swap { align-self: center; transform: rotate(90deg); }
  .converter-swap.rotating { transform: rotate(270deg); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .rates-grid { grid-template-columns: repeat(2, 1fr); }
  .rates-grid-compact { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 28px; }
}

@media (max-width: 420px) {
  .rates-grid { grid-template-columns: 1fr; }
  .rates-grid-compact { grid-template-columns: 1fr; }
  .casas-grid { grid-template-columns: 1fr; }
  .price-value { font-size: 22px; }
  .rate-card { padding: 16px; }
}

/* ═══════════════════════════════════
   ANIMATIONS v2
   ═══════════════════════════════════ */

/* FOIC: ocultar targets solo cuando JS está vivo */
html.js-reveal-pending [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

/* Reveal transition */
[data-reveal] { will-change: opacity, transform; }
[data-reveal].reveal-ready {
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].reveal-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Flash sutil verde al refrescar un número (dato fresco) */
@keyframes valueFlash {
  0%   { color: var(--green-soft); }
  100% { color: inherit; }
}
.value-flash { animation: valueFlash 0.6s ease-out forwards; }

/* Hero canvas */
.hero-canvas-wrapper { position: relative; overflow: hidden; }
#hero-dot-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-canvas-wrapper > .container { position: relative; z-index: 1; }

/* ═══════════════════════════════════
   HERO REDISEÑADO (Playfair + mesh gradient + pill buttons)
   ═══════════════════════════════════ */
.hero-intro-content {
  position: relative;
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
  padding: 8px 0;
}
.hero-intro-content::before {
  content: '';
  position: absolute;
  inset: -40px -10% 0;
  background:
    radial-gradient(circle at 28% 22%, var(--mesh-1), transparent 55%),
    radial-gradient(circle at 72% 68%, var(--mesh-2), transparent 55%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  opacity: 1;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 22px;
}
.hero-subtitle {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }
.hero-cta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta {
  padding: 12px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 220ms var(--ease-spring),
              box-shadow 220ms ease,
              opacity 200ms ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-cta-primary {
  background: var(--accent);
  color: var(--bg-base);
}
.hero-cta-primary:hover {
  transform: translateY(-2px);
  opacity: 1;
  box-shadow: var(--shadow-hover);
  color: var(--bg-base);
}
.hero-cta-outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}
.hero-cta-outline:hover {
  transform: translateY(-2px);
  background: var(--bg-surface);
  opacity: 1;
}
.hero-cta-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.hero-cta-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
  opacity: 1;
}

/* Staggered reveal del hero al cargar */
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-title,
.hero-subtitle,
.hero-cta-row {
  animation: heroReveal 0.7s var(--ease-out-expo) both;
}
.hero-title    { animation-delay: 0.05s; }
.hero-subtitle { animation-delay: 0.18s; }
.hero-cta-row  { animation-delay: 0.30s; }

/* ═══════════════════════════════════
   THEME TOGGLE (sol/luna)
   ═══════════════════════════════════ */
#theme-toggle {
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 32px;
  height: 32px;
  transition: color 0.15s, background 0.15s;
}
#theme-toggle:hover { color: var(--accent); background: var(--bg-surface-2); }
#theme-toggle svg {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-spring);
}
#theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
#theme-toggle .icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] #theme-toggle .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] #theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* ═══════════════════════════════════
   CONVERTER SWAP BUTTON
   ═══════════════════════════════════ */
.converter-swap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-bottom: 4px;
  align-self: flex-end;
  transition: transform 0.4s var(--ease-spring),
              background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease;
  cursor: pointer;
}
.converter-swap:hover {
  background: var(--accent);
  color: var(--bg-base);
  border-color: var(--accent);
}
.converter-swap.rotating { transform: rotate(180deg); }

.converter-input-group.crossfade-out {
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* ═══════════════════════════════════
   TIMELINE VERTICAL (info de viaje)
   ═══════════════════════════════════ */
.timeline {
  list-style: none;
  margin: 18px 0 6px;
  padding: 0 0 0 4px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}
.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 8px 0;
  align-items: start;
}
.timeline-step + .timeline-step { margin-top: 6px; }
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg-base);
  margin-top: 6px;
  margin-left: 5px;
  z-index: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}
.timeline-step.total .timeline-dot { background: var(--accent); }
.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeline-content h4 {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}
.timeline-time {
  font-family: var(--font-number);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.timeline-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.timeline-step.total {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 10px 0;
  margin-left: -8px;
  padding-left: 8px;
  padding-right: 12px;
  margin-top: 8px;
}
.timeline-step.total .timeline-content h4 { font-weight: 700; }
.timeline-step.total .timeline-time { font-size: 14px; }

/* ═══════════════════════════════════
   BORDER STATUS (chalana en vivo)
   ═══════════════════════════════════ */
.border-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.border-status strong { font-weight: 600; }
.border-status-detail { color: var(--text-dim); font-size: 12px; }
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulseGlow 2s ease-out infinite;
}
.pulse-dot.pulse-green { background: #22c55e; }
.pulse-dot.pulse-red   { background: #ef4444; }
@keyframes pulseGlow {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* ═══════════════════════════════════
   SPARKLINE (tendencia 7 días)
   ═══════════════════════════════════ */
.sparkline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 6px 0 0;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}
.sparkline-toggle:hover { color: var(--accent); }
.sparkline-toggle .chev {
  display: inline-block;
  transition: transform 0.3s var(--ease-spring);
}
.sparkline-toggle.open .chev { transform: rotate(180deg); }
.sparkline-container {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.4s var(--ease-smooth),
              opacity 0.3s ease,
              margin-top 0.3s ease;
}
.sparkline-container.open {
  max-height: 90px;
  opacity: 1;
  margin-top: 10px;
}
.sparkline-svg { display: block; width: 100%; height: 60px; }
.sparkline-empty {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  padding: 20px 0;
  line-height: 1.4;
}

/* Navbar: contenedor del nav-right ajustado para theme toggle */
.nav-right { gap: 8px; }

/* Reduced motion: desactivar todo */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  #hero-dot-canvas { display: none; }
  .value-flash { animation: none; }
  .hero-title,
  .hero-subtitle,
  .hero-cta-row { animation: none; opacity: 1; transform: none; }
  .pulse-dot::after { animation: none; opacity: 0; }
  .rate-card, .weather-card, .casa-card, .news-card, .home-post-card > div,
  .hero-cta, .converter-swap, #theme-toggle svg {
    transition: none !important;
  }
}
