/* =========================================================
   PrecioDelDolar.com — Estilos principales
   Tema: Verde profesional / Blanco
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --green-dark:   #065f35;
  --green:        #0a7a45;
  --green-mid:    #0d9254;
  --green-light:  #e6f7ee;
  --green-pale:   #f2fbf6;
  --white:        #ffffff;
  --gray-100:     #f8fafc;
  --gray-200:     #eef2f7;
  --gray-300:     #d1dde8;
  --gray-500:     #6b7c8e;
  --gray-700:     #374151;
  --text:         #0f1f12;
  --text-muted:   #4a6358;
  --gold:         #d4a017;
  --red:          #dc2626;
  --blue:         #1d4ed8;

  --radius:     14px;
  --radius-sm:   8px;
  --radius-xs:   5px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,.07);
  --shadow:     0 4px 16px rgba(6,95,53,.10);
  --shadow-md:  0 8px 28px rgba(6,95,53,.14);
  --transition: .2s ease;

  --container: 1180px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--gray-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- HEADER ---------- */
.header {
  background: var(--green-dark);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.header-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: .5rem;
  padding-block: 0;
  min-height: 54px;
}

/* ---------- HEADER NAV ---------- */
.header-nav { display: flex; align-items: stretch; }

.header-nav-list {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.header-nav-link,
.header-nav-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: 0 .95rem;
  color: var(--white);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
  text-decoration: none;
  letter-spacing: .01em;
}

.header-nav-link:hover,
.header-nav-btn:hover,
.header-nav-item--has-dropdown:hover > .header-nav-btn {
  background: rgba(255,255,255,.15);
  text-decoration: none;
  color: var(--white);
}

.header-nav-caret {
  font-size: .6rem;
  opacity: .8;
  margin-left: .1rem;
}

/* Dropdown */
.header-nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 3px solid #3cb054;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  min-width: 220px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 300;
}

.header-nav-item--has-dropdown:hover .header-nav-dropdown,
.header-nav-item--has-dropdown.open .header-nav-dropdown {
  display: block;
}

.header-nav-dropdown li a {
  display: block;
  padding: .48rem 1.1rem;
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition);
  text-align: center;
}

.header-nav-dropdown li + li a {
  border-top: 1px solid var(--gray-200);
}

.header-nav-dropdown li a:hover {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

/* Mobile: hamburger */
.header-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: .5rem;
  line-height: 1;
  align-self: center;
}

@media (max-width: 820px) {
  .header-nav-toggle { display: flex; }
  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--green-dark);
    z-index: 200;
    border-top: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 6px 18px rgba(0,0,0,.2);
  }
  .header-nav.open { display: block; }
  .header-nav-list { flex-direction: column; }
  .header-nav-item { flex-direction: column; }
  .header-nav-link,
  .header-nav-btn {
    padding: .7rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    width: 100%;
    justify-content: space-between;
  }
  .header-nav-dropdown {
    display: none !important;
  }
  .header-nav-item--has-dropdown.open .header-nav-dropdown {
    display: block !important;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: rgba(0,0,0,.15);
    max-height: none;
  }
  .header-nav-dropdown li a {
    color: rgba(255,255,255,.9);
    padding: .5rem 2rem;
    text-align: left;
  }
  .header-nav-dropdown li + li a { border-top: 1px solid rgba(255,255,255,.06); }
  .header-nav-dropdown li a:hover { background: rgba(255,255,255,.1); color: var(--white); }
  .header-meta { display: none; }
}


.logo {
  display: flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
}

.logo-icon {
  background: #00c853;
  color: #000;
  font-weight: 900;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.logo-tld {
  font-size: 1.15rem;
  font-weight: 400;
  color: rgba(255,255,255,.65);
}

.logo--white .logo-text,
.logo--white .logo-tld { color: var(--white); }

.logo-img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: rgba(255,255,255,.8);
}

.live-dot {
  width: 8px;
  height: 8px;
  background: #00e676;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.8); }
}

/* ---------- TOPNAV ---------- */
.topnav {
  background: var(--green);
  border-bottom: 1px solid rgba(0,0,0,.15);
}

