/* =========================================================
   Cerrajeros Lucentum Alicante — style.css
   Paleta: azul marino #16324f / naranja #e2762d / crema #f7f4ef
   ========================================================= */
:root {
  --navy: #16324f;
  --navy-dark: #0d2036;
  --navy-mid: #1e4066;
  --orange: #e2762d;
  --orange-dark: #c96524;
  --orange-text: #ad5410; /* naranja oscurecido: 5.2:1 sobre blanco, apto WCAG AA para texto */
  --orange-cta: #bd5514;  /* naranja de superficies con texto blanco: 4.7:1, apto WCAG AA */
  --orange-cta-dark: #a84a0e;
  --cream: #f7f4ef;
  --white: #ffffff;
  --text: #33414e;
  --text-light: #5b6b7a;
  --border: #e3ded6;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(13, 32, 54, .08);
  --shadow-lg: 0 8px 28px rgba(13, 32, 54, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Anclas (#servicios, #zonas...) no quedan ocultas bajo el header sticky */
[id] { scroll-margin-top: 84px; }

/* Selección de texto con color de marca */
::selection { background: var(--orange); color: #fff; }

/* Foco visible de marca para navegación por teclado */
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); margin-bottom: 1rem; }
h3 { font-size: 1.22rem; margin-bottom: .5rem; }

p { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--orange-text); text-decoration: none; }
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
li { margin-bottom: .35rem; }

.container { width: min(1180px, 92%); margin-inline: auto; }
.container.narrow { width: min(800px, 92%); }
.center { text-align: center; }

.section { padding: 4.2rem 0; }
.section.alt { background: var(--cream); }

.section-kicker {
  color: var(--orange-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  margin-bottom: .4rem;
}
.dark-section .section-kicker, .zones-section .section-kicker { color: var(--orange); }

.section-intro { color: var(--text-light); max-width: 760px; }
.center .section-intro { margin-inline: auto; }

/* ---------- Iconos SVG ---------- */
svg.icon {
  width: 1em; height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
  display: inline-block;
}
.btn svg.icon { width: 1.05em; height: 1.05em; margin-right: .35em; }
.hero-kicker svg.icon { color: var(--orange); margin-right: .3em; }
.hero-badges svg.icon { color: var(--orange); margin-right: .3em; }
.urgency-strip svg.icon { margin-right: .3em; }
.footer-contact svg.icon { color: var(--orange); margin-right: .4em; }
.sticky-call svg.icon { margin-right: .4em; }
.header-cta svg.icon { margin-right: .3em; }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: .78rem 1.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .2s;
  text-decoration: none !important;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(13, 32, 54, .22); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-orange { background: var(--orange-cta); color: #fff; }
.btn-orange:hover { background: var(--orange-cta-dark); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-mid); }
.btn-light-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.85); padding: .5rem 1.1rem; font-size: .92rem; white-space: nowrap; }
.btn-light-outline:hover { background: #fff; color: var(--orange-dark); }

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  display: flex; align-items: center; gap: 1.4rem;
  min-height: 68px; flex-wrap: wrap; padding: .4rem 0;
}
.brand img { width: 150px; height: auto; border-radius: 4px; }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; gap: 1.35rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.main-nav > ul > li > a { display: inline-flex; align-items: center; gap: .3rem; padding: .8rem 0; }
.main-nav a {
  color: #e8edf3; font-weight: 600; font-size: .95rem;
}
.main-nav a:hover { color: var(--orange); text-decoration: none; }
.main-nav li { margin: 0; }

/* Dropdowns (subpáginas) */
.main-nav .has-sub { position: relative; }
.main-nav .has-sub > a { display: inline-flex; align-items: center; gap: .3rem; padding: .8rem 0; }
.main-nav .caret { font-size: .7rem; color: var(--orange); transition: transform .2s; }
.main-nav .sub-menu {
  list-style: none;
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 250px;
  background: var(--navy-dark);
  border: 1px solid rgba(255,255,255,.1);
  border-top: 3px solid var(--orange);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  padding: .4rem 0; margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 110;
}
.main-nav .has-sub:hover > .sub-menu,
.main-nav .has-sub:focus-within > .sub-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.main-nav .has-sub:hover > a .caret,
.main-nav .has-sub:focus-within > a .caret { transform: rotate(180deg); }
.main-nav .sub-menu li { margin: 0; }
.main-nav .sub-menu a {
  display: block;
  padding: .55rem 1.2rem;
  font-size: .9rem; font-weight: 500;
  color: #dbe4ee;
  white-space: nowrap;
}
.main-nav .sub-menu a:hover {
  background: var(--navy-mid);
  color: var(--orange);
  text-decoration: none;
}
.header-cta { padding: .55rem 1.15rem; font-size: .92rem; white-space: nowrap; }
.header-cta .cta-short { display: none; }
@media (max-width: 1080px) {
  .header-cta .cta-num { display: none; }
  .header-cta .cta-short { display: inline; }
}
/* Checkbox del menú: oculto visualmente pero enfocable por teclado */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-toggle-label { display: none; cursor: pointer; }

