/* maxizona.es — estilo base, sin dependencias. Móvil primero.
   Identidad (guía de color de la familia Maxi, v1.3): la base común de los portales con los mismos nombres de variables. El principal de maxizona
   es el verde hoja (--c-zona, el de «zona» en el logotipo): lo que se pulsa va en verde y cada portal aparece solo con el suyo (--pc), como
   permite la guía en los enlaces cruzados. Tema oscuro con [data-theme="dark"], que pone el guion del <head>, y con el del sistema si no hay JavaScript. */
:root {
  color-scheme: light;
  --accent: #e8a455; --bg-body: #fdf8f2; --bg-surface: #fffdfa; --bg-soft: #f8efe4; --border: #eadccb; --border-strong: #dcc7b1;
  --bg-dark: #2c2c2a; --on-dark: #f4ede4; --on-dark-muted: #d3cabf;
  --header-bg: #fffdfa; --header-border: #eadccb; --header-search-bg: #f6eee4; --header-search-border: #eadccb; --header-search-placeholder: #8a7b6e;
  --text-main: #2b2420; --text-muted: #5e5047; --text-light: #776a5e;
  --primary: #347940; --primary-hover: #2b6434; --primary-solid: #347940; --primary-solid-hover: #2b6434; --on-primary: #ffffff;
  --logo-maxi: #2C2C2A; --c-zona: #347940;
  --c-servicios: #a9532f; --c-ocio: #a52e60; --c-tiendas: #297895;
  --max-w: 1180px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(61, 48, 40, 0.07); --shadow-md: 0 10px 25px -5px rgba(61, 48, 40, 0.10);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg-body: #262629; --bg-surface: #303033; --bg-soft: #2b2b2e; --border: #444447; --border-strong: #55524f;
  --bg-dark: #1c1c1e; --on-dark: #f4ede4; --on-dark-muted: #bdb3a8;
  --header-bg: #1c1c1e; --header-border: #444447; --header-search-bg: #303033; --header-search-border: #4a4a4d; --header-search-placeholder: #9a9187;
  --text-main: #f4ede4; --text-muted: #bdb3a8; --text-light: #a89f95;
  --primary: #75c783; --primary-hover: #93d59e; --primary-solid: #347940; --primary-solid-hover: #2b6434; --on-primary: #ffffff;
  --logo-maxi: #f4ede4; --c-zona: #75c783;
  --c-servicios: #e08b64; --c-ocio: #e479a6; --c-tiendas: #64bfe0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35); --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.55);
}
/* Sin JavaScript (sin data-theme), el tema del sistema */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg-body: #262629; --bg-surface: #303033; --bg-soft: #2b2b2e; --border: #444447; --border-strong: #55524f;
    --bg-dark: #1c1c1e; --on-dark: #f4ede4; --on-dark-muted: #bdb3a8;
    --header-bg: #1c1c1e; --header-border: #444447; --header-search-bg: #303033; --header-search-border: #4a4a4d; --header-search-placeholder: #9a9187;
    --text-main: #f4ede4; --text-muted: #bdb3a8; --text-light: #a89f95;
    --primary: #75c783; --primary-hover: #93d59e; --primary-solid: #347940; --primary-solid-hover: #2b6434; --on-primary: #ffffff;
    --logo-maxi: #f4ede4; --c-zona: #75c783;
    --c-servicios: #e08b64; --c-ocio: #e479a6; --c-tiendas: #64bfe0;
  }
}
/* Color de cada portal: lupa, segunda palabra del logotipo y enlaces de su tarjeta */
.p-maxiservicios { --pc: var(--c-servicios); }
.p-maxiocio { --pc: var(--c-ocio); }
.p-maxitiendas { --pc: var(--c-tiendas); }
.portal a, .frontera a { color: var(--pc); }   /* el logotipo toma currentColor: sin esto, el color de los enlaces (grafito) */

* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text-main); background: var(--bg-body);
  -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); margin: 0 0 12px; font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 0 0 14px; font-weight: 750; }
p { margin: 0 0 12px; }
.ancho { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 8px 14px; border-radius: var(--radius-md); background: var(--primary-solid);
  color: var(--on-primary); }
.saltar:focus { top: 12px; }
.entradilla { font-size: 1.1rem; color: var(--text-muted); max-width: 62ch; }
.nota { font-size: .9rem; color: var(--text-light); margin-top: 14px; }

