/* =====================================================================
   Calculadora de Remesas — Stylesheet
   ===================================================================== */

:root {
  --primary:       #EA580C;
  --primary-dark:  #9A3412;
  --primary-light: #FED7AA;
  --primary-50:    #FFF7ED;
  --accent:        #166534;
  --accent-light:  #DCFCE7;
  --warning:       #D97706;
  --warning-bg:    #FFFBEB;
  --warning-border:#FCD34D;
  --bg:            #FEF3E8;
  --surface:       #FFFBF5;
  --text:          #1C1917;
  --text-muted:    #78716C;
  --border:        #E7C9A6;
  --radius:        14px;
  --radius-sm:     9px;
  --shadow:        0 1px 3px 0 rgb(0 0 0/.10), 0 1px 2px -1px rgb(0 0 0/.10);
  --shadow-md:     0 4px 6px -1px rgb(0 0 0/.10), 0 2px 4px -2px rgb(0 0 0/.10);
  --shadow-lg:     0 10px 15px -3px rgb(0 0 0/.10), 0 4px 6px -4px rgb(0 0 0/.10);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Container ──────────────────────────────────────────────────── */
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── Header ─────────────────────────────────────────────────────── */
.site-header {
  background: var(--primary-dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgb(0 0 0/.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.site-logo:hover { text-decoration: none; }
.site-logo svg { flex-shrink: 0; }

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  color: rgba(255,255,255,.82);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.site-nav a:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.site-nav a.active { background: rgba(255,255,255,.2); color: #fff; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #EA580C 100%);
  color: #fff;
  padding: 52px 0 72px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.55rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.05rem;
  opacity: .88;
  max-width: 540px;
  margin: 0 auto;
}

/* ── Calculator card ────────────────────────────────────────────── */
.calc-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  margin-top: -36px;
  position: relative;
  z-index: 10;
}

.calc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 20px;
}

.calc-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.input-wrap { position: relative; }

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
  user-select: none;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input.has-prefix { padding-left: 30px; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.btn-calc {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 30px;
  font-size: 1rem;
  font-weight: 700;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  height: 48px;
}
.btn-calc:hover { background: var(--primary-dark); }
.btn-calc:active { transform: scale(.98); }

/* ── Alert banner ───────────────────────────────────────────────── */
.alert-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin: 22px 0 0;
}
.alert-banner .alert-icon { flex-shrink: 0; margin-top: 1px; color: var(--warning); }
.alert-banner p { font-size: 0.845rem; color: #92400E; line-height: 1.55; }
.alert-banner a { color: #92400E; font-weight: 600; text-decoration: underline; }

/* ── Results ────────────────────────────────────────────────────── */
.results-section { margin-top: 28px; }

.results-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.results-header h2 { font-size: 1.15rem; font-weight: 800; }
.results-count { font-size: 0.82rem; color: var(--text-muted); }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}

.result-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: relative;
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.result-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.result-card.best { border-color: var(--accent); }

.best-badge {
  position: absolute;
  top: -12px;
  left: 14px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.card-top { display: flex; align-items: center; gap: 11px; }

.plat-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.7rem;
  flex-shrink: 0;
  letter-spacing: -.3px;
  line-height: 1;
}

.plat-name { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.plat-type { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.card-receives {
  background: var(--primary-50);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  text-align: center;
}
.recv-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.recv-amount { font-size: 1.5rem; font-weight: 800; color: var(--primary-dark); letter-spacing: -.5px; line-height: 1.15; }
.recv-currency { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.det-item { display: flex; flex-direction: column; gap: 2px; }
.det-label { font-size: 0.67rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.det-value { font-size: 0.82rem; font-weight: 700; }

.card-methods { display: flex; flex-wrap: wrap; gap: 4px; }
.method-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.67rem;
  padding: 3px 7px;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-send {
  display: block;
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.845rem;
  font-weight: 700;
  text-align: center;
  transition: background .15s;
}
.btn-send:hover { background: var(--primary-dark); text-decoration: none; }

/* ── Empty / prompt state ───────────────────────────────────────── */
.calc-prompt {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.calc-prompt svg { margin: 0 auto 14px; opacity: .35; }
.calc-prompt h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text); }
.calc-prompt p { font-size: 0.875rem; }

/* ── CTA section ────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--primary-50), #fff);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 28px 0;
}
.cta-icon { flex-shrink: 0; color: var(--primary); }
.cta-text h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.cta-text p { font-size: 0.845rem; color: var(--text-muted); }
.btn-cta {
  margin-left: auto;
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s;
  display: inline-block;
}
.btn-cta:hover { background: var(--primary-dark); text-decoration: none; }

/* ── Ad slot ────────────────────────────────────────────────────── */
.ad-slot {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  margin: 22px 0;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Page sections ──────────────────────────────────────────────── */
.page-section { padding: 44px 0; }
.section-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.4px; margin-bottom: 6px; }
.section-subtitle { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 28px; }

/* ── Comparativa filters ────────────────────────────────────────── */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  align-items: center;
}

.filter-btn {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.country-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 34px 6px 16px;
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  font-family: inherit;
}
.country-select:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Compare cards ──────────────────────────────────────────────── */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 18px;
}

.compare-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, border-color .2s;
}
.compare-card:hover { box-shadow: var(--shadow-md); border-color: var(--primary-light); }
.compare-card.hidden { display: none; }

.cc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.cc-header .plat-logo { width: 38px; height: 38px; font-size: 0.65rem; }

.cc-name { font-weight: 700; font-size: 0.9rem; line-height: 1.3; }
.cc-type { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

.cc-body { padding: 14px 18px; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  font-size: 0.82rem;
}
.info-row:last-child { border-bottom: none; }
.info-key { color: var(--text-muted); font-weight: 500; min-width: 110px; flex-shrink: 0; }
.info-val { font-weight: 600; text-align: right; flex: 1; }

.cov-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.cov-tag {
  background: var(--primary-50);
  color: var(--primary-dark);
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
}

.cc-footer {
  background: var(--bg);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.77rem;
  gap: 8px;
}
.avail-icons { display: flex; gap: 6px; align-items: center; color: var(--text-muted); }
.avail-icons span { display: flex; align-items: center; gap: 3px; }

.btn-visit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s;
  display: inline-block;
}
.btn-visit:hover { background: var(--primary-dark); text-decoration: none; }

/* ── Guide cards ────────────────────────────────────────────────── */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.guide-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.guide-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
  color: var(--primary);
}
.guide-card h4 { font-size: 0.88rem; font-weight: 700; margin-bottom: 6px; }
.guide-card p { font-size: 0.79rem; color: var(--text-muted); line-height: 1.55; }

/* ── Privacy policy ─────────────────────────────────────────────── */
.policy-wrap { max-width: 760px; }
.policy-wrap h2 {
  font-size: 1.2rem; font-weight: 800;
  margin: 30px 0 10px; color: var(--primary-dark);
}
.policy-wrap h2:first-child { margin-top: 0; }
.policy-wrap p, .policy-wrap li {
  font-size: 0.9rem; color: #374151; line-height: 1.8; margin-bottom: 10px;
}
.policy-wrap ul { padding-left: 22px; }
.policy-wrap li { margin-bottom: 5px; }
.policy-wrap a { font-weight: 600; }
.policy-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.68);
  padding: 34px 0 18px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
  margin-bottom: 22px;
}

