/* ===========================
   Single Servicio – Estilos
   =========================== */

.single-servicio-template,
.single-servicio-template :where(*) { box-sizing: border-box; }

.single-servicio-template {
  --primary-color:#1A345E;
  --secondary-color:#2A5288;
  --accent-color:#BF1E2E;
  --text-color-dark:#333333;
  --text-color-light:#F0F2F5;
  --bg-light:#F8F9FA;
  --white:#FFFFFF;

  --spacing-sm:1rem;
  --spacing-md:2.5rem;
  --spacing-lg:4rem;
  --container-width:1200px;

  --radius:12px;
  --shadow-sm:0 4px 14px rgba(0,0,0,.08);
  --shadow-md:0 12px 32px rgba(0,0,0,.15);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.single-servicio-template .container{
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--spacing-sm);
}

/* TITULARES */
.single-servicio-template .h2-section-title{
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--primary-color);
  text-align: center;
  line-height: 1.15;
  letter-spacing: .2px;
  display: block;
  padding-bottom: .7rem;
  margin: 0 0 2rem;
  position: relative;
}
.single-servicio-template .h2-section-title.white{ color:#fff; }
.single-servicio-template .h2-section-title::after{
  content:'';
  position:absolute; left:50%; bottom:0;
  transform:translateX(-50%);
  width:72px; height:4px; border-radius:2px;
  background: var(--accent-color);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.single-servicio-template .h2-section-title.white::after { content:none; }

.single-servicio-template .h3-content-title{
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 .75rem;
}

.single-servicio-template .section{ padding-block: var(--spacing-lg); }

/* HERO */
.single-servicio-template .section-hero{
  position:relative; min-height:62vh; display:grid;
  place-items:center; text-align:center; color:#fff; overflow:hidden;
}
.single-servicio-template .hero-media{ position:absolute; inset:0; overflow:hidden; }
.single-servicio-template .hero-media img{
  width:100%; height:100%; object-fit:cover; transform:scale(1.06);
  filter:saturate(1.05) contrast(1.05);
}
.single-servicio-template .hero-overlay{ position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.25)); }
.single-servicio-template .hero-content{
  position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:.9rem;
  max-width:820px; padding:1.5rem 1.25rem; background:rgba(0,0,0,.35); backdrop-filter:blur(2px);
  border-radius:var(--radius); box-shadow:var(--shadow-sm);
}
.single-servicio-template .hero-title{
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  line-height:1.08; margin:0; color:#fff;
  text-shadow:0 6px 28px rgba(0,0,0,.35);
}
.single-servicio-template .hero-subtitle{
  font-size: clamp(1rem, 2.6vw, 1.125rem);
  color: var(--text-color-light);
  margin: 0;
}