/* Cabecera: logotipo de maxizona, menú y botón de tema */
.cabecera { background: var(--header-bg); border-bottom: 1px solid var(--header-border); }
.cabecera .ancho { display: flex; align-items: center; gap: 8px 20px; min-height: 68px; flex-wrap: wrap; }
.marca { display: inline-flex; color: var(--logo-maxi); margin-right: auto; }
.marca:hover .logotipo { opacity: .85; }
.logotipo { display: block; height: 42px; width: auto; }
.menu { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: .95rem; font-weight: 600; }
.menu a { color: var(--text-main); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--primary); }
.tema { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; flex-shrink: 0; cursor: pointer;
  color: var(--text-main); background: var(--header-search-bg); border: 1px solid var(--header-search-border); border-radius: 999px; }
.tema:hover { border-color: var(--primary); }
.tema svg { width: 18px; height: 18px; }
.tema .sol { display: none; }
[data-theme="dark"] .tema .sol { display: block; }
[data-theme="dark"] .tema .luna { display: none; }
@media (max-width: 720px) {
  .cabecera .ancho { padding-top: 10px; padding-bottom: 10px; }
  .menu { order: 3; flex-basis: 100%; font-size: .9rem; }
  .logotipo { height: 38px; }
}

/* Portada por bandas */
.portada { display: block; }
/* Héroe con foto a todo el ancho bajo un velo oscuro, más denso donde va el texto: en los dos temas, texto claro, como el bloque oscuro */
.heroe { position: relative; isolation: isolate; overflow: hidden; background: var(--bg-dark); color: var(--on-dark); }
.heroe-fondo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.heroe::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(28, 24, 20, .85) 0%, rgba(28, 24, 20, .7) 50%, rgba(28, 24, 20, .22) 100%); }
.heroe-dentro { padding-top: clamp(48px, 9vw, 112px); padding-bottom: clamp(48px, 8vw, 104px); }
.heroe h1 { max-width: 21ch; text-shadow: 0 1px 14px rgba(0, 0, 0, .3); }
/* Todo en --on-dark: sobre la foto, el gris apagado no llega a 4,5:1 en las zonas más claras */
.heroe .antetitulo, .heroe .entradilla, .heroe .ejemplos { color: var(--on-dark); }
.heroe .ejemplos a { color: var(--on-dark); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .32); }
.heroe .ejemplos a:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .6); }
.heroe :focus-visible { outline-color: var(--on-dark); }
@media (max-width: 720px) {
  .heroe::before { background: rgba(28, 24, 20, .7); }
}
.antetitulo { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-light); margin-bottom: 14px; }
.banda { padding: clamp(36px, 6vw, 64px) 0; }
.banda-suave { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Buscador */
.buscador { display: flex; align-items: center; gap: 8px; max-width: 640px; margin: 22px 0 14px; background: var(--bg-surface);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 5px 5px 20px; box-shadow: var(--shadow-md); }
.buscador input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: var(--text-main); padding: 10px 0;
  outline: none; }
.buscador input::placeholder { color: var(--header-search-placeholder); }
.buscador:focus-within { border-color: var(--primary); }
.buscador button { flex: none; border: 0; border-radius: 999px; background: var(--primary-solid); color: var(--on-primary); font: inherit; font-weight: 700;
  padding: 11px 22px; cursor: pointer; }
.buscador button:hover { background: var(--primary-solid-hover); }
.ejemplos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .9rem; color: var(--text-light); }
.ejemplos a { color: var(--text-main); text-decoration: none; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; }
.ejemplos a:hover { border-color: var(--border-strong); }

/* Tarjetas de los portales */
.portales { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.portal { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 22px 20px; display: flex;
  flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); color: var(--pc); }
