/* =========================================================
   MAD Mobile — Landing "MÁS CERCA DE LO QUE TE IMPORTA"
   (versión 2 del mockup, fondo blanco). Colores muestreados del mockup
   (mad-mobile-v3/assets/reference-mockup.jpg). Mobile-first: <640, 640+, 1024+.
   ========================================================= */
/* ---------- Tipografías servidas desde la propia web (sin Google Fonts: más rápido y sin enviar la IP a Google) ---------- */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("assets/fonts/roboto-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("assets/fonts/roboto-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* While Roboto loads: Arial resized to Roboto's exact measurements, so nothing moves when the font arrives */
@font-face { font-family: 'Roboto Fallback'; src: local('Arial'); size-adjust: 100.3%; ascent-override: 92.77%; descent-override: 24.41%; line-gap-override: 0%; }
@font-face { font-family: 'Permanent Marker'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/permanent-marker-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }


:root {
  --navy: #0d3350;
  --navy-deep: #0b4163;
  --nav-text: #173a5c;
  --lead: #1e3f5d;
  --sky: #3d8fc4;
  --sky-icon: #2f93d6;
  --sky-text: #3b7db5;
  --line: #e3e8ee;
  --soft: #eef3f7;
  --card: #fbfcfd;
  --yellow: #fecf2b;
  --yellow-hover: #f5c400;
  --ink: #0b1622;
  --ink-soft: #3b4753;
  --muted: #5b6b77;

  --font: 'Roboto', 'Roboto Fallback', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
/* no global scroll-behavior: smooth (Edge could leave a newly opened page halfway); script.js animates
   only the jumps inside the same page (Ver tarifas, Comprobar cobertura…) */
main [id] { scroll-margin-top: 90px; }
body { margin: 0; font-family: var(--font); background: #fff; color: var(--navy); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
svg { display: block; }
h1, h2, h3 { margin: 0; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--yellow); color: var(--ink); padding: 10px 16px; font-weight: 700;
}
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 32px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1.2 var(--font); white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-hover); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--soft); }
.btn-sm { padding: 12px 22px; border-radius: 10px; font-size: .95rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid transparent; transition: box-shadow .2s ease, border-color .2s ease; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(13,51,80,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo img { height: 40px; width: auto; }

.menu-toggle { display: flex; padding: 6px; color: var(--navy); }

.main-nav {
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; padding: 24px;
  display: flex; flex-direction: column; gap: 28px;
  transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
}
.main-nav.is-open { transform: translateX(0); }
.main-nav ul { display: flex; flex-direction: column; }
.main-nav ul a { display: block; padding: 14px 0; font-weight: 500; font-size: 1.05rem; color: var(--nav-text); border-bottom: 1px solid var(--line); }
.nav-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.account-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--nav-text); }
.account-link svg { color: var(--navy); }

/* ---------- Hero ---------- */
.hero { background: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 28px; padding-top: 40px; padding-bottom: 20px; }

.hero-h1 { margin: 0; font-weight: inherit; }
.eyebrow { display: block; margin: 0 0 14px; font-weight: 700; font-size: .92rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sky); }
.hero-title { display: block; font-size: clamp(2.3rem, 9vw, 3.9rem); line-height: 1.12; font-weight: 700; letter-spacing: -.5px; color: var(--navy); }
.hero-stroke { width: 150px; height: 16px; margin: 16px 0 26px 4px; color: var(--yellow); overflow: visible; }
.hero-lead { margin: 0 0 32px; font-size: 1.12rem; line-height: 1.6; color: var(--lead); }
.hero-lead strong { font-weight: 500; color: var(--navy); }
.hero-lead br { display: none; } /* the mockup's line breaks only fit from tablet up */
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-media { position: relative; justify-self: center; width: min(100%, 560px); container-type: inline-size; }
.hero-clip { position: absolute; }
.hero-photo {
  width: 100%; height: auto; clip-path: url(#heroBlob);
  /* soft fade from the white page into the left side of the photo */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 9%, #000 30%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.35) 9%, #000 30%);
}
/* Doodles of the mockup, drawn on top of the photo (positions in % of the photo) */
/* same place and size as in the mockup (% of the photo) */
.hero-m { position: absolute; left: 47%; top: 52%; width: 25.6%; height: 37.8%; overflow: visible; filter: drop-shadow(0 2px 6px rgba(11,22,34,.35)); }
.hero-m path { fill: var(--yellow); }
.hero-bubble {
  position: absolute; left: 64%; top: 67%; right: -1%; bottom: -1%; margin: 0; padding: 4% 3% 2% 5.5%;
  display: flex; flex-direction: column; justify-content: center; /* its top-left corner meets the M, as in the mockup */
  background: var(--yellow); color: var(--navy); border-radius: 48% 52% 24% 58% / 52% 46% 18% 50%;
  font: 400 3.5cqw/1.16 'Permanent Marker', 'Segoe Print', cursive; transform: rotate(-4deg);
  box-shadow: 0 0 0 .8cqw #fff, 0 10px 24px rgba(13,51,80,.25);
}
.hero-bubble svg { display: block; flex-shrink: 0; width: 5.2cqw; height: 5.2cqw; margin: 3% 0 0 62%; color: var(--navy); }

/* ---------- Benefits ---------- */
.benefits-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 0;
  padding-top: 30px; padding-bottom: 30px;
}
.benefit { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 10px; }
.benefit:nth-child(even) { border-left: 1px solid var(--line); }
.benefit svg { width: 42px; height: 42px; color: var(--navy); margin-bottom: 14px; }
.benefit strong { font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.benefit span { margin-top: 4px; font-size: .95rem; color: var(--sky-text); }

/* ---------- Pricing ---------- */
.pricing { padding: 36px 0 52px; }
.section-title { text-align: center; font-size: 2rem; font-weight: 700; color: var(--navy); }

.tabs {
  display: flex; width: 100%; max-width: 600px; margin: 24px auto 34px;
  background: var(--soft); border-radius: 999px; padding: 4px;
}
.tab { position: relative; flex: 1; padding: 13px 10px; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--lead); white-space: nowrap; }
.tab:not(.active) + .tab:not(.active)::before {
  content: ""; position: absolute; left: 0; top: 25%; height: 50%; width: 1px; background: #cdd7e0;
}
.tab.active { background: var(--yellow); color: var(--ink); font-weight: 700; }

