:root {
  --azul: #1F3B57;
  --azul-claro: #2C4C6B;
  --verde: #3E6B54;
  --verde-claro: #CFE0D8;
  --acento: #3E6B54;
  --coral: var(--acento); /* alias historico, ya no es naranja - se mantiene por compatibilidad */
  --crema: #F7F6F2;
  --texto-suave: #5B7288;
  --borde: #E1DFD6;

  /* Escala de radios */
  --radio-sm: 8px;
  --radio-md: 14px;
  --radio-lg: 20px;

  /* Escala de sombras (elevacion) */
  --sombra-1: 0 3px 12px rgba(31,59,87,0.08);
  --sombra-2: 0 16px 32px rgba(31,59,87,0.16);
  --sombra-3: 0 30px 70px rgba(15,25,35,0.35);

  /* Escala de espaciado */
  --esp-1: 8px;
  --esp-2: 12px;
  --esp-3: 16px;
  --esp-4: 24px;
  --esp-5: 32px;
  --esp-6: 48px;
  --esp-7: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--crema);
  color: var(--azul);
  line-height: 1.5;
}
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- HEADER ---------- */
header {
  background: var(--azul);
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: padding .25s ease, box-shadow .25s ease;
  animation: heroFadeUp .45s ease both;
}
header.header-compacto { padding: 11px 40px; box-shadow: 0 4px 16px rgba(0,0,0,0.14); }
.menu-hamburguesa {
  display: none;
  background: none; border: none; color: #fff; font-size: 22px; cursor: pointer;
  padding: 4px 6px;
}
header .logo { color: #fff; font-family: 'Fraunces', serif; font-weight: 600; font-size: 19px; }
header nav a {
  color: #B9CBDA;
  margin-left: 26px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease;
}
header nav a:hover { color: #fff; }

/* ---------- HERO EDITORIAL ---------- */
.hero-editorial {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: stretch;
  height: 280px;
  overflow: hidden;
}
.hero-editorial > * { min-width: 0; min-height: 0; }

.hero-vector {
  background: linear-gradient(160deg, var(--verde) 0%, #2E4F3F 100%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.hero-vector i { font-size: 64px; color: rgba(255,255,255,0.9); position: relative; z-index: 1; }
.hero-vector img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.hero-vector::before {
  content: '';
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.hero-vector::after {
  content: '';
  position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -100px; left: -80px;
}

.hero-editorial-img { position: relative; overflow: hidden; height: 100%; width: 100%; min-width: 0; min-height: 0; }
.hero-editorial-img img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; object-position: center 30%; display: block; opacity: 0.92; }
.hero-editorial-img::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  animation: brillo 4.5s ease-in-out 3;
  z-index: 2;
}
@keyframes brillo {
  0% { left: -60%; }
  40% { left: 130%; }
  100% { left: 130%; }
}
.hero-editorial-img.es-video::before { display: none; }
.hero-editorial-text {
  background: linear-gradient(150deg, #EAF1F0 0%, #DCEAE3 45%, #E3ECF2 100%);
  display: flex; align-items: stretch; justify-content: stretch;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.hero-editorial-text::before {
  content: '';
  position: absolute; inset: 0;
  border-left: 3px solid var(--coral);
}
.hero-text-glass {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 8px 24px rgba(31,59,87,0.08);
  border-radius: 16px;
  padding: 18px 32px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-kicker {
  color: var(--coral); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.hero-editorial-text h1 { color: var(--azul); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.15; margin-bottom: 10px; }
.hero-editorial-text p { color: var(--texto-suave); font-size: 14px; max-width: 480px; margin-bottom: 18px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-outline-dark { border: 1.5px solid var(--azul-claro); color: var(--azul); }
.btn-outline-dark:hover { background: var(--azul); color: #fff; border-color: var(--azul); }

.banda-iconos {
  background: linear-gradient(120deg, #2C4C6B 0%, #3E6E96 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 22px 40px;
  gap: 0;
}
.banda-item {
  display: flex; align-items: center; gap: 14px;
  padding: 6px 24px;
  position: relative;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}
button.banda-item {
  background: none; border: none; font-family: inherit; text-align: left;
  width: 100%; padding-top: 6px; padding-bottom: 6px;
}
.banda-item-clickable { cursor: pointer; padding-right: 34px; }
.banda-item-flecha {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: #fff;
  background: rgba(255,255,255,0.18);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  animation: flechaRebote 1.8s ease-in-out infinite;
}
@keyframes flechaRebote {
  0%, 100% { transform: translateY(-50%); opacity: 0.75; }
  50% { transform: translateY(-38%); opacity: 1; }
}
a.banda-item:hover, button.banda-item:hover { transform: translateY(-2px); }
.banda-item::after {
  content: '';
  position: absolute; top: 8%; right: 0; bottom: 8%; width: 1px;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.16) 50%, transparent 100%);
}
.banda-item:first-child { padding-left: 0; }
.banda-item:last-child { padding-right: 0; }
.banda-item:last-child::after { display: none; }
a.banda-item:hover { transform: translateY(-2px); }
.banda-icon-badge {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.25);
}
.banda-icon-badge i { font-size: 16px; color: #fff; }
a.banda-item:hover .banda-icon-badge, button.banda-item:hover .banda-icon-badge { transform: scale(1.1); box-shadow: 0 6px 16px rgba(0,0,0,0.35), inset 0 1px 1px rgba(255,255,255,0.3); }
.banda-item h4 { color: #fff; font-size: 13.5px; font-weight: 700; margin-bottom: 2px; font-family: 'Inter', sans-serif; }
.banda-item p { color: #93A9BE; font-size: 11.5px; }

@media (max-width: 900px) {
  .hero-editorial { grid-template-columns: 1fr; height: auto; }
  .hero-vector { height: 120px; }
  .hero-vector i { font-size: 44px; }
  .hero-editorial-img { height: 220px; }
  .hero-img-izq { order: -1; }
  .hero-img-der { order: 2; }
  .banda-iconos { grid-template-columns: 1fr 1fr; }
  .banda-item:nth-child(2n)::after { display: none; }
  .banda-item { padding: 14px 16px; }
  .banda-item::after { top: auto; right: 8%; left: 8%; bottom: 0; height: 1px; width: auto; background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.16) 50%, transparent 100%); }
}
@media (max-width: 560px) {
  .banda-iconos { grid-template-columns: 1fr; }
  .banda-item::after { display: none; }
}

/* ---------- HERO EDITORIAL: entrada escalonada real (kicker -> titulo -> texto -> botones) ---------- */
.hero-kicker { animation: heroFadeUp .5s ease .05s both; }
.hero-editorial-text h1 { animation: heroFadeUp .5s ease .15s both; }
.hero-editorial-text p { animation: heroFadeUp .5s ease .25s both; }
.hero-actions { animation: heroFadeUp .5s ease .35s both; }
.hero-editorial-img:not(.es-video) { animation: heroImagenEscala .7s ease both; }
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroImagenEscala {
  from { opacity: 0; transform: scale(1.06); }
  to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-kicker, .hero-editorial-text h1, .hero-editorial-text p, .hero-actions, .hero-editorial-img:not(.es-video) { animation: none; }
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  margin: 0 6px;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #5B9B7D 0%, var(--coral) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(62,107,84,0.4), inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -2px 4px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transition: left .5s ease;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(62,107,84,0.5), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.4); color: #fff; backdrop-filter: blur(6px); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------- SERVICIOS ---------- */
.servicios { padding: 70px 40px; max-width: 1200px; margin: 0 auto; }
.servicios h2 { font-size: 28px; margin-bottom: 6px; }
.servicios > p.eyebrow { color: var(--texto-suave); font-size: 14px; margin-bottom: 32px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); column-gap: 26px; row-gap: 46px; }

.card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease;
  box-shadow: 0 3px 12px rgba(31,59,87,0.08);
}
.card:hover { transform: translateY(-9px) !important; box-shadow: 0 28px 46px rgba(31,59,87,0.24), 0 10px 18px rgba(31,59,87,0.14); }

.card-icon {
  height: 150px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-icon i { font-size: 40px; color: #fff; position: relative; z-index: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15)); }
.card-icon::after {
  content: '';
  position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  top: -30px; right: -30px;
}
.tile-1 { background: linear-gradient(135deg, #2C4C6B 0%, #1F3B57 100%); }
.tile-2 { background: linear-gradient(135deg, #4A8069 0%, #2E4F3F 100%); }
.tile-3 { background: linear-gradient(135deg, #6FA98A 0%, #43705A 100%); }
.tile-4 { background: linear-gradient(135deg, #5B7288 0%, #3A4E5F 100%); }

.card img { width: 100%; height: 160px; object-fit: cover; background: var(--verde-claro); display: block; }
.card-body { padding: 22px 22px 16px; }
.card-body h3 { font-size: 17px; margin-bottom: 8px; }
.card-body p { font-size: 13.5px; color: var(--texto-suave); margin-bottom: 18px; line-height: 1.55; }

.norma {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #F5EFE0;
  border: 2px solid transparent;
  border-radius: 20px;
  background:
    linear-gradient(160deg, var(--azul-claro) 0%, var(--azul) 100%) padding-box,
    linear-gradient(120deg, #E8CD8A 0%, #B8892E 25%, #F6E7BE 50%, #A87825 75%, #E8CD8A 100%) border-box;
  padding: 5px 13px;
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  box-shadow: 0 5px 16px rgba(31,59,87,0.3), inset 0 1px 2px rgba(255,255,255,0.3), inset 0 -3px 6px rgba(14,25,35,0.45);
}
.norma span { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; }
.norma::before { content: '\2713'; color: #7FD9A8; font-weight: 700; position: relative; z-index: 2; text-shadow: 0 0 6px rgba(127,217,168,0.55); }
.norma::after {
  content: '';
  position: absolute;
  top: -6px; left: 8%;
  width: 40%; height: 12px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  filter: blur(3px);
  z-index: 1;
}
.norma-shine {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 35%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%);
  animation: brilloVidrio 3.6s ease-in-out 2;
  z-index: 1;
  pointer-events: none;
}

.card-actions { display: flex; gap: 8px; }
.card-actions a {
  font-size: 12px;
  font-weight: 700;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  white-space: nowrap;
}
.card-actions a i { font-size: 11px; }
.card-actions .ver { border: 1.5px solid #C7D2D9; color: var(--azul); }
.card-actions .ver:hover { background: var(--azul); color: #fff; border-color: var(--azul); }
.card-actions .cotizar { background: linear-gradient(135deg, #4A8069 0%, #2E4F3F 100%); color: #fff; box-shadow: 0 4px 12px rgba(46,79,63,0.35); }
.card-actions .cotizar:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(46,79,63,0.45); }

.card-icon-foto { padding: 0; height: 190px; position: relative; }
.card-icon-foto::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  background: linear-gradient(to top, rgba(15,26,38,0.35) 0%, transparent 100%);
  pointer-events: none;
}
.card-icon-foto img { width: 100%; height: 100%; object-fit: cover; }
.card-icon-foto .media-video-wrap { width: 100%; height: 100%; }
.card-icon-foto .media-play-btn { width: 44px; height: 44px; }
.card-icon-foto .media-play-btn i { font-size: 16px; }
.detalle-hero-foto { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* ---------- TESTIMONIOS ---------- */
.estrellas { color: var(--coral); margin-bottom: 8px; letter-spacing: 2px; }

/* ---------- FORMULARIO ---------- */
.contacto-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(31,59,87,0.12);
}

.contacto-info {
  position: relative;
  padding: 44px 38px;
  display: flex; align-items: center;
  overflow: hidden;
}
.contacto-info::before {
  content: '';
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  top: -80px; right: -80px;
}
.contacto-info::after {
  content: '';
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  bottom: -70px; left: -50px;
}
.contacto-info-content { position: relative; z-index: 1; }
.contacto-info h3 { color: #fff; font-size: 22px; margin-bottom: 12px; }
.contacto-info > .contacto-info-content > p { color: rgba(255,255,255,0.75); font-size: 14px; margin-bottom: 24px; line-height: 1.7; }
.contacto-info-item {
  color: #fff; font-size: 13.5px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.contacto-info-item i { width: 18px; opacity: 0.85; }
.contacto-whatsapp {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2CBE5C 0%, #1F9E4A 100%);
  color: #fff;
  border: none;
  box-shadow: 0 6px 18px rgba(37,211,102,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
  position: relative;
  overflow: hidden;
}
.contacto-whatsapp::before {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transition: left .5s ease;
}
.contacto-whatsapp:hover::before { left: 130%; }
.contacto-whatsapp:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 26px rgba(37,211,102,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
}

.form-contacto {
  background: #fff;
  padding: 44px 38px;
}
.form-contacto label { font-size: 13px; font-weight: 700; color: var(--azul); }
.form-contacto input, .form-contacto select, .form-contacto textarea {
  width: 100%;
  padding: 12px 14px;
  margin: 6px 0 18px;
  border: 1.5px solid #DDE3E2;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  background: var(--crema);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-contacto input:focus, .form-contacto select:focus, .form-contacto textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(62,107,84,0.12);
}
.input-servicio-fijo {
  color: var(--azul); font-weight: 700; cursor: not-allowed;
  background: var(--verde-claro) !important; border-color: var(--verde) !important;
}
.form-contacto button {
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  width: 100%;
}

@media (max-width: 860px) {
  .contacto-layout { grid-template-columns: 1fr; }
}

.alerta-exito { color: var(--verde); background: var(--verde-claro); padding: 14px 18px; border-radius: 10px; max-width: 500px; margin-bottom: 20px; font-size: 14px; }
.alerta-error { color: #8A3E3E; background: #F5E6E6; padding: 14px 18px; border-radius: 10px; max-width: 500px; margin-bottom: 20px; font-size: 14px; }

.norma-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 12.5px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 14px; width: fit-content;
  backdrop-filter: blur(6px);
}
.norma-badge::before { content: '\2696'; }

.hero-text-glass .norma-badge {
  border: 2px solid transparent;
  background:
    linear-gradient(160deg, var(--azul-claro) 0%, var(--azul) 100%) padding-box,
    linear-gradient(120deg, #E8CD8A 0%, #B8892E 25%, #F6E7BE 50%, #A87825 75%, #E8CD8A 100%) border-box;
  color: #F5EFE0;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  box-shadow: 0 6px 20px rgba(31,59,87,0.35), inset 0 1px 2px rgba(255,255,255,0.3), inset 0 -3px 7px rgba(14,25,35,0.45);
}
.hero-text-glass .norma-badge::after {
  content: '';
  position: absolute;
  top: -8px; left: 10%;
  width: 45%; height: 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  filter: blur(4px);
}
.hero-text-glass .norma-badge::before {
  content: '\2696';
  position: relative; z-index: 2;
  color: #E8CD8A;
}
.norma-badge-shine {
  content: '';
  position: absolute;
  top: 0; left: -75%;
  width: 35%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,0.75) 50%, transparent 100%);
  animation: brilloVidrio 3.2s ease-in-out 2;
  z-index: 1;
  pointer-events: none;
}
@keyframes brilloVidrio {
  0% { left: -75%; }
  35% { left: 130%; }
  100% { left: 130%; }
}

.hero-editorial-servicio .hero-editorial-text h1 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 0; }
.hero-editorial-img .hero-vector { width: 100%; height: 100%; }

.media-video-wrap { position: relative; width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; overflow: hidden; display: block; }
.media-video-wrap video { width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-width: 0; object-fit: cover; object-position: center 30%; display: block; }

.media-play-btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: none; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.95) 0%, rgba(62,107,84,0.9) 55%, rgba(30,55,42,0.95) 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 2px 3px rgba(255,255,255,0.6), inset 0 -4px 8px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
  z-index: 2;
}
.media-play-btn i { color: #fff; font-size: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3)); margin-left: 2px; }
.media-play-btn:hover { transform: translate(-50%,-50%) scale(1.08); box-shadow: 0 10px 28px rgba(0,0,0,0.4), inset 0 2px 3px rgba(255,255,255,0.6); }

/* Al reproducir, el boton se achica y va a la esquina para no tapar el video */
.media-play-btn.is-playing {
  top: auto; left: auto; bottom: 14px; right: 14px;
  transform: none;
  width: 42px; height: 42px;
}
.media-play-btn.is-playing i { font-size: 15px; margin-left: 1px; }
.media-play-btn.is-playing:hover { transform: scale(1.08); }

/* ---------- DETALLE SERVICIO (contenido) ---------- */
.detalle-hero { position: relative; height: 260px; overflow: hidden; display: flex; }
.detalle-hero-foto-wrap { width: 50%; height: 100%; overflow: hidden; }
.detalle-hero-foto-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detalle-hero-sinfoto { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.detalle-hero-sinfoto i { font-size: 60px; color: rgba(255,255,255,0.85); }

.detalle-hero-decorativo {
  width: 50%; height: 100%; position: relative; overflow: hidden;
  background-image: url('../uploads/hero-textura.png');
  background-repeat: repeat;
  background-size: 100px 100px;
  display: flex; align-items: center; justify-content: center;
}
.detalle-hero-decorativo::before {
  content: '';
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.detalle-hero-decorativo::after {
  content: '';
  position: absolute; width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.detalle-hero-icon-fondo { font-size: 64px; color: rgba(255,255,255,0.35); position: relative; z-index: 1; }
.detalle-hero-decorativo-foto { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }

.detalle-hero-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 32px 40px;
  background: linear-gradient(0deg, rgba(0,0,0,0.4) 0%, transparent 55%);
}
.detalle-hero-overlay h1 { color: #fff; font-size: 30px; }
.detalle-hero-overlay .norma-badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 12.5px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 12px; width: fit-content;
  backdrop-filter: blur(6px);
}
.detalle-hero-overlay .norma-badge::before { content: '\2696'; }

@media (max-width: 640px) {
  .detalle-hero-foto-wrap { width: 100%; }
  .detalle-hero-decorativo { display: none; }
}

.detalle-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 30px;
  align-items: start;
}

.bloque {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  animation: fadeUp .5s ease both;
}
.bloque h2 { font-size: 20px; margin-bottom: 12px; color: var(--azul); }
.bloque p { line-height: 1.8; font-size: 15px; color: #33475C; }

.lista-beneficios { list-style: none; }
.lista-beneficios li {
  padding: 10px 0 10px 30px;
  position: relative;
  font-size: 14.5px;
  color: #33475C;
  border-bottom: 1px solid #F2F0EA;
}
.lista-beneficios li:last-child { border-bottom: none; }
.lista-beneficios li::before {
  content: '\2713';
  position: absolute; left: 0; top: 10px;
  color: var(--verde);
  font-weight: 700;
  background: var(--verde-claro);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}

.video-wrap { position: relative; padding-bottom: 56%; height: 0; overflow: hidden; border-radius: 12px; background: var(--azul); }
.video-wrap iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:0; }

.lista-documentos { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.doc-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--azul-claro); font-weight: 600; font-size: 14px;
  text-decoration: none; border: 1.5px solid #C7D2D9; padding: 10px 16px; border-radius: 8px;
  transition: all .18s ease;
}
.doc-link i { color: var(--coral); font-size: 15px; }
.doc-link:hover { background: var(--azul); color: #fff; border-color: var(--azul); }
.doc-link:hover i { color: #fff; }

.detalle-sidebar { position: sticky; top: 90px; }
.sidebar-card {
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 17px; margin-bottom: 10px; color: var(--azul); }
.sidebar-card p { font-size: 13.5px; color: var(--texto-suave); margin-bottom: 16px; line-height: 1.6; }
.sidebar-contact-item {
  background: var(--crema);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 8px;
}
.sidebar-btn { display: block; text-align: center; width: 100%; margin-top: 14px; }

.otro-servicio {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--azul);
  padding: 10px 0;
  border-bottom: 1px solid #F2F0EA;
  transition: opacity .18s ease;
}
.otro-servicio:last-child { border-bottom: none; }
.otro-servicio:hover { opacity: 0.7; }
.otro-servicio-icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
}
.otro-servicio span:last-child { font-size: 13.5px; font-weight: 600; }

@media (max-width: 860px) {
  .detalle-layout { grid-template-columns: 1fr; }
  .detalle-sidebar { position: static; }
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--azul);
  color: #9FB6C9;
  padding: 26px 40px;
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- ANIMACIONES ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  header, .servicios, .detalle { padding-left: 20px; padding-right: 20px; }
  .servicios { padding-top: 44px; padding-bottom: 44px; }
  .servicios > p.eyebrow { margin-bottom: 22px; }
  .hero-vector { height: 90px; }
  .hero-vector i { font-size: 34px; }
  .hero-editorial-img { height: 180px; }
  .banda-iconos { padding: 16px 20px; }
  .banda-item { padding: 10px 12px; }
}

/* ---------- POPUP DE VIDEO (al dar play se ve grande, con controles) ---------- */
.video-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,20,30,0.9);
  z-index: 9999;
  align-items: center; justify-content: center;
  padding: 30px;
}
.video-modal-overlay.activo { display: flex; }
.video-modal-box {
  position: relative;
  max-width: 92vw; max-height: 85vh;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  line-height: 0;
}
.video-modal-box video { max-width: 92vw; max-height: 85vh; width: auto; height: auto; display: block; }
.video-modal-cerrar {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(15,25,35,0.65);
  border: 1.5px solid rgba(255,255,255,0.55);
  color: #fff; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.video-modal-cerrar:hover { background: rgba(15,25,35,0.9); transform: scale(1.08); }
@media (max-width: 640px) {
  .video-modal-cerrar { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 16px; }
}

/* ---------- POPUP DE LA BANDA DE ICONOS (sale anclado desde el item, tipo cajero) ---------- */
.banda-modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,25,35,0.35);
  z-index: 9999;
}
.banda-modal-overlay.activo { display: block; }
.banda-modal-box {
  position: fixed;
  background: #fff;
  width: 340px; max-width: calc(100vw - 32px);
  border-radius: 18px;
  padding: 30px 26px 26px;
  text-align: center;
  box-shadow: 0 24px 55px rgba(15,25,35,0.35);
  animation: bandaModalSube .28s cubic-bezier(.2,.8,.2,1);
  transform-origin: top center;
}
.banda-modal-box::before {
  content: '';
  position: absolute; top: -9px; left: var(--flecha-x, 50%);
  transform: translateX(-50%);
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 3px 0 0 0;
  rotate: 45deg;
  box-shadow: -3px -3px 6px rgba(15,25,35,0.04);
}
@keyframes bandaModalSube {
  from { opacity: 0; transform: translateY(-14px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.banda-modal-icono {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2), inset 0 1px 1px rgba(255,255,255,0.3);
}
.banda-modal-icono i { font-size: 22px; color: #fff; }
.banda-modal-box h3 { color: var(--azul); font-size: 18px; margin-bottom: 10px; }
.banda-modal-box p { color: var(--texto-suave); font-size: 14px; line-height: 1.6; }
.banda-modal-cerrar {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--crema);
  border: none;
  color: var(--azul); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.banda-modal-cerrar:hover { background: #E7E4DC; transform: scale(1.08); }

/* ---------- FORMULARIO DE CONTACTO: SIEMPRE con fondo vivo, nunca un cuadro plano ---------- */
/* Si subes una foto en el admin, se usa esa (con efecto fijo/parallax al hacer scroll).
   Si NO subes ninguna, se usa un degradado de marca animado con textura, para que
   igual haya profundidad y movimiento en vez de un bloque de color soso. */
.contacto-con-fondo {
  position: relative;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 40%),
    linear-gradient(120deg, #16283C 0%, #1F3B57 45%, #2E4F3F 100%);
  background-size: 220% 220%, 220% 220%, 200% 200%;
  background-position: 0% 0%, 100% 100%, 0% 50%;
  background-attachment: fixed, fixed, fixed;
  animation: fondoContactoVivo 18s ease-in-out infinite;
  isolation: isolate;
}
@keyframes fondoContactoVivo {
  0%   { background-position: 0% 0%, 100% 100%, 0% 50%; }
  50%  { background-position: 30% 20%, 70% 80%, 100% 50%; }
  100% { background-position: 0% 0%, 100% 100%, 0% 50%; }
}
.contacto-con-fondo::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,22,32,0.55) 0%, rgba(13,22,32,0.4) 100%);
  z-index: 0;
}
.contacto-con-fondo > * { position: relative; z-index: 1; }
.contacto-con-fondo h2 { color: #fff; }
.contacto-con-fondo > .eyebrow { color: rgba(255,255,255,0.8); }
.contacto-con-fondo .alerta-exito, .contacto-con-fondo .alerta-error { max-width: 700px; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) {
  .contacto-con-fondo { background-attachment: scroll, scroll, scroll; }
}
@media (prefers-reduced-motion: reduce) {
  .contacto-con-fondo { animation: none; }
}
.contacto-con-fondo.tiene-foto {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  animation: none;
}
.contacto-con-fondo.tiene-foto::before {
  background: linear-gradient(180deg, rgba(13,22,32,0.75) 0%, rgba(13,22,32,0.55) 100%);
}
@media (max-width: 640px) {
  .contacto-con-fondo.tiene-foto { background-attachment: scroll; }
}

/* ---------- SCROLL REVEAL REAL: aparecen al entrar en pantalla, no todas de golpe al cargar ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- NAV: resalta la seccion donde estas (scrollspy) ---------- */
header nav a.nav-activo { color: #fff; position: relative; }
header nav a.nav-activo::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--coral);
  border-radius: 2px;
}

/* ---------- BOTON FLOTANTE DE WHATSAPP (visible en todo el sitio) ---------- */
.whatsapp-flotante {
  position: fixed; right: 22px; bottom: 22px; z-index: 500;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #2CBE5C 0%, #1F9E4A 100%);
  color: #fff; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(31,158,74,0.45);
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.whatsapp-flotante:hover { transform: scale(1.08); box-shadow: 0 12px 28px rgba(31,158,74,0.55); }
@media (max-width: 640px) {
  .whatsapp-flotante { right: 16px; bottom: 16px; width: 50px; height: 50px; font-size: 23px; }
}

/* ---------- BOTON "VOLVER ARRIBA" ---------- */
#btn-volver-arriba {
  position: fixed; right: 22px; bottom: 88px; z-index: 500;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--azul); color: #fff; border: none;
  font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(31,59,87,0.3);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
#btn-volver-arriba.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#btn-volver-arriba:hover { background: var(--azul-claro); }
@media (max-width: 640px) {
  #btn-volver-arriba { right: 16px; bottom: 76px; width: 38px; height: 38px; font-size: 13px; }
}

/* ---------- FOCO VISIBLE PARA NAVEGACION POR TECLADO (accesibilidad) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2.5px solid var(--coral);
  outline-offset: 2px;
}

/* ---------- MENU MOVIL (hamburguesa real) ---------- */
@media (max-width: 640px) {
  .menu-hamburguesa { display: block; }
  header nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: var(--azul);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 28px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease, visibility .28s;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    z-index: 40;
  }
  header nav.menu-abierto { transform: translateY(0); opacity: 1; visibility: visible; }
  header nav a { margin-left: 0; padding: 12px 0; font-size: 16px; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
}
@media (prefers-reduced-motion: reduce) {
  header nav { transition: opacity .15s ease, visibility .15s; }
}

/* ---------- BARRA DE PROGRESO DE SCROLL ---------- */
#barra-progreso {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--acento) 0%, var(--azul-claro) 100%);
  z-index: 999;
  transition: width .1s linear;
}
@media (prefers-reduced-motion: reduce) {
  #barra-progreso { transition: none; }
}

/* ---------- ZOOM SUAVE DE IMAGEN/VIDEO EN TARJETAS AL HOVER ---------- */
.card-icon-foto { overflow: hidden; }
.card-icon-foto img, .card-icon-foto .media-video-wrap video {
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.card:hover .card-icon-foto img,
.card:hover .card-icon-foto .media-video-wrap video {
  transform: scale(1.08);
}
@media (prefers-reduced-motion: reduce) {
  .card-icon-foto img, .card-icon-foto .media-video-wrap video { transition: none; }
  .card:hover .card-icon-foto img, .card:hover .card-icon-foto .media-video-wrap video { transform: none; }
}

/* ---------- FEEDBACK TACTIL: los botones "se hunden" un poco al presionar ---------- */
.btn:active, .card-actions a:active, .whatsapp-flotante:active,
#btn-volver-arriba:active, .contacto-whatsapp:active, .banda-item-clickable:active {
  transform: scale(0.96);
}

/* ---------- BANDA DE ICONOS: aparicion tipo "pop" al entrar en pantalla ---------- */
.banda-item.reveal { transform: translateY(16px) scale(0.94); }
.banda-item.reveal.in-view { transform: translateY(0) scale(1); }
