/* Página comercial (www): sección de normas agrupadas por familia. v3.11.22 (tono de Quién está detrás y Planes; animación de iconos)
   Prefijo cg-norms-*. Colores institucionales y movimiento mínimo; se desactiva con prefers-reduced-motion. */
#normas .landing-section-lead { max-width: none; }

.cg-norms-stat {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 18px 0 0;
  color: #475569;
  font-size: 14px;
}
.cg-norms-stat strong {
  color: #0f172a;
  font-size: 22px;
  letter-spacing: -.02em;
  margin-right: 6px;
}

.cg-norms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.cg-norms-card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 46px #02061712;
  color: #0f172a;
  opacity: 0;
  transform: translateY(12px);
  animation: cgNormsIn .6s ease forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
/* Algunas tarjetas con el degradado azul de "Diferenciador" (1.ª, 5.ª y 9.ª) */
.cg-norms-card:nth-child(4n+1) {
  background:
    radial-gradient(circle at 92% 16%, #bfdbfe 0, transparent 34%),
    linear-gradient(135deg, #ffffff, #f8fbff);
}
.cg-norms-card:hover,
.cg-norms-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px #2563eb22;
  border-color: #93c5fd;
}

.cg-norms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cg-norms-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #1d4ed8;
  flex: none;
}
.cg-norms-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cg-norms-count {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  background: #eff6ff;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.cg-norms-card h3 {
  margin: 16px 0 12px;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.01em;
}

.cg-norms-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.cg-norms-tags li {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 11px;
  line-height: 1.3;
}

@keyframes cgNormsIn {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .cg-norms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .cg-norms-grid { grid-template-columns: 1fr; gap: 14px; }
  .cg-norms-card { padding: 18px; }
}
/* Iconos: flotan suavemente, su anillo pulsa y el icono se mueve al pasar el cursor */
.cg-norms-icon {
  animation: cgNormsFloat 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.45s);
}
.cg-norms-icon::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 2px solid #60a5fa;
  opacity: 0;
  animation: cgNormsPulse 2.8s ease-out infinite;
  animation-delay: calc(var(--i, 0) * -0.3s);
  pointer-events: none;
}
.cg-norms-card:hover .cg-norms-icon svg {
  animation: cgNormsWiggle .6s ease;
}
@keyframes cgNormsFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes cgNormsPulse {
  0% { transform: scale(.9); opacity: .7; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes cgNormsWiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg) scale(1.08); }
  60% { transform: rotate(8deg) scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .cg-norms-card { opacity: 1; transform: none; animation: none; transition: none; }
  .cg-norms-icon, .cg-norms-icon::after, .cg-norms-card:hover .cg-norms-icon svg { animation: none; }
  .cg-norms-card:hover, .cg-norms-card:focus-within { transform: none; }
}

/* Prueba (v3.11.32): sección de normas en fondo oscuro, con las mismas mejoras de tarjetas, iconos y animaciones */
#normas {
  border-color: #ffffff1a;
  color: #e2e8f0;
}
#normas h2 { color: #ffffff; }
#normas .landing-section-lead { color: #cbd5e1; }
#normas .cg-norms-stat { color: #cbd5e1; }
#normas .cg-norms-stat strong { color: #ffffff; }
#normas .cg-norms-card {
  background: linear-gradient(180deg, #16233dc7, #0c1628c7);
  border: 1px solid #ffffff1f;
  color: #e2e8f0;
  box-shadow: 0 18px 46px #02061759;
  backdrop-filter: blur(10px);
}
#normas .cg-norms-card:nth-child(4n+1) {
  background:
    radial-gradient(circle at 92% 16%, #1e40afb3 0, transparent 36%),
    linear-gradient(135deg, #16233dc7, #0c1628c7);
}
#normas .cg-norms-card:hover,
#normas .cg-norms-card:focus-within {
  border-color: #60a5fa;
  box-shadow: 0 26px 60px #2563eb3d;
}
#normas .cg-norms-card h3 { color: #ffffff; }
#normas .cg-norms-count { color: #dbeafe; background: #1e3a8a; }
#normas .cg-norms-icon { background: linear-gradient(135deg, #2563eb, #4f46e5); box-shadow: 0 8px 20px #2563eb40; }
#normas .cg-norms-tags li {
  background: #ffffff0f;
  border-color: #ffffff26;
  color: #e2e8f0;
}

/* Transparencia animada (3.11.33): mismo efecto que el hero de la página comercial, con imagen de fondo,
   velo que respira y desenfoque del fondo. Las tarjetas siguen opacas para que se lean. */
html:not(.platform-login-host) #normas {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff14, #ffffff07);
  border: 1px solid #ffffff20;
  border-radius: 32px;
  box-shadow: 0 30px 80px #02061770, 0 1px 0 #ffffff26 inset;
  backdrop-filter: blur(18px);
}
html:not(.platform-login-host) #normas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: url("../assets/brand/cybergovernance-hero-v1.png") center/cover no-repeat;
  background-image: image-set(url("../assets/brand/cybergovernance-hero-v1.webp") type("image/webp"), url("../assets/brand/cybergovernance-hero-v1.png") type("image/png"));
  opacity: .3;
  filter: saturate(.9) contrast(1.05);
  transform: scale(1.02);
  animation: wwwAppProdHeroBreath 16s ease-in-out infinite alternate;
  pointer-events: none;
}
html:not(.platform-login-host) #normas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, #0b1b36f2 0%, #102341e8 56%, #101d39c7 100%);
  opacity: .94;
  animation: wwwAppProdOverlayBreath 9s ease-in-out infinite;
  pointer-events: none;
}
html:not(.platform-login-host) #normas > * {
  position: relative;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  html:not(.platform-login-host) #normas::before,
  html:not(.platform-login-host) #normas::after { animation: none; }
}