/* ¿QUÉ OFRECEMOS? */
.single-servicio-template .dynamic-content-block{
  display:grid; gap:var(--spacing-md); align-items:center;
  margin:0 0 var(--spacing-lg); grid-template-columns:1fr;
}
@media(min-width:900px){
  .single-servicio-template .dynamic-content-block{ grid-template-columns:1.1fr 1fr; }
  .single-servicio-template .dynamic-content-block[data-alt="1"]{ grid-template-columns:1fr 1.1fr; }
  .single-servicio-template .dynamic-content-block[data-alt="1"] .content-text{ order:2; }
}
.single-servicio-template .content-text-body{ font-size:clamp(.98rem,2.2vw,1.03rem); color:#414141; }
.single-servicio-template .content-image img{
  width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:var(--radius);
  box-shadow:var(--shadow-md); transition:transform .35s ease, box-shadow .35s ease;
}
.single-servicio-template .content-image img:hover{ transform:scale(1.015); box-shadow:0 18px 42px rgba(0,0,0,.20); }

/* BENEFICIOS */
.single-servicio-template .section-benefits{ background: var(--bg-light);padding:40px; }
.single-servicio-template .benefits-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr));
  gap:1.25rem; margin-top:var(--spacing-md);
}
.single-servicio-template .benefit-item{
  background:#fff; padding:1.4rem; border-radius:14px; text-align:center;
  border:1px solid #e9eef3; box-shadow:var(--shadow-sm);
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-left:6px solid var(--accent-color);
}
.single-servicio-template .benefit-item:hover{ transform:translateY(-6px); box-shadow:var(--shadow-md); border-color:#dfe7ee; }
.single-servicio-template .benefit-item .icon{ font-size:2rem; color:var(--secondary-color); margin-bottom:.6rem; }
.single-servicio-template .benefit-item h4{ font-size:clamp(1.05rem,2.2vw,1.2rem); margin:.1rem 0 .35rem; color:#1c2b46; }
.single-servicio-template .benefit-item p{
  font-size:clamp(.92rem,2vw,1rem); margin:0; color:#4a5568;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

/* GALERÍA */
.single-servicio-template .section-gallery{ padding-block: var(--spacing-lg); }
.single-servicio-template .gallery-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:.9rem; }
.single-servicio-template .gallery-item{
  cursor:pointer; display:block; border:0; background:transparent; padding:0;
  border-radius:12px; overflow:hidden; box-shadow:var(--shadow-sm);
  transition:transform .25s ease, box-shadow .25s ease;
}
.single-servicio-template .gallery-item:hover{ transform:translateY(-4px); box-shadow:var(--shadow-md); }
.single-servicio-template .gallery-item img{ width:100%; height:100%; display:block; aspect-ratio:4/3; object-fit:cover; }

/* MODAL <dialog> */
html.modal-open { overflow: hidden; }
.gda-dialog{ border:0; padding:0; max-width:92vw; max-height:92vh; background:transparent; }
.gda-dialog::backdrop{ background: rgba(0,0,0,.92); }
.gda-dialog img{ display:block; max-width:min(92vw, 1200px); max-height:90vh; border-radius:12px; }
.gda-dialog__close{
  position: fixed; top: 18px; right: 22px;
  height: 48px; width: 48px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.15); color:#fff; font-size: 2rem; line-height:1;
  cursor: pointer; z-index: 1;
}
.gda-dialog__close:hover{ background: rgba(255,255,255,.25); }

/* CTA & RELACIONADOS */
.single-servicio-template .section-cta{ background:var(--primary-color); color:#fff; text-align:center; }
.single-servicio-template .cta-sub{ margin:0 0 1.4rem; color:var(--text-color-light); }
.single-servicio-template .btn-cta{
  display:inline-flex; align-items:center; gap:.55rem;
  padding:.9rem 1.25rem; border-radius:999px;
  background:var(--accent-color); color:#fff; text-decoration:none;
  font-weight:800; box-shadow:0 8px 18px rgba(191,30,46,.25);
  transition:transform .15s ease, box-shadow .2s ease;
}
.single-servicio-template .btn-cta:hover{ transform:translateY(-2px); box-shadow:0 14px 28px rgba(191,30,46,.32); }
.single-servicio-template .btn-ghost{ background:transparent; border:2px solid rgba(255,255,255,.7); color:#fff; }
.single-servicio-template .btn-ghost:hover{ background:rgba(255,255,255,.1); }

.single-servicio-template .earning-relacionados{ background:var(--bg-light); }
.single-servicio-template .earning-servicios-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:.8rem; margin-top:1.2rem;
}
.single-servicio-template .earning-servicio-item{
  display:flex; align-items:center; justify-content:center; gap:.6rem;
  font-weight:800; color:var(--primary-color); text-decoration:none;
  border:1.5px solid var(--primary-color); border-radius:999px;
  padding:.9rem 1.2rem; box-shadow:var(--shadow-sm);
  transition:transform .2s ease, color .2s ease, border-color .2s ease;
}
.single-servicio-template .earning-servicio-item:hover{
  transform:translateY(-4px); color:var(--accent-color); border-color:var(--accent-color);
}

/* ============ Animación on-scroll ============ */
@media (prefers-reduced-motion: no-preference){
  .single-servicio-template .animate-on-scroll{
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .single-servicio-template .animate-on-scroll.is-visible{
    opacity: 1;
    transform: none;
  }
}

/* ============ Fallback overlay (si <dialog> no está disponible) ============ */
#gdaOverlay{
  position: fixed; inset: 0; display: none;
  justify-content: center; align-items: center;
  background: rgba(0,0,0,.92); z-index: 9999; padding: 2rem;
}
#gdaOverlay.open{ display: flex; }
#gdaOverlay img{
  max-width: min(92vw, 1200px);
  max-height: 90vh;
  border-radius: 12px;
  display: block;
}
#gdaOverlay .gdaOverlayClose{
  position: fixed; top: 18px; right: 22px; height: 48px; width: 48px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.15);
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
#gdaOverlay .gdaOverlayClose:hover{ background: rgba(255,255,255,.25); }

/* ============ Fallback de visibilidad (quitar cuando el JS funcione) =========== */
/* Mantiene el contenido visible aunque no cargue el JS */
.single-servicio-template .animate-on-scroll { opacity: 1 !important; transform: none !important; }
.single-servicio-template .animate-on-scroll.is-visible { opacity: 1 !important; transform: none !important; }
