/* M&H Marketing — hoja de estilos de la versión estática
   Identidad original: azul corporativo #00a0e3, titulares #202020, texto #595959, tipografía Poppins. */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }

:root {
  --blue: #00a0e3;
  --blue-dark: #0081b8;
  --navy: #0b3169;
  --ink: #202020;
  --text: #595959;
  --muted: #8a8a8a;
  --line: #e3e8ec;
  --soft: #f3f8fb;
  --black: #0d0d0d;
  --white: #fff;
  --radius: 4px;
  --wrap: 1180px;
  --gap: clamp(20px, 3vw, 40px);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--text); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: var(--white); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: var(--radius); }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.accent { color: var(--blue) !important; }
.ink { color: var(--ink) !important; }
h5 .ink, h6 .ink { color: var(--ink); }

/* ---------- tipografía ---------- */
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; line-height: 1.25; margin: 1.4em 0 .5em; letter-spacing: -.005em; }
h1:first-child, h2:first-child, h3:first-child, h4:first-child, h5:first-child, h6:first-child { margin-top: 0; }
h1 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
h3, h1.as-h3 { font-size: clamp(1.45rem, 2.3vw, 2rem); text-transform: uppercase; }
h4, h1.as-h4 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); text-transform: uppercase; }
.text h4 + p, .text h3 + p { margin-top: 0; }
h5, h1.as-h5 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--blue); }
h6, h1.as-h6 { font-size: 1.1rem; color: var(--blue); }
p { margin: 0 0 1em; }
.text { max-width: 72ch; }
.col-12 > .text { max-width: none; }
.text ul, .text ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.text li { margin: .3em 0; }
.text li::marker { color: var(--blue); }
.text strong { color: var(--ink); font-weight: 600; }
.legal h2 { font-size: 1.25rem; }
.legal h3 { font-size: 1.4rem; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .8em 1.4em; border: 0; border-radius: var(--radius);
  background: var(--blue); color: var(--white); font: 500 .78rem/1.2 var(--font); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, transform .2s; }
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px currentColor; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-small { padding: .55em .9em; font-size: .7rem; letter-spacing: .04em; text-transform: none; }
.btn-wrap { text-align: center; margin: 1.4em 0 0; }

/* ---------- cabecera ---------- */
.site-header { position: relative; z-index: 20; background: var(--white); }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 104px; }
.logo { display: block; width: clamp(190px, 24vw, 260px); }
.logo img { width: 100%; }
.btn-call { font-size: .9rem; padding: .95em 1.6em; }
.btn-call svg { flex: none; }
.menu-toggle { display: none; }