.plans { display: grid; grid-template-columns: 1fr; gap: 26px 18px; }
.plans[hidden] { display: none; }

.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 22px 22px; box-shadow: 0 4px 14px rgba(13,51,80,.06);
}
.plan.featured { border: 3px solid var(--yellow); background: #fff; padding: 24px 20px 20px; }
.plan-badge {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -62%); margin: 0;
  background: var(--navy-deep); color: #fff; font-weight: 700; font-size: .9rem;
  padding: 7px 24px; border-radius: 12px; white-space: nowrap;
}
.plan-brand { margin: 0 0 4px; font-size: .9rem; text-transform: uppercase; color: #2b3743; letter-spacing: .3px; }
.plan h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 14px; }
.plan-price { margin: 0 0 20px; font-size: 2.8rem; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.plan-price small { font-size: 1.1rem; font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.plan ul { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.plan li { display: flex; align-items: center; gap: 12px; font-size: .95rem; color: var(--ink-soft); }
.plan li svg { width: 18px; height: 18px; color: #1d3b56; flex-shrink: 0; }
.btn-plan {
  margin-top: auto; width: 100%; border-radius: 10px; padding: 13px;
  border: 1.5px solid #c3ccd5; color: var(--ink); background: #fff;
}
.btn-plan:hover { border-color: var(--ink); }
.plan.featured .btn-plan { background: var(--yellow); border-color: var(--yellow); }
.plan.featured .btn-plan:hover { background: var(--yellow-hover); }

.tag-promo {
  display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 4px; vertical-align: 1px;
  background: #fff1bf; color: #6b5200; font-size: .68rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}
.all-rates { display: flex; width: fit-content; align-items: center; gap: 8px; margin: 30px auto 0; font-weight: 700; color: var(--navy); }
.all-rates:hover { text-decoration: underline; }

/* ---------- "Ver todas las tarifas" ---------- */
.rates-modal { position: fixed; inset: 0; z-index: 1000; background: rgba(1,22,38,.72); display: flex; align-items: center; justify-content: center; padding: 20px; }
.rates-modal[hidden] { display: none; }
.rates-box { position: relative; width: min(860px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: #fff; color: var(--ink); border-radius: 16px; padding: 26px 26px 18px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.rates-box > h2 { font-size: 1.4rem; font-weight: 700; color: var(--navy); padding-right: 40px; }
.rates-close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--navy); }
.rates-close:hover { background: var(--soft); }
.rates-tabs { display: flex; gap: 6px; margin: 16px 0 10px; flex-wrap: wrap; }
.rates-tabs button { padding: 9px 18px; border-radius: 999px; background: var(--soft); color: var(--lead); font-weight: 500; font-size: .92rem; }
.rates-tabs button.on { background: var(--yellow); color: var(--ink); font-weight: 700; }
.rates-list { overflow-y: auto; padding-right: 4px; }
.rates-list h3 { margin: 18px 0 8px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.rates-rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rate { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; padding: 11px 14px; font-size: .9rem; }
.rate + .rate { border-top: 1px solid #eef2f5; }
.rate-name strong { font-weight: 700; }
.rate-feats { grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-soft); font-size: .84rem; }
.rate-feats li { display: flex; align-items: center; gap: 6px; }
.rate-feats svg { width: 14px; height: 14px; color: #1d3b56; flex-shrink: 0; }
.rate-price { font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.rate-price small { font-size: .78rem; font-weight: 500; margin-left: 2px; }
.rates-note { margin: 12px 0 0; font-size: .78rem; color: var(--muted); }
.rate-btn { grid-column: 1 / -1; grid-row: 3; justify-self: start; height: 34px; padding: 0 18px; border-radius: 999px; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: .85rem; }
.rate-btn:hover { background: var(--yellow-hover); }

/* ---------- Coverage ("¿Llegamos a tu casa?") ---------- */
.section-coverage { padding: 0 0 20px; }
.coverage-card {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  background: var(--navy-deep); color: #fff; border-radius: 16px; padding: 28px 22px;
}
.coverage-pin { width: 46px; height: 58px; color: var(--yellow); }
.coverage-body h2 { font-size: 1.5rem; font-weight: 500; margin-bottom: 4px; }
.coverage-body > p { margin: 0 0 18px; color: #d8e2ea; }
.coverage-form { display: flex; flex-direction: column; gap: 12px; }
.coverage-form input { flex: 1; min-width: 0; padding: 16px 20px; border: none; border-radius: 10px; font: 400 1rem var(--font); color: var(--ink); outline: none; }
.coverage-form input:focus { box-shadow: 0 0 0 3px rgba(254,207,43,.55); }
.btn-cov { border-radius: 10px; padding: 16px 34px; }
.coverage-body .coverage-status { margin: 24px 0 4px; font-weight: 700; line-height: 1.45; }
.coverage-status:empty { display: none; }

/* ---------- Products (Solo Móvil / Solo Fibra) ---------- */
.section-products { padding: 0 0 48px; }
.products-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.product { display: flex; align-items: center; gap: 20px; background: var(--soft); border-radius: 14px; overflow: hidden; color: var(--ink); }
.product img { width: 120px; height: 140px; object-fit: cover; flex-shrink: 0; }
.product-body { padding: 16px 16px 16px 0; }
.product h3 { font-size: 1.3rem; font-weight: 700; }
.product-from { margin: 4px 0 12px; font-size: 1.05rem; color: var(--muted); }
.product-from b { color: var(--ink); }
.btn-product { padding: 9px 20px; border: 1.5px solid var(--navy); color: var(--navy); font-size: .9rem; }
.btn-product:hover { background: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--nav-text); }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.footer-logo img { height: 44px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px 28px; font-weight: 500; }
.footer-nav a:hover, .main-nav ul a:hover { color: var(--sky); }
.footer-social { display: flex; gap: 22px; color: var(--navy); }
.footer-social svg { width: 26px; height: 26px; }
.footer-social a:hover { color: var(--sky); }
.footer-tag { margin: 0; line-height: 1.5; font-weight: 500; }
.footer-tag svg { display: inline-block; width: 30px; height: 30px; color: var(--navy); vertical-align: -8px; margin-left: 6px; }

/* =========================================================
   Tablet — 640px+
   ========================================================= */
@media (min-width: 640px) {
  .hero-lead br { display: inline; }
  .benefits-grid { grid-template-columns: repeat(4, 1fr); }
  .benefit + .benefit { border-left: 1px solid var(--line); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .coverage-card { grid-template-columns: 70px 1fr; align-items: center; padding: 30px 36px 30px 28px; gap: 20px; }
  .coverage-pin { justify-self: center; }
  .coverage-form { flex-direction: row; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Desktop — 1024px+
   ========================================================= */
@media (min-width: 1024px) {
  .header-inner { height: 84px; }
  .logo img { height: 46px; }
  .menu-toggle { display: none; }
  .main-nav {
    position: static; transform: none; padding: 0; background: none; overflow: visible;
    flex-direction: row; align-items: center; flex: 1; gap: 0; margin-left: 40px;
  }
  .main-nav ul { flex-direction: row; gap: 28px; }
  .main-nav ul a { padding: 6px 0; border: none; font-size: .98rem; }
  .nav-actions { flex-direction: row; align-items: center; gap: 26px; margin-left: auto; padding-left: 26px; border-left: 1px solid var(--line); }

  /* Photo as tall as the whole hero and flush with the right edge of the screen, like the V3 */
  .hero { position: relative; min-height: 660px; }
  .hero-inner { display: flex; align-items: center; min-height: 660px; padding-top: 40px; padding-bottom: 50px; }
  /* the text always ends 40px before the photo (photo width: min(56vw, 760px), flush right) */
  .hero-copy { position: relative; z-index: 2; max-width: min(620px, calc(100vw - min(56vw, 760px) - max(24px, (100vw - 1240px) / 2 + 24px) - 40px)); }
  .hero-title { font-size: clamp(3.2rem, 4.4vw, 4rem); }
  .hero-lead { font-size: 1.2rem; }
  .hero-media { position: absolute; top: 0; right: 0; height: 100%; width: min(56vw, 760px); }
  .hero-photo { height: 100%; object-fit: cover; object-position: 60% 20%; }
  .hero-bubble { right: 2%; bottom: 1%; } /* the photo touches the screen edge: keep the bubble inside */

  .benefits-grid { padding-top: 26px; padding-bottom: 34px; }
  .benefit svg { width: 44px; height: 44px; }
  .benefit strong { font-size: 1.1rem; }

  .section-title { font-size: 2.3rem; }
  .tabs { width: fit-content; max-width: none; }
  .tab { flex: none; padding: 13px 52px; }
  .plans { grid-template-columns: repeat(4, 1fr); }
  .plans[data-count="3"] { grid-template-columns: repeat(3, 1fr); max-width: 960px; margin: 0 auto; }
  .rate { grid-template-columns: 1.1fr 1.6fr auto auto; }
  .rate-feats, .rate-btn { grid-column: auto; grid-row: auto; }

  .coverage-card { grid-template-columns: 90px 1fr; padding: 34px 44px 34px 30px; }
  .coverage-pin { width: 56px; height: 70px; }
  .coverage-body h2 { font-size: 1.7rem; }
  .coverage-form { gap: 16px; max-width: 760px; }

  .product img { width: 150px; height: 170px; }
  .product h3 { font-size: 1.45rem; }

  .footer-inner { flex-direction: row; align-items: center; gap: 48px; }
  .footer-logo img { height: 50px; }
  .footer-tag { margin-left: auto; }
}

/* =========================================================
   Páginas interiores (Fibra + Móvil, Solo Fibra, Solo Móvil, Contactar, Ayuda,
   Los MadPrincipios y legales) — las genera build.py con esta cabecera y este pie.
   ========================================================= */
.main-nav ul a[aria-current="page"] { color: var(--sky); }

.page-hero { background: var(--soft); color: var(--navy); padding: 44px 0 40px; }
.page-eyebrow { margin: 0 0 10px; font-weight: 700; font-size: .9rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sky); }
.page-hero h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); font-weight: 700; line-height: 1.1; }
.page-lead { margin: 12px 0 0; max-width: 680px; font-size: 1.12rem; line-height: 1.55; color: var(--lead); }

.page-section { padding: 40px 0 8px; color: var(--navy); }
.page-section .section-title { text-align: center; font-size: 1.9rem; font-weight: 700; margin-bottom: 28px; color: var(--navy); }
.group-title { margin: 0 0 30px; font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.group-note { margin: 22px auto 0; font-size: .88rem; color: var(--muted); }

.why { padding-bottom: 56px; }
.why-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.why-item { background: var(--soft); border-radius: 16px; padding: 26px 24px; }
.why-item svg { width: 40px; height: 40px; color: var(--navy); margin-bottom: 14px; }
.why-item h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.why-item p { margin: 0; line-height: 1.55; color: var(--lead); }

.faq { display: flex; flex-direction: column; gap: 12px; max-width: 860px; margin: 0 auto; }
.faq details { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; position: relative; padding: 18px 34px 18px 0; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--navy); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; line-height: 1.6; color: #3b4753; }

.page-content { max-width: 1000px; margin: 0 auto; padding-bottom: 48px; }
.page-cta { margin: 36px auto 0; max-width: 860px; text-align: center; background: var(--soft); color: var(--navy); border-radius: 16px; padding: 30px 24px; }
.page-cta h2 { font-size: 1.45rem; font-weight: 700; margin-bottom: 8px; }
.page-cta p { margin: 0 0 20px; line-height: 1.55; color: var(--muted); }
.page-cta p a { color: var(--navy); font-weight: 700; text-decoration: underline; }

.principles { display: grid; grid-template-columns: 1fr; gap: 18px; }
.principle { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px; }
.principle-tag { display: inline-block; margin: 0 0 12px; padding: 5px 14px; border-radius: 999px; background: var(--yellow); color: #0b1622; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; }
.principle h2 { font-size: 1.35rem; font-weight: 700; margin-bottom: 8px; }
.principle p { margin: 0; line-height: 1.6; color: #3b4753; }

.contact-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.contact-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.contact-label { margin: 0 0 6px; font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #5b6b77; }
.contact-value { display: inline-block; font-size: 1.6rem; font-weight: 700; color: #0d3350; }
.contact-value:hover { text-decoration: underline; }
.contact-card p:last-child { margin: 8px 0 0; color: #3b4753; }
.contact-hours { margin: 24px 0 0; font-size: 1.05rem; color: var(--navy); }
.contact-social { margin-top: 34px; }
.contact-social h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; color: var(--navy); }
.contact-social-links { display: flex; flex-wrap: wrap; gap: 12px; }

.legal-article { max-width: 900px; margin: 0 auto 56px; background: #fff; color: #0b1622; border: 1px solid #e3e8ee; border-radius: 16px; padding: 28px 22px; }
.legal-article h2 { margin: 28px 0 10px; font-size: 1.2rem; font-weight: 700; color: #0d3350; }
.legal-article p, .legal-article li { line-height: 1.65; color: #27333f; }
.legal-article p { margin: 0 0 12px; }
.legal-article ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.legal-article li { margin-bottom: 4px; }
.legal-article .legal-data { list-style: none; margin: 0; padding: 14px 18px; background: #f4f7fa; border: 1px solid #e3e8ee; border-radius: 12px; }
.legal-article .legal-date { color: #5b6b77; }
.legal-article a { color: #0d5c8f; text-decoration: underline; }
.legal-pending { padding: 1px 6px; border-radius: 4px; background: #fff1bf; color: #6b5200; font-weight: 500; }

/* ---------- Botón flotante de WhatsApp (enlace a wa.me: sin cookies ni scripts externos) ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.28); transition: transform .15s ease; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }
.footer-phone { font-weight: 700; font-size: 1.1rem; }

@media (min-width: 640px) {
  .why-grid, .principles, .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .legal-article { padding: 40px 44px; }
}
@media (min-width: 1024px) {
  .page-hero { padding: 64px 0 56px; }
  .page-section { padding-top: 52px; }
  .wa-float { right: 26px; bottom: 26px; width: 62px; height: 62px; }
  .wa-float svg { width: 34px; height: 34px; }
}

/* ---------- Pie en 3 columnas, como madmobile.es: Legal · Nosotros · Contacto ---------- */
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-col .footer-title { margin: 0 0 10px; font-size: .82rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--sky); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-weight: 500; }
.footer-col a[href^="tel:"] { white-space: nowrap; }
.footer-col a:hover { color: var(--sky); text-decoration: underline; }
@media (min-width: 640px) {
  .footer-cols { grid-template-columns: repeat(3, auto); gap: 48px; }
}
@media (min-width: 1024px) {
  .footer-inner { align-items: flex-start; }
  .footer-cols { flex: 1; }
}

/* ---------- Página /tarifas/: todas las tarifas agrupadas por tipo ---------- */
.rates-jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.rates-jump a { padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: .95rem; background: #fff; color: var(--navy); border: 1px solid var(--line); }
.rates-jump a:hover { background: var(--yellow); color: #0b1622; border-color: var(--yellow); }
.cat-title { margin: 0 0 6px; font-size: clamp(1.7rem, 5vw, 2.3rem); font-weight: 700; color: var(--navy); }
.cat-link { display: inline-flex; margin-bottom: 30px; font-weight: 700; color: var(--navy); }
.cat-link:hover { text-decoration: underline; }
.page-section .group-subtitle { margin: 34px 0 26px; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.cat-section + .cat-section { border-top: 1px solid var(--line); margin-top: 30px; }

/* =========================================================
   FAQ y páginas legales en "modo noche": tarjetas azul noche con degradado,
   preguntas numeradas con la letra de rotulador y acentos amarillos.
   ========================================================= */
.faq { counter-reset: faq; }
.faq details {
  counter-increment: faq; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f4d75 0%, #0b2a44 100%);
  color: #fff; border: 1px solid rgba(13,51,80,.35); border-radius: 16px; padding: 0 22px 0 76px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.faq details::before {
  content: counter(faq, decimal-leading-zero); position: absolute; left: 20px; top: 13px;
  font: 400 1.7rem/1 'Permanent Marker', 'Segoe Print', cursive; color: var(--yellow); transform: rotate(-6deg);
}
.faq details::after { /* soft glow in the corner */
  content: ""; position: absolute; right: -60px; top: -60px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(254,207,43,.16) 0%, transparent 70%); pointer-events: none;
}
.faq details:hover { transform: translateX(4px); border-color: rgba(254,207,43,.45); }
.faq details[open] { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow), 0 16px 36px rgba(0,0,0,.28); }
.faq summary { color: #fff; }
.faq summary::after { color: var(--yellow); }
.faq details p { position: relative; color: #d8e4ee; }

.legal-article {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0f4d75 0%, #0b2a44 100%);
  color: #d8e4ee; border: 1px solid rgba(13,51,80,.35); box-shadow: 0 24px 60px rgba(0,0,0,.22);
}
.legal-article::before { /* yellow glow behind the text */
  content: ""; position: absolute; right: -120px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(254,207,43,.14) 0%, transparent 70%); pointer-events: none;
}
.legal-article > * { position: relative; }
.legal-article h2 { color: #fff; border-left: 4px solid var(--yellow); padding-left: 12px; }
.legal-article p, .legal-article li { color: #d8e4ee; }
.legal-article strong { color: #fff; }
.legal-article a { color: var(--yellow); }
.legal-article .legal-date { color: #9fb6c9; }
.legal-article .legal-data { background: rgba(255,255,255,.05); border: 1.5px dashed rgba(254,207,43,.55); }
.legal-article .legal-data li { color: #fff; }
.legal-article .legal-pending { background: var(--yellow); color: #0b1622; }

/* ---------- V2 (web blanca): FAQ y páginas legales en claro ----------
   Mismo estilo que el "modo noche" (números de rotulador, acentos amarillos), sobre blanco. */
.faq details { background: linear-gradient(135deg, #ffffff 0%, #f1f6fa 100%); color: var(--navy); border-color: var(--line); box-shadow: 0 4px 14px rgba(13,51,80,.06); }
.faq details::before { color: var(--navy); }
.faq details::after { background: radial-gradient(circle, rgba(254,207,43,.28) 0%, transparent 70%); }
.faq details:hover { border-color: var(--yellow); }
.faq details[open] { box-shadow: 0 0 0 1px var(--yellow), 0 14px 32px rgba(13,51,80,.12); }
.faq summary { color: var(--navy); }
.faq summary::after { color: var(--navy); }
.faq details p { color: var(--ink-soft); }

.legal-article { background: linear-gradient(160deg, #ffffff 0%, #f1f6fa 100%); color: var(--ink-soft); border-color: var(--line); box-shadow: 0 18px 44px rgba(13,51,80,.08); }
.legal-article::before { background: radial-gradient(circle, rgba(254,207,43,.22) 0%, transparent 70%); }
.legal-article h2 { color: var(--navy); }
.legal-article p, .legal-article li { color: #27333f; }
.legal-article strong { color: var(--navy); }
.legal-article a { color: #0d5c8f; }
.legal-article .legal-date { color: var(--muted); }
.legal-article .legal-data { background: #fffbea; border-color: rgba(214,166,0,.6); }
.legal-article .legal-data li { color: #27333f; }

/* =========================================================
   Estructura final (NUEVA WEB MAD MOBILE.docx): Red 5G, FAQ, MadPrincipios,
   "Contrata ya", buscador de la FAQ, página MAD TV y pie con 4 columnas.
   ========================================================= */
.section-sub { margin: 10px auto 0; max-width: 680px; text-align: center; font-size: 1.05rem; line-height: 1.55; color: var(--lead); }
.pricing .section-sub { margin-bottom: 4px; }

.pricing-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin: 34px auto 0; padding: 20px 24px; max-width: 760px; border-radius: 16px; background: var(--soft); border: 1px solid var(--line); text-align: center; }
.pricing-cta p { margin: 0; color: var(--navy); font-size: 1.05rem; }

/* ---------- Red 5G ---------- */
.section-net { padding: 56px 0 20px; color: var(--navy); }
.net-card { position: relative; overflow: hidden; border-radius: 20px; background: var(--navy-deep); color: #fff; padding: 34px 26px; }
.net-copy { position: relative; z-index: 1; max-width: 620px; }
.net-card h2 { font-size: clamp(1.7rem, 4.5vw, 2.3rem); font-weight: 700; line-height: 1.15; margin-bottom: 14px; }
.net-card p { margin: 0 0 22px; line-height: 1.6; color: #d8e2ea; }
.net-logos { display: flex; flex-wrap: wrap; gap: 10px; }
.net-logos li { padding: 9px 18px; border-radius: 999px; font-weight: 700; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.net-art { display: none; }
.net-features { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.net-feature { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.net-feature svg { grid-row: 1 / 3; width: 36px; height: 36px; color: var(--navy); }
.net-feature strong { color: var(--navy); font-size: 1.05rem; }
.net-feature span { color: var(--lead); font-size: .95rem; }

/* ---------- FAQ y MadPrincipios en la portada ---------- */
.section-faq, .section-principles { padding: 56px 0 24px; color: var(--navy); }
.section-faq .section-title, .section-principles .section-title { text-align: center; font-size: clamp(1.8rem, 4.5vw, 2.3rem); font-weight: 700; color: var(--navy); }
.section-faq .faq { margin-top: 30px; }
.section-faq .all-rates { display: flex; width: fit-content; margin: 26px auto 0; }
.section-coverage { padding-top: 40px; }
.section-principles { padding-bottom: 60px; }
.principles-6 { margin-top: 30px; }
.principle h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.principle .principle-tag { font-family: 'Permanent Marker', 'Segoe Print', cursive; font-weight: 400; font-size: 1.1rem; letter-spacing: 0; }

/* ---------- Ayuda: buscador y categorías ---------- */
.faq-tools { max-width: 860px; margin: 0 auto 30px; }
.faq-search { width: 100%; padding: 16px 20px; border-radius: 14px; border: 1px solid #c9d3dc; font: 400 1.05rem var(--font); color: #0b1622; background: #fff; outline: none; }
.faq-search:focus { border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(254,207,43,.35); }
.faq-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.faq-cats a { padding: 8px 16px; border-radius: 999px; font-weight: 500; font-size: .92rem; background: #fff; color: var(--navy); border: 1px solid var(--line); }
.faq-cats a:hover { background: var(--yellow); color: #0b1622; border-color: var(--yellow); }
.faq-group { max-width: 860px; margin: 0 auto 30px; scroll-margin-top: 100px; }
.faq-group h2 { font-size: 1.35rem; font-weight: 700; margin: 0 0 14px; color: var(--navy); }
.faq-empty { max-width: 860px; margin: 0 auto 30px; font-weight: 500; color: var(--navy); }
.faq-empty a { color: var(--navy); text-decoration: underline; }

/* ---------- MAD TV ---------- */
.tv-intro { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; margin-bottom: 20px; color: var(--navy); }
.tv-kicker { font-size: 1.3rem; font-weight: 700; margin: 0 0 12px; color: var(--navy); }
.tv-intro-text p { line-height: 1.6; color: var(--lead); margin: 0 0 12px; }
.tv-intro-text strong { color: var(--navy); }
.tv-price { border-radius: 20px; padding: 28px 26px; background: var(--navy-deep); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.tv-price-brand { margin: 0 0 10px; font: 400 1.5rem/1 'Permanent Marker', 'Segoe Print', cursive; color: var(--yellow); text-transform: uppercase; }
.tv-price ul { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.tv-price li::before, .tv-checks li::before { content: "✓ "; font-weight: 700; color: var(--yellow); }
.tv-price-amount { margin: 6px 0 2px; font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.tv-price-amount small { font-size: 1.1rem; font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.tv-price-note { margin: 0 0 18px; font-size: .92rem; opacity: .85; }
.tv-section { padding: 44px 0 6px; color: var(--navy); }
.tv-section > h2, .tv-final h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; margin-bottom: 10px; color: var(--navy); }
.tv-eyebrow { margin: 0 0 8px; font-weight: 700; font-size: .88rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sky); }
.tv-lead { margin: 0 0 24px; max-width: 760px; line-height: 1.6; color: var(--lead); }
.tv-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.tv-card { border-radius: 16px; padding: 22px; background: #fff; border: 1px solid var(--line); }
.tv-emoji { margin: 0 0 8px; font-size: 1.7rem; line-height: 1; }
.tv-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.tv-card p:last-child { margin: 0; line-height: 1.55; color: var(--lead); font-size: .95rem; }
.tv-football { margin-top: 30px; padding: 34px 26px; border-radius: 20px; background: var(--soft); }
.tv-bullets { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tv-bullets li { padding: 10px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-weight: 500; }
.tv-claim { margin: 18px 0 18px; font: 400 1.35rem/1.25 'Permanent Marker', 'Segoe Print', cursive; color: var(--navy); }
.tv-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.tv-steps li { border-radius: 16px; padding: 22px; background: #fff; border: 1px solid var(--line); }
.tv-step-num { display: block; font: 400 1.8rem/1 'Permanent Marker', 'Segoe Print', cursive; color: var(--navy); margin-bottom: 8px; }
.tv-steps h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; color: var(--navy); }
.tv-steps p { margin: 0; color: var(--lead); line-height: 1.55; }
.tv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-chips li { padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 500; }
.tv-summary .tv-price { max-width: 760px; margin: 0 auto; }
.tv-price-wide h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.tv-checks { display: grid; grid-template-columns: 1fr; gap: 6px 20px; margin-bottom: 16px; }
.tv-final { margin: 44px 0 56px; padding: 40px 26px; border-radius: 20px; text-align: center; background: var(--navy-deep); color: #fff; }
.tv-final h2 { color: inherit; }
.tv-final p { margin: 0 0 10px; }
.tv-final .tv-eyebrow { color: var(--yellow); }

/* ---------- Pie: 4 columnas (Tarifas · Legal · Nosotros · Contacto) ---------- */
.footer-tag strong { font-size: 1.1rem; }

@media (min-width: 640px) {
  .net-features { grid-template-columns: repeat(2, 1fr); }
  .principles-6 { grid-template-columns: repeat(2, 1fr); }
  .tv-grid, .tv-steps { grid-template-columns: repeat(2, 1fr); }
  .tv-checks { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, auto); }
}
@media (min-width: 1024px) {
  .net-card { padding: 48px 52px; min-height: 300px; display: flex; align-items: center; }
  
  .net-features { grid-template-columns: repeat(4, 1fr); }
  .principles-6 { grid-template-columns: repeat(3, 1fr); }
  .tv-intro { grid-template-columns: 1.2fr 1fr; gap: 48px; }
  .tv-grid { grid-template-columns: repeat(4, 1fr); }
  .tv-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .tv-steps { grid-template-columns: repeat(4, 1fr); }
  .tv-checks { grid-template-columns: repeat(4, auto); }
  .footer-cols { grid-template-columns: repeat(4, auto); gap: 40px; }
}


/* Footer with 4 columns: links never break; the closing line goes on its own row below */
.footer-col li { white-space: nowrap; }
@media (min-width: 1024px) {
  .footer-inner { flex-wrap: wrap; row-gap: 24px; }
  .footer-tag { flex-basis: 100%; margin-left: 0; padding-top: 20px; border-top: 1px solid var(--line); }
}

/* Preguntas frecuentes al final de cada página */
.page-faq { padding-bottom: 56px; }
.page-faq .all-rates { display: flex; width: fit-content; margin: 26px auto 0; }

/* Más espacio entre el número y el texto (preguntas frecuentes y MadPrincipios) */
.faq details { padding-left: 92px; }
.faq details::before { left: 24px; }
.principle .principle-tag { margin-bottom: 18px; }
@media (max-width: 639px) { .faq details { padding-left: 80px; } .faq details::before { left: 18px; } }

/* ---------- Ajustes de Dani ---------- */
/* Icono delante de cada nombre del menú */
.main-nav ul a { display: flex; align-items: center; gap: 8px; }
.nav-ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--sky); }
.main-nav ul a[aria-current="page"] .nav-ico, .main-nav ul a:hover .nav-ico { color: currentColor; }

/* Tarjetas de tarifas: sombra amarilla (la destacada, más intensa) */
.plan { box-shadow: 0 10px 26px rgba(254,207,43,.66); transition: box-shadow .2s ease, transform .2s ease; }
.plan:hover { box-shadow: 0 16px 38px rgba(254,207,43,.86); transform: translateY(-3px); }
.plan.featured { box-shadow: 0 18px 44px rgba(254,207,43,.94); }


/* MAD TV: la tele (ilustración en la propia página) */
.tv-mock { margin: 26px 0 0; max-width: 540px; }
.tv-screen { position: relative; aspect-ratio: 16 / 9.4; border: 10px solid #0b0f14; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #0d3350, #061a2a); box-shadow: 0 24px 50px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.06);
  padding: 4% 5%; display: flex; flex-direction: column; gap: 4%; color: #fff; font-size: clamp(.55rem, 1.35vw, .85rem); }
.tv-ui-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.tv-ui-logo { font: 400 1.4em/1 'Permanent Marker', 'Segoe Print', cursive; color: #fecf2b; }
.tv-ui-live { color: #ff6b6b; font-size: .85em; letter-spacing: .6px; }
.tv-ui-hero { position: relative; flex: 1; border-radius: 10px; padding: 5% 6%; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(0deg, rgba(0,0,0,.6), rgba(0,0,0,0) 65%), repeating-linear-gradient(90deg, #1f8f4a 0 10%, #1a7f41 10% 20%); }
.tv-ui-hero::before { content: ""; position: absolute; left: 50%; top: 14%; width: 17%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; transform: translateX(-50%); }
.tv-ui-hero::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid rgba(255,255,255,.5); }
.tv-ui-hero > * { position: relative; z-index: 1; }
.tv-ui-kicker { margin: 0; font-size: .8em; color: #fecf2b; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tv-ui-title { margin: 2px 0 6px; font-size: 1.55em; font-weight: 700; }
.tv-ui-play { align-self: flex-start; padding: .35em .95em; border-radius: 999px; background: #fecf2b; color: #0b1622; font-weight: 700; }
.tv-ui-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3%; }
.tv-ui-row span { padding: 6% 4%; border-radius: 8px; background: rgba(255,255,255,.1); text-align: center; font-weight: 500; font-size: .85em; white-space: nowrap; }
.tv-stand { width: 26%; height: 16px; margin: 0 auto; background: linear-gradient(#1a1f26, #0b0f14); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }

/* Red 5G: foto de la chica a la derecha de la tarjeta (en escritorio), fundida con el azul */
@media (min-width: 1024px) {
  .net-photo { display: block; position: absolute; top: 0; right: 0; width: 46%; height: 100%; object-fit: cover; object-position: 60% 25%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
}


/* Contactar: cada canal con su color (España · extranjero · WhatsApp) y un icono grande de fondo */
.contact-grid .contact-card { position: relative; overflow: hidden; border: 0; color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.18);
  transition: transform .2s ease, box-shadow .2s ease; }
.contact-grid .contact-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,.25); border: 0; }
.contact-grid .contact-card::after { content: ""; position: absolute; right: -6px; bottom: -18px; width: auto; height: auto; border-radius: 0; background: none;
  font-size: 5.5rem; line-height: 1; opacity: .22; transform: rotate(-12deg); pointer-events: none; }
.contact-grid .contact-card:nth-child(1) { background: linear-gradient(135deg, #fecf2b 0%, #f59e0b 100%); color: #0b1622; }
.contact-grid .contact-card:nth-child(1)::after { content: "📞"; }
.contact-grid .contact-card:nth-child(2) { background: linear-gradient(135deg, #2f93d6 0%, #0d3350 100%); }
.contact-grid .contact-card:nth-child(2)::after { content: "🌍"; }
.contact-grid .contact-card:nth-child(3) { background: linear-gradient(135deg, #25d366 0%, #0f7a5c 100%); }
.contact-grid .contact-card:nth-child(3)::after { content: "💬"; }
.contact-grid .contact-card .contact-label { color: currentColor; opacity: .8; }
.contact-grid .contact-card .contact-value { color: currentColor; }
.contact-grid .contact-card p:last-child { color: currentColor; opacity: .9; }

/* Contactar: los mismos tres colores, degradándose hacia un tono muy claro */
.contact-grid .contact-card { color: #0d3350; }
.contact-grid .contact-card:nth-child(1) { background: linear-gradient(135deg, #fecf2b 0%, #ffe78a 45%, #fff8dc 100%); }
.contact-grid .contact-card:nth-child(2) { background: linear-gradient(135deg, #2f93d6 0%, #8cc8ee 45%, #e3f2fc 100%); }
.contact-grid .contact-card:nth-child(3) { background: linear-gradient(135deg, #25d366 0%, #8be8b0 45%, #e2f9eb 100%); }
.contact-grid .contact-card::after { opacity: .28; }

/* ---------- MAD TV con las imágenes de Vuela TV ---------- */
.tv-screen-photo { padding: 0; display: block; }
.tv-screen-photo img { width: 100%; height: 100%; object-fit: cover; }
.tv-logo { display: block; width: 150px; height: auto;  }
.tv-price-brand:has(.tv-logo) { margin-bottom: 14px; }
.tv-channels { display: block; width: 100%; height: auto; margin: 0 0 16px; border-radius: 10px; background: #fff; }
.tv-football-img { display: block; width: 100%; height: auto; border-radius: 16px; margin-bottom: 22px; box-shadow: 0 16px 36px rgba(0,0,0,.25); }
.tv-contents { display: block; width: 100%; height: auto; border-radius: 16px; margin: 6px 0 22px; box-shadow: 0 16px 36px rgba(0,0,0,.25); }
@media (min-width: 1024px) {
  .tv-grid-channels { grid-template-columns: repeat(2, 1fr); }
  .tv-football { display: grid; grid-template-columns: 1fr 1.05fr; gap: 34px; align-items: center; }
  .tv-football-img { order: 2; margin: 0; }
}

/* MAD TV: canales de los clubes y montaje de contenidos en la tarjeta resumen */
.tv-clubs { margin: 6px 0 4px; }
.tv-clubs p { margin: 0 0 10px; font-weight: 700; }
.tv-club-logos { display: flex; flex-wrap: wrap; gap: 12px; }
.tv-club-logos img { height: 58px; width: auto; padding: 6px 12px; border-radius: 12px; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.tv-summary .tv-price { max-width: 1060px; }
.tv-summary-img { display: block; width: 100%; height: auto; margin-top: 22px; border-radius: 14px; box-shadow: 0 14px 30px rgba(0,0,0,.25); }
@media (min-width: 1024px) {
  .tv-price-wide { display: grid; grid-template-columns: 1fr 1.15fr; gap: 34px; align-items: center; }
  .tv-price-wide .tv-checks { grid-template-columns: repeat(2, auto); }
  .tv-summary-img { margin-top: 0; height: 100%; object-fit: cover; }
}

/* MAD TV: logos de canales en recuadros cuadrados (como en vuelatv.com, más grandes) */
.tv-logos { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tv-logos li { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 16% 10%; border-radius: 16px; background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.12); transition: transform .2s ease, box-shadow .2s ease; }
.tv-logos li:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(254,207,43,.35); }
.tv-logos img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
@media (min-width: 640px) { .tv-logos { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .tv-logos { grid-template-columns: repeat(6, 1fr); gap: 16px; } }

/* ---------- Bloques añadidos desde el panel (admin/lib/templates.php) ---------- */
.mb-section { padding-bottom: 0; }
.mb-section .page-content { padding-bottom: 8px; }
.mb-block { max-width: 1000px; margin: 0 auto 40px; color: var(--navy); }
.mb-block h2 { font-size: 1.7rem; font-weight: 700; line-height: 1.2; margin: 0 0 14px; color: var(--navy); }
.mb-block h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; color: var(--navy); }
.mb-block p { line-height: 1.65; color: var(--ink-soft); margin: 0 0 12px; }
.mb-block ul { list-style: disc; padding-left: 22px; margin: 0 0 12px; }
.mb-block li { line-height: 1.65; color: var(--ink-soft); margin-bottom: 6px; }
.mb-block p a:not(.btn), .mb-block li a:not(.btn) { color: #0d5c8f; text-decoration: underline; }
.mb-block .btn { margin-top: 8px; }
.mb-center { text-align: center; }
.mb-media { display: grid; gap: 26px; align-items: center; }
.mb-media img, .mb-image img { display: block; width: 100%; height: auto; border-radius: 18px; box-shadow: 0 16px 36px rgba(13, 51, 80, .14); }
.mb-image { margin-bottom: 40px; }
.mb-image figcaption { margin-top: 10px; text-align: center; font-size: .92rem; color: var(--muted); }
.mb-cards { display: grid; gap: 18px; margin-top: 22px; }
.mb-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; box-shadow: 0 10px 24px rgba(254, 207, 43, .16); }
.mb-card .mb-emoji { font-size: 2rem; line-height: 1; margin: 0 0 12px; }
.mb-block .faq { margin-top: 20px; }
@media (min-width: 768px) {
  .mb-media { grid-template-columns: 1fr 1fr; gap: 40px; }
  .mb-media-left img { order: -1; }
  .mb-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Pie: títulos de columna sin etiqueta de encabezado (SEO) y enlaces más fáciles de tocar en el móvil ---------- */
.footer-col ul { gap: 0; }
.footer-col a { display: inline-block; padding: 6px 0; }

/* ---------- Migas de pan (SEO: las mismas que el marcado BreadcrumbList) ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; font-size: .85rem; line-height: 1.4; }
.breadcrumbs a { color: inherit; opacity: .75; text-decoration: underline; text-underline-offset: 3px; padding: 4px 0; }
.breadcrumbs a:hover { opacity: 1; }
.breadcrumbs span[aria-hidden] { opacity: .5; }
.breadcrumbs span[aria-current] { font-weight: 600; opacity: .9; }

/* ---------- Pantallas anchas: contenedor más ancho para que no sobre margen a los lados ---------- */
:root { --wrap: 1240px; }
.wrap { max-width: var(--wrap); }
@media (min-width: 1440px) { :root { --wrap: 1360px; } }
@media (min-width: 1680px) { :root { --wrap: 1520px; } }
@media (min-width: 1024px) {
  .hero-copy { max-width: min(640px, calc(100vw - min(56vw, 760px) - max(24px, (100vw - var(--wrap)) / 2 + 24px) - 40px)); }
}
@media (min-width: 1680px) {
  .hero-media { width: min(50vw, 960px); }
  .hero-copy { max-width: min(700px, calc(100vw - min(50vw, 960px) - max(24px, (100vw - var(--wrap)) / 2 + 24px) - 40px)); }
  .hero-title { font-size: 4.4rem; }
  .hero-lead { font-size: 1.3rem; }
}

/* ---------- Ordenador: todo un 10 % más pequeño (textos, títulos, imágenes y espacios) ---------- */
@media (min-width: 1024px) {
  html { zoom: .9; }
  :root { --wrap: 1378px; }   /* = 1240 px en pantalla con el zoom */
}
@media (min-width: 1440px) { :root { --wrap: 1511px; } }   /* = 1360 px en pantalla */
@media (min-width: 1680px) { :root { --wrap: 1689px; } }   /* = 1520 px en pantalla */

/* ---------- Ordenador: la foto de portada empieza a unos 50 px del texto (sin hueco en medio) ---------- */
@media (min-width: 1024px) { .hero-media { width: min(calc(60vw + 64px), 828px); } }
@media (min-width: 1440px) { .hero-media { width: calc(55vw + 60px); } }
@media (min-width: 1680px) { .hero-media { width: min(calc(56vw + 78px), 1200px); } }
/* la foto es más ancha que alta: el bocadillo se mide también por la altura para no salirse ni estirarse */
@media (min-width: 1024px) {
  .hero-media { container-type: size; }
  .hero-bubble { left: auto; width: min(34cqw, 43cqh); font-size: min(3.5cqw, 4cqh); }
  .hero-bubble svg { width: min(5.2cqw, 6cqh); height: min(5.2cqw, 6cqh); }
  /* la M mantiene su forma y sigue tocando el bocadillo */
  .hero-m { width: min(25.6cqw, 29.5cqh); left: calc(98cqw - min(34cqw, 43cqh) - min(25.6cqw, 29.5cqh) + 8.6cqw); }
}

/* ---------- Solo Móvil: el halo de cada tarjeta, del color de su red ---------- */
.plans[data-red="vodafone"] .plan { box-shadow: 0 10px 26px rgba(230,0,0,.60); }
.plans[data-red="vodafone"] .plan:hover { box-shadow: 0 16px 38px rgba(230,0,0,.78); }
.plans[data-red="vodafone"] .plan.featured { box-shadow: 0 18px 44px rgba(230,0,0,.86); }
.plans[data-red="orange"] .plan { box-shadow: 0 10px 26px rgba(255,121,0,.66); }
.plans[data-red="orange"] .plan:hover { box-shadow: 0 16px 38px rgba(255,121,0,.86); }
.plans[data-red="orange"] .plan.featured { box-shadow: 0 18px 44px rgba(255,121,0,.94); }
.plans[data-red="movistar"] .plan { box-shadow: 0 10px 26px rgba(1,157,244,.64); }
.plans[data-red="movistar"] .plan:hover { box-shadow: 0 16px 38px rgba(1,157,244,.84); }
.plans[data-red="movistar"] .plan.featured { box-shadow: 0 18px 44px rgba(1,157,244,.92); }

/* ---------- Pie: operador registrado en la CNMC ---------- */
/* the closing line: «MAD Mobile» on the left and, in the same strip, «Operador registrado en: CNMC» */
.footer-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.footer-reg { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; font-size: .95rem; font-weight: 500; color: var(--nav-text); }
.footer-reg img { height: 72px; width: auto; }
@media (min-width: 768px) { .footer-bottom { margin-left: auto; } }
@media (min-width: 1024px) {
  .footer-bottom { flex-basis: 100%; margin-left: 0; flex-direction: row; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); }
  .footer-bottom .footer-tag { flex-basis: auto; margin-left: 0; padding-top: 0; border-top: 0; }
  .footer-bottom .footer-reg { margin: 0 auto; }
}
