/* =========================================================
   COMPONENTS.CSS — SegurosconLiza.com
   Componentes reutilizables en todas las páginas:
   nav, footer, botones, formularios, badges, modal, wa-float
   ========================================================= */

/* ── SKIP LINK (accesibilidad) ── */
.skip-link {
  position: absolute; top: -100%; left: 0; z-index: 9999;
  background: var(--primary); color: #fff;
  padding: 12px 20px; font-size: 14px; font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
  transition: top .15s;
}
.skip-link:focus { top: 0; outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── UTILIDADES GLOBALES ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.section-tag {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 14px;
  border-radius: 20px; margin-bottom: 16px;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15; color: var(--dark);
}
.section-title em { color: var(--primary); font-style: italic; }
.section-sub {
  font-size: 17px; color: var(--muted);
  margin: 12px auto 0; max-width: 560px;
}

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px;
  padding: 14px 28px; border-radius: var(--radius);
  cursor: pointer; border: none; transition: all .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 12px rgba(13,110,138,.30);
}
.btn-primary:hover { background: var(--primary-dk); transform: translateY(-1px); }
.btn-accent {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 12px rgba(212,113,74,.30);
}
.btn-accent:hover { background: var(--accent-dk); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--secondary); }
.btn-ghost {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-lg { padding: 17px 36px; font-size: 16px; }
.btn-block,
.btn-full  { width: 100%; justify-content: center; }
.btn-outline-white {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline-white:hover { background: rgba(255,255,255,.15); }

/* ── NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13,110,138,.08);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-arc {
  width: 36px; height: 36px;
  border: 3px solid var(--primary);
  border-bottom-color: transparent;
  border-radius: 50%; transform: rotate(-45deg);
}
.nav-logo-text .logo-name {
  font-family: var(--serif); font-size: 17px; color: var(--primary);
  line-height: 1;
}
.nav-logo-text .logo-sub {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); line-height: 1;
}
.nav-links {
  display: flex; gap: 28px;
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-phone {
  font-size: 14px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px; transition: all .2s;
}

/* ── LEAD FORM ── */
.lead-form-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-lg);
}
.lead-form-title {
  font-family: var(--serif); font-size: 22px;
  color: var(--dark); margin-bottom: 4px;
}
.lead-form-sub {
  font-size: 14px; color: var(--muted); margin-bottom: 24px;
}
.form-field {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
}
.form-field label {
  font-size: 13px; font-weight: 600; color: var(--dark);
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px; color: var(--dark);
  background: var(--light);
  transition: border-color .2s;
  width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none; border-color: var(--primary);
}
.form-field select { cursor: pointer; }
.form-error {
  color: #DC2626; font-size: 13px;
  margin-top: 8px; display: none;
}
.form-footer {
  text-align: center; font-size: 12px;
  color: var(--muted); margin-top: 12px;
}
.form-footer a { color: var(--primary); font-weight: 600; }
.form-success {
  text-align: center; padding: 16px 0;
}
.form-success-icon {
  width: 52px; height: 52px;
  background: #DCFCE7; color: #16A34A;
  border-radius: 50%; font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.form-success-title {
  font-weight: 700; font-size: 17px; color: var(--dark);
  margin-bottom: 6px;
}
.form-success-sub { font-size: 14px; color: var(--muted); }
.form-success-sub a { color: var(--primary); font-weight: 600; }
.btn:disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

/* ── WHATSAPP FLOTANTE ── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 58px; height: 58px; background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.1); }

@keyframes wa-bounce-in {
  0%   { transform: scale(0) translateY(20px); opacity: 0; }
  60%  { transform: scale(1.15) translateY(0); }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.wa-float { animation: wa-bounce-in .5s cubic-bezier(.175,.885,.32,1.275) 2s both; }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.wa-float-label {
  position: absolute; right: 68px;
  background: var(--dark); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  padding: 6px 12px; border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s; transform: translateY(-50%); top: 50%;
}
.wa-float:hover .wa-float-label { opacity: 1; }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,.7);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-logo .logo-name { font-family: var(--serif); font-size: 18px; color: #fff; }
.footer-logo .logo-sub  { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.footer-desc { font-size: 14px; line-height: 1.7; opacity: .65; margin-top: 16px; }
.footer-legal { font-size: 11px; opacity: .35; margin-top: 10px; line-height: 1.6; }
.footer-col h4 {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.9); margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col li a { font-size: 14px; color: rgba(255,255,255,.72); transition: color .2s; }
.footer-col li a:hover { color: #7FDBFF; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; opacity: .45; flex-wrap: wrap; gap: 8px;
}

/* ── FOOTER SIMPLE (viaje, expats) ── */
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-arc {
  width: 30px; height: 30px;
  border: 2.5px solid rgba(255,255,255,.5);
  border-bottom-color: transparent;
  border-radius: 50%; transform: rotate(-45deg);
}
.footer-links {
  display: flex; gap: 20px; flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px; color: rgba(255,255,255,.65); transition: color .2s;
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  font-size: 12px; color: rgba(255,255,255,.45);
  width: 100%; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.footer-copy a { color: rgba(255,255,255,.65); }

/* ── TRUST BAR ── */
.trust-bar { background: var(--secondary); padding: 40px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.trust-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
  box-shadow: var(--shadow-card);
}
.trust-num {
  font-family: var(--mono); font-size: 40px; font-weight: 500;
  color: var(--primary); display: block; line-height: 1;
}
.trust-desc { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.4; }

/* ── RESPONSIVE NAV ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-phone { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px; box-shadow: var(--shadow);
  }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 500px) {
  .nav-actions .btn { display: none; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .trust-grid  { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-lg { padding: 15px 24px; font-size: 15px; }
}

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 998;
  background: var(--dark); color: rgba(255,255,255,.88);
  transform: translateY(100%); transition: transform .3s ease;
}
.cookie-banner--visible { transform: translateY(0); }
.cookie-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 14px 24px;
}
.cookie-inner p { font-size: 14px; margin: 0; }
.cookie-inner a { color: #7FDBFF; text-decoration: underline; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) {
  .cookie-inner { flex-direction: column; align-items: flex-start; padding: 16px 20px 20px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}

/* ── BACK TO TOP ── */
.back-top {
  position: fixed; bottom: 100px; right: 28px; z-index: 997;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--white); color: var(--primary);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s, background .15s, color .15s;
  transform: translateY(10px);
}
.back-top--visible {
  opacity: 1; pointer-events: auto; transform: translateY(0);
}
.back-top:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
  transform: translateY(-3px);
}
.back-top:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 3px;
}

/* ── BTN-SOFT (botón neutro/secundario) ── */
.btn-soft {
  background: var(--secondary); color: var(--muted);
  border: none; font-weight: 500;
}
.btn-soft:hover { background: var(--border); color: var(--dark); }
