/* =========================================================
   TARIFAS.HTML
   Hero gradient + parallax reveal + country fee tables
   ========================================================= */

body {
  font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}

:root {
  --tar-navy: #0E2159;
  --tar-green: #24eab5;
  --tar-line: #e9eef4;
  --tar-muted: #64748b;
}

/* --- header: connect the dark nav bar with the hero gradient --- */
#site-header .tar-header-bar {
  background-image: linear-gradient(82.92deg, #0E2159 5.52%, #004a84 50%, #0a7f9b 94.48%) !important;
}
#site-header .tar-nav-current {
  color: #fff;
  background: rgba(255, 255, 255, .10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}

/* =========================================================
   HERO
   ========================================================= */
.tar-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(82.92deg, #0E2159 5.52%, #005295 50%, #00B7AC 94.48%);
}

.tar-hero__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
.tar-hero__glow--a {
  top: -190px;
  left: -150px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(64, 150, 255, .30) 0%, rgba(64, 150, 255, 0) 68%);
}
.tar-hero__glow--b {
  right: -130px;
  bottom: -310px;
  width: 540px;
  height: 540px;
  background: radial-gradient(circle, rgba(36, 234, 181, .22) 0%, rgba(36, 234, 181, 0) 68%);
}

.tar-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: 34px;
  width: 100%;
  max-width: 1200px;
  min-height: 470px;
  margin: 0 auto;
  padding: 76px 24px 86px;
}

.tar-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .11);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}
.tar-badge i {
  font-size: 15px;
  opacity: .9;
}

.tar-title {
  margin: 22px 0 0;
  font-size: clamp(34px, 4.6vw, 54px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.tar-title span {
  display: block;
  color: var(--tar-green);
}

.tar-desc {
  max-width: 410px;
  margin: 20px 0 28px;
  color: rgba(255, 255, 255, .87);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.65;
}

/* staggered copy entrance (fill-mode backwards keeps :hover transforms free) */
.tar-hero__copy > * {
  animation: tarCopyIn .72s cubic-bezier(.16, 1, .3, 1) backwards;
}
.tar-hero__copy > :nth-child(1) { animation-delay: .06s; }
.tar-hero__copy > :nth-child(2) { animation-delay: .16s; }
.tar-hero__copy > :nth-child(3) { animation-delay: .26s; }
.tar-hero__copy > :nth-child(4) { animation-delay: .36s; }
@keyframes tarCopyIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.tar-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(100deg, #12d8ac 0%, #24eab5 100%);
  box-shadow: 0 10px 28px rgba(5, 40, 70, .28), inset 0 0 0 1px rgba(255, 255, 255, .20);
  color: #08243f;
  font-size: 13px;
  font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.tar-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 14px 34px rgba(5, 40, 70, .36);
}
.tar-btn i { font-size: 17px; }

/* --- parallax + fade-in layers -------------------------------- */
.tar-visual {
  position: relative;
  min-width: 0;
}
/* outer layer: one-shot entrance (CSS-driven, always resolves to visible) */
.tar-reveal {
  animation: tarRevealIn 1.05s cubic-bezier(.16, 1, .3, 1) .12s backwards;
  will-change: opacity, transform;
}
@keyframes tarRevealIn {
  from { opacity: 0; transform: translate3d(0, 54px, 0) scale(.93); }
  to   { opacity: 1; transform: none; }
}
/* inner layer: continuous scroll parallax (no transition, rAF driven) */
.tar-map {
  display: block;
  width: 112%;
  max-width: none;
  height: auto;
  margin-left: -6%;
  transform: translate3d(var(--tar-mx, 0px), calc(var(--tar-y, 0px) + var(--tar-my, 0px)), 0);
  transition: transform .2s ease-out;
  will-change: transform;
  filter: drop-shadow(0 22px 44px rgba(3, 32, 76, .22));
}

/* =========================================================
   CONTENT
   ========================================================= */
.tar-content {
  padding: 0;
  background: #f7f9fc;
}
.tar-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- country picker --- */
.tar-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 38px;
}
.tar-country {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--tar-navy);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.tar-country:hover { background: rgba(255, 255, 255, .65); }
.tar-country.is-active {
  border-color: #5fe6c8;
  background: #E2F9FA;
  box-shadow: 0 6px 20px rgba(16, 80, 120, .10), 0 0 0 1px rgba(36, 234, 181, .22);
}
.tar-country:focus-visible {
  outline: 2px solid #12d8ac;
  outline-offset: 2px;
}
.tar-country img {
  flex: 0 0 auto;
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
}
.tar-country .tar-chev {
  margin-left: auto;
  color: #94a3b8;
  font-size: 19px;
}
.tar-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #9aa8bd;
  font-family: inherit;
  font-size: 12px;
  cursor: default;
}
.tar-add i { font-size: 18px; }

/* --- fee panel --- */
.tar-panel {
  min-height: 430px;
  padding: 34px 40px 42px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 45, 90, .06);
}
.tar-panel[hidden] { display: none !important; }
.tar-panel.is-enter { animation: tarFade .42s ease both; }
@keyframes tarFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.tar-panel__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #0C2684;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.tar-panel__title img {
  width: 24px;
  height: 17px;
  border-radius: 2px;
  object-fit: cover;
}

.tar-row {
  --tar-gap: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 105px 132px 86px;
  align-items: center;
  gap: var(--tar-gap);
  padding: 20px 0;
  border-top: 1px solid var(--tar-line);
}
.tar-row:last-child { border-bottom: 1px solid var(--tar-line); }
.tar-row--ar {
  grid-template-columns: 44px minmax(0, 1fr) 190px 90px 86px;
  border-bottom: 1px solid var(--tar-line);
}
/* Argentina has no "Min." value: column 4 is empty. Span it so the rate is
   centered between its two dividers instead of hugging the left one.
   NOTE: the cells have no --rate modifier class; target the first cell. */
