/* ═══════════════════════════════════════════════════════════════════════════
   PrimaveraTravels — Shared Components v2
   Used by EVERY public page: nav, language dropdown, footer, buttons,
   badges, section shells, route/airport cards, FAQ.
   Requires tokens.css.
═══════════════════════════════════════════════════════════════════════════ */

/* ── Navigation ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
}
.nav-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex-shrink: 0; }
.nav-logo-mark { width: 30px; height: 30px; display: flex; align-items: center; flex-shrink: 0; }
.nav-logo-mark svg { width: 100%; height: 100%; display: block; }
.nav-brand-name {
  font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 600;
  color: var(--ink); letter-spacing: -.01em;
  white-space: nowrap;
}
.nav-brand-name span { color: var(--terracotta); }

.nav-right { display: flex; align-items: center; gap: 1.1rem; }
.nav-link {
  color: var(--gray-500); text-decoration: none;
  font-size: .84rem; font-weight: 500;
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--horizon); font-weight: 600; }

/* ── Language dropdown (built by I18n.buildSwitcher) ─────────────────────── */
.lang-switcher { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--mist);
  border-radius: 100px; padding: 4px 10px 4px 6px;
  font-family: var(--font-body); font-size: .76rem; font-weight: 600;
  color: var(--ink); cursor: pointer;
  transition: border-color var(--transition);
}
.lang-toggle:hover { border-color: var(--horizon-l); }
.lang-toggle .lang-flag-img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; }
.lang-toggle svg { width: 12px; height: 12px; color: var(--gray-500); transition: transform var(--transition); }
.lang-switcher.open .lang-toggle svg { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 168px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 5px;
  display: none;
  z-index: 120;
}
.lang-switcher.open .lang-menu { display: block; animation: langMenuIn .15s cubic-bezier(.4,0,.2,1); }
@keyframes langMenuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.lang-option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 7px 9px;
  background: none; border: none; border-radius: 8px;
  font-family: var(--font-body); font-size: .82rem; font-weight: 500;
  color: var(--ink); cursor: pointer; text-align: left;
  transition: background var(--transition);
}
.lang-option:hover { background: var(--stone); }
.lang-option.active { background: var(--stone-d); font-weight: 600; }
.lang-option .lang-flag-img { width: 20px; height: 15px; border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.lang-option .lang-native { flex: 1; }
.lang-option .lang-code { font-size: .68rem; color: var(--gray-500); font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: .86rem; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
  min-height: 44px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-action { /* terracotta — the only "do it" color */
  background: var(--terracotta); color: var(--white);
  box-shadow: 0 4px 14px rgba(196,98,45,.28);
}
.btn-action:hover:not(:disabled) {
  background: var(--terracotta-d);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(196,98,45,.36);
}
.btn-action:active:not(:disabled) { transform: translateY(0); }

.btn-primary { background: var(--horizon); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: var(--horizon-d); }

.btn-outline {
  background: var(--white); border: 1.5px solid var(--mist); color: var(--horizon);
}
.btn-outline:hover:not(:disabled) { border-color: var(--horizon-l); background: var(--stone); }

.btn-ghost {
  background: none; color: var(--gray-500); padding: 8px 10px; min-height: 0;
}
.btn-ghost:hover:not(:disabled) { color: var(--horizon); background: var(--stone); }

.btn-sm { padding: 7px 13px; font-size: .78rem; min-height: 36px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: .98rem; border-radius: var(--radius-lg); }

/* ── Eyebrow + section headers ────────────────────────────────────────────── */
.section { padding: 3.2rem 1.5rem; }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-alt { background: var(--white); }

.eyebrow {
  display: block;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: .6rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 600; letter-spacing: -.01em;
  color: var(--ink); line-height: 1.15;
}
.section-title em { font-style: italic; color: var(--horizon); font-weight: 500; }
.section-sub {
  margin-top: .6rem;
  font-size: .95rem; color: var(--gray-500);
  max-width: 560px; line-height: 1.6;
}
.section-head-center { text-align: center; }
.section-head-center .section-sub { margin-left: auto; margin-right: auto; }

/* ── Trust badges (green check pills) ─────────────────────────────────────── */
.trust-badges {
  display: flex; flex-wrap: nowrap; gap: 5px;
  padding: .4rem 1.4rem;
  border-bottom: 1px solid var(--mist);
  background: var(--white);
}
.trust-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  background: var(--success-bg); border: 1px solid #CDE5D6; color: var(--success);
  font-size: .68rem; font-weight: 600;
  padding: 5px 8px; border-radius: 100px;
  white-space: nowrap; flex: 1;
}
.trust-badge svg { width: 10px; height: 10px; stroke: var(--success); flex-shrink: 0; }
@media (max-width: 640px) {
  .trust-badges { padding: .35rem .85rem; gap: 4px; }
  .trust-badge { font-size: .62rem; padding: 3px 7px; }
}

/* ── Route & airport cards ────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-top: 2rem;
}
.dest-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.dest-card:hover {
  border-color: var(--horizon-l);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.dest-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dest-card-code {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  color: var(--horizon); background: var(--stone-d);
  padding: 3px 8px; border-radius: 100px;
  white-space: nowrap;
}
.dest-card-route {
  font-family: var(--font-display);
  font-size: 1.12rem; font-weight: 600; color: var(--ink);
  line-height: 1.3; letter-spacing: -.01em;
}
.dest-card-route .arrow { color: var(--gray-300); font-weight: 400; padding: 0 2px; }
.dest-card-meta {
  display: flex; align-items: center; gap: 14px;
  font-size: .8rem; color: var(--gray-500); font-weight: 500;
}
.dest-card-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--stone-d);
  padding-top: 12px; margin-top: 2px;
}
.dest-card-price { display: flex; flex-direction: column; }
.dest-card-from { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gray-500); }
.dest-card-amount {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 600; color: var(--terracotta);
  line-height: 1.1; letter-spacing: -.01em;
}
.dest-card-amount .dest-card-cur { font-size: .9rem; color: var(--gray-500); font-family: var(--font-body); font-weight: 600; }
.dest-card-cta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 600; color: var(--horizon);
}
.dest-card:hover .dest-card-cta { color: var(--terracotta); }
.dest-card-cta svg { width: 14px; height: 14px; }

/* ── Steps (how it works) ─────────────────────────────────────────────────── */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-top: 2.2rem;
}
@media (max-width: 760px) { .steps-grid { grid-template-columns: 1fr; gap: 10px; } }
.step-card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  position: relative;
}
.section-alt .step-card { background: var(--stone); }
.step-num {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 600; font-style: italic;
  color: var(--gold);
  line-height: 1; margin-bottom: 10px;
}
.step-title { font-size: .95rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.step-text { font-size: .83rem; color: var(--gray-500); line-height: 1.6; }

/* ── Feature / guarantee grid ─────────────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 2.2rem;
}
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; gap: 10px; } }
.feature-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.section-alt .feature-card { background: var(--stone); }
.feature-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--horizon); color: var(--white);
  display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-title { font-size: .92rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.feature-text { font-size: .82rem; color: var(--gray-500); line-height: 1.6; }

/* ── FAQ accordion ────────────────────────────────────────────────────────── */
.faq-list { max-width: 720px; margin: 2rem auto 0; display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 14px 18px;
  font-size: .88rem; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: color var(--transition);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--horizon); }