.topnav-inner {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: 0;
}
.topnav-inner::-webkit-scrollbar { display: none; }

.topnav-list {
  display: flex;
  align-items: stretch;
  min-width: max-content;
  width: 100%;
}

.topnav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.topnav-link,
.topnav-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .6rem 1.05rem;
  color: var(--white);
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  background: none;
  border: none;
  border-right: 1px solid rgba(255,255,255,.13);
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
  text-decoration: none;
  letter-spacing: .01em;
}

.topnav-link:hover,
.topnav-btn:hover,
.topnav-has-dropdown:hover > .topnav-btn {
  background: rgba(0,0,0,.18);
  text-decoration: none;
  color: var(--white);
}

.topnav-link--home {
  font-size: 1.15rem;
  padding-inline: 1rem;
  border-left: 1px solid rgba(255,255,255,.13);
}

.topnav-caret {
  font-size: .6rem;
  opacity: .75;
  margin-left: .1rem;
}

/* Dropdown */
.topnav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-top: 2px solid var(--green);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  min-width: 200px;
  z-index: 300;
}

.topnav-has-dropdown:hover .topnav-dropdown,
.topnav-has-dropdown.open .topnav-dropdown {
  display: block;
}

.topnav-dropdown li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .48rem 1rem;
  color: var(--text);
  font-size: .83rem;
  white-space: nowrap;
  transition: background var(--transition);
}

.topnav-dropdown li + li a {
  border-top: 1px solid var(--gray-200);
}

.topnav-dropdown li a:hover {
  background: var(--green-light);
  text-decoration: none;
  color: var(--green-dark);
}

/* ---------- HERO ---------- */
.hero {
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green) 60%, var(--green-mid) 100%);
  color: var(--white);
  padding: 3rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .75rem;
  position: relative;
}

.hero-subtitle {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: rgba(255,255,255,.82);
  margin-bottom: 2.5rem;
  position: relative;
}

.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 700px;
  margin-inline: auto;
  position: relative;
}

.hero-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  transition: transform var(--transition), background var(--transition);
}

.hero-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.18); }

.hero-card--eur {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
}

.hero-card-flag { font-size: 2rem; margin-bottom: .4rem; }
.hero-card-name { font-size: .8rem; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .05em; }
.hero-card-code { font-size: .75rem; color: rgba(255,255,255,.5); margin-bottom: .5rem; }

.hero-card-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-value--sm { font-size: 1.1rem; font-weight: 600; }
.hero-card-note { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: .3rem; }

/* ---------- SECTIONS ---------- */
.section { padding: 4rem 0; }
.section--green { background: var(--green-pale); }
.section--light { background: var(--gray-200); }

.section-header { text-align: center; margin-bottom: 2.5rem; }

.section-header h2 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: .5rem;
}

.section-subtitle {
  font-size: .95rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-inline: auto;
}

/* ---------- TABLE ---------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.rates-table thead {
  background: var(--green-dark);
  color: var(--white);
}

.rates-table th {
  padding: .9rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .83rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.rates-table tbody tr {
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--transition);
}

.rates-table tbody tr:last-child { border-bottom: none; }
.rates-table tbody tr:hover { background: var(--green-pale); }

.rates-table td {
  padding: .85rem 1rem;
  vertical-align: middle;
  white-space: nowrap;
}

.country-cell {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
}

.country-flag { font-size: 1.25rem; }

.rate-value {
  font-weight: 700;
  font-size: .95rem;
  color: var(--green-dark);
}

.rate-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.rate-badge--oficial { background: #dcfce7; color: #166534; }
.rate-badge--paralelo { background: #fef3c7; color: #92400e; }
.rate-badge--blue { background: #dbeafe; color: #1e40af; }
.rate-badge--usd { background: #f0fdf4; color: #15803d; }

.loading-row td {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
}

/* ---------- CALCULATOR ---------- */
.calculator {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  max-width: 640px;
  margin-inline: auto;
}

.calc-row { margin-bottom: 1.25rem; }

.calc-row--currencies {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: .75rem;
}

.calc-field { display: flex; flex-direction: column; gap: .35rem; }

.calc-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.calc-input,
.calc-select {
  padding: .75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.calc-input:focus,
.calc-select:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(13,146,84,.15);
}