.portal:hover { border-color: var(--pc); }
.portal p { margin: 0; color: var(--text-main); }
.logotipo-portal { display: block; height: 40px; width: auto; max-width: 100%; margin-bottom: 8px; }
.portal-que { font-weight: 700; }
.pronto { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--text-muted); background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 2px; }
.portal-cifra { font-size: .95rem; }
.portal-cifra strong { display: block; font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.portal .portal-ejemplos { color: var(--text-muted); font-size: .95rem; flex: 1; }
.portal-ir { color: var(--pc); font-weight: 700; margin-top: 10px; }

/* Qué negocio va a cada portal */
.frontera { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.frontera li { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; display: flex;
  flex-direction: column; gap: 4px; color: var(--pc); }
.frontera-cuando { font-weight: 750; font-size: 1.1rem; color: var(--text-main); margin: 0; }
.frontera-ejemplo { color: var(--text-muted); margin: 0 0 8px; flex: 1; }
.logotipo-mini { display: block; height: 30px; width: auto; max-width: 100%; }

/* Negocios y cómo funcionamos en la portada */
.dos { display: grid; gap: 20px 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: center; }
.bloque-oscuro { --relleno: clamp(22px, 4vw, 34px); background: var(--bg-dark); color: var(--on-dark); border-radius: var(--radius-lg);
  padding: var(--relleno); overflow: hidden; }
/* La foto ocupa todo el ancho del bloque, sin su relleno; el bloque recorta las esquinas */
.bloque-foto { display: block; width: calc(100% + 2 * var(--relleno)); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  object-position: 50% 35%; margin: calc(-1 * var(--relleno)) calc(-1 * var(--relleno)) 22px; }
.bloque-oscuro p { color: var(--on-dark-muted); }
.boton { display: inline-block; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 11px 22px; margin-top: 8px; }
.boton-principal { background: var(--primary-solid); color: var(--on-primary); }
.boton-principal:hover { background: var(--primary-solid-hover); }
.claves { padding: clamp(4px, 2vw, 12px) 0; }
.claves ul { margin: 0 0 14px; padding-left: 20px; }
.claves li { margin-bottom: 8px; color: var(--text-muted); }
.claves strong { color: var(--text-main); }

/* Páginas interiores */
.pagina { padding-top: clamp(24px, 5vw, 48px); padding-bottom: 56px; }
.pagina h2 { margin-top: 36px; }
.cabeza { margin-bottom: 8px; }
.cabeza.con-foto img { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); margin: 8px 0 12px; }
@media (min-width: 860px) {
  .cabeza.con-foto { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; }
  .cabeza.con-foto img { margin: 0; }
}
.texto { max-width: 72ch; }
.texto h2 { font-size: 1.3rem; margin-top: 30px; }
.acciones { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.acciones > li { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; color: var(--pc); }
.acciones ul { color: var(--text-main); padding-left: 18px; margin: 14px 0; }
.acciones ul li { margin-bottom: 6px; }
.acciones-enlaces { margin: 0; }
.acciones-enlaces a { color: var(--pc); font-weight: 700; }
.elegir { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 12px; max-width: 720px; }
.elegir a { display: grid; gap: 4px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px;
  text-decoration: none; color: var(--pc); box-shadow: var(--shadow-sm); }
.elegir a:hover { border-color: var(--pc); }
.elegir .logotipo-portal { height: 34px; margin-bottom: 2px; }
.elegir-que { color: var(--text-main); font-weight: 600; }
.elegir-ir { color: var(--pc); font-weight: 700; }
.probable { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--on-primary); background: var(--primary-solid); border-radius: 999px;
  padding: 1px 9px; margin-left: 6px; vertical-align: 2px; }

/* Legales */
.legal { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 8px clamp(18px, 4vw, 32px) 24px;
  max-width: 820px; }
.legal h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-top: 20px; }
.legal h2 { font-size: 1.15rem; margin: 26px 0 8px; }
.legal li { margin: 4px 0; }
.tabla-scroll { overflow-x: auto; }
.tabla-scroll table { border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.tabla-scroll th, .tabla-scroll td { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; text-align: left; }

/* Pie: los tres portales y los legales */
.pie { border-top: 1px solid var(--header-border); background: var(--header-bg); font-size: .9rem; color: var(--text-muted); padding: 28px 0 22px; }
.pie-red p { margin-bottom: 10px; }
.pie-red ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; }
.pie-portal { display: inline-flex; color: var(--pc); }
.pie-portal:hover { opacity: .85; }
.logotipo-pie { display: block; height: 30px; width: auto; }
.pie-legal { margin: 0 0 6px; }
.pie-legal a { color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
  .portal, .elegir a, .ejemplos a, .tema, .buscador { transition: border-color .15s, background-color .15s; }
}