.faq-item summary::after {
  content: ''; width: 8px; height: 8px; flex-shrink: 0;
  border-right: 2px solid var(--gray-300);
  border-bottom: 2px solid var(--gray-300);
  transform: rotate(45deg);
  transition: transform var(--transition);
  margin-bottom: 2px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
.faq-answer {
  padding: 0 18px 16px;
  font-size: .84rem; color: var(--gray-500); line-height: 1.65;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer { background: var(--horizon-d); padding: 2.2rem 1.5rem 1.2rem; }
.footer-inner { max-width: var(--container); margin: 0 auto; }
.footer-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600; color: var(--white);
}
.footer-brand-name span { color: var(--gold); }
.footer-tagline {
  font-size: .8rem; color: rgba(255,255,255,.55);
  margin-top: 6px; max-width: 340px; line-height: 1.55;
}
.footer-col-title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: rgba(255,255,255,.45);
  margin-bottom: 10px;
}
.footer-links { display: flex; flex-direction: column; gap: 7px; }
.footer-link {
  font-size: .84rem; font-weight: 500;
  color: rgba(255,255,255,.82); text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover { color: var(--gold); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-top: 1rem;
  font-size: .72rem; color: rgba(255,255,255,.4);
}
.footer-credit { font-size: .66rem; color: rgba(255,255,255,.3); }
.footer-credit a { color: rgba(255,255,255,.45); }

@media (max-width: 640px) {
  .footer-top { flex-direction: column; gap: 1.4rem; }
}

/* ── Responsive nav ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav { padding: 0 .9rem; height: 50px; }
  .nav-logo-mark { width: 26px; height: 26px; }
  .nav-brand-name { font-size: .95rem; }
  .nav-right { gap: .7rem; }
  .nav-link { font-size: .8rem; }
}
