html {
  scroll-behavior: smooth;
}


/* Encabezado / banner */
.encabezado-nosotros {
  width: 100%;
  min-height: 160px;
  height: clamp(160px, 22vh, 260px);
  display: flex;
  align-items: center;
  position: relative;
  background-image: url("/img/servicios/banner_servicios.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0; /* mantener por debajo de las cards si hace falta */
}
.encabezado-nosotros::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.contenedor-encabezado {
  position: relative;
  z-index: 1;
  padding-left: 4rem;
  padding-right: 1rem;
}
.titulo-encabezado {
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 42px);
}
.subtitulo-encabezado {
  opacity: 0.95;
  font-size: clamp(14px, 2.2vw, 18px);
}

/* ======== SECCIÓN DE SERVICIOS ======== */
/* Usamos grid para controlar exactamente cuántas cards por fila */
.pricing-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Se ajusta automáticamente, min 220px para que quepan 5 */
  gap: 20px;
  position: relative;
  z-index: 2;
  margin-top: 10px;       
  padding: 0 2rem 40px;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  justify-content: center;
}

/* ======== TARJETAS ======== */
.pricing-card {
  margin-bottom: 0;
  border-radius: 14px;
  width: 100%;             
  min-height: 520px;       
  display: flex;
  flex-direction: column;   
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(18, 38, 63, 0.12);
  transition: transform 0.36s cubic-bezier(.22,.9,.33,1), box-shadow 0.36s;
  background-color: #ffffff;
  border: 1px solid rgba(18, 38, 63, 0.04);
}
.pricing-card::before {
  content: "";
  height: 6px;
  display: block;
  width: 100%;
  top: 0;
  left: 0;
}
.pricing-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 45px rgba(18, 38, 63, 0.18);
}

/* ======== PARTE SUPERIOR ======== */
.pricing-top {
  flex: 0 0 auto;
  background-color: #fff;
  color: #333;
  padding: 22px 20px 12px;
  text-align: center;
}
.pricing-top h3 {
  margin: 0 0 6px;
  font-size: 1.05em;
  color: #222;
}

/* ======== PARTE INFERIOR (IMAGEN) ======== */
.pricing-bottom {
  flex: 1 1 auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: left;
  padding: 30px 25px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  min-height: 360px; /* mantiene imagen alta pero no excesiva */
}
.pricing-bottom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.18));
  z-index: 0;
}

/* Contenido encima de la imagen */
.pricing-content {
  position: relative;
  z-index: 2;                 /* encima del overlay (::before tiene z-index:0) */
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 10px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.pricing-content h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}
.pricing-content .small {
  margin: 0;
  font-size: 0.95rem;
  color: #e6eef6;
  opacity: 0.95;
  line-height: 1.4;
}

/* Lista legible */
.pricing-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #f3f7fb;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Acciones / botones */
.pricing-actions .btn {
  display: block;
  margin: 10px auto 0 auto;
  background: #000000;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(59,130,246,0.18);
}

.pricing-actions .btn:hover {
  background-color: #333;
  color: #f1f1f1;
}



/* Responsive: grid columns by breakpoints */
@media (max-width: 1100px) {
  .pricing-container { 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  }
}

@media (max-width: 900px) {
  .pricing-container { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

@media (max-width: 600px) {
  .pricing-container { 
    grid-template-columns: 1fr; 
  }
}



/* Sección detallada */
.servicios-detallados {
  background-color: #ffffff;
}

.service-card {
  align-items: center;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  background-color: #ffffff;
  border: 1px solid rgba(18, 38, 63, 0.06);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(18, 38, 63, 0.08);
}

.service-card img {
  object-fit: cover;
  height: 220px;
  width: 100%;
  transition: transform 0.6s ease, opacity 0.32s ease;
}

.service-card:hover img {
  transform: scale(1.03);
  opacity: 0.96;
}

.service-card .card-body {
  padding: 1rem;
}

.service-card h5 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: #111827;
}

.service-card p {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 0.6rem;
}

.service-card button {
  display: block;
  margin: 10px auto 0 auto;
  background-color: black;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.service-card button:hover {
  background-color: #333;
  color: #f1f1f1;
}


/* Ventanas emergentes de cada servicio */
.modal-hero .modal-dialog {
  max-width: 920px;
}

.modal-hero .modal-content {
  border: 0;
  overflow: hidden;
  border-radius: 14px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  background-color: transparent;
  box-shadow: 0 18px 40px rgba(2,6,23,0.18);
}

.modal-hero .hero {
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
}

.modal-hero .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.25), rgba(2,6,23,0.55));
  z-index: 1;
}

.modal-hero .hero .hero-content {
  position: absolute;
  left: 1.25rem;
  bottom: 1rem;
  z-index: 2;
  color: #fff;
}

.modal-hero .hero .hero-content h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.modal-hero .modal-body {
  background: #fff;
  padding: 1.25rem 1.5rem 1.7rem;
  flex: 1 1 auto;
}

.modal-hero .modal-footer {
  background: #cfcfcf;
  border-top: 0;
  padding: 0.75rem 1.5rem 1.25rem;
}

.tag {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  backdrop-filter: blur(4px);
}

@media (max-width: 768px) {
  .service-card img {
    height: 160px;
  }
  .modal-hero .modal-dialog {
    max-width: 94%;
  }
  .modal-hero .hero .hero-content {
    left: 0.9rem;
    bottom: 0.8rem;
  }
}


/* ======== TITULOS DE SECCIÓN (Cremaciones y Funerarios) ======== */
h3.text .fw-semibold {
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: #0a0a0a; /* puedes cambiar por #1a1a1a o #111827 */
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 60px;
  margin-bottom: 28px;
  position: relative;
}

h3.fw-semibold::after {
  content: "";
  display: block;
  width: 70px;
  height: 3px;
  background: black; /* color del subrayado */
  margin: 12px auto 0 auto;
  border-radius: 2px;
}
