@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Cormorant+Garamond:ital,wght@0,400;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --marino:     #1b2d42;
  --marino2:    #162436;
  --marino3:    #111e2c;
  --borde-m:    #253d57;
  --dorado:     #a8832a;
  --dorado-s:   rgba(200,169,110,0.12);
  --dorado-b:   rgba(200,169,110,0.35);
  --crema:      #ffffff;
  --crema2:     #f5f5f5;
  --borde-c:    #ddd8d0;
  --blanco:     #ffffff;
  --texto:      #1a1c1f;
  --texto-s:    #4a5a6a;
  --texto-c:    #7a8a96;
  --verde-wa:   #25d366;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--crema);
  color: var(--texto);
  font-size: 16px;
  line-height: 1.7;
}

h1, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  line-height: 1.2;
}
h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
}

p { color: var(--texto-s); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 2rem; }

.etiqueta {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dorado);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── BOTONES ── */
.btn-principal {
  display: inline-block;
  background: var(--dorado);
  color: var(--marino);
  padding: 12px 28px;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-principal:hover { background: #d4ba82; }

.btn-fantasma {
  display: inline-block;
  background: transparent;
  color: rgba(255,255,255,0.6);
  padding: 12px 28px;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.22);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-fantasma:hover { border-color: var(--dorado); color: var(--dorado); }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--dorado);
  color: var(--dorado);
  padding: 12px 24px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-wa:hover { background: var(--dorado); color: var(--marino); }

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 64px;
  transition: background 0.35s, backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.navbar.transparente {
  background: rgba(8, 16, 28, 0.25);
}
.navbar.solida {
  background: var(--marino);
  border-bottom-color: var(--borde-m);
  backdrop-filter: blur(8px);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-marca {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: #c8a96e;
  line-height: 1;
  letter-spacing: 0.12em;
  padding-right: 1.8rem;
  border-right: 1px solid rgba(200,169,110,0.4);
}
.nav-marca span { display: none; }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.activo { color: var(--dorado); }
.nav-cotizar {
  border: 1px solid var(--dorado-b);
  color: var(--dorado);
  padding: 7px 18px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.2s, color 0.2s;
}
.nav-cotizar:hover { background: var(--dorado); color: var(--marino); }
.nav-menu { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-menu i { font-size: 22px; color: rgba(255,255,255,0.6); }

/* ── HERO ── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  background: var(--marino2);
  overflow: hidden;
}

/* Simulación de pantallas CCTV mientras no hay video real */
.hero-cctv-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: #050e18;
  opacity: 0.55;
}
.cctv-cam {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cctv-cam:nth-child(1) { background: #0c1e30; }
.cctv-cam:nth-child(2) { background: #0a1825; }
.cctv-cam:nth-child(3) { background: #0e1c28; }
.cctv-cam:nth-child(4) { background: #0b1a2a; }
.cctv-label {
  position: absolute; top: 12px; left: 14px;
  font-size: 11px; color: #4a9060;
  letter-spacing: 0.1em; font-family: monospace;
}
.cctv-hora {
  position: absolute; top: 12px; right: 14px;
  font-size: 11px; color: #4a9060; font-family: monospace;
}
.cctv-rec {
  position: absolute; bottom: 12px; left: 14px;
  display: flex; align-items: center; gap: 5px;
}
.cctv-rec-dot {
  width: 7px; height: 7px;
  background: #e03030; border-radius: 50%;
  animation: blink 1.4s infinite;
}
.cctv-rec-txt { font-size: 10px; color: #e03030; font-family: monospace; letter-spacing: 0.1em; }
.cctv-icon { width: 55%; opacity: 0.08; }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

/* Cuando hay video real, reemplaza la grilla CCTV */
.hero-video-bg video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(8, 16, 28, 0.30);
}
.hero-linea-dorada {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--dorado);
}

.hero-contenido {
  position: relative;
  z-index: 10;
  width: 100%;
  padding-bottom: 5rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--dorado-b);
  padding: 6px 14px;
  margin-bottom: 1.2rem;
}
.hero-badge-punto {
  width: 6px; height: 6px;
  background: var(--dorado); border-radius: 50%;
  animation: pulso 2s infinite;
}
@keyframes pulso { 0%,100%{opacity:1} 50%{opacity:0.35} }
.hero-badge-texto {
  font-size: 11px;
  color: #c8a96e;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 580;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: #f0e8de;
  max-width: 560px;
  margin-bottom: 1rem;
}
.hero h1 em { color: var(--dorado); font-style: italic; }
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  max-width: 420px;
  margin-bottom: 2rem;
  line-height: 1.8;
}
.hero-acciones { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.hero-top-linea {
  width: 32px; height: 2px;
  background: var(--dorado);
  flex-shrink: 0;
}
.hero-top-texto {
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-divisor {
  width: 100%;
  max-width: 480px;
  height: 2px;
  background: rgba(200,169,110,0.35);
  margin: 18px 0;
}
.hero-bajo {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

/* ── STATS ── */
.stats-bar {
  background: var(--marino);
  border-bottom: 1px solid var(--borde-m);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  text-align: center;
  padding: 22px 12px;
  border-right: 1px solid var(--borde-m);
}
.stat:last-child { border-right: none; }
.stat-numero {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--dorado);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 11px;
  color: #4a6a86;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

/* ── SECCIONES ── */
.seccion { padding: 5rem 0; }
.seccion-blanca { background: var(--blanco); border-top: 1px solid var(--borde-c); border-bottom: 1px solid var(--borde-c); }
.seccion-header { margin-bottom: 2.5rem; }
.seccion-header h2 { font-size: clamp(1.6rem, 3vw, 2rem); color: var(--texto); }
.seccion-header p { font-size: 15px; color: var(--texto-c); margin-top: 0.4rem; max-width: 500px; line-height: 1.7; }

/* ── SERVICIOS GRID ── */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--borde-c);
  border: 1px solid var(--borde-c);
}
.svc-card {
  background: var(--crema);
  padding: 2.2rem 1.8rem;
  transition: background 0.2s;
  cursor: default;
}
.svc-card:hover { background: var(--blanco); }
.svc-num {
  font-size: 11px; color: var(--dorado);
  letter-spacing: 0.14em; margin-bottom: 1rem;
  font-family: 'DM Sans', sans-serif;
}
.svc-card h3 {
  font-size: 1.2rem; color: var(--texto);
  margin-bottom: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}
.svc-card p { font-size: 14px; line-height: 1.7; }

/* ── CAPACITACIONES ── */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.cap-card {
  background: var(--crema);
  border: 1px solid var(--borde-c);
  padding: 1.8rem 1.6rem;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.cap-card:hover { border-color: var(--dorado); background: var(--blanco); }
.cap-card-top {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 1rem;
}
.cap-icono {
  width: 36px; height: 36px;
  border: 1px solid var(--dorado);
  display: flex; align-items: center;
  justify-content: center;
  color: var(--dorado); font-size: 17px;
  flex-shrink: 0;
}
.cap-card h3 {
  font-size: 1rem; font-family: 'DM Sans', sans-serif;
  font-weight: 500; color: var(--texto); line-height: 1.3;
}
.cap-card p { font-size: 13px; line-height: 1.7; }
.cap-tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
.cap-tag {
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--dorado-b);
  color: var(--dorado); padding: 3px 10px;
  background: var(--dorado-s);
}

/* ── BLOG PREVIEW ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.blog-card {
  background: var(--blanco);
  border: 1px solid var(--borde-c);
  padding: 1.8rem 1.6rem;
  transition: border-color 0.2s;
}
.blog-card:hover { border-color: var(--dorado); }
.blog-tag {
  font-size: 11px; color: var(--dorado);
  letter-spacing: 0.11em; text-transform: uppercase;
  margin-bottom: 0.6rem;
  font-family: 'DM Sans', sans-serif;
}
.blog-card h3 {
  font-size: 1.1rem; color: var(--texto);
  margin-bottom: 0.5rem; line-height: 1.4;
}
.blog-card p { font-size: 13px; line-height: 1.7; margin-bottom: 1.2rem; }
.blog-footer {
  display: flex; justify-content: space-between;
  align-items: center; padding-top: 1rem;
  border-top: 1px solid var(--borde-c);
}
.blog-fecha { font-size: 12px; color: var(--texto-c); }
.blog-leer {
  font-size: 12px; color: var(--dorado);
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: gap 0.2s; display: flex; align-items: center; gap: 5px;
}
.blog-leer:hover { gap: 9px; }

/* ── CONTACTO BAR ── */
.contacto-bar {
  background: var(--marino);
  border-top: 3px solid var(--dorado);
  padding: 3rem 0;
}
.contacto-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.contacto-texto h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem; color: #e8ddd0;
  margin-bottom: 4px;
}
.contacto-texto p { font-size: 14px; color: #4a6a86; }

/* ── FOOTER ── */
footer {
  background: var(--marino3);
  border-top: 1px solid var(--borde-m);
  padding: 1.5rem 0;
}
footer .container {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 0.5rem;
}
footer p { font-size: 12px; color: #2a3d52; }

/* ── WA FLOTANTE ── */
.wa-flotante {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 300;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px;
}
.wa-tooltip {
  background: var(--marino);
  color: #e8ddd0;
  font-size: 13px;
  padding: 7px 14px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.wa-flotante:hover .wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}
.wa-boton {
  background: var(--verde-wa);
  color: #fff;
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(37,211,102,0.3);
  transition: transform 0.2s;
}
.wa-boton:hover { transform: scale(1.08); }

/* ── BLOG PAGE ── */
.blog-hero {
  background: var(--marino);
  padding: 8rem 0 3.5rem;
  border-bottom: 3px solid var(--dorado);
}
.blog-hero h1 { font-size: 2.4rem; color: #e8ddd0; margin-bottom: 0.5rem; }
.blog-hero p { font-size: 15px; color: var(--texto-c); max-width: 500px; }

.blog-page { padding: 4rem 0; }
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 3rem;
  align-items: start;
}
.articulos { display: flex; flex-direction: column; gap: 20px; }
.articulo-card {
  background: var(--blanco);
  border: 1px solid var(--borde-c);
  padding: 2rem 1.8rem;
  transition: border-color 0.2s;
}
.articulo-card:hover { border-color: var(--dorado); }
.articulo-tag {
  font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--dorado);
  margin-bottom: 0.6rem; font-family: 'DM Sans', sans-serif;
}
.articulo-card h2 { font-size: 1.35rem; color: var(--texto); margin-bottom: 0.6rem; line-height: 1.35; }
.articulo-card p { font-size: 14px; line-height: 1.75; margin-bottom: 1.4rem; }
.articulo-footer {
  display: flex; justify-content: space-between;
  align-items: center; padding-top: 1rem;
  border-top: 1px solid var(--borde-c);
}
.articulo-fecha { font-size: 12px; color: var(--texto-c); }
.articulo-leer {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dorado);
  font-family: 'DM Sans', sans-serif;
  display: flex; align-items: center; gap: 5px;
  transition: gap 0.2s;
}
.articulo-leer:hover { gap: 9px; }

.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.widget {
  background: var(--blanco);
  border: 1px solid var(--borde-c);
  padding: 1.4rem;
}
.widget-titulo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; color: var(--texto);
  margin-bottom: 1rem; padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--borde-c);
}
.categorias { display: flex; flex-direction: column; }
.cat-item {
  display: flex; justify-content: space-between;
  align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--borde-c);
  font-size: 14px; color: var(--texto-s);
  cursor: pointer; transition: color 0.2s;
}
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { color: var(--dorado); }
.cat-count {
  font-size: 11px; color: var(--texto-c);
  background: var(--crema2); padding: 2px 9px;
}
.widget-contacto { background: var(--marino); border: none; }
.widget-contacto .widget-titulo { color: #e8ddd0; border-color: var(--borde-m); }
.widget-contacto p { font-size: 14px; color: var(--texto-c); margin-bottom: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .hero h1 { font-size: 2rem; }
  .hero-sub { font-size: 14px; }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(3) { border-top: 1px solid var(--borde-m); }
  .stat:nth-child(4) { border-top: 1px solid var(--borde-m); border-right: none; }
  .servicios-grid { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cotizar { display: none; }
  .nav-menu { display: block; }
  .nav-links.abierto {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--marino); padding: 1.5rem 2rem;
    gap: 1.25rem; border-bottom: 1px solid var(--borde-m);
  }
  .nav-links.abierto a { font-size: 14px; }
  .blog-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .wa-flotante { bottom: 20px; right: 20px; }
}

/* ── MODAL CERTIFICADOS ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8,16,28,0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.modal-overlay.visible {
  display: flex;
}
.modal-caja {
  background: var(--marino);
  border: 1px solid var(--borde-m);
  padding: 2rem;
  max-width: 680px;
  width: 90%;
  position: relative;
}
.modal-cerrar {
  position: absolute;
  top: 12px; right: 14px;
  background: none; border: none;
  color: var(--texto-c); font-size: 20px;
  cursor: pointer; transition: color 0.2s;
}
.modal-cerrar:hover { color: var(--dorado); }
.modal-galeria { margin-bottom: 1.2rem; }
.modal-img {
  display: none;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
}
.modal-img.activa { display: block; }
.modal-controles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.modal-btn {
  background: none;
  border: 1px solid var(--borde-m);
  color: var(--dorado);
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  transition: background 0.2s;
}
.modal-btn:hover { background: var(--dorado-s); }
.modal-contador {
  font-size: 13px;
  color: var(--texto-c);
  letter-spacing: 0.1em;
  min-width: 48px;
  text-align: center;
}
.hero-badge { cursor: pointer; }

/* ── FAQ ── */
.faq-lista {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--borde-c);
}
.faq-item {
  border-bottom: 1px solid var(--borde-c);
}
.faq-pregunta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--texto);
  text-align: left;
  gap: 1rem;
  transition: color 0.2s;
}
.faq-pregunta:hover { color: var(--dorado); }
.faq-icono {
  font-size: 16px;
  color: var(--dorado);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq-item.abierto .faq-icono {
  transform: rotate(45deg);
}
.faq-respuesta {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.faq-respuesta p {
  padding-bottom: 1.4rem;
  font-size: 14px;
  line-height: 1.8;
  color: var(--texto-s);
  max-width: 680px;
}
.faq-item.abierto .faq-respuesta {
  max-height: 300px;
}