/* ============================================================
   gestoresgranada.com — Felisa Herrera Talavera
   Asesoría de autónomos en Granada
   Identidad: verde abeto + ámbar, tipografía Nunito (local).
   Sin dependencias externas. Analítica solo con consentimiento.
   ============================================================ */

/* ---------- Fuentes locales (OFL) ---------- */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/Nunito/nunito-v26-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/Nunito/nunito-v26-latin-700.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --verde: #175c4f;
  --verde-osc: #0e4239;
  --verde-suave: #eaf1ec;
  --tinta: #1f2d28;
  --gris: #56655f;
  --papel: #fcfbf8;
  --blanco: #ffffff;
  --linea: #d9e1da;
  --ambar: #96690f;
  --wa: #1da851;
  --radio: 10px;
  --sombra: 0 1px 3px rgba(20, 45, 38, 0.10);
  --ancho: 1080px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--verde); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--verde-osc); }
:focus-visible { outline: 3px solid var(--verde); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--tinta); margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1.9em; }
ul { margin: 0 0 1.9em; padding-left: 1.2em; }
li { margin-bottom: 0.85em; }
li::marker { color: var(--verde); }
strong { font-weight: 700; }

.contenedor { max-width: var(--ancho); margin: 0 auto; padding: 0 1.25rem; }
.texto { max-width: 66ch; }

