/* ============================================================
   Components - buttons, header, nav, footer, cards, badges
   ============================================================ */

/* =============== Buttons =============== */
.btn {
  --btn-bg: var(--c-navy-800);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px;
  padding: var(--s-3) var(--s-6);
  font-family: var(--font-head);
  font-size: var(--fs-sm); font-weight: 700; line-height: 1.2;
  letter-spacing: .01em;
  text-align: center; text-decoration: none;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 2px solid var(--btn-bd);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }

/* Acción principal: naranja del logotipo con texto casi negro.
   #10161D sobre #FF620B = 6.07:1. El blanco daría 3.00:1 y no cumple. */
.btn--primary { --btn-bg: var(--c-orange-500); --btn-fg: var(--on-orange); }
.btn--primary:hover { --btn-bg: var(--c-orange-600); --btn-fg: var(--on-orange); }

/* Secondary - navy on white text = 8.84:1 */
.btn--secondary { --btn-bg: var(--c-navy-800); }
.btn--secondary:hover { --btn-bg: var(--c-navy-900); }

.btn--outline {
  --btn-bg: transparent; --btn-fg: var(--c-navy-800); --btn-bd: var(--c-navy-300);
}
.btn--outline:hover { --btn-bg: var(--c-navy-50); --btn-bd: var(--c-navy-800); --btn-fg: var(--c-navy-900); }

.btn--ghost-light {
  --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255,255,255,.5);
}
.btn--ghost-light:hover { --btn-bg: rgba(255,255,255,.12); --btn-bd: #fff; --btn-fg: #fff; }

.btn--lg { min-height: 54px; padding: var(--s-4) var(--s-8); font-size: var(--fs-body); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 420px) { .btn-row .btn { width: 100%; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
  color: var(--c-navy-800); text-decoration: none;
}
.link-arrow::after { content: "\2192"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover { color: var(--c-orange-700); text-decoration: underline; }
.link-arrow:hover::after { transform: translateX(3px); }

/* =============== Header =============== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.header__bar {
  display: flex; align-items: center; gap: var(--s-6);
  height: var(--header-h);
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: clamp(34px, 3.4vw, 44px); width: auto; }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.nav__list li { margin: 0; }
.nav__link {
  display: block; padding: var(--s-3);
  font-family: var(--font-head); font-size: var(--fs-sm); font-weight: 600;
  color: var(--c-navy-900); text-decoration: none; border-radius: var(--r-sm);
  white-space: nowrap;
}
.nav__link:hover { background: var(--c-navy-50); color: var(--c-navy-800); }
.nav__link[aria-current="page"] { color: var(--c-orange-700); }
.nav__link[aria-current="page"]::after {
  content: ""; display: block; height: 3px; border-radius: 2px;
  background: var(--c-orange-500); margin-top: 4px;
}

.header__actions { display: flex; align-items: center; gap: var(--s-4); flex: none; }
.header__phone {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
  color: var(--c-navy-900); text-decoration: none; white-space: nowrap;
}
.header__phone:hover { color: var(--c-orange-700); }
.header__phone svg { width: 17px; height: 17px; color: var(--c-orange-500); flex: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; min-width: 48px; padding: 0 var(--s-3);
  background: transparent; border: 2px solid var(--c-line-strong);
  border-radius: var(--r-md); cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
  color: var(--c-navy-900);
}
.nav-toggle__bars { position: relative; width: 20px; height: 14px; flex: none; }
.nav-toggle__bars span {
  position: absolute; left: 0; width: 100%; height: 2.5px; border-radius: 2px;
  background: var(--c-navy-900);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 5.75px; }
.nav-toggle__bars span:nth-child(3) { top: 11.5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.75px) rotate(-45deg); }

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .header__actions { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    margin: 0; background: #fff;
    border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: var(--s-4) var(--gutter) var(--s-8);
  }
  .nav[hidden] { display: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link {
    padding: var(--s-4) var(--s-2); font-size: var(--fs-lead);
    border-bottom: 1px solid var(--c-line); border-radius: 0;
  }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__link[aria-current="page"] { border-left: 4px solid var(--c-orange-500); padding-left: var(--s-4); }
  .nav__mobile-actions { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-6); }
}
@media (min-width: 1041px) {
  .nav__mobile-actions { display: none; }
  .nav[hidden] { display: block !important; }
}


/* =============== Cards =============== */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card--link:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--c-navy-200); }
.card h3 { margin-bottom: var(--s-2); }
.card p { font-size: var(--fs-sm); color: var(--text-base); }
.card__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: var(--s-5);
  border-radius: var(--r-md);
  background: var(--c-orange-50); color: var(--c-orange-500);
  font-family: var(--font-head); font-size: 1.3rem; font-weight: 800;
  flex: none;
}
.card__icon svg { width: 24px; height: 24px; }
.card--on-navy {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.16);
  box-shadow: none;
}
.card--on-navy p { color: var(--text-on-dark-subtle); }
.card--on-navy .card__icon { background: rgba(196,224,78,.15); color: var(--c-lime-500); }