.swap-btn {
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  flex-shrink: 0;
  margin-bottom: 2px;
}

.swap-btn:hover { background: var(--green-dark); transform: rotate(180deg); }

.calc-result {
  margin-top: 1.5rem;
  text-align: center;
  padding: 1.5rem;
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  border: 2px solid var(--green-light);
}

.calc-result-value {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
  color: var(--green-dark);
  min-height: 2.5rem;
}

.calc-result-rate {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .3rem;
}

/* ---------- COUNTRY CARDS ---------- */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.country-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: box-shadow var(--transition), transform var(--transition);
}

.country-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.country-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.country-card-flag { font-size: 2rem; }

.country-card-title h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .1rem;
}

.country-card-title p {
  font-size: .8rem;
  color: var(--text-muted);
}

.country-card-rates { display: flex; flex-direction: column; gap: .5rem; }

.country-card-rate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .75rem;
  background: var(--gray-100);
  border-radius: var(--radius-xs);
  font-size: .88rem;
}

.country-card-rate-label { color: var(--text-muted); }
.country-card-rate-value { font-weight: 700; color: var(--green-dark); }

.country-card-desc {
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--gray-200);
  padding-top: .75rem;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin-inline: auto; }

.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}

.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font);
  transition: background var(--transition);
}

.faq-btn:hover { background: var(--green-pale); }
.faq-btn[aria-expanded="true"] { color: var(--green-dark); background: var(--green-pale); }

.faq-icon {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--green);
  transition: transform var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.faq-btn[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.faq-answer.open { display: block; }
.faq-answer p { margin-bottom: .5rem; }
.faq-answer strong { color: var(--green-dark); }

/* ---------- FOOTER ---------- */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.8);
  padding: 3rem 0 1.5rem;
}

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

.footer-brand p {
  margin-top: .75rem;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.5);
  margin-bottom: .75rem;
}

.footer-links ul { display: flex; flex-direction: column; gap: .4rem; }

.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}

.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Skeleton / Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,.15) 25%, rgba(255,255,255,.3) 50%, rgba(255,255,255,.15) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  min-width: 60px;
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .hero { padding: 2rem 0 2.5rem; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }

  .calc-row--currencies {
    grid-template-columns: 1fr;
  }
  .swap-btn {
    margin-inline: auto;
    transform: rotate(90deg);
  }
  .swap-btn:hover { transform: rotate(270deg); }

  .rates-table th,
  .rates-table td { padding: .7rem .75rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }

  .hero-cards {
    grid-template-columns: 1fr 1fr;
  }
  .hero-card--update { grid-column: 1 / -1; }

  .rates-table { font-size: .82rem; }
}

/* ---------- Country card link ---------- */
.country-card-link {
  display: inline-block;
  margin-top: .75rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--green);
}
.country-card-title a { color: inherit; text-decoration: none; }
.country-card-title a:hover { color: var(--green); text-decoration: underline; }

