/* ==========================================================================
   Protección Civil CDMX — hoja de estilos estática
   Reconstrucción sin WordPress/Divi. Paleta y tipografías del sitio original.
   ========================================================================== */

:root {
  --amarillo: #ffcc33;
  --naranja: #f36f21;
  --oscuro: #222222;
  --texto: #666666;
  --texto-claro: #898989;
  --titulo: #333333;
  --crema: #ebe8e0;
  --gris-claro: #f6f6f6;
  --blanco: #ffffff;
  --ancho: 1080px;
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;
  --font-head: "Roboto", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--texto);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--naranja); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--oscuro); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; color: var(--titulo); margin: 0 0 .5em; line-height: 1.25; }
p { margin: 0 0 1.2em; }
ul { margin: 0; padding: 0; list-style: none; }

.contenedor { width: 80%; max-width: var(--ancho); margin: 0 auto; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botón ---------- */
.btn {
  display: inline-block;
  background: var(--amarillo);
  color: var(--oscuro);
  border: 1px solid var(--amarillo);
  border-radius: 5px;
  padding: 10px 30px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.7;
  transition: background .25s, transform .15s;
}
.btn:hover { background: #ffd65c; color: var(--oscuro); transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--oscuro); outline-offset: 2px; }

/* ---------- Encabezado ---------- */
.encabezado {
  position: sticky; top: 0; z-index: 100;
  background: var(--blanco);
  box-shadow: 0 1px 0 rgba(0,0,0,.1);
  transition: box-shadow .3s;
}
.encabezado.con-sombra { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 80px; }
.logo img { height: 42px; width: auto; }

.nav ul { display: flex; gap: 24px; align-items: center; }
.nav a { color: rgba(0,0,0,.6); font-weight: 600; font-size: 14px; padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amarillo); transform: scaleX(0); transition: transform .25s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--oscuro); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.menu-boton {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  width: 44px; height: 44px; flex-direction: column; justify-content: center; gap: 5px;
}
.menu-boton span { display: block; height: 3px; background: var(--oscuro); border-radius: 2px; transition: transform .3s, opacity .3s; }
.menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Secciones genéricas ---------- */
.seccion { padding: 80px 0; }
.seccion--crema { background: var(--crema); }
.seccion--gris { background: var(--gris-claro); }
.seccion--oscura { background: var(--oscuro); color: var(--texto-claro); }

.fondo {
  position: relative; background-size: cover; background-position: center; color: #f3f3f3;
}
.fondo::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.fondo > * { position: relative; }
.fondo h1, .fondo h2 { color: #f3f3f3; }

/* ---------- Hero (inicio) ---------- */
.hero { padding: 150px 0; background-image: url("../img/1920x900x2.jpg"); }
.hero h1 { font-size: 40px; line-height: 1.25; text-transform: uppercase; max-width: 720px; }
.hero h1 span { color: var(--amarillo); }
.hero p { font-size: 18px; margin: 28px 0 32px; max-width: 720px; }

/* ---------- Experiencia ---------- */
.experiencia .contenedor { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.experiencia img.foto { width: 100%; max-width: 560px; border-radius: 4px; box-shadow: 0 12px 40px rgba(0,0,0,.12); margin: 0 auto; }
.experiencia h2 { font-family: var(--font-body); font-size: 30px; color: var(--titulo); }
.experiencia .decor { width: 117px; height: auto; margin: 10px 0 24px; }
.experiencia p { font-size: 18px; color: #000; text-align: justify; line-height: 1.75; }

/* ---------- Servicios (inicio) ---------- */
.servicios-home h2 { text-align: center; font-size: 30px; color: #212529; text-transform: uppercase; letter-spacing: .5px; }
.servicios-home .divisor { display: block; margin: 0 auto 50px; width: 150px; }
.servicios-home .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.blurb { display: flex; gap: 24px; padding: 34px 0; border-bottom: 1px solid #e1e1e1; align-items: flex-start; }
.blurb img { width: 72px; height: 72px; flex: 0 0 72px; }
.blurb h3 { font-size: 20px; letter-spacing: 1px; text-transform: uppercase; color: var(--titulo); margin-bottom: 8px; }
.blurb p { font-size: 16px; color: var(--texto-claro); line-height: 2; margin: 0; }
.col-izq .blurb { flex-direction: row-reverse; text-align: right; }
.grid > div > .blurb:last-child { border-bottom: 0; }

/* ---------- CTA ---------- */
.cta { padding: 150px 0; text-align: center; background-image: url("../img/1920x900x3.jpg"); }
.cta h2 { font-size: 40px; text-transform: uppercase; }
.cta p { font-size: 18px; max-width: 760px; margin: 20px auto 30px; }

/* ---------- Pie ---------- */
.pie { background: var(--oscuro); color: var(--texto-claro); padding: 80px 0 40px; }
.pie .contenedor { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 50px; align-items: start; }
.pie .sello { width: 100%; max-width: 380px; }
.pie h4 { color: var(--blanco); font-size: 20px; font-family: var(--font-body); font-weight: 600; margin-bottom: 20px; }
.pie li { display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.7; padding: 8px 0; }
.pie li svg { flex: 0 0 22px; width: 22px; height: 22px; fill: var(--amarillo); }
.pie a { color: var(--texto-claro); }
.pie a:hover { color: var(--amarillo); }

.pie-inferior { background: var(--amarillo); color: var(--oscuro); text-align: center; padding: 16px 0 12px; font-size: 16px; }
.pie-inferior p { margin: 0 0 10px; }
.redes { display: flex; justify-content: center; gap: 10px; }
.redes a { width: 32px; height: 32px; border-radius: 3px; display: grid; place-items: center; color: #fff; }
.redes a svg { width: 18px; height: 18px; fill: currentColor; }
.redes .fb { background: #3b5998; }
.redes .in { background: #007bb6; }
.redes a:hover { opacity: .8; color: #fff; }

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.whatsapp .etiqueta {
  background: #fff; color: #222; font-size: 13px; padding: 6px 12px; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2); position: relative; white-space: nowrap;
}
.whatsapp .etiqueta::after {
  content: ""; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: #fff; border-right: 0;
}
.whatsapp .icono {
  width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); transition: transform .2s;
}
.whatsapp .icono svg { width: 30px; height: 30px; fill: #fff; }
.whatsapp:hover .icono { transform: scale(1.08); }

/* ---------- Páginas interiores: cabecera ---------- */
.cabecera { padding: 100px 0; text-align: center; }
.cabecera h1 { font-size: 40px; text-transform: none; }
.cabecera--servicios { background-image: url("../img/servicios.jpg"); }
.cabecera--render { background-image: url("../img/1-MAS.jpg"); }
.cabecera--render h1 { text-transform: uppercase; }

/* ---------- Servicios (página) ---------- */
.servicios-pagina .intro h2 { font-size: 30px; color: var(--titulo); }
.servicios-pagina .intro p.destacado { font-size: 22px; color: var(--naranja); font-family: var(--font-head); font-weight: 500; line-height: 1.35; }
.lista-tramites { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 30px 0 50px; }
.tramite { background: #e9e9e9; border-radius: 6px; overflow: hidden; transition: background .25s; }
.tramite summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none;
  padding: 16px 22px; font-family: var(--font-head); font-size: 17px; color: #555; user-select: none;
}
.tramite summary::-webkit-details-marker { display: none; }
.tramite summary:hover { color: var(--oscuro); }
.tramite .flecha {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--naranja); position: relative; transition: transform .25s;
}
.tramite .flecha::after {
  content: ""; position: absolute; left: 9px; top: 7px; width: 7px; height: 7px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
.tramite[open] { background: #d98a0e; }
.tramite[open] summary { color: var(--oscuro); }
.tramite[open] .flecha { transform: rotate(180deg); }
.tramite-cuerpo { padding: 6px 22px 22px; }
.tramite-cuerpo a { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; color: var(--oscuro); }
.tramite-cuerpo a:hover { text-decoration: underline; }
.tramite-cuerpo img { width: 32px; height: 32px; }
.separador { border: 0; border-top: 1px solid #5eb5d6; margin: 40px 0; }

.tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin: 40px 0; }
.tarjeta { display: block; text-align: center; padding: 24px 16px; background: var(--blanco); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.tarjeta:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.tarjeta:hover h3 { color: var(--naranja); }
.tarjeta img { width: 110px; height: 110px; margin: 0 auto 16px; object-fit: contain; }
.tarjeta h3 { font-size: 18px; color: var(--titulo); margin: 0; }
.croquis { display: flex; align-items: center; gap: 40px; margin: 40px 0; }
.croquis img { width: 220px; }
.croquis h3 { font-size: 24px; }

/* ---------- Renderizado ---------- */
.render .intro { text-align: center; }
.render .intro h2 { font-size: 40px; margin-bottom: 30px; }
.render .lead { font-size: 24px; color: var(--titulo); font-family: var(--font-head); font-weight: 500; line-height: 1.3; text-align: left; }
.render .texto { text-align: left; font-size: 16px; color: #444; }
.render .texto ul li { font-size: 16px; line-height: 1.7; }
.render .texto ul li::before { content: "– "; }
.render h3 { font-size: 24px; font-family: var(--font-body); font-weight: 400; margin: 40px 0 20px; }
.galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.galeria figure { margin: 0; }
.galeria img { width: 100%; aspect-ratio: 400/284; object-fit: cover; border-radius: 4px; cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.galeria img:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.galeria figcaption { font-size: 20px; color: var(--texto); margin-top: 8px; }
.galeria-mas { text-align: center; margin-top: 30px; }

/* Visor (lightbox) */
.visor { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 200; }
.visor.abierto { display: flex; }
.visor img { max-width: 92vw; max-height: 88vh; border-radius: 4px; box-shadow: 0 0 40px rgba(0,0,0,.5); }
.visor button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; font-size: 28px; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.visor button:hover { background: rgba(255,255,255,.25); }
.visor .cerrar { top: 16px; right: 16px; }
.visor .ant { left: 16px; top: 50%; transform: translateY(-50%); }
.visor .sig { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Contacto ---------- */
.contacto h1 { font-family: var(--font-body); font-weight: 400; font-size: 72px; line-height: 1.1; margin: 0 0 60px; text-transform: none; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contacto .horario { font-size: 18px; line-height: 1.7; color: #555; margin-bottom: 30px; }
.datos { border-top: 1px solid #ccc; }
.dato { display: flex; gap: 20px; padding: 30px 0; border-bottom: 1px solid #ccc; align-items: flex-start; }
.dato img, .dato svg { width: 32px; height: 32px; flex: 0 0 32px; margin-top: 4px; }
.dato h3 { font-family: var(--font-body); font-size: 24px; font-weight: 400; color: #222; margin-bottom: 10px; }
.dato p { margin: 0; font-size: 18px; line-height: 1.6; color: #555; }
.dato a { color: #555; }
.dato a:hover { color: var(--naranja); }
.acciones { display: flex; flex-wrap: wrap; gap: 16px; margin: 30px 0 0; }
.btn--ws { background: #25d366; border-color: #25d366; color: #fff; display: inline-flex; align-items: center; gap: 10px; }
.btn--ws:hover { background: #1ebe5a; color: #fff; }
.btn--ws svg { width: 22px; height: 22px; fill: #fff; }
.mapa { background: #f2f2f2; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 24px rgba(0,0,0,.08); align-self: stretch; min-height: 560px; }
.mapa iframe { width: 100%; height: 100%; min-height: 560px; border: 0; display: block; }

/* ---------- 404 ---------- */
.pagina-404 { text-align: center; padding: 120px 0; }
.pagina-404 h1 { font-size: 72px; color: var(--amarillo); }

/* ---------- Animación de entrada ---------- */
.js .aparece { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.aparece.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .aparece { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .contenedor { width: 90%; }
  .menu-boton { display: flex; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.12); display: none; }
  .nav.abierto { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
  .nav a { display: block; padding: 12px 5%; border-bottom: 1px solid #f0f0f0; }
  .nav a::after { display: none; }
  .hero { padding: 100px 0; }
  .hero h1 { font-size: 32px; }
  .experiencia .contenedor { grid-template-columns: 1fr; }
  .servicios-home .grid { grid-template-columns: 1fr; }
  .col-izq .blurb { flex-direction: row; text-align: left; }
  .pie .contenedor { grid-template-columns: 1fr; }
  .tarjetas { grid-template-columns: repeat(2, 1fr); }
  .galeria { grid-template-columns: repeat(2, 1fr); }
  .cta { padding: 100px 0; }
  .cta h2, .cabecera h1 { font-size: 32px; }
  .contacto h1 { font-size: 48px; margin-bottom: 30px; }
  .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
  .mapa { min-height: 0; }
}
@media (max-width: 560px) {
  .seccion { padding: 60px 0; }
  .hero h1 { font-size: 26px; }
  .hero p, .experiencia p { font-size: 16px; }
  .tarjetas, .galeria { grid-template-columns: 1fr; }
  .croquis { flex-direction: column; text-align: center; }
  .tramite-cuerpo a { font-size: 18px; }
  .whatsapp .etiqueta { display: none; }
  .mapa iframe { min-height: 340px; }
  .contacto h1 { font-size: 40px; }
  .dato h3 { font-size: 20px; }
}

/* ---------- Ajustes SEO/semántica ---------- */
.render .subtitulo { text-transform: uppercase; font-weight: 600; font-size: 18px; color: #333; font-family: var(--font-body); margin: 30px 0 10px; }
.croquis .descarga { display: inline-flex; align-items: center; gap: 6px; color: var(--naranja); font-weight: 600; font-size: 14px; }
