/* =====================================================================
   PCW — CSS/servicios.css
   Ventana de información de cada servicio (#servicios).
   Mismo diseño que la ventana "¿Quiénes somos?" de Nosotros:
   foto con logo a la izquierda y textos a la derecha.

   Todo usa el prefijo "pcws-": no modifica las tarjetas de servicios
   ni ningún otro estilo del sitio.
   La lógica está en JS/servicios.js (clase ServiceModal).
   ===================================================================== */

/* Bloquea el desplazamiento de la página mientras la ventana está abierta */
html.pcws-lock,
html.pcws-lock body { overflow: hidden; }

.pcws-modal {
  width: min(920px, 100% - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 40px 90px -20px rgba(3, 27, 61, 0.65);
}
.pcws-modal[open] { animation: pcwsModalIn 0.35s var(--ease, ease); }
.pcws-modal::backdrop {
  background: rgba(3, 27, 61, 0.55);
  backdrop-filter: blur(3px);
}

.pcws-modal__box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  max-height: calc(100dvh - 2rem);
  background: var(--white, #FFFFFF);
}

/* Columna izquierda: foto del servicio con capa azul y logotipo */
.pcws-modal__media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--navy, #031B3D);
}
.pcws-modal__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.pcws-modal__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(3, 27, 61, 0.75), rgba(0, 87, 184, 0.45));
}
.pcws-modal__logo {
  position: relative;
  z-index: 1;
  width: 82%;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

/* Columna derecha: textos (con desplazamiento interno si hace falta) */
.pcws-modal__content {
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.25rem, 3.5vw, 2.5rem);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--gray-text, #4B5563);
}
.pcws-modal__text + .pcws-modal__text { margin-top: 0.75rem; }
.pcws-modal__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  margin-bottom: 1rem;
  padding-right: 2.5rem;           /* espacio para la X */
}
.pcws-modal__title span { color: var(--blue, #0057B8); }

.pcws-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--blue, #0057B8);
  background: rgba(0, 140, 255, 0.1);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.pcws-modal__close svg {
  width: 1.1rem; height: 1.1rem;
  fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round;
}
.pcws-modal__close:hover { background: var(--electric, #008CFF); color: var(--white, #FFFFFF); transform: rotate(90deg); }

/* Lista "Qué incluye" (mismo estilo que misión, visión y valores) */
.pcws-items {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}
.pcws-item { display: flex; gap: 0.9rem; align-items: flex-start; }
.pcws-item__icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  color: var(--electric, #008CFF);
  background: rgba(0, 140, 255, 0.1);
  border-radius: 14px;
}
.pcws-item__icon svg {
  width: 1.5rem; height: 1.5rem;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.pcws-item h3 {
  margin-bottom: 0.15rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--navy, #031B3D);
}
.pcws-item p { font-size: 0.86rem; line-height: 1.5; }

/* Botón para solicitar el servicio por WhatsApp */
.pcws-modal__actions { margin-top: 1.6rem; }

/* --- Animación --- */
@keyframes pcwsModalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

/* --- Modo oscuro (botón luna / sol) --- */
[data-theme="dark"] .pcws-modal__box { background: var(--dk-surface); }
[data-theme="dark"] .pcws-modal__content { color: var(--dk-text); }
[data-theme="dark"] .pcws-modal__title span { color: var(--dk-accent); }
[data-theme="dark"] .pcws-item h3 { color: var(--dk-title); }
[data-theme="dark"] .pcws-item p { color: var(--dk-muted); }
[data-theme="dark"] .pcws-item__icon,
[data-theme="dark"] .pcws-modal__close { color: var(--dk-accent); background: rgba(92, 196, 255, 0.12); }

/* --- Tablet (hasta 900 px) --- */
@media (max-width: 900px) {
  .pcws-modal__box { grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr); }
}

/* --- Celular (hasta 600 px): imagen arriba (banda) y texto debajo --- */
@media (max-width: 600px) {
  .pcws-modal {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: 18px;
  }
  .pcws-modal__box {
    grid-template-columns: 1fr;
    grid-template-rows: 130px minmax(0, 1fr);
    max-height: calc(100dvh - 1rem);
  }
  .pcws-modal__logo { width: auto; height: 80%; }
  .pcws-modal__content { max-height: none; overflow-y: auto; }
  .pcws-modal__close { background: rgba(255, 255, 255, 0.92); }
  .pcws-modal__actions .btn { width: 100%; justify-content: space-between; white-space: normal; }
}

/* --- Movimiento reducido --- */
@media (prefers-reduced-motion: reduce) {
  .pcws-modal[open] { animation: none; }
  .pcws-modal__close { transition: none; }
}