/* ---------- COUNTRY PAGE ---------- */
.cp-hero {
  background: linear-gradient(145deg, var(--green-dark) 0%, var(--green) 70%, var(--green-mid) 100%);
  color: var(--white);
  padding: 2.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.cp-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.cp-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  font-weight: 800;
  margin-bottom: .6rem;
  position: relative;
}
.cp-rate-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  max-width: 680px;
  position: relative;
}
.cp-rate-card {
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  transition: background var(--transition), transform var(--transition);
}
.cp-rate-card:hover { background: rgba(255,255,255,.19); transform: translateY(-2px); }
.cp-rate-card--main {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.4);
}
.cp-rate-icon { font-size: 1.8rem; margin-bottom: .35rem; }
.cp-rate-label { font-size: .75rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.cp-rate-value { font-size: 1.7rem; font-weight: 800; color: var(--white); }
.cp-rate-currency { font-size: .75rem; color: rgba(255,255,255,.55); margin-top: .25rem; }

/* Bloque compra/venta al estilo infodolar */
.cv-tables-wrap {
  margin-top: 2rem;
  position: relative;
}
.cv-block {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}
.cv-block-header {
  background: var(--green-dark);
  padding: .75rem 1.1rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .82rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: .07em;
  text-transform: uppercase;
  border-bottom: none;
}
.cv-note {
  margin-top: .65rem;
  font-size: .71rem;
  color: rgba(255,255,255,.5);
  font-style: italic;
}

/* Compra/Venta table on country page */
.cv-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--white);
  margin-top: 1.5rem;
}
.cv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
.cv-table thead { background: var(--green-dark); color: var(--white); }
.cv-table th {
  padding: .85rem 1rem;
  text-align: center;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.cv-table th:first-child { text-align: left; }
.cv-table td {
  padding: .85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}
.cv-table td:first-child { text-align: left; font-weight: 600; }
.cv-table tbody tr:last-child td { border-bottom: none; }
.cv-table tbody tr:hover { background: var(--green-pale); }
.cv-compra { color: var(--blue); font-weight: 700; }
.cv-venta  { color: var(--green-dark); font-weight: 700; }
.cv-spread { color: var(--gray-500); font-size: .85rem; }
.cv-var         { font-weight: 700; font-size: .88rem; line-height: 1.4; }
.cv-var small   { font-weight: 400; font-size: .75rem; display: block; opacity: .8; }
.cv-var--up     { color: var(--red); }      /* dólar sube = malo para el bolsillo */
.cv-var--down   { color: var(--green-mid); } /* dólar baja = bueno */
.cv-var--flat   { color: var(--gray-500); }
.cv-time        { color: var(--gray-500); font-size: .82rem; white-space: nowrap; }
.cv-flag { width: 28px; height: 20px; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-right: .5rem; }
.cv-flag-emoji { font-size: 1.3rem; margin-right: .4rem; vertical-align: middle; }

/* Country info box */
.cp-info-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--green);
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 860px;
  margin-inline: auto;
}
.cp-info-box p { margin-bottom: 1rem; }
.cp-info-box p:last-child { margin-bottom: 0; }
.cp-info-box strong { color: var(--green-dark); }

/* Other countries grid */
.other-countries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.other-country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .9rem .6rem;
  text-decoration: none;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.other-country-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--green-light);
  text-decoration: none;
}
.other-flag { font-size: 1.8rem; }
.other-flag-img { width: 36px; height: 26px; object-fit: cover; border-radius: 4px; }
.other-name { font-size: .78rem; font-weight: 600; color: var(--text); }
.other-rate { font-size: .72rem; color: var(--text-muted); background: var(--green-pale); padding: .15rem .4rem; border-radius: 10px; }

/* Breadcrumb */
.breadcrumb { padding: .6rem 0; }
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: .4rem;
  list-style: none;
  font-size: .82rem;
  color: rgba(255,255,255,.6);
}
.breadcrumb-list li:not(:last-child)::after { content: '›'; margin-left: .4rem; }
.breadcrumb-list a { color: rgba(255,255,255,.75); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--white); }
.breadcrumb-list [aria-current] { color: rgba(255,255,255,.9); font-weight: 600; }

/* Full page loading */
.loading-full {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  gap: 1rem;
  color: var(--text-muted);
}

/* ---------- Utilidades ---------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.text-error { color: var(--red); font-style: italic; font-size: .85rem; }

/* ---------- CONVERTIR PAGE ---------- */
.hero--compact { padding-block: 2.5rem 2rem; }
.hero--compact h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

.header-nav-link--active {
  color: var(--primary) !important;
  font-weight: 700;
}

.calculator--large .calc-input {
  font-size: 1.3rem;
  padding: 1rem 1.2rem;
}
.calculator--large .calc-select {
  font-size: 1.05rem;
  padding: .85rem 1rem;
}
.calculator--large .calc-result-value {
  font-size: clamp(2rem, 5vw, 3rem);
}

/* Tasas de referencia rápida */
.ref-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.ref-rate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transition: box-shadow .2s;
}
.ref-rate-card:hover { box-shadow: var(--shadow-md); }
.ref-rate-card-country {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ref-rate-card-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -.02em;
}
.ref-rate-card-code {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Info cards (how-to) */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.info-card-icon { font-size: 2rem; margin-bottom: .75rem; }
.info-card h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--text-main); }
.info-card p  { font-size: .9rem; color: var(--text-muted); margin: 0; line-height: 1.6; }
.info-text { max-width: 780px; margin: 0 auto; }
.info-text h3 { font-size: 1.1rem; margin-bottom: .75rem; color: var(--text-main); }
.info-text p  { font-size: .95rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; }