@media (max-width: 900px) {
  .main-nav { order: 3; width: 100%; margin: 0; display: none; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; padding: .4rem 0 .8rem; align-items: stretch; }
  .main-nav > ul > li { border-top: 1px solid rgba(255,255,255,.08); margin: 0; }
  .main-nav a { display: block; padding: .7rem .2rem; }
  .main-nav > ul > li > a { display: flex; justify-content: flex-start; padding: .7rem .2rem; }
  .nav-toggle-label {
    display: flex; flex-direction: column; gap: 5px; margin-left: auto; padding: .5rem;
  }
  .nav-toggle-label span { width: 26px; height: 3px; background: #fff; border-radius: 2px; }
  .header-cta { margin-left: .2rem; }

  /* Dropdowns en móvil: submenú visible e indentado, sin posicionamiento flotante */
  .main-nav .has-sub > a { display: flex; justify-content: flex-start; padding: .7rem .2rem; }
  .main-nav .sub-menu {
    position: static;
    transform: none;
    opacity: 1; visibility: visible;
    min-width: 0;
    background: rgba(255,255,255,.04);
    border: 0; border-left: 3px solid var(--orange);
    border-radius: 0;
    box-shadow: none;
    margin: 0 0 .5rem .6rem;
    padding: .15rem 0;
  }
  .main-nav .sub-menu a { padding: .5rem .9rem; white-space: normal; }
  .main-nav .has-sub:hover > a .caret,
  .main-nav .has-sub:focus-within > a .caret { transform: none; }
}

/* ---------- Hero ---------- */
.hero {
  background-color: var(--navy-dark); /* respaldo mientras carga o si falla la foto */
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 4.5rem 0 4rem;
}
.hero-box { max-width: 620px; }
.hero-kicker {
  display: inline-block;
  background: rgba(226, 118, 45, .18);
  border: 1px solid var(--orange);
  color: #ffd9b8;
  font-size: .82rem; font-weight: 700;
  padding: .25rem .8rem; border-radius: 999px;
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; margin-bottom: 1rem; text-shadow: 0 2px 12px rgba(13, 32, 54, .45); text-wrap: balance; }
.hero-lead { color: #dbe4ee; font-size: 1.05rem; margin-bottom: 1.6rem; text-shadow: 0 1px 6px rgba(13, 32, 54, .5); }
.hero-ctas { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-badges { list-style: none; padding: 0; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.hero-badges li { color: #cfdae6; font-size: .9rem; font-weight: 600; }

/* ---------- Franja urgencia ---------- */
.urgency-strip { background: var(--orange-cta); color: #fff; padding: .65rem 0; }
.urgency-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.urgency-inner p { margin: 0; font-weight: 600; font-size: .95rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--cream); border-bottom: 1px solid var(--border); font-size: .88rem; }
.breadcrumb ol { list-style: none; display: flex; gap: .5rem; padding: .55rem 0; margin: 0; flex-wrap: wrap; }
.breadcrumb li + li::before { content: "›"; margin-right: .5rem; color: var(--text-light); }
.breadcrumb li[aria-current] { color: var(--text-light); }

/* ---------- Grid servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: block;
  color: var(--text);
  text-decoration: none !important;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 10px;
  background: var(--navy); color: var(--orange);
  font-size: 1.5rem; margin-bottom: .9rem;
}
.service-icon svg.icon { width: 26px; height: 26px; vertical-align: 0; }
.service-card h3 { color: var(--navy); }
.service-card p { font-size: .95rem; color: var(--text-light); margin-bottom: .8rem; }
.service-card .card-link { color: var(--orange-text); font-weight: 700; font-size: .92rem; }

/* ---------- Sección con imagen ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.split-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; max-height: 520px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Features (¿Por qué elegirnos?) ---------- */
.dark-section { background: var(--navy-dark); color: #d5dfea; }
.dark-section h2, .dark-section h3 { color: #fff; }
.dark-section .section-kicker { color: var(--orange); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,.09);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  padding: 1.5rem 1.4rem;
}
.feature-card p { font-size: .93rem; color: #c3d0dd; margin: 0; }

/* ---------- Zonas ---------- */
.zones-section {
  background-image: linear-gradient(rgba(13, 32, 54, .88), rgba(13, 32, 54, .88)), url('/img/zonas-alicante.webp');
  background-size: cover;
  background-position: center;
  color: #d5dfea;
}
.zones-section h2 { color: #fff; }
.zones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem;
  margin-top: 2rem;
}
.zone-pill {
  display: flex; align-items: center; gap: .55rem;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: .6rem 1.2rem;
  color: #eef3f8; font-weight: 600; font-size: .95rem;
  text-decoration: none !important;
  transition: background .2s;
}
.zone-pill .pin { color: var(--orange); display: inline-flex; }
.zone-pill .pin svg.icon { width: 16px; height: 16px; }
span.zone-pill { cursor: default; opacity: .72; }
a.zone-pill { border-color: rgba(226, 118, 45, .65); }
a.zone-pill::after { content: "\203A"; margin-left: auto; color: var(--orange); font-weight: 700; font-size: 1.1rem; }
a.zone-pill:hover { text-decoration: none; }
a.zone-pill:hover { background: rgba(226, 118, 45, .35); }

/* ---------- Prose (contenido largo) ---------- */
.prose h2 { margin-top: 2.4rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7rem; color: var(--navy-mid); }
.prose ul li::marker { color: var(--orange); }
.prose .highlight-box {
  background: var(--cream);
  border-left: 4px solid var(--orange);
  border-radius: 0 8px 8px 0;
  padding: 1.2rem 1.4rem;
  margin: 1.6rem 0;
}
.prose .highlight-box p { margin-bottom: .4rem; }
.prose .highlight-box p:last-child { margin-bottom: 0; }

/* ---------- CTA banda ---------- */
.cta-band { background: var(--orange-cta); color: #fff; text-align: center; padding: 3rem 0; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 680px; margin: 0 auto 1.4rem; }
.cta-band .btn-navy { background: var(--navy-dark); }

/* ---------- FAQ ---------- */
.faq-section { background: var(--cream); }
.faq-list { margin-top: 1.8rem; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: .8rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-weight: 700;
  color: var(--navy);
  position: relative;
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--cream); }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 1.2rem; top: 50%;
  transform: translateY(-50%) rotate(0deg);
  color: var(--orange-text); font-size: 1.5rem; font-weight: 400;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item[open] summary { border-bottom: 1px solid var(--border); }
.faq-answer { padding: 1rem 1.3rem; font-size: .97rem; color: var(--text-light); }

/* ---------- Contacto ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.3rem;
  margin-top: 2.2rem;
  text-align: center;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem 1.3rem;
  box-shadow: var(--shadow);
}
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--navy); color: var(--orange); font-size: 1.4rem;
  margin-bottom: .8rem;
}
.contact-icon svg.icon { width: 24px; height: 24px; vertical-align: 0; }
.contact-card p { font-size: .97rem; margin: 0; }
.contact-card a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #b9c7d5; font-size: .93rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 2.2rem;
  padding: 3.2rem 0 2.4rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h3 {
  color: #fff; font-size: 1.02rem; margin-bottom: .9rem;
  border-bottom: 2px solid var(--orange); display: inline-block; padding-bottom: .3rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .45rem; }
.footer-col a { color: #b9c7d5; }
.footer-col a:hover { color: var(--orange); }
.footer-contact li { line-height: 1.5; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.1rem 0; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; flex-wrap: wrap; font-size: .85rem;
}
.footer-bottom p { margin: 0; }
.footer-legal { list-style: none; display: flex; gap: 1.2rem; padding: 0; margin: 0; }
.footer-legal a { color: #b9c7d5; }

/* ---------- Sticky call (móvil) ---------- */
.sticky-call {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  background: var(--orange-cta); color: #fff;
  text-align: center; font-weight: 700; font-size: 1.05rem;
  white-space: nowrap; overflow: hidden;
  padding: .95rem 1rem calc(.95rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -3px 12px rgba(0,0,0,.25);
  text-decoration: none !important;
}
@media (max-width: 760px) {
  .sticky-call { display: block; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 350px) {
  .sticky-call .sc-label { display: none; }
}

/* ---------- Figura de contenido ---------- */
.content-figure { margin: 0 0 3.5rem; }
.content-figure img {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  object-position: center 35%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.content-figure figcaption {
  margin-top: .7rem;
  font-size: .92rem;
  color: var(--text-light);
  text-align: center;
}

/* ---------- Ajustes móviles: touch targets y header compacto ---------- */
@media (max-width: 900px) {
  .main-nav .sub-menu a { padding: .7rem .9rem; }
  .zone-pill { padding: .75rem 1.2rem; }
  .footer-col li { margin-bottom: .65rem; }
}
@media (max-width: 430px) {
  .brand img { width: 118px; }
  .header-cta { padding: .45rem .75rem; font-size: .85rem; }
  .header-inner { gap: .8rem; }
}

/* ---------- Página actual en la navegación ---------- */
.main-nav a[aria-current="page"] { color: var(--orange); }

/* ---------- Legales ---------- */
.legal-hero { background: var(--navy-dark); padding: 3rem 0; }
.legal-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.legal-body { padding: 3rem 0 4rem; }
.legal-body h2 { margin-top: 2rem; font-size: 1.35rem; }
.legal-body ul { margin-bottom: 1.2rem; }

/* ---------- Tabla responsive ---------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--border); padding: .65rem .8rem; text-align: left; }
th { background: var(--navy); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: var(--cream); }