/* ---------- Accesibilidad: saltar al contenido ---------- */
.salto {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--verde); color: var(--blanco);
  padding: 0.6rem 1rem; border-radius: 0 0 var(--radio) 0; text-decoration: none;
}
.salto:focus { left: 0; color: var(--blanco); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
}
.cabecera__fila {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.8rem 0;
}
.marca { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.marca__sello {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  background: var(--verde); color: var(--blanco);
  border-radius: 9px; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.02em;
}
.marca__nombre { font-weight: 700; color: var(--tinta); line-height: 1.15; }
.marca__nombre small { display: block; font-weight: 400; color: var(--gris); font-size: 0.78rem; }

.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { text-decoration: none; color: var(--tinta); font-size: 0.98rem; }
.nav a:hover { color: var(--verde); }
.nav a[aria-current="page"] { color: var(--verde); font-weight: 700; }
.nav .boton { margin-left: 0.4rem; }

.hamburguesa {
  display: none; background: none; border: 1px solid var(--linea);
  border-radius: 8px; padding: 0.5rem 0.65rem; cursor: pointer; color: var(--tinta);
}
.hamburguesa span { display: block; width: 20px; height: 2px; background: currentColor; margin: 4px 0; }

.menu-movil {
  position: fixed; inset: 0; z-index: 60;
  background: var(--blanco); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.menu-movil[hidden] { display: none; }
.menu-movil a { padding: 0.75rem 0.5rem; font-size: 1.15rem; text-decoration: none; color: var(--tinta); border-bottom: 1px solid var(--linea); }
.menu-movil__cerrar { align-self: flex-end; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--tinta); padding: 0.25rem 0.5rem; }

@media (max-width: 1000px) {
  .nav { display: none; }
  .hamburguesa { display: block; }
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; border-radius: var(--radio);
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; line-height: 1.2;
}
.boton--verde { background: var(--verde); color: var(--blanco); }
.boton--verde:hover { background: var(--verde-osc); color: var(--blanco); }
.boton--wa { background: var(--wa); color: var(--blanco); }
.boton--wa:hover { background: #178a42; color: var(--blanco); }
.boton--borde { background: var(--blanco); color: var(--verde); border-color: var(--verde); }
.boton--borde:hover { background: var(--verde-suave); }
.botonera { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.4rem 0 0.5rem; }

/* ---------- Hero ---------- */
.hero { padding: 3.2rem 0 2.6rem; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.hero__nota { color: var(--gris); margin-top: 0.9rem; font-size: 0.95rem; }
.hero h1 { max-width: 21ch; }
.hero__intro { font-size: 1.15rem; max-width: 58ch; color: var(--tinta); }

/* Fichas de modelos: el elemento identitario de la portada */
.fichas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.ficha {
  background: var(--papel); border: 1px solid var(--linea); border-top: 4px solid var(--ambar);
  border-radius: 6px 6px var(--radio) var(--radio);
  padding: 0.8rem 1.1rem 0.7rem; min-width: 128px; box-shadow: var(--sombra);
}
.ficha b { display: block; font-size: 1.7rem; color: var(--verde-osc); letter-spacing: 0.01em; }
.ficha span { display: block; font-size: 0.82rem; color: var(--gris); line-height: 1.3; margin-top: 0.15rem; }

/* ---------- Secciones ---------- */
.seccion { padding: 4.6rem 0; }
@media (max-width: 720px) { .seccion { padding: 3.4rem 0; } }
.seccion--panel { background: var(--verde-suave); border-block: 1px solid var(--linea); }
.seccion__cabeza { max-width: 62ch; margin-bottom: 2.6rem; }
.seccion__cabeza p { color: var(--gris); }
.seccion__cabeza > :last-child,
.seccion .contenedor > :last-child { margin-bottom: 0; }

/* Tarjetas de servicio */
.servicios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 860px) { .servicios { grid-template-columns: 1fr; } }
.servicio {
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem 1.4rem 1.2rem; box-shadow: var(--sombra);
  display: flex; flex-direction: column;
}
.servicio h3 { color: var(--verde-osc); }
.servicio ul { font-size: 0.97rem; margin-bottom: 1rem; }
.servicio .enlace { margin-top: auto; font-weight: 700; }

/* Proceso (sí es una secuencia real) */
.proceso { counter-reset: paso; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; padding: 0; margin: 0; list-style: none; }
@media (max-width: 860px) { .proceso { grid-template-columns: 1fr; } }
.proceso li { counter-increment: paso; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.2rem 1.3rem; margin: 0; }
.proceso li::before {
  content: counter(paso);
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; margin-bottom: 0.6rem;
  background: var(--verde); color: var(--blanco);
  border-radius: 50%; font-weight: 700;
}
.proceso h3 { margin-bottom: 0.35rem; }
.proceso p { margin: 0; font-size: 0.97rem; color: var(--gris); }

/* Listas de trámites en landings */
.tramites { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
@media (max-width: 720px) { .tramites { grid-template-columns: 1fr; } }
.tramites li { margin-bottom: 1.5em; }

/* FAQ */
.faq details { border: 1px solid var(--linea); border-radius: var(--radio); background: var(--blanco); margin-bottom: 0.9rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: 0.9rem 1.1rem; list-style-position: inside; }
.faq summary:hover { color: var(--verde); }
.faq details[open] summary { border-bottom: 1px solid var(--linea); }
.faq .faq__cuerpo { padding: 1.1rem 1.3rem; }
.faq .faq__cuerpo p:last-child { margin-bottom: 0; }

/* Aviso de especialización */
.solo-autonomos {
  border-left: 4px solid var(--ambar); background: var(--blanco);
  padding: 1.6rem 1.8rem; border-radius: 0 var(--radio) var(--radio) 0;
  max-width: 70ch;
}
.solo-autonomos p:last-child { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.contacto-rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .contacto-rejilla { grid-template-columns: 1fr; } }
.dato { margin-bottom: 1.1rem; }
.dato b { display: block; color: var(--verde-osc); }
.dato a { font-size: 1.05rem; }

.mapa-caja {
  position: relative; border: 1px solid var(--linea); border-radius: var(--radio);
  overflow: hidden; background: var(--verde-suave); min-height: 340px;
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
}
.mapa-caja iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapa-caja p { color: var(--gris); font-size: 0.92rem; max-width: 40ch; }

/* ---------- CTA final ---------- */
.cta-final { background: var(--verde-osc); color: var(--blanco); }
.cta-final h2, .cta-final p { color: var(--blanco); }
.cta-final p { opacity: 0.9; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #cfd8d3; padding: 2.6rem 0 1.6rem; font-size: 0.95rem; }
.pie a { color: #e8eeea; }
.pie a:hover { color: var(--blanco); }
.pie__rejilla { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 1.8rem; }
@media (max-width: 860px) { .pie__rejilla { grid-template-columns: 1fr; } }
.pie h3 { color: var(--blanco); font-size: 1rem; margin-bottom: 0.7rem; }
.pie ul { list-style: none; padding: 0; }
.pie address { font-style: normal; }
.pie__legal { border-top: 1px solid #3a4742; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; justify-content: space-between; color: #a9b6b0; font-size: 0.88rem; }
.pie__legal ul { display: flex; flex-wrap: wrap; gap: 1.2rem; margin: 0; }

/* ---------- Páginas legales ---------- */
.legal h2 { margin-top: 1.6em; }
.legal { max-width: 76ch; }

/* ---------- Utilidades ---------- */
.migas { font-size: 0.88rem; color: var(--gris); margin: 1.2rem 0 0; }
.migas a { color: var(--gris); }
.subtexto { color: var(--gris); }
.pendiente { background: #fff3d6; border: 1px dashed var(--ambar); padding: 0.1em 0.35em; border-radius: 4px; }

/* ============================================================
   v3 — Hero en dos columnas, iconos, hechos y retrato
   ============================================================ */
.hero__rejilla { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.6rem; align-items: center; }
@media (max-width: 920px) { .hero__rejilla { grid-template-columns: 1fr; } }

.plazos {
  background: var(--blanco); border: 1px solid var(--linea); border-top: 4px solid var(--ambar);
  border-radius: 6px 6px var(--radio) var(--radio); box-shadow: var(--sombra);
  padding: 1.3rem 1.4rem 1.1rem; max-width: 380px; justify-self: end; width: 100%;
}
@media (max-width: 920px) { .plazos { justify-self: start; margin-top: 1.4rem; } }
.plazos__titulo { font-weight: 700; font-size: 1.08rem; color: var(--verde-osc); margin: 0 0 0.7rem; }
.plazos ul { list-style: none; margin: 0 0 0.8rem; padding: 0; }
.plazos li { display: flex; align-items: baseline; gap: 0.55rem; padding: 0.5rem 0; margin: 0; border-bottom: 1px dashed var(--linea); font-size: 0.95rem; }
.plazos li:last-child { border-bottom: 0; }
.plazos li::before { content: "✓"; color: var(--verde); font-weight: 700; }
.plazos li span { flex: 1; color: var(--gris); }
.plazos li b { color: var(--verde-osc); white-space: nowrap; }
.plazos__pie { margin: 0; font-size: 0.85rem; color: var(--gris); }

.servicio__icono { display: block; width: 32px; height: 32px; color: var(--verde); margin-bottom: 0.55rem; }
.servicio__icono svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.hechos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: 1.6rem; max-width: 74ch; }
@media (max-width: 860px) { .hechos { grid-template-columns: 1fr; } }
.hechos > div { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: 0.95rem 1.15rem; }
.hechos strong { display: block; color: var(--verde-osc); font-size: 1.08rem; }
.hechos span { color: var(--gris); font-size: 0.9rem; }

.quien { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: 2.6rem; align-items: center; }
@media (max-width: 860px) { .quien { grid-template-columns: 1fr; } }
.quien figure { margin: 0; max-width: 380px; }
.quien img { width: 100%; height: auto; border-radius: var(--radio); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.quien figcaption { font-size: 0.85rem; color: var(--gris); margin-top: 0.5rem; }

/* ============================================================
   v4 — Fotos: hero, bandas de imagen y retrato real
   ============================================================ */
.hero__foto {
  width: 100%; max-width: 520px; height: auto; justify-self: end;
  border-radius: var(--radio); border: 1px solid var(--linea); box-shadow: var(--sombra);
}
@media (max-width: 920px) { .hero__foto { max-width: 100%; justify-self: start; margin-top: 1.4rem; } }

.media { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.4rem; align-items: center; }
.media--inversa { grid-template-columns: 0.85fr 1.15fr; }
.media--cabeza { margin-bottom: 1.8rem; }
.media .seccion__cabeza { margin-bottom: 0; }
.media__foto {
  width: 100%; height: auto;
  border-radius: var(--radio); border: 1px solid var(--linea); box-shadow: var(--sombra);
}
@media (max-width: 860px) {
  .media, .media--inversa { grid-template-columns: 1fr; }
  .media--inversa .media__foto { order: 2; }
}

/* ============================================================
   v5 — Cabecera oscura (verde abeto), diferenciada del cuerpo
   ============================================================ */
.cabecera { background: var(--verde-osc); border-bottom: 1px solid rgba(0, 0, 0, 0.18); }
.marca__sello { background: var(--blanco); color: var(--verde-osc); }
.marca__nombre { color: var(--blanco); }
.marca__nombre small { color: #c9d8d1; }
.nav a { color: #d9e4de; }
.nav a:hover { color: var(--blanco); }
.nav a[aria-current="page"] { color: var(--blanco); }
.hamburguesa { border-color: rgba(255, 255, 255, 0.4); color: var(--blanco); }
.cabecera :focus-visible { outline-color: var(--blanco); }
.salto { background: var(--blanco); color: var(--verde-osc); }

.menu-movil { background: var(--verde-osc); }
.menu-movil a { color: var(--blanco); border-bottom-color: rgba(255, 255, 255, 0.16); }
.menu-movil__cerrar { color: var(--blanco); }

/* ---------- Aviso de cookies (Rechazar y Aceptar con el mismo formato) ---------- */
.cookies {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1000;
  max-width: 760px; margin: 0 auto; padding: 1rem 1.2rem;
  background: var(--blanco); color: var(--tinta);
  border: 1px solid var(--linea); border-radius: var(--radio);
  box-shadow: 0 6px 24px rgba(20, 45, 38, 0.18);
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem;
}
.cookies__texto { margin: 0; flex: 1 1 320px; font-size: 0.95rem; line-height: 1.5; }
.cookies__texto a { color: var(--verde); }
.cookies__botones { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.cookies__boton {
  min-width: 7.5rem; padding: 0.65rem 1.1rem; border-radius: var(--radio);
  border: 2px solid var(--verde); background: var(--verde); color: var(--blanco);
  font: inherit; font-weight: 700; cursor: pointer;
}
.cookies__boton:hover { background: var(--verde-osc); border-color: var(--verde-osc); }
.cookies__boton:focus-visible, .pie__cookies:focus-visible { outline: 3px solid var(--ambar); outline-offset: 2px; }
@media (max-width: 520px) {
  .cookies__botones { width: 100%; }
  .cookies__boton { flex: 1; }
}
.pie__cookies {
  background: none; border: 0; padding: 0; font: inherit; color: #e8eeea;
  text-decoration: underline; cursor: pointer;
}
.pie__cookies:hover { color: var(--blanco); }

/* ---------- Tabla de la política de cookies ---------- */
.tabla-legal { overflow-x: auto; margin: 1rem 0 1.4rem; }
.tabla-legal table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 560px; }
.tabla-legal th, .tabla-legal td { border: 1px solid var(--linea); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
.tabla-legal th { background: var(--verde-suave); }
.legal__fecha { color: var(--gris); font-size: 0.9rem; }

/* ---------- Cabecera: botón de llamada junto a WhatsApp (escritorio) ---------- */
.nav .boton { padding: 0.6rem 1rem; font-size: 0.95rem; }
.nav .boton + .boton { margin-left: -0.6rem; }
.nav .boton--tel { background: transparent; color: var(--blanco); border-color: rgba(255, 255, 255, 0.55); }
.nav .boton--tel:hover { color: var(--blanco); background: rgba(255, 255, 255, 0.12); border-color: var(--blanco); }
.boton--tel svg { flex: none; }
@media (max-width: 1120px) { .nav { gap: 1.1rem; } }

/* ---------- Barra fija de contacto en móvil: llamar, WhatsApp y email ---------- */
.barra-movil { display: none; }
@media (max-width: 1000px) {
  .barra-movil {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom));
    background: var(--verde-osc); border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 16px rgba(20, 45, 38, 0.18);
  }
  .barra-movil__btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    min-height: 3.4rem; padding: 0.4rem 0.25rem; border-radius: var(--radio);
    background: rgba(255, 255, 255, 0.1); color: var(--blanco);
    font-size: 0.8rem; font-weight: 700; line-height: 1.1; text-decoration: none;
  }
  .barra-movil__btn:hover, .barra-movil__btn:focus-visible { background: rgba(255, 255, 255, 0.2); color: var(--blanco); }
  .barra-movil__btn--wa { background: var(--wa); }
  .barra-movil__btn--wa:hover, .barra-movil__btn--wa:focus-visible { background: #178a42; }
  .barra-movil__btn--tel { background: #cfe0d6; color: var(--verde-osc); }
  .barra-movil__btn--tel:hover, .barra-movil__btn--tel:focus-visible { background: #b9d1c3; color: var(--verde-osc); }
  .barra-movil__btn--email { background: var(--ambar); }
  .barra-movil__btn--email:hover, .barra-movil__btn--email:focus-visible { background: #7d570c; }
  .barra-movil :focus-visible { outline-color: var(--blanco); }
  /* Que la barra no tape el final de la página ni el aviso de cookies */
  body { padding-bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
  .cookies { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
}

/* Botón de llamada del menú móvil (mismo tono menta que la barra inferior) */
.menu-movil .boton { margin-top: 0.6rem; border-bottom: 2px solid transparent; }
.menu-movil .boton--llamar { background: #cfe0d6; color: var(--verde-osc); border-color: #cfe0d6; }
.menu-movil .boton--llamar:hover, .menu-movil .boton--llamar:focus-visible { background: #b9d1c3; border-color: #b9d1c3; color: var(--verde-osc); }