.badge {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-head); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-pill);
  background: var(--c-lime-500); color: var(--c-navy-950);
}
.badge--outline { background: transparent; color: var(--c-navy-800); border: 1.5px solid var(--c-navy-200); }

/* Fact strip */
.facts { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.facts li {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin: 0; padding: var(--s-2) var(--s-4);
  font-family: var(--font-head); font-size: var(--fs-sm); font-weight: 700;
  color: var(--c-navy-900); background: var(--c-white);
  border: 1px solid var(--c-line); border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
}
.facts li::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-orange-500); flex: none;
}

/* =============== Footer =============== */
.footer { position: relative; color: var(--text-on-dark-subtle); }

/* Transición orgánica en los colores de marca. */
.footer__edge {
  height: clamp(40px, 6vw, 72px);
  background: var(--surface-dark);
  clip-path: ellipse(120% 100% at 50% 100%);
  margin-bottom: -1px;
}
.footer__edge::after {
  content: ""; display: block; height: 100%;
  background: linear-gradient(90deg, var(--c-orange-500) 0 38%, var(--c-lime-500) 38% 68%, transparent 68%);
  opacity: .9;
  clip-path: polygon(0 0, 100% 0, 100% 6px, 0 6px);
}

.footer__body {
  position: relative; overflow: hidden;
  background: var(--surface-dark);
  padding-block: var(--s-12) var(--s-8);
}

/* Marca de agua del león, muy tenue. */
.footer__watermark {
  position: absolute; right: -6%; bottom: -34%;
  width: min(52%, 620px); height: auto;
  opacity: .05; pointer-events: none;
  filter: grayscale(1) brightness(3);
}

.footer h2, .footer h3 { color: #fff; }
.footer a { color: var(--text-on-dark-subtle); text-decoration: none; }
.footer a:hover { color: var(--c-lime-500); text-decoration: underline; }

.footer__grid { display: grid; gap: var(--s-10); position: relative; }
@media (min-width: 700px)  { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .footer__grid { grid-template-columns: 1.7fr 1fr 1.1fr 1.2fr; gap: var(--s-8); } }

.footer__logo { width: min(230px, 70%); height: auto; margin-bottom: var(--s-5); }
.footer__blurb { font-size: var(--fs-sm); max-width: 36ch; margin-bottom: var(--s-5); }
.footer__flag {
  display: inline-flex; align-items: center; gap: var(--s-2);
  margin: 0; padding: var(--s-2) var(--s-4);
  border-radius: var(--r-pill);
  background: var(--c-lime-500); color: var(--c-navy-950);
  font-family: var(--font-head); font-weight: 800; font-size: var(--fs-xs);
}
.footer__flag svg { width: 16px; height: 16px; flex: none; }

.footer__title {
  font-family: var(--font-head); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: var(--c-lime-500); margin: 0 0 var(--s-5);
}
.footer__list { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.footer__list li { margin: 0 0 var(--s-3); }
.footer__contact { list-style: none; margin: 0 0 var(--s-6); padding: 0; font-size: var(--fs-sm); }
.footer__contact li { display: flex; gap: var(--s-3); margin: 0 0 var(--s-4); }
.footer__contact svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--c-orange-500); }

.social { display: flex; flex-wrap: wrap; gap: var(--s-3); list-style: none; margin: 0; padding: 0; }
.social li { margin: 0; }
.social__link {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-pill);
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
}
.social__link svg { width: 19px; height: 19px; flex: none; }
.social__link:hover {
  background: var(--c-orange-500); border-color: var(--c-orange-500);
  color: var(--on-orange); text-decoration: none;
}

.footer__bottom {
  position: relative;
  margin-top: var(--s-12); padding-top: var(--s-6);
  border-top: 1px solid rgba(255, 255, 255, .16);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6);
  justify-content: space-between; align-items: center;
  font-size: var(--fs-xs);
}
.footer__copy { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: var(--s-4); list-style: none; margin: 0; padding: 0; }
.footer__legal li { margin: 0; }