/* Geo banner (main page) */
.geo-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.geo-banner-flag { font-size: 1.8rem; line-height: 1; }
.geo-banner-info { flex: 1; min-width: 0; }
.geo-banner-label { font-size: .75rem; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }
.geo-banner-rate  { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.geo-banner-sub   { font-size: .85rem; opacity: .9; }
.geo-banner-link  {
  background: rgba(255,255,255,.2);
  color: var(--white);
  border-radius: 6px;
  padding: .45rem .9rem;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s;
}
.geo-banner-link:hover { background: rgba(255,255,255,.35); }

/* Highlighted country card */
.country-card--geo-highlight {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb, 22,101,52), .12);
  position: relative;
}
.country-card--geo-highlight::before {
  content: "Tu país";
  position: absolute;
  top: -10px; left: 1rem;
  background: var(--primary);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .6rem;
  border-radius: 99px;
}


/* ===== SEO prerender blocks ===== */
.seo-country-hero h1{margin-bottom:.75rem}
.seo-intro-grid,.seo-columns,.seo-link-grid{display:grid;gap:1rem}
.seo-intro-grid{grid-template-columns:2fr 1fr}
.seo-columns{grid-template-columns:repeat(3,1fr)}
.seo-link-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-top:1rem}
.seo-card{background:#fff;border:1px solid var(--gray-200);border-radius:16px;padding:1.25rem;box-shadow:0 6px 18px rgba(0,0,0,.04)}
.seo-card--soft{background:var(--green-pale)}
.seo-checklist,.seo-inline-links{margin:0;padding-left:1.2rem}
.seo-checklist li,.seo-inline-links li{margin:.45rem 0}
.seo-faq-list{display:grid;gap:.75rem}
.seo-faq-item{background:#fff;border:1px solid var(--gray-200);border-radius:14px;padding:1rem 1.1rem}
.seo-faq-item summary{cursor:pointer;font-weight:700}
.seo-faq-item p{margin:.8rem 0 0}
@media (max-width: 900px){
  .seo-intro-grid,.seo-columns{grid-template-columns:1fr}
}



/* ===== CONTENT PAGES / LONGTAIL ===== */
.page-hero{
  background: linear-gradient(180deg, rgba(0,111,56,.08) 0%, rgba(0,111,56,.03) 100%);
  border-bottom: 1px solid var(--gray-200);
}
.page-hero .container{padding-block:2rem}
.page-kicker{display:inline-flex;align-items:center;gap:.5rem;background:var(--green-pale);color:var(--green-dark);padding:.35rem .75rem;border-radius:999px;font-size:.82rem;font-weight:700;margin-bottom:1rem}
.page-hero h1{margin-bottom:.8rem}
.page-hero p{max-width:860px}
.page-content{padding:2rem 0}
.page-content .section{padding-block:1.4rem}
.page-content .section-header{margin-bottom:1rem}
.page-link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:1rem}
.page-link-card{display:block;background:#fff;border:1px solid var(--gray-200);border-radius:16px;padding:1rem 1.1rem;box-shadow:0 6px 18px rgba(0,0,0,.04);text-decoration:none;color:var(--text-dark)}
.page-link-card strong{display:block;color:var(--green-dark);margin-bottom:.35rem}
.page-link-card span{font-size:.95rem;color:var(--gray-700)}
.content-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid var(--gray-200);border-radius:16px;overflow:hidden}
.content-table th,.content-table td{padding:.9rem 1rem;border-bottom:1px solid var(--gray-200);text-align:left}
.content-table th{background:var(--green-dark);color:#fff;font-size:.9rem}
.content-table tr:last-child td{border-bottom:none}
.content-note{font-size:.94rem;color:var(--gray-700)}
.legal-prose .seo-card p + p, .legal-prose .seo-card ul{margin-top:.8rem}
.legal-prose .seo-card ul{padding-left:1.1rem}
