/* =====================================================================
   Forwarding.es - Estilos públicos + componentes base compartidos
   ===================================================================== */
:root {
  --navy: #0B2A5B;
  --navy-2: #0B3D91;
  --blue: #1565C0;
  --blue-light: #E8F1FC;
  --bg: #F1F4F9;
  --ink: #0A0F1A;
  --text: #1B2230;
  --muted: #6B7485;
  --line: #DDE3EC;
  --white: #FFFFFF;
  --accent: #FF7A1A;
  --accent-dark: #E4630A;
  --accent-soft: #FFF1E6;
  --green: #12805C;
  --green-soft: #E3F5EE;
  --red: #C62828;
  --red-soft: #FDECEC;
  --violet: #5E35B1;
  --violet-soft: #EFE9FB;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10, 15, 26, .06), 0 8px 24px rgba(11, 42, 91, .08);
  --shadow-lg: 0 24px 60px rgba(11, 42, 91, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid rgba(255, 122, 26, .55); outline-offset: 2px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-dark); margin-bottom: 10px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font: 600 .98rem/1.2 var(--font); border: 2px solid transparent; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255, 122, 26, .3); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue-light); }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a61f1f; }
.btn-sm { padding: 8px 14px; font-size: .88rem; border-radius: 8px; }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.25rem; color: var(--navy); letter-spacing: -.02em; }
.brand-name span { color: var(--accent); }
.brand-light .brand-name { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-login { color: var(--navy); font-weight: 600; font-size: .95rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang-switch a { padding: 5px 9px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.lang-switch a.active { background: var(--navy); color: #fff; }
.lang-switch a:hover { text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Menú desplegable (Cómo funciona) ---------- */
.has-sub { position: relative; }
.nav-sub-head { display: flex; align-items: center; gap: 2px; }
.nav-sub-toggle { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; transition: transform .2s, color .2s, background .2s; }
.nav-sub-toggle svg { width: 16px; height: 16px; }
.nav-sub-toggle:hover { color: var(--blue); background: var(--blue-light); }
.nav-sub { position: absolute; top: calc(100% + 12px); left: -16px; z-index: 60; min-width: 240px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s linear .18s; }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-sub a { display: block; padding: 9px 12px; border-radius: 8px; font-size: .92rem; color: var(--text); white-space: nowrap; }
.nav-sub a:hover, .nav-sub a:focus-visible { background: var(--bg); color: var(--blue); text-decoration: none; }
.has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub, .has-sub.open .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity .18s, transform .18s, visibility 0s linear 0s; }
.has-sub:hover .nav-sub-toggle, .has-sub.open .nav-sub-toggle { color: var(--blue); }
.has-sub.open .nav-sub-toggle { transform: rotate(180deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 85% -10%, #1f5fc4 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0a1f45 70%); color: #d7e3f7; padding: 90px 0 110px; }
.hero::after { content: ""; position: absolute; inset: auto -10% -2px -10%; height: 80px; background: #fff; clip-path: ellipse(60% 100% at 50% 100%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: 1.17rem; max-width: 600px; color: #c8d6ee; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: .85rem; font-weight: 600; margin-bottom: 22px; }
.hero-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 122, 26, .25); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; list-style: none; padding: 0; margin: 0; font-size: .92rem; max-width: 620px; }
.trust li { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.trust li::before { content: "✓"; display: inline-grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 122, 26, .18); color: var(--accent); font-size: .75rem; font-weight: 800; }
.hero-visual { position: relative; align-self: start; margin-top: 12px; }
.hero-visual svg { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .25)); }
.hero-visual .hv-route { stroke-dasharray: 6 8; animation: hv-dash 1.6s linear infinite; }
.hero-visual .hv-pulse { transform-box: fill-box; transform-origin: center; animation: hv-pulse 2.4s ease-out infinite; }
.hero-visual .hv-pulse:nth-child(2) { animation-delay: .6s; }
.hero-visual .hv-pulse:nth-child(3) { animation-delay: 1.2s; }
.hero-visual .hv-pulse:nth-child(4) { animation-delay: 1.8s; }
@keyframes hv-dash { to { stroke-dashoffset: -28; } }
@keyframes hv-pulse { 0% { transform: scale(.8); opacity: .9; } 100% { transform: scale(3); opacity: 0; } }
.address-card { background: #fff; color: var(--text); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); position: relative; }
.address-card::before { content: ""; position: absolute; top: -14px; right: 26px; width: 64px; height: 28px; background: var(--accent); border-radius: 6px; transform: rotate(6deg); opacity: .9; }
.address-card h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.address-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .95rem; }
.address-card dt { color: var(--muted); }
.address-card dd { margin: 0; font-weight: 600; color: var(--ink); }
.address-card .code { color: var(--accent-dark); }
.address-card small { display: block; margin-top: 16px; color: var(--muted); }
.flags { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.flags span { background: var(--bg); border-radius: 6px; padding: 3px 8px; font-size: .78rem; font-weight: 600; color: var(--navy); }

/* ---------- Páginas interiores ---------- */
.page-hero { background: linear-gradient(160deg, var(--navy) 0%, #0a1f45 100%); color: #c8d6ee; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; }
.page-hero p { font-size: 1.1rem; max-width: 720px; }
.page-hero .muted { color: #9fb2d3; }
.page-hero-sm { padding: 48px 0 40px; }

/* ---------- Pasos y funcionalidades ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--blue-light); color: var(--blue); font-weight: 800; margin-bottom: 16px; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: box-shadow .2s, transform .2s; }
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.feature .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; margin-bottom: 16px; }
.feature .ic svg { width: 24px; height: 24px; }
.feature:nth-child(2n) .ic { background: var(--accent); }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Tarjetas y formularios ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 2px rgba(10, 15, 26, .04); }
.card + .card { margin-top: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field small, .help { color: var(--muted); font-size: .82rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=datetime-local], input[type=time], input[type=month], input[type=week], input[type=url], input[type=search], input[type=file], select, textarea {
  width: 100%; padding: 11px 13px; font: 400 .97rem/1.4 var(--font); color: var(--text); background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21, 101, 192, .12); }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { padding: 9px; background: var(--bg); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--blue); flex: none; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.req::after { content: " *"; color: var(--accent-dark); }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .95rem; border: 1px solid transparent; }
.alert-success { background: var(--green-soft); color: #0b5e43; border-color: #b8e5d3; }
.alert-error { background: var(--red-soft); color: #9b1c1c; border-color: #f5c2c2; }
.alert-info { background: var(--blue-light); color: var(--navy); border-color: #c5dbf5; }
.alert-warning { background: var(--accent-soft); color: #8a3d05; border-color: #ffd3b0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge-blue { background: var(--blue-light); color: var(--blue); }
.badge-orange { background: var(--accent-soft); color: var(--accent-dark); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: #EEF0F4; color: #5a6272; }
.badge-violet { background: var(--violet-soft); color: var(--violet); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; background: #F7F9FC; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ---------- Calculadora ---------- */
.calc-box { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.calc-form { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.calc-result { background: var(--navy); color: #d7e3f7; border-radius: var(--radius); padding: 28px; min-height: 100%; }
.calc-result h3 { color: #fff; }
.calc-empty { display: grid; place-items: center; text-align: center; min-height: 260px; color: #9fb2d3; }
.calc-empty svg { width: 64px; height: 64px; margin-bottom: 12px; opacity: .6; }
.calc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .88rem; margin-bottom: 18px; }
.calc-meta strong { color: #fff; }
.calc-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.calc-plan { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 16px; }
.calc-plan.best { border-color: var(--accent); background: rgba(255, 122, 26, .1); }
.calc-plan h4 { color: #fff; margin: 0 0 8px; font-size: 1rem; }
.calc-plan .total { font-size: 1.6rem; font-weight: 800; color: #fff; line-height: 1.1; }
.calc-plan ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: .8rem; }
.calc-plan li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.calc-disclaimer { font-size: .8rem; color: #9fb2d3; margin: 16px 0 0; }

/* Calculadora con GENEI: lista de agencias con logo y precio por plan */
.calc-options-title { margin: 0 0 10px; font-weight: 600; color: #fff; font-size: .95rem; }
.calc-carriers { display: flex; flex-direction: column; gap: 10px; }
.calc-carrier { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 14px; }
.calc-carrier.best { border-color: var(--accent); background: rgba(255, 122, 26, .1); }
.calc-carrier-head { display: flex; align-items: center; gap: 12px; position: relative; }
.calc-logo { flex: none; width: 88px; height: 52px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 0; overflow: hidden; }
/* El logo ocupa todo el recuadro (sin bordes blancos): los logos de GENEI ya traen su propio fondo de color */
.calc-logo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center; }
.calc-logo-txt { display: none; font-weight: 800; color: var(--navy); font-size: 1rem; letter-spacing: .02em; }
.calc-logo.no-img .calc-logo-txt { display: block; }
.calc-carrier-info { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.calc-carrier-info strong { color: #fff; font-size: 1rem; }
.calc-carrier-info > span { font-size: .82rem; color: #c8d6ee; }
.calc-carrier-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 5px; }
.calc-carrier-tags em { font-style: normal; font-size: .72rem; font-weight: 600; color: #d7e3f7; background: rgba(255, 255, 255, .1); border-radius: 99px; padding: 2px 8px; white-space: nowrap; }
.calc-flag { flex: none; align-self: flex-start; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.calc-carrier-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.calc-carrier-price { background: rgba(0, 0, 0, .15); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; }
.calc-carrier-price span { font-size: .74rem; color: #9fb2d3; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.calc-carrier-price strong { color: #fff; font-size: 1.12rem; font-weight: 800; white-space: nowrap; }
.calc-carrier-price.low strong { color: #ffb47a; }
.calc-carrier-tags em.t-time::before { content: "⏱ "; }
/* Correos Express destacado (nuestro favorito) */
.calc-featured { margin: 0 0 16px; }
.calc-carrier.featured { background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); border: 2px solid #ffd2b0; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
/* Logo de Correos Express: su SVG trae fondo azul propio y se muestra a tamaño completo como el resto */
.calc-logo-cex { background: #002E6D; padding: 0; }
.calc-logo-cex span { font-weight: 800; font-size: .74rem; line-height: 1.1; color: var(--navy); text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.calc-carrier-tags em.t-good { background: rgba(18, 128, 92, .35); color: #dff7ec; }
.calc-carrier-tags em.t-good::before { content: "✓ "; }
.calc-flag.fav { background: #fff; color: var(--accent-dark); }
/* Seguro opcional hasta 2.000 € (bloque comercial de la calculadora) */
.calc-ins { display: flex; gap: 14px; align-items: center; margin: 16px 0 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(120deg, #12805C 0%, #1BA77A 100%); color: #fff; box-shadow: 0 10px 26px rgba(18, 128, 92, .35); position: relative; overflow: hidden; }
.calc-ins::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.calc-ins-ic { flex: none; width: 42px; height: 42px; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .2); color: #fff; }
.calc-ins strong { display: block; font-size: 1.05rem; line-height: 1.25; color: #fff; }
.calc-ins span { display: block; font-size: .85rem; color: #e3f8ef; margin-top: 2px; }
.calc-empty .calc-ins-badge { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 14px; border-radius: 99px; background: rgba(27, 167, 122, .22); border: 1px solid rgba(27, 167, 122, .55); color: #c9f5e2; font-weight: 700; font-size: .88rem; }
.calc-empty .calc-ins-badge svg { width: 18px; height: 18px; margin: 0; opacity: 1; flex: none; }
.calc-all-link { margin-top: 14px; color: var(--navy) !important; }
.calc-all-link:hover { background: var(--blue-light); }
/* Página «Todos los precios» */
.calc-result.calc-all { min-height: 0; }
.all-parcel { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.all-parcel strong { color: #fff; }
/* Estado de carga (botón Calcular, panel de resultados y enlace Ver todos) */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: fw-spin .7s linear infinite; vertical-align: -3px; margin-right: 10px; flex: none; }
.spinner-lg { width: 46px; height: 46px; border-width: 4px; margin: 0 0 14px; color: var(--accent); border-right-color: transparent; }
.btn.is-loading, a.is-loading { pointer-events: none; opacity: .9; }
.btn.is-loading:disabled { opacity: 1; cursor: progress; }
.calc-loading { display: grid; place-items: center; align-content: center; text-align: center; min-height: 260px; color: #d7e3f7; }
.calc-loading p { margin: 0; font-weight: 600; }
@keyframes fw-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: fw-spin 1.6s linear infinite !important; }
}
@media (max-width: 420px) {
  .calc-carrier-prices { grid-template-columns: 1fr; }
  .calc-carrier-price { flex-direction: row; justify-content: space-between; align-items: center; }
  .calc-logo { width: 60px; height: 38px; }
}
/* Resultado de la calculadora en móvil: nada puede salirse de la ventana */
.calc-box > *, .calc-result, .calc-carriers, .calc-carrier, .calc-featured { min-width: 0; max-width: 100%; }
.calc-result { overflow-wrap: anywhere; }
.calc-carrier-price { min-width: 0; }
@media (max-width: 640px) {
  .calc-result { padding: 18px 14px; }
  .calc-result h3 { font-size: 1.05rem; }
  .calc-carrier { padding: 12px; position: relative; }
  .calc-carrier-head { align-items: flex-start; gap: 10px; position: static; }
  .calc-carrier-tags em { white-space: normal; }
  /* Ribbon («Destacado» / «Más barato») sobre el borde superior de la tarjeta para no robar ancho */
  .calc-carrier .calc-flag { position: absolute; top: -10px; right: 10px; z-index: 1; }
  .calc-carrier:has(.calc-flag) { margin-top: 8px; }
  .calc-featured { margin-top: 12px; }
  .calc-carrier-prices { grid-template-columns: 1fr; gap: 6px; }
  .calc-carrier-price { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; }
  .calc-carrier-price strong { font-size: 1.05rem; }
  .calc-logo { width: 64px; height: 40px; }
  .calc-ins { padding: 12px; gap: 10px; }
  .calc-ins-ic { width: 36px; height: 36px; padding: 6px; }
  .calc-result .btn { white-space: normal; text-align: center; }
}

/* ---------- Planes y tarifas ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan-card { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 30px 26px; display: flex; flex-direction: column; position: relative; }
.plan-card.featured { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.plan-flag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 14px; border-radius: 99px; }
.plan-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.plan-card .desc { color: var(--muted); font-size: .92rem; min-height: 44px; }
.price { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; margin: 8px 0 18px; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; font-size: .93rem; }
.plan-card li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.plan-card li span { color: var(--muted); }
.plan-card li strong { color: var(--ink); text-align: right; }
.fees-table td:not(:first-child), .fees-table th:not(:first-child) { text-align: center; }
.fees-table td:first-child { font-weight: 600; }
.notes { font-size: .88rem; color: var(--muted); margin-top: 22px; }
.notes p { margin-bottom: .6em; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--ink); padding: 18px 30px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.4rem; color: var(--accent); font-weight: 600; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }
/* Logos de métodos de pago (FAQ de formas de pago) */
.pay-logos { list-style: none; margin: 0; padding: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.pay-logo { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 9px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.pay-logo img { display: block; height: 20px; width: auto; max-width: 56px; }
.pay-logo-text { font-size: .72rem; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* ---------- Bloques CTA ---------- */
.band { background: linear-gradient(120deg, var(--navy-2), var(--blue)); color: #d7e3f7; border-radius: 22px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.band h2 { color: #fff; margin-bottom: 8px; }
.band p { margin: 0; max-width: 620px; }
.band-dark { background: var(--ink); }
.band-dark h2 span { color: var(--accent); }

/* ---------- Auth / registro ---------- */
.auth-wrap { min-height: calc(100vh - 72px); background: var(--bg); padding: 56px 0; }
.auth-card { max-width: 480px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 36px; box-shadow: var(--shadow); }
.auth-card.wide { max-width: 760px; }
.auth-card h1 { font-size: 1.8rem; }
.auth-foot { text-align: center; margin-top: 20px; font-size: .92rem; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; }
.choice .box { display: block; height: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 22px; transition: border-color .15s, background .15s; }
.choice .box strong { display: block; font-size: 1.1rem; color: var(--ink); margin: 10px 0 4px; }
.choice .box span { color: var(--muted); font-size: .9rem; }
.choice .box svg { width: 34px; height: 34px; color: var(--blue); }
.choice input:checked + .box { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + .box { outline: 3px solid rgba(255, 122, 26, .45); }
.plan-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-pick .box { padding: 16px; text-align: center; }
.plan-pick .box strong { margin-top: 0; }
.plan-pick .box em { display: block; font-style: normal; font-weight: 800; color: var(--navy); font-size: 1.2rem; }
.steps-indicator { display: flex; gap: 8px; margin-bottom: 22px; }
.steps-indicator span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.steps-indicator span.on { background: var(--accent); }

/* ---------- LocalHub landing ---------- */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--line); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-size: .75rem; font-weight: 800; }

/* Hero LocalHub */
.hub-hero { position: relative; overflow: hidden; background: radial-gradient(900px 500px at 90% 0%, rgba(255, 122, 26, .28) 0%, transparent 60%), radial-gradient(1000px 600px at 10% 110%, #1f5fc4 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0a1f45 75%); color: #c8d6ee; padding: 72px 0 84px; }
.hub-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hub-hero h1 { color: #fff; }
.hub-hero h1 span { color: var(--accent); }
.hub-hero .lead { font-size: 1.15rem; max-width: 620px; }
.hub-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 122, 26, .16); border: 1px solid rgba(255, 122, 26, .45); color: #ffd2b0; padding: 6px 14px; border-radius: 99px; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 20px; }
.hub-pill::before { content: "★"; color: var(--accent); }
.hub-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .92rem; }
.hub-ticks li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 6px; }
.hub-login { margin: 18px 0 0; font-size: .9rem; }
.hub-login a { color: #9fc3ff; }
.hub-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hub-stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.hub-stat strong { color: #fff; font-size: 2rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.hub-stat span { font-size: .86rem; line-height: 1.35; }
.hub-stat-main { grid-column: 1 / -1; background: linear-gradient(135deg, var(--accent), #ff9d4d); border: 0; color: #fff; box-shadow: 0 18px 40px rgba(255, 122, 26, .35); padding: 22px 24px; }
.hub-stat-main span { font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: #fff5ec; }
.hub-stat-main strong { font-size: clamp(3rem, 7vw, 4.4rem); }
.hub-stat-main small { color: #fff; font-size: .88rem; }

/* Comparativa */
.hub-compare { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
.hub-bars { display: flex; flex-direction: column; gap: 22px; }
.hub-bar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; }
.hub-bar-label { font-weight: 700; color: var(--muted); font-size: .92rem; }
.hub-bar { height: 44px; background: var(--bg); border-radius: 12px; overflow: hidden; }
.hub-bar i { display: block; height: 100%; background: #b8c2d3; border-radius: 12px; }
.hub-bar-row strong { font-size: 1.25rem; color: var(--muted); min-width: 90px; text-align: right; }
.hub-bar-row.us .hub-bar-label { color: var(--navy); }
.hub-bar-row.us .hub-bar i { background: linear-gradient(90deg, var(--accent), #ffab66); animation: hub-grow 1.2s ease-out; }
.hub-bar-row.us strong { color: var(--accent-dark); font-size: 1.6rem; }
@keyframes hub-grow { from { width: 0; } }
.hub-table-card { padding: 20px; }
.hub-earn-table td { font-size: .95rem; }
.hub-green { color: var(--green); }

/* Beneficios */
.hub-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Simulador */
.hub-sim { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px; box-shadow: var(--shadow); }
.hub-sim-label { display: block; font-weight: 700; margin: 18px 0 10px; color: var(--ink); }
.hub-sim-label strong { color: var(--accent-dark); font-size: 1.4rem; }
.hub-sim input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; cursor: pointer; }
.hub-sim-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.hub-sim-note { color: var(--muted); margin: 14px 0 0; }
.hub-sim-out { background: var(--navy); color: #c8d6ee; border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.hub-sim-out div { display: flex; flex-direction: column; }
.hub-sim-out span { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.hub-sim-out strong { color: #fff; font-size: 1.7rem; font-weight: 800; }
.hub-sim-out .big strong { color: var(--accent); font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.05; }
.hub-sim-out .vs { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 14px; }
.hub-sim-out .vs strong { font-size: 1.1rem; color: #9fb2d3; text-decoration: line-through; }

/* Pioneros y garantías */
.hub-pioneer { flex-direction: column; align-items: stretch; gap: 28px; }
.hub-pioneer > div { max-width: 820px; }
.hub-pioneer .eyebrow { color: var(--accent); }
.hub-pioneer h2 span { color: var(--accent); }
.hub-guarantees { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; }
.hub-guarantees li { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; }
.hub-guarantees strong { color: #fff; }
.hub-guarantees strong::before { content: "✓ "; color: var(--accent); }
.hub-guarantees span { font-size: .88rem; }
.hub-support { margin-top: 32px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--accent-soft); border: 1px solid #ffd3b0; border-radius: 16px; padding: 22px 26px; }
.hub-support > div:first-child { display: flex; flex-direction: column; }
.hub-support strong { color: var(--ink); font-size: 1.1rem; }
.hub-support span { color: #8a3d05; }
.hub-support-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hub-contract-note { margin-top: 22px; }
.hub-mini { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-weight: 600; color: var(--navy); font-size: .95rem; }
.hub-mini li::before { content: "→ "; color: var(--accent); }

/* Formulario por pasos */
.hub-form-card { position: relative; }
.wizard-steps { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wizard-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: .78rem; color: var(--muted); position: relative; }
.wizard-steps li::after { content: ""; position: absolute; top: 16px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 3px; border-radius: 3px; background: var(--line); }
.wizard-steps li:last-child::after { display: none; }
.wizard-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--bg); border: 2px solid var(--line); color: var(--muted); }
.wizard-steps em { font-style: normal; font-weight: 600; }
.wizard-steps li.on span { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-steps li.on em { color: var(--ink); }
.wizard-steps li.done span { background: var(--green); border-color: var(--green); color: #fff; }
.wizard-steps li.done::after { background: var(--green); }
.wizard-step { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.wizard-step legend { font-weight: 800; color: var(--ink); font-size: 1.05rem; margin-bottom: 14px; padding: 0; }
.wizard-step + .wizard-step { margin-top: 26px; }
.is-wizard .wizard-step { display: none; }
.is-wizard .wizard-step.active { display: block; margin-top: 0; animation: wz-in .25s ease-out; }
@keyframes wz-in { from { opacity: 0; transform: translateX(12px); } }
form:not(.is-wizard) [data-wizard-next], form:not(.is-wizard) [data-wizard-prev] { display: none; }
.wizard-actions { justify-content: space-between; }
.wizard-actions [data-wizard-next], .wizard-actions [data-wizard-submit] { margin-left: auto; }
.field-error { border-color: var(--red) !important; box-shadow: 0 0 0 4px rgba(198, 40, 40, .1) !important; }
.size-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; font: 600 .86rem var(--font); color: var(--text); cursor: pointer; }
.chip:hover, .chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.pallet-info { display: flex; gap: 16px; align-items: center; background: var(--bg); border-radius: 12px; padding: 14px 16px; margin-bottom: 6px; }
.pallet-info svg { width: 96px; flex: none; }
.pallet-info div { display: flex; flex-direction: column; font-size: .9rem; }
.pallet-info strong { color: var(--ink); }

/* Ahorro en planes */
.plan-save { background: var(--green-soft); border: 1px solid #b8e5d3; border-radius: 12px; padding: 12px 14px; margin: -6px 0 16px; display: flex; flex-direction: column; gap: 4px; }
.plan-save-head { display: flex; align-items: center; gap: 10px; }
.plan-save-head strong { color: #0b5e43; font-size: .92rem; line-height: 1.3; }
.plan-save small { color: #0b5e43; font-size: .8rem; line-height: 1.35; }
.plan-save-badge { display: inline-block; background: var(--green); color: #fff; font-weight: 800; font-size: .85rem; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.save-pill { display: inline-block; font-style: normal; background: var(--green-soft); color: var(--green); font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; margin-left: 4px; vertical-align: middle; white-space: nowrap; }
.plans-save-note { text-align: center; color: var(--muted); font-size: .85rem; margin: 22px 0 0; }
.fees-table .save-row td { background: #f6fbf9; }
/* Hueco del bloque de ahorro en planes sin ahorro (Free): solo se usa en pricing y en escritorio */
.plan-save-spacer { display: none; }
@media (min-width: 981px) {
  /* Pricing (escritorio): las filas de las tarjetas se comparten (subgrid) para que las tarifas empiecen a la misma altura */
  .plans-align .plan-save-spacer { display: block; margin: -6px 0 16px; }
  .plans-align .plan-card.featured { transform: none; }
  @supports (grid-template-rows: subgrid) {
    .plans-align .plans { row-gap: 0; }
    .plans-align .plan-card { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
  }
  @supports not (grid-template-rows: subgrid) {
    .plans-align .plan-save-spacer { min-height: 64px; }
  }
}

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 32px; align-items: start; }
.info-card { background: var(--bg); border-radius: var(--radius); padding: 26px; }
.info-card p { margin-bottom: .7em; }
.hp { position: absolute !important; left: -9999px !important; }

/* ---------- Legal ---------- */
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.legal-tabs a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--text); }
.legal-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.legal-tabs a:hover { text-decoration: none; }
.prose h2 { font-size: 1.3rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.05rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { margin: 1em 0; }

/* ---------- 404 ---------- */
.e404 { text-align: center; padding: 110px 0; }
.e404 .big { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; color: var(--navy); line-height: 1; letter-spacing: -.05em; }
.e404 .big span { color: var(--accent); }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #a7b0c2; padding: 64px 0 24px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #a7b0c2; }
.site-footer a:hover { color: #fff; }
.footer-brand p { margin-top: 16px; max-width: 360px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid #1f2736; margin-top: 44px; padding-top: 22px; font-size: .85rem; }

/* ---------- Banner cookies ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 18px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .9rem; }
.cookie-banner p { margin: 0; flex: 1 1 320px; }
.cookie-actions { display: flex; gap: 10px; }

/* ---------- Paginación ---------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.pagination a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .9rem; }
.pagination a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination a:hover { text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 16px; }
  .main-nav { gap: 18px; }
}
@media (max-width: 980px) {
  .nav-toggle { display: block; flex: none; }
  /* backdrop-filter crea un bloque contenedor que rompe el position:fixed del menú: se desactiva en móvil */
  .site-header { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .main-nav { position: fixed; top: 72px; left: 0; right: 0; bottom: auto; width: 100%; height: calc(100vh - 72px); height: calc(100dvh - 72px); background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); gap: 18px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s linear .25s; }
  .main-nav::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .nav-open .main-nav { transform: none; visibility: visible; transition: transform .25s ease, visibility 0s linear 0s; }
  .nav-open { overflow: hidden; }
  .nav-links { flex-direction: column; gap: 0; flex: none; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 10px; flex: none; }
  .nav-actions .btn, .nav-login { text-align: center; padding: 11px; }
  .nav-login { border: 1.5px solid var(--line); border-radius: 8px; }
  .lang-switch { align-self: center; }
  .hero-grid, .calc-box, .two-col, .contact-grid, .hub-hero-grid, .hub-compare, .hub-sim { grid-template-columns: 1fr; }
  .hub-benefits { grid-template-columns: repeat(2, 1fr); }
  .hub-sim { padding: 28px; }
  .hero { padding: 64px 0 96px; }
  .hero-visual { margin-top: 0; }
  .hero-visual svg { max-width: 440px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features, .benefits { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .plan-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .steps, .features, .benefits, .form-grid, .form-grid.cols-3, .form-grid.cols-4, .choice-grid, .plan-pick, .calc-plans, .hub-benefits { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .footer-grid .footer-brand, .footer-grid .footer-legal { grid-column: 1 / -1; }
  .footer-brand p { max-width: none; }
  .footer-legal h3 { display: none; }
  .footer-legal ul { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; font-size: clamp(.62rem, 2.8vw, .8rem); white-space: nowrap; }
  .footer-legal li { margin: 0; display: flex; align-items: center; }
  .footer-legal li + li::before { content: "·"; margin: 0 .45em; color: #a7b0c2; }
  .hub-hero { padding: 52px 0 60px; }
  .hub-stat strong { font-size: 1.6rem; }
  .hub-bar-row { grid-template-columns: 1fr auto; }
  .hub-bar-row .hub-bar { grid-column: 1 / -1; grid-row: 2; }
  .hub-sim { padding: 22px; }
  .wizard-steps em { font-size: .7rem; }
  .wizard-actions .btn { flex: 1; }
  .pallet-info { flex-direction: column; align-items: flex-start; }
  .band { padding: 32px 24px; }
  .auth-card { padding: 26px 20px; border-radius: 14px; }
  .hero-ctas .btn { width: 100%; }
  .trust { grid-template-columns: 1fr; }
  .calc-form, .calc-result, .card { padding: 20px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; }
}
/* Menú desplegable en móvil: sublista dentro del panel, se abre con la flecha */
@media (max-width: 980px) {
  .nav-sub-head { border-bottom: 1px solid var(--line); }
  .nav-sub-head a { flex: 1; border-bottom: 0 !important; }
  .nav-sub-toggle { width: 44px; height: 44px; }
  .nav-sub-toggle svg { width: 20px; height: 20px; }
  .nav-sub { position: static; min-width: 0; padding: 4px 0 8px 14px; border: 0; border-left: 2px solid var(--accent-soft); border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; margin: 6px 0 4px 4px; }
  .nav-sub::before { display: none; }
  .has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub { display: none; }
  .has-sub.open .nav-sub { display: block; }
  .nav-links .nav-sub a { padding: 9px 10px; border-bottom: 0; font-size: .97rem; color: var(--muted); white-space: normal; }
  .nav-links .nav-sub a:hover { color: var(--blue); }
}
/* ---------------------------------------------------------------- Re-consolidación (portada) */
.recons-flow { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: stretch; gap: 0; margin-top: 8px; }
.recons-step { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.recons-step h3 { margin: 14px 0 6px; }
.recons-step p { margin: 0; color: var(--muted); font-size: .95rem; }
.recons-step-final { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.recons-link { position: relative; }
.recons-link::before { content: ''; position: absolute; top: 50%; left: 4px; right: 4px; border-top: 2px dashed var(--accent); }
.recons-visual { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 56px; padding: 10px; border-radius: var(--radius-sm); background: var(--bg); }
.recons-visual .rbox { display: inline-grid; place-items: center; min-width: 38px; height: 34px; padding: 0 8px; border-radius: 7px; background: #FFB27A; color: #7a2e00; font-weight: 800; font-size: .85rem; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); }
.recons-visual .rbox-big { background: var(--accent); color: #fff; min-width: 54px; height: 40px; }
.recons-visual .rbox-new { background: var(--blue-light); color: var(--blue); border: 2px dashed var(--blue); box-shadow: none; }
.recons-visual .rbox-final { background: var(--navy); color: #fff; min-width: 70px; height: 46px; }
.recons-visual .rplus, .recons-visual .rarrow { font-weight: 800; color: var(--muted); }
.recons-visual .rarrow { color: var(--accent); font-size: 1.2rem; }
.recons-points { list-style: none; margin: 28px auto 0; padding: 0; max-width: 920px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.recons-points li { display: flex; gap: 10px; align-items: flex-start; }
.recons-points svg { flex: none; width: 22px; height: 22px; margin-top: 2px; padding: 3px; border-radius: 50%; background: var(--green-soft); color: var(--green); }
@media (max-width: 900px) {
  .recons-flow { grid-template-columns: 1fr; gap: 0; }
  .recons-link { height: 26px; }
  .recons-link::before { top: 4px; bottom: 4px; left: 50%; right: auto; border-top: 0; border-left: 2px dashed var(--accent); }
  .recons-points { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cookie-banner, .no-print { display: none !important; }
}

/* ---------------------------------------------------------------- Landing pages LocalHub por ciudad */
.lh-crumbs { font-size: .85rem; margin: 0 0 22px; }
.lh-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.lh-crumbs li { display: inline-flex; align-items: center; gap: 8px; color: #9fb2d3; }
.lh-crumbs li + li::before { content: "›"; color: #6f84a8; }
.lh-crumbs a { color: #c8d6ee; }
.lh-crumbs a:hover { color: #fff; }
.lh-crumbs [aria-current] { color: #fff; font-weight: 600; }
.lh-prose { max-width: 820px; margin: 0 auto; font-size: 1.05rem; }
.lh-prose p { color: var(--text); }
.lh-prose .lh-perfil { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 16px 20px; border-radius: 0 12px 12px 0; color: #5a2a05; }
.lh-tags { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lh-tags li { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; font-weight: 600; font-size: .92rem; color: var(--navy); }
.lh-tags li::before { content: "✓ "; color: var(--accent); font-weight: 800; }
.lh-local { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.lh-local-card { background: var(--navy); color: #c8d6ee; border-radius: 18px; padding: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px; }
.lh-local-card h3 { color: #fff; margin: 0; }
.lh-local-card .lh-cp { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 800; color: var(--accent); line-height: 1.05; letter-spacing: -.02em; }
.lh-local-card small { color: #9fb2d3; margin-top: 10px; }
.lh-towns { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lh-towns li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; padding: 4px 12px; font-size: .85rem; color: #fff; }
.lh-towns li:first-child { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.lh-city-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lh-city-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; color: var(--navy); font-weight: 700; font-size: .95rem; line-height: 1.3; transition: border-color .15s, box-shadow .15s, transform .15s; }
.lh-city-links a::after { content: "→"; color: var(--accent); flex: none; }
.lh-city-links a:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.lh-city-links small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.lh-region + .lh-region { margin-top: 40px; }
.lh-region h2 { font-size: 1.35rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-bottom: 10px; border-bottom: 2px solid var(--accent-soft); }
.lh-region h2 small { font-size: .82rem; color: var(--muted); font-weight: 600; }
.lh-more { text-align: center; margin: 28px 0 0; font-weight: 700; }
.lh-hook-links { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.lh-points { margin-top: 36px; }
@media (max-width: 980px) {
  .lh-local { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lh-city-links { grid-template-columns: 1fr 1fr; }
  .lh-hook-links { grid-template-columns: 1fr; }
  .lh-local-card { padding: 22px; }
}
@media (max-width: 400px) {
  .lh-city-links { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Páginas de servicios (templates/service_page.php) */
.svc-hero .svc-eyebrow { color: #ffb47a; }
.svc-hero .hero-ctas { margin: 26px 0 0; }
.svc-prose h2 { margin-bottom: .8em; }
.svc-prose a { font-weight: 600; }
.svc-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-cards a { display: flex; flex-direction: column; gap: 8px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; color: var(--text); transition: box-shadow .2s, transform .2s, border-color .2s; }
.svc-cards a:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }
.svc-cards .ic { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; margin-bottom: 8px; }
.svc-cards li:nth-child(2n) .ic { background: var(--accent); }
.svc-cards .ic svg { width: 24px; height: 24px; }
.svc-cards strong { color: var(--ink); font-size: 1.15rem; }
.svc-cards span:not(.ic) { color: var(--muted); font-size: .95rem; flex: 1; }
.svc-cards em { font-style: normal; font-weight: 700; color: var(--blue); font-size: .92rem; }
.svc-related { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
/* Logo de marca (p. ej. Amazon en la página de Amazon FBA): recuadro blanco legible sobre fondos oscuros */
.svc-hero-tag { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 10px; }
.svc-hero-tag .eyebrow { margin-bottom: 0; }
.svc-brand-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 12px; padding: 6px 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.svc-brand-logo img { display: block; height: 34px; width: auto; max-width: 100%; }
.svc-cards li .ic.ic-logo { width: 96px; height: 48px; background: #fff; border: 1px solid var(--line); padding: 0 10px; }
.svc-cards li .ic.ic-logo img { display: block; width: 100%; height: auto; max-height: 34px; object-fit: contain; }
.svc-related-logo { display: block; height: 22px; width: auto; margin: 0 0 6px; }
@media (max-width: 640px) {
  .svc-brand-logo img { height: 28px; }
}
@media (max-width: 980px) {
  .svc-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .svc-cards, .svc-related { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Bloque «Más de 20 couriers» (templates/couriers.php) */
.couriers-inline { margin-top: 64px; padding-top: 56px; border-top: 1px solid var(--line); }
/* Recuadros del mismo tamaño, centrados (la última fila incompleta también queda centrada) */
.courier-logos { list-style: none; margin: 0 auto; padding: 0; max-width: 1080px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.courier-tile { flex: 0 0 170px; display: flex; align-items: center; justify-content: center; height: 90px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.courier-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
/* El logo cubre todo el recuadro (sin márgenes interiores) */
.courier-tile img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; object-position: center; }
.courier-more { text-align: center; color: var(--muted); font-size: .92rem; margin: 16px 0 0; }
@media (max-width: 640px) {
  .couriers-inline { margin-top: 44px; padding-top: 40px; }
  .courier-logos { gap: 10px; }
  .courier-tile { flex-basis: calc((100% - 20px) / 3); height: 70px; padding: 0; }
}
@media (max-width: 380px) {
  .courier-tile { flex-basis: calc((100% - 10px) / 2); }
}

/* Botón descargar dossier LocalHub */
.btn-dl { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .55); display: inline-flex; align-items: center; gap: 9px; }
.btn-dl:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-dl .btn-dl-i { flex: none; }
.band-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 640px) { .band-ctas { width: 100%; } .band-ctas .btn { width: 100%; justify-content: center; } .hero-ctas .btn-dl { justify-content: center; } }

/* Fix móvil LocalHub: la tabla/barras ensanchaban la página (los hijos del grid no podían encogerse) */
.hub-compare > *, .hub-hero-grid > *, .hub-sim > * { min-width: 0; }
.hub-table-card { max-width: 100%; overflow: hidden; }
@media (max-width: 980px) {
  .hero-grid, .calc-box, .two-col, .contact-grid, .hub-hero-grid, .hub-compare, .hub-sim { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .hub-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .hub-bar-row strong { min-width: 0; font-size: 1.1rem; }
  .hub-bar-row.us strong { font-size: 1.25rem; }
  .hub-bar { height: 36px; }
  .hub-table-card { padding: 14px; }
  .hub-earn-table { width: 100%; table-layout: fixed; }
  .hub-earn-table th { font-size: .6rem; padding: 10px 4px; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; }
  .hub-earn-table td { font-size: .74rem; padding: 10px 4px; white-space: normal; overflow-wrap: anywhere; }
  .hub-earn-table th:first-child, .hub-earn-table td:first-child { width: 22%; }
}

/* ===== Artículos prohibidos (prohibited-items.php) ===== */
.pi-hero { position: relative; overflow: hidden; }
.pi-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(198, 40, 40, .28), transparent 65%); pointer-events: none; }
.pi-hero-grid { display: flex; align-items: center; justify-content: space-between; gap: 32px; position: relative; z-index: 1; }
.pi-badge { flex: none; width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center; background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .18); color: #ff8a80; position: relative; }
.pi-badge svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); opacity: .5; }
.pi-badge strong { font-size: 3rem; line-height: 1; color: #fff; font-weight: 800; position: relative; }
.pi-badge span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: #c8d6ee; position: relative; }
.pi-notice-wrap { padding-bottom: 0; }
.pi-notice { display: flex; align-items: center; gap: 20px; padding: 22px 26px; border-radius: var(--radius); background: var(--red-soft); border: 1px solid #f3c1c1; border-left: 6px solid var(--red); box-shadow: var(--shadow); }
.pi-notice-ic { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--red); color: #fff; }
.pi-notice-ic svg { width: 28px; height: 28px; }
.pi-notice h2 { font-size: 1.15rem; margin: 0 0 2px; color: var(--red); }
.pi-notice p { margin: 0; font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.pi-notice-end { margin-top: 40px; }
.pi-search { position: relative; max-width: 560px; margin: 0 auto 32px; }
.pi-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pi-search input { width: 100%; padding: 14px 16px 14px 46px; font: inherit; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); box-shadow: var(--shadow); }
.pi-search input:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.pi-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pi-card { display: flex; gap: 16px; align-items: flex-start; padding: 22px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); transition: box-shadow .2s, transform .2s; }
.pi-card[hidden] { display: none; }
.pi-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.pi-ic { position: relative; flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); }
.pi-ic svg { width: 26px; height: 26px; }
.pi-x { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.pi-x::before, .pi-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 2px; background: #fff; border-radius: 2px; transform: translate(-50%, -50%) rotate(45deg); }
.pi-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.pi-body { min-width: 0; }
.pi-num { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--red); opacity: .7; }
.pi-body h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.3; color: var(--ink); }
.pi-body p { margin: 0; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.pi-empty { text-align: center; color: var(--muted); margin-top: 24px; }
@media (max-width: 960px) {
  .pi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pi-hero-grid { flex-direction: column; align-items: flex-start; }
  .pi-badge { width: 120px; height: 120px; }
  .pi-badge strong { font-size: 2.2rem; }
  .pi-grid { grid-template-columns: 1fr; }
  .pi-notice { flex-direction: column; align-items: flex-start; padding: 20px; }
}

/* Artículos sin indemnización */
.pi-card-warn { border-top-color: var(--accent); }
.pi-card-warn .pi-ic { background: var(--accent-soft); color: var(--accent-dark); }
.pi-card-warn .pi-x { background: var(--accent); }
.pi-card-warn .pi-num { color: var(--accent-dark); }
.pi-carrier { display: flex; align-items: center; gap: 14px; margin: 28px 0 0; padding: 16px 20px; border-radius: var(--radius); background: #fff; border: 1px dashed var(--accent); color: var(--ink); font-weight: 600; }
.pi-carrier-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: #fff; }
.pi-carrier-ic svg { width: 22px; height: 22px; }
.pi-warn-section .pi-notice-end { margin-top: 28px; }

/* Tiendas online de ejemplo (shops.php) */
.shop-grid { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.shop-card { display: flex; flex-direction: column; align-items: center; gap: 10px; height: 100%; padding: 22px 12px 18px; text-align: center; text-decoration: none; background: #fff; border: 1px solid #e5e9f2; border-radius: var(--radius); color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.shop-card:hover, .shop-card:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(11, 42, 91, .12); border-color: var(--accent); }
.shop-logo { width: 72px; height: 72px; display: grid; place-items: center; }
.shop-logo img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; }
.shop-initial { display: none; width: 64px; height: 64px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-size: 1.6rem; font-weight: 800; }
.shop-card strong { font-size: 1rem; line-height: 1.3; }
.shop-card em { font-style: normal; font-size: .82rem; color: var(--muted); }
.shop-card:hover em { color: var(--accent-dark); }
.shop-note { margin: 24px 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
@media (max-width: 960px) { .shop-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
