/**
 * Sección PorQueElegirnos — diseño premium v3
 */

/* ====================================================
   SECCIÓN + FONDO DECORATIVO
   ==================================================== */
.pqe-section {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
  background: #faf9fc;
}

/* Blobs de fondo animados */
.pqe-deco {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.pqe-deco--1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255, 94, 167, 0.13) 0%, transparent 70%);
  top: -120px; left: -160px;
  animation: floatBlob1 12s ease-in-out infinite;
}

.pqe-deco--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(201, 182, 228, 0.18) 0%, transparent 70%);
  bottom: -80px; right: -100px;
  animation: floatBlob2 15s ease-in-out infinite;
}

.pqe-deco--3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255, 94, 167, 0.08) 0%, transparent 70%);
  top: 40%; left: 40%;
  animation: floatBlob1 20s ease-in-out infinite reverse;
}

@keyframes floatBlob1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}
@keyframes floatBlob2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-25px, -30px) scale(1.08); }
}

.pqe-container {
  position: relative;
  z-index: 1;
}

/* ====================================================
   HEADER
   ==================================================== */
.pqe-header {
  text-align: center;
  margin-bottom: 4rem;
}

.pqe-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(255, 94, 167, 0.1);
  border: 1px solid rgba(255, 94, 167, 0.25);
  padding: 0.38rem 1.1rem;
  border-radius: 99px;
  margin-bottom: 1.4rem;
}

.pqe-eyebrow-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.6); }
}

.pqe-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.18;
  color: #1a1025;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
}

.pqe-title-accent {
  background: linear-gradient(135deg, var(--color-primary) 0%, #c9b6e4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pqe-subtitle {
  font-size: 1.02rem;
  color: #7a7084;
  line-height: 1.7;
  max-width: 430px;
  margin: 0 auto;
}

/* ====================================================
   GRID
   ==================================================== */
.pqe-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

/* ====================================================
   TARJETA BASE
   ==================================================== */
.pqe-card {
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.45s ease;
  will-change: transform;
}

/* ====================================================
   TARJETA HÉROE
   ==================================================== */
.pqe-hero-wrap {
  position: relative;
}

.pqe-card--hero {
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #1a1025;
  box-shadow:
    0 4px 24px rgba(255, 94, 167, 0.12),
    0 2px 8px rgba(0,0,0,0.06);
}

.pqe-card--hero:hover {
  transform: translateY(-8px) scale(1.012);
  box-shadow:
    0 24px 60px rgba(255, 94, 167, 0.22),
    0 8px 24px rgba(0,0,0,0.12);
}

/* Imagen hero */
.pqe-img-wrap {
  position: absolute;
  inset: 0;
}

.pqe-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.7s ease, opacity 0.5s ease;
}

.pqe-card--hero:hover .pqe-img-wrap img {
  transform: scale(1.06);
  opacity: 0.85;
}

/* Gradiente sobre imagen */
.pqe-card--hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to top, rgba(10, 4, 20, 0.92) 0%, rgba(10, 4, 20, 0.5) 45%, transparent 100%),
    linear-gradient(135deg, rgba(255, 94, 167, 0.2) 0%, transparent 60%);
  z-index: 1;
}

/* Pill flotante */
.pqe-hero-pill {
  position: absolute;
  top: 1.3rem;
  left: 1.3rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.38rem 0.85rem;
  border-radius: 99px;
  animation: floatPill 4s ease-in-out infinite;
}

@keyframes floatPill {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.pqe-hero-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6EE7B7;
  box-shadow: 0 0 0 2px rgba(110, 231, 183, 0.4);
  animation: pulseDot 2s ease-in-out infinite;
}

/* Contenido héroe */
.pqe-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pqe-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.pqe-card--hero:hover .pqe-hero-icon {
  transform: scale(1.15) rotate(8deg);
  background: rgba(255, 94, 167, 0.35);
}

.pqe-hero-content h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pqe-hero-content p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.6;
  max-width: 340px;
}

/* Shimmer border en la tarjeta héroe */
.pqe-shine {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, rgba(255,94,167,0.7), rgba(201,182,228,0.5), transparent 60%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 4;
}

.pqe-card--hero:hover .pqe-shine {
  opacity: 1;
}

/* ====================================================
   TARJETAS SECUNDARIAS (FEATS)
   ==================================================== */
.pqe-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.pqe-card--feat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.055);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  padding: 0;
}

.pqe-card--feat:hover {
  transform: translateX(6px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.09);
}

/* Línea de acento izquierda */
.pqe-feat-accent {
  position: absolute;
  left: 0; top: 10%; bottom: 10%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  border-left: 2px solid;
  transition: top 0.3s, bottom 0.3s;
}

.pqe-card--feat:hover .pqe-feat-accent {
  top: 0%;
  bottom: 0%;
  border-radius: 0;
}

/* si la tarjeta tiene imagen de fondo en la cara secundaria */
.pqe-img-wrap--sm {
  position: absolute;
  inset: 0;
}

.pqe-img-wrap--sm img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.12;
  transition: opacity 0.4s;
}

.pqe-card--feat:hover .pqe-img-wrap--sm img {
  opacity: 0.2;
}

/* Body de la feat */
.pqe-feat-body {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.4rem 1.6rem;
  position: relative;
  z-index: 2;
}

/* Icono feat */
.pqe-feat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: rgba(255, 94, 167, 0.15);
  color: #FF5EA7;
  flex-shrink: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
}

.pqe-card--feat:hover .pqe-feat-icon {
  transform: scale(1.18) rotate(8deg);
}

.pqe-feat-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pqe-feat-title {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 700;
  color: #1a1025;
  line-height: 1.3;
}

.pqe-feat-desc {
  margin: 0;
  font-size: 0.82rem;
  color: #7a7084;
  line-height: 1.5;
}

/* Glow al hacer hover */
.pqe-glow {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1.5px solid transparent;
  background: linear-gradient(135deg, var(--glow, #FF5EA7), transparent 60%) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
  z-index: 5;
}

.pqe-card--feat:hover .pqe-glow {
  opacity: 0.8;
}

/* ====================================================
   ANIMACIÓN DE ENTRADA
   ==================================================== */
[data-reveal].pqe-header,
[data-reveal].pqe-hero-wrap,
[data-reveal].pqe-card--feat {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-reveal].pqe-hero-wrap.is-visible,
[data-reveal].pqe-header.is-visible,
[data-reveal].pqe-card--feat.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 900px) {
  .pqe-grid {
    grid-template-columns: 1fr;
  }

  .pqe-card--hero { height: 340px; }
}

@media (max-width: 640px) {
  .pqe-section { padding: 4.5rem 0; }
  .pqe-header  { margin-bottom: 2.5rem; }
  .pqe-card--feat:hover { transform: translateY(-4px); }
}