.main-nav { background: linear-gradient(#2b2b2b, #171717); border-top: 1px solid #3a3a3a; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.main-nav > ul { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0 auto; padding-top: 0; padding-bottom: 0; }
.main-nav li { position: relative; }
.main-nav a, .main-nav .sub-toggle { display: flex; align-items: center; gap: 6px; padding: 15px 16px; color: #f2f2f2; font: 600 .7rem/1.2 var(--font);
  letter-spacing: .03em; text-transform: uppercase; text-decoration: none; background: none; border: 0; cursor: pointer; }
.main-nav a:hover, .main-nav .sub-toggle:hover, .main-nav [aria-current="page"], .main-nav .sub-toggle.is-current { background: #000; color: var(--white); }
.main-nav [aria-current="page"] { box-shadow: inset 0 -3px 0 var(--blue); }
.main-nav .sub { list-style: none; margin: 0; padding: 6px 0; min-width: 220px; position: absolute; left: 0; top: 100%; background: #111;
  box-shadow: 0 10px 24px rgba(0,0,0,.25); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
.main-nav .sub a { text-transform: none; font-size: .82rem; font-weight: 500; letter-spacing: 0; padding: 11px 18px; }
.main-nav .has-sub:hover .sub, .main-nav .has-sub:focus-within .sub, .main-nav .has-sub.open .sub { opacity: 1; visibility: visible; transform: none; }

/* ---------- rejilla de contenido ---------- */
main { min-height: 40vh; }
.row { padding: clamp(36px, 5vw, 64px) 0 0; }
main > .row:last-of-type { padding-bottom: clamp(48px, 6vw, 80px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; } .col-9 { grid-column: span 9; } .col-12 { grid-column: span 12; }
.col > * + * { margin-top: 1.4rem; }
.col > .text + .text { margin-top: .2rem; }

.single-image img { width: 100%; border-radius: var(--radius); box-shadow: 0 14px 30px -18px rgba(0,0,0,.45); }
.page-quienes-somos .single-image { max-width: 760px; margin-left: auto; margin-right: auto; }
.page-quienes-somos .single-image img { box-shadow: none; }

hr.sep { border: 0; height: 2px; background: var(--blue); margin: .6rem 0 0; }

/* acordeón de preguntas frecuentes */
.accordion { display: grid; gap: 2px; }
.accordion details { background: var(--blue); color: var(--white); border-radius: 2px; }
.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 12px; height: 12px; background:
  linear-gradient(currentColor, currentColor) center/12px 2px no-repeat, linear-gradient(currentColor, currentColor) center/2px 12px no-repeat; transition: transform .2s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion summary:hover { background: var(--blue-dark); }
.accordion .text { background: var(--white); color: var(--text); padding: 18px 22px 8px; border: 1px solid var(--line); border-top: 0; max-width: none; }

/* formulario */
.contact-form { display: grid; gap: 12px; background: var(--white); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form input[type="tel"], .contact-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #00a0e4; border-radius: 2px; background: var(--white); color: #252525;
  font: 500 .82rem/1.4 var(--font); }
.contact-form ::placeholder { color: #afafaf; opacity: 1; }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid rgba(0,160,227,.35); outline-offset: 0; }
.contact-form .accept { display: flex; align-items: center; gap: 8px; font-size: .95rem; }
.contact-form .accept a { color: var(--navy); text-decoration: none; }
.contact-form .accept a:hover { text-decoration: underline; }
.contact-form .accept input { width: 16px; height: 16px; accent-color: var(--blue); }
.contact-form .btn { justify-self: start; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form [aria-invalid="true"] { border-color: #d0021b; }
.form-status { margin: 0; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: #1b7f3b; } .form-status.err { color: #c0172b; }
.contact-form.is-sending .btn { opacity: .6; pointer-events: none; }

/* slider de portada */
.slider { position: relative; overflow: hidden; border-radius: var(--radius); background: #e9eef2; aspect-ratio: 760 / 380; }
.slides, .slide { position: absolute; inset: 0; }
.slide { display: block; opacity: 0; transition: opacity .8s ease; color: var(--white); text-decoration: none; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide picture, .slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,0) 40%, rgba(0,0,0,.35)); }
.slide-caption { position: absolute; left: 4%; top: 9%; z-index: 2; max-width: 80%; background: var(--blue); color: var(--white); padding: .55em 1.2em;
  border-radius: 999px; font-weight: 500; font-size: clamp(.85rem, 1.5vw, 1.05rem); box-shadow: 0 8px 20px -10px rgba(0,0,0,.6); }
.slide-btn { position: absolute; left: 50%; bottom: 12%; z-index: 2; transform: translateX(-50%); white-space: nowrap; background: rgba(255,255,255,.95); color: var(--ink);
  padding: .65em 1.4em; border-radius: var(--radius); font: 600 .78rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.slide:hover .slide-btn { background: var(--blue); color: var(--white); }
.slider-arrow { position: absolute; top: 50%; z-index: 3; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.35); color: var(--white); font-size: 26px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.slider:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { background: var(--blue); }
.slider-arrow.prev { left: 12px; } .slider-arrow.next { right: 12px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid var(--white); background: transparent; cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--white); }

/* bloques de acceso de portada */
.page-inicio .row + .row .grid { align-items: stretch; }
.tile { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--blue); text-align: center; }
.tile picture { overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 2; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.tile:hover img { transform: scale(1.05); }
.tile-title { display: block; margin-top: 16px; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.tile:hover .tile-title { color: var(--ink); }

/* galería y visor */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.gallery-item { display: block; position: relative; overflow: hidden; }
.gallery-item img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery + .gallery { margin-top: 24px; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 95vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(0,0,0,.88); }
.lightbox img { max-width: 95vw; max-height: 88vh; width: auto; margin: 0 auto; }
.lightbox button { position: fixed; top: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; cursor: pointer; }
.lightbox .lb-close { right: 14px; } .lightbox .lb-prev { left: 14px; top: 50%; } .lightbox .lb-next { right: 14px; top: 50%; }
.lightbox button:hover { background: var(--blue); }

/* mapa */
.map { position: relative; aspect-ratio: 2 / 1; max-height: 520px; width: 100%; background: var(--soft) center/cover; border-radius: var(--radius); overflow: hidden; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center;
  background: repeating-linear-gradient(45deg, #eef5f9 0 14px, #e6f0f6 14px 28px); }
.map-placeholder p { margin: 0; color: var(--ink); font-weight: 600; }
.page-instalaciones main > .row:first-child .wrap { max-width: none; padding: 0; }
.page-instalaciones main > .row:first-child { padding-top: 0; }
.page-instalaciones main > .row:first-child .map { border-radius: 0; max-height: 600px; }

/* ---------- pie ---------- */
.site-footer { background: #000; color: #cfcfcf; padding: 56px 0 64px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; align-items: start; text-align: center; }
.footer-logo { display: inline-block; width: 260px; max-width: 100%; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 10px; }
.site-footer li ul { margin-top: 2px; }
.site-footer a, .site-footer span { color: #cfcfcf; text-decoration: none; font-size: .95rem; }
.site-footer a:hover { color: var(--blue); }

/* ---------- aviso de cookies ---------- */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: rgba(0,0,0,.92); color: #fff; font-size: .82rem; line-height: 1.45; }
.cookie-bar[hidden] { display: none; }
.cookie-bar p { margin: 0; max-width: 820px; }
.cookie-bar > div { display: flex; gap: 8px; }

/* ---------- adaptación a tabletas ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-2, .col-3, .col-4, .col-6, .col-8, .col-9, .col-12 { grid-column: span 6; }
  .col-empty { display: none; }
  .single-image { max-width: 420px; margin-left: auto; margin-right: auto; }
  .page-inicio .col-3:has(.tile) { grid-column: span 3; }
  .contact-form { max-width: 560px; }
  .main-nav a, .main-nav .sub-toggle { padding: 14px 11px; }
}

/* ---------- adaptación a móviles ---------- */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .header-top { min-height: 76px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .logo { width: 180px; }
  .btn-call { order: 3; width: 100%; font-size: .8rem; padding: .8em 1em; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border: 0; border-radius: var(--radius); background: var(--ink); cursor: pointer; }
  .menu-toggle > span:first-child, .menu-toggle > span:first-child::before, .menu-toggle > span:first-child::after { display: block; width: 20px; height: 2px; background: #fff; position: relative; transition: transform .2s; }
  .menu-toggle > span:first-child::before, .menu-toggle > span:first-child::after { content: ""; position: absolute; left: 0; }
  .menu-toggle > span:first-child::before { top: -6px; } .menu-toggle > span:first-child::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] > span:first-child { background: transparent; }
  .menu-toggle[aria-expanded="true"] > span:first-child::before { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:first-child::after { transform: translateY(-6px) rotate(-45deg); }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; padding: 6px 0 12px; }
  .main-nav a, .main-nav .sub-toggle { width: 100%; justify-content: space-between; padding: 14px 20px; font-size: .78rem; border-bottom: 1px solid #2a2a2a; }
  .main-nav .sub { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: #0b0b0b; }
  .main-nav .has-sub.open .sub { display: block; }
  .main-nav .has-sub:hover .sub { display: none; }
  .main-nav .has-sub.open:hover .sub { display: block; }
  .main-nav .sub a { padding-left: 36px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .slider { aspect-ratio: 4 / 3; }
  .slider-arrow { opacity: 1; width: 34px; height: 34px; font-size: 22px; }
  .slide-btn { bottom: 16%; }
  .accordion summary { padding: 15px 16px; font-size: 1rem; }
  .cookie-bar { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .page-inicio .col-3:has(.tile) { grid-column: span 6; }
  .slide-caption { font-size: .82rem; }
}