.footer-brand .site-logo { margin-bottom: 10px; }
.footer-brand p { font-size: 0.8rem; max-width: 310px; line-height: 1.6; }

.footer-links { display: flex; flex-direction: column; gap: 8px; text-align: right; }
.footer-links a { font-size: 0.8rem; color: rgba(255,255,255,.62); transition: color .15s; }
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 16px;
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.7;
}

/* ── Hero two-column (image + text) ────────────────────────────── */
.hero-inner {
  display: flex;
  align-items: center;
  gap: 44px;
}

.hero-text { flex: 1; text-align: left; }
.hero-text h1 { margin-bottom: 14px; }
.hero-text p { margin: 0; max-width: 480px; }

.hero-img {
  flex-shrink: 0;
  width: 360px;
}

.hero-img img {
  width: 100%;
  height: 264px;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  box-shadow: 0 14px 44px rgba(0,0,0,.38);
  display: block;
}

.rate-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 14px;
  line-height: 1.55;
  padding: 0 4px;
}
.rate-info a { color: var(--text-muted); text-decoration: underline; }
.rate-info strong { color: var(--text); }

.photo-credit {
  font-size: 0.65rem;
  color: rgba(255,255,255,.45);
  margin-top: 6px;
  text-align: right;
}
.photo-credit a { color: rgba(255,255,255,.55); }

/* ── Photo banner (index) ───────────────────────────────────────── */
.photo-banner {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}

.photo-banner-img {
  flex-shrink: 0;
  width: 280px;
  object-fit: cover;
  display: block;
}

.photo-banner-text {
  padding: 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.photo-banner-text h3 { font-size: 1.05rem; font-weight: 800; }
.photo-banner-text p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

.photo-banner-credit {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
}
.photo-banner-credit a { color: var(--text-muted); }

/* ── Guide photo banner (comparativa) ──────────────────────────── */
.guide-photo-banner {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
  position: relative;
  height: 220px;
}

.guide-photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.guide-photo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(154,52,18,.82) 0%, rgba(154,52,18,.3) 60%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 32px 36px;
}

.guide-photo-banner-overlay h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  max-width: 340px;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

/* ── Cookie consent banner ─────────────────────────────────────── */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--primary-dark);
  color: rgba(255,255,255,.92);
  padding: 16px 24px;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  border-top: 3px solid var(--primary);
}

.cookie-banner p {
  flex: 1;
  font-size: 0.845rem;
  line-height: 1.55;
  min-width: 220px;
  margin: 0;
}

.cookie-banner p a { color: var(--primary-light); font-weight: 600; }
.cookie-banner p a:hover { color: #fff; }

.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-reject {
  background: transparent;
  border: 2px solid rgba(255,255,255,.38);
  color: rgba(255,255,255,.82);
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 0.845rem;
  font-weight: 600;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.cookie-reject:hover { border-color: rgba(255,255,255,.7); color: #fff; }

.cookie-accept {
  background: var(--primary);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 20px;
  font-size: 0.845rem;
  font-weight: 700;
  font-family: inherit;
  transition: background .15s;
}
.cookie-accept:hover { background: #C2410C; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .calc-form { grid-template-columns: 1fr; }
  .cta-section { flex-direction: column; text-align: center; }
  .btn-cta { margin-left: 0; width: 100%; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { text-align: left; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .hero { padding: 32px 0 52px; }
  .calc-card { padding: 20px; margin-top: -24px; }
  .hero-inner { flex-direction: column; }
  .hero-text { text-align: center; }
  .hero-img { display: none; }
  .photo-banner { flex-direction: column; }
  .photo-banner-img { width: 100%; height: 200px; }
  .guide-photo-banner { height: 180px; }
  .guide-photo-banner-overlay h3 { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .site-nav a { display: none; }
  .site-nav a.active { display: block; }
  .results-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .card-details { grid-template-columns: 1fr; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .cookie-actions { width: 100%; }
  .cookie-reject, .cookie-accept { flex: 1; text-align: center; }
}