.tar-row--ar .tar-row__cell:first-child { grid-column: 3 / 5; }
.tar-row--ar .tar-row__cell:last-child { grid-column: 5; }

.tar-row__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #123a86;
}
.tar-row__icon svg { width: 36px; height: 36px; }
.tar-row__icon img { width: 40px; height: 40px; object-fit: contain; }
.tar-row__name {
  color: #0C2684;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.tar-row__note {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
}
.tar-row__meta { display: contents; }
.tar-row__cell {
  border-left: 1px solid var(--tar-line);
  color: var(--tar-muted);
  font-size: 15px;
  white-space: nowrap;
  text-align: center;
}
/* The divider is each cell's border-left, and the right divider sits
   after the grid gap. Compensate by one gap so the text lands exactly
   midway between the two lines (otherwise it sits gap/2 to the left). */
.tar-row__cell:not(:last-child) { padding-left: var(--tar-gap); }
.tar-row__cell--rate {
  color: #334155;
  font-weight: 500;
}

/* --- Argentina legal copy --- */
.tar-legal { margin-top: 34px; }
.tar-legal h3 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}
.tar-legal p {
  max-width: 780px;
  margin: 0 0 4px;
  color: var(--tar-muted);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.5;
}

/* =========================================================
   RESPONSIVE  (figure 4)
   ========================================================= */
@media (max-width: 960px) {
  .tar-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    min-height: 0;
    padding: 42px 20px 26px;
  }
  .tar-hero__copy,
  .tar-visual { min-width: 0; }
  .tar-title { margin-top: 18px; font-size: clamp(29px, 7.4vw, 40px); }
  .tar-desc { max-width: 100%; margin: 15px 0 22px; font-size: 13px; }
  .tar-btn { padding: 10px 20px; font-size: 12px; }
  .tar-visual { margin-top: 10px; }
  .tar-map { width: 100%; max-width: 100%; margin-left: 0; }
  .tar-hero__glow--a { top: -150px; left: -130px; width: 280px; height: 280px; }
  .tar-hero__glow--b { right: -150px; bottom: -230px; width: 320px; height: 320px; }

  .tar-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 16px;
    border-radius: 0;
  }
  .tar-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 18px;
  }
  .tar-country {
    padding: 11px 12px;
    border-color: #e7edf4;
    background: #fff;
    font-size: 11.5px;
    letter-spacing: .05em;
  }
  .tar-country img { width: 20px; height: 15px; }
  .tar-country .tar-chev { font-size: 16px; }
  .tar-country.is-active { box-shadow: 0 4px 14px rgba(16, 80, 120, .08); }
  .tar-add { grid-column: 1 / -1; margin-top: 0; }

  .tar-panel {
    min-height: 0;
    margin-top: 14px;
    padding: 22px 18px 28px;
    border-radius: 8px;
  }
  .tar-panel__title { gap: 10px; margin-bottom: 8px; font-size: 19px; }
  .tar-panel__title img { width: 21px; height: 15px; }

  .tar-row,
  .tar-row--ar {
    --tar-gap: 0px; /* no grid column gap: the desktop centering offset does not apply */
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 16px 0;
  }
  .tar-row__icon { grid-row: 1; width: 30px; height: 30px; }
  .tar-row__icon svg { width: 29px; height: 29px; }
  .tar-row__icon img { width: 30px; height: 30px; }
  .tar-row__name { grid-column: 2; grid-row: 1; font-size: 13px; }
  .tar-row__note { font-size: 10.5px; }
  .tar-row__meta {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-left: 0;
  }
  /* Vertical dividers between the values. The lines themselves are flex
     items, so space-between keeps an equal gap on both sides of each line
     and it lands exactly midway between two values, whatever their width. */
  .tar-row__meta::before,
  .tar-row__meta::after {
    content: '';
    flex: 0 0 1px;
    align-self: center;
    height: 18px;
    /* slightly deeper than --tar-line so the short mobile dividers stay visible at 1x */
    background: #dce3ed;
  }
  .tar-row__meta > :nth-child(1) { order: 1; }
  .tar-row__meta::before { order: 2; }
  .tar-row__meta > :nth-child(2) { order: 3; }
  .tar-row__meta::after { order: 4; }
  .tar-row__meta > :nth-child(3) { order: 5; }
  /* Argentina only has two values -> one divider */
  .tar-row--ar .tar-row__meta::after { display: none; }
  .tar-row--ar .tar-row__cell:first-child,
  .tar-row--ar .tar-row__cell:last-child { grid-column: auto; }
  .tar-row__cell {
    padding-left: 0;
    border-left: 0;
    font-size: 11.5px;
  }
  .tar-legal { margin-top: 26px; }
  .tar-legal p { font-size: 12px; line-height: 1.8; }
}

@media (max-width: 380px) {
  .tar-aside { gap: 8px; }
  .tar-country { gap: 7px; padding: 10px 8px; font-size: 10.5px; }
  .tar-row__meta { padding-left: 0; }
  .tar-row__cell { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .tar-reveal { animation: none; opacity: 1; transform: none; }
  .tar-map { transform: none !important; transition: none; }
  .tar-hero__glow { transform: none !important; }
  .tar-hero__copy > * { animation: none; }
  .tar-panel.is-enter { animation: none; }
  .tar-btn, .tar-country { transition: none; }
}
