/**
 * predial-principal.css
 *    External CSS for principal.php interactive sections
 *
 * @format
 */

body {
  background: linear-gradient(
    135deg,
    #1239e414 0%,
    rgb(255, 255, 255) 50%,
    #1239e444 100%
  );
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
  overflow-x: hidden;
}

.predial-banner {
  position: relative;
  overflow: hidden;
  margin: 2.5rem auto;
  padding: 2rem 2rem 2.5rem;
  max-width: 1140px;
  border-radius: 32px;
  background: linear-gradient(135deg, #00d7ff 0%, #0ca0e6 100%);
  color: #07172f;
  box-shadow: 0 24px 70px rgba(3, 14, 40, 0.16);
}

.predial-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle farthest-side at top left,
    rgba(255, 255, 255, 0.28),
    transparent 38%
  );
  pointer-events: none;
}

.predial-banner-shape {
  position: absolute;
  right: -25%;
  top: -18%;
  width: 72%;
  height: 220%;
  background: linear-gradient(180deg, #9d4edd 0%, #7c3aed 100%);
  transform: skewY(-22deg);
  border-radius: 40px;
  opacity: 0.92;
  pointer-events: none;
}

.predial-banner-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.75rem;
  align-items: center;
}

.predial-banner-copy {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-width: 0;
}

.predial-banner-tag {
  margin: 0 0 0.35rem;
  color: rgba(7, 23, 47, 0.8);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.predial-banner-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.02;
}

.predial-banner-play {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.predial-banner-play:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.predial-banner-play-icon {
  width: 18px;
  height: 22px;
  display: inline-block;
  background: #07172f;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.predial-banner-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.predial-banner-visual svg {
  width: 100%;
  max-width: 300px;
  height: auto;
}

@media (max-width: 940px) {
  .predial-banner-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .predial-banner-copy {
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
  }
}

@media (max-width: 620px) {
  .predial-banner {
    padding: 1.6rem 1.4rem 2rem;
    border-radius: 26px;
  }

  .predial-banner-play {
    width: 60px;
    height: 60px;
  }

  .predial-banner-copy h2 {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
  }
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.predial-video-frame {
  position: relative;
}

.predial-video-bubble {
  position: absolute;
  max-width: 240px;
  left: 50%;
  top: -12px;
  transform: translateX(-50%) translateY(6px) scale(0.98);
  background: linear-gradient(
    180deg,
    rgba(3, 7, 18, 0.98),
    rgba(9, 12, 20, 0.95)
  );
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
  opacity: 0;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: auto;
  z-index: 40;
  font-size: 13px;
  line-height: 1.25;
}

.predial-video-bubble strong {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.predial-video-bubble.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.predial-video-bubble.bubble-1,
.predial-video-bubble.bubble-2 {
  left: 50%;
  top: -12px;
}

@media (max-width: 640px) {
  .predial-video-bubble {
    display: none;
  }
}

.predial-video-frame video {
  pointer-events: none;
}

.predial-card-bubble {
  position: absolute;
  right: -8%;
  top: -6%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.12),
    rgba(34, 211, 238, 0.08)
  );
  filter: blur(22px);
  transition:
    transform 0.45s ease,
    opacity 0.35s;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.predial-benefit-card:hover .predial-card-bubble {
  opacity: 1;
  transform: scale(1.06) translateY(-6px);
}

.predial-badge-delay-800 {
  animation-delay: 0.8s;
}

/* ===============================
   IMPACTO DEL PREDIAL
*/
.predial-impact-container {
  position: relative;
  z-index: 2;
  width: min(1220px, 100%);
  margin: 0 auto;
}

.predial-impact-bg {
  position: absolute;
  border-radius: 999px;
  filter: blur(45px);
  opacity: 0.75;
  pointer-events: none;
}

.predial-impact-bg-one {
  width: 260px;
  height: 260px;
  top: 80px;
  left: -90px;
  background: rgba(0, 87, 255, 0.2);
}

.predial-impact-bg-two {
  width: 340px;
  height: 340px;
  right: -120px;
  bottom: 40px;
  background: rgba(0, 229, 255, 0.22);
}

.predial-impact-header {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 46px;
}

.predial-impact-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #ffffff;
  color: #0057ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 14px 35px rgba(0, 87, 255, 0.12);
  border: 1px solid rgba(0, 87, 255, 0.12);
  margin-bottom: 18px;
}

.predial-impact-kicker span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #00c8ff;
  box-shadow: 0 0 0 6px rgba(0, 200, 255, 0.14);
}

.predial-impact-header h2 {
  margin: 0;
  color: #07172f;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.predial-impact-header h2 strong {
  display: inline-block;
  color: transparent;
  background: linear-gradient(90deg, #0057ff, #00b7ff, #0043c9);
  background-clip: text;
  -webkit-background-clip: text;
}

.predial-impact-header p {
  max-width: 680px;
  margin: 20px auto 0;
  color: #53627a;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.predial-impact-gallery {
  display: flex;
  gap: 16px;
  height: 540px;
  width: 100%;
  padding: 12px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 87, 255, 0.12);
  box-shadow:
    0 30px 80px rgba(10, 35, 90, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.predial-impact-panel {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  background: #0b1730;
  transition:
    flex 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.35s ease,
    box-shadow 0.35s ease;
  box-shadow: 0 16px 35px rgba(5, 20, 50, 0.16);
}

.predial-impact-panel:hover,
.predial-impact-panel.is-active {
  flex: 3.2;
  transform: translateY(-5px);
  box-shadow: 0 26px 60px rgba(0, 87, 255, 0.25);
}

.predial-impact-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(4, 15, 35, 0.04) 0%,
    rgba(4, 15, 35, 0.22) 35%,
    rgba(2, 8, 23, 0.92) 100%
  );
  pointer-events: none;
}

.predial-impact-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  transition:
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.5s ease;
}

.predial-impact-panel:hover .predial-impact-img,
.predial-impact-panel.is-active .predial-impact-img {
  transform: scale(1.13);
  filter: saturate(1.08) contrast(1.05);
}

.predial-impact-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.24) 48%,
    transparent 58%,
    transparent 100%
  );
  transform: translateX(-120%);
  transition: transform 0.9s ease;
  pointer-events: none;
}

.predial-impact-panel:hover .predial-impact-shine,
.predial-impact-panel.is-active .predial-impact-shine {
  transform: translateX(120%);
}

.predial-impact-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.predial-impact-badge span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.predial-impact-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 24px;
  color: #ffffff;
  transform: translateY(28px);
  transition: transform 0.45s ease;
}

.predial-impact-panel:hover .predial-impact-content,
.predial-impact-panel.is-active .predial-impact-content {
  transform: translateY(0);
}

.predial-impact-number {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #ffffff;
  color: #0057ff;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.predial-challenge-media {
  position: relative;
  width: min(100%, 760px);
  min-height: 430px;
  margin: 0 auto;
  padding: 52px 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 42px;
  background:
    radial-gradient(
      circle at 14% 16%,
      rgba(90, 255, 185, 0.34),
      transparent 34%
    ),
    radial-gradient(
      circle at 76% 20%,
      rgba(255, 178, 190, 0.28),
      transparent 30%
    ),
    radial-gradient(
      circle at 76% 84%,
      rgba(105, 137, 255, 0.28),
      transparent 34%
    ),
    linear-gradient(135deg, #f8fcff 0%, #eef6ff 100%);
  box-shadow: 0 28px 70px rgba(38, 76, 130, 0.12);
}

.predial-bg-blur {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.7;
  pointer-events: none;
}

.predial-bg-blur-1 {
  width: 230px;
  height: 230px;
  left: -50px;
  top: -40px;
  background: rgba(117, 255, 201, 0.35);
}

.predial-bg-blur-2 {
  width: 260px;
  height: 260px;
  right: 35px;
  top: 40px;
  background: rgba(255, 206, 191, 0.35);
}

.predial-bg-blur-3 {
  width: 300px;
  height: 300px;
  right: -70px;
  bottom: -70px;
  background: rgba(133, 158, 255, 0.3);
}

.predial-challenge-media-frame {
  position: relative;
  width: 100%;
  min-height: 260px;
  border-radius: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  background: rgba(255, 255, 255, 0.46);
  border: 10px solid rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 0 55px rgba(85, 120, 170, 0.08),
    0 20px 60px rgba(33, 60, 120, 0.1);
  backdrop-filter: blur(18px);
}

.predial-orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.orbit-1 {
  width: 315px;
  height: 315px;
  background: linear-gradient(
    135deg,
    rgba(50, 225, 235, 0.35),
    rgba(255, 127, 167, 0.25)
  );
  opacity: 0.8;
}

.orbit-2 {
  width: 240px;
  height: 240px;
  border: 28px solid rgba(54, 202, 218, 0.23);
  box-shadow: 30px 50px 0 rgba(242, 114, 149, 0.18);
}

.orbit-3 {
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 170px -35px 0 rgba(190, 186, 218, 0.25);
}

.predial-video-circle {
  position: relative;
  z-index: 3;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 45px rgba(32, 86, 150, 0.16);
  animation: predialFloat 4s ease-in-out infinite;
}

.predial-video-circle video {
  width: 145%;
  height: 145%;
  object-fit: contain;
}

.predial-mini-dot {
  position: absolute;
  z-index: 2;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffc47a;
}

.dot-1 {
  right: 145px;
  top: -28px;
}

.dot-2 {
  left: 55px;
  bottom: -8px;
  width: 9px;
  height: 9px;
  background: #cbd2ef;
}

.dot-3 {
  right: 175px;
  bottom: -12px;
  background: #8fd8df;
}

.predial-challenge-floating-card {
  position: absolute;
  z-index: 18;
  right: 34px;
  bottom: 8px;
  max-width: 310px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 24px;
  border-radius: 20px;
  background: #252068;
  color: #fff;
  box-shadow: 0 22px 45px rgba(37, 32, 104, 0.28);
  animation: predialCardIn 1s ease both;
}

.floating-card-icon {
  width: 23px;
  height: 23px;
  min-width: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 900;
}

.predial-challenge-floating-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

.predial-challenge-floating-card strong {
  display: block;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.15;
  font-weight: 900;
}

@keyframes predialFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes predialCardIn {
  from {
    opacity: 0;
    transform: translateX(35px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  .predial-challenge-media {
    min-height: 420px;
    padding: 34px 18px 95px;
    border-radius: 30px;
  }

  .predial-challenge-media-frame {
    min-height: 245px;
    border-radius: 28px;
    border-width: 8px;
  }

  .orbit-1 {
    width: 250px;
    height: 250px;
  }

  .orbit-2 {
    width: 195px;
    height: 195px;
    border-width: 22px;
  }

  .predial-video-circle {
    width: 145px;
    height: 145px;
  }

  .predial-challenge-floating-card {
    left: 22px;
    right: 22px;
    bottom: 12px;
    max-width: none;
    padding: 15px 18px;
    border-radius: 18px;
  }

  .predial-challenge-floating-card strong {
    font-size: 15px;
  }
}

.predial-impact-content h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.predial-impact-content p {
  max-width: 430px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.96rem;
  line-height: 1.55;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.4s ease,
    max-height 0.4s ease;
}

.predial-impact-panel:hover .predial-impact-content p,
.predial-impact-panel.is-active .predial-impact-content p {
  opacity: 1;
  max-height: 130px;
}

.predial-impact-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.4s ease;
}

.predial-impact-panel:hover .predial-impact-tags,
.predial-impact-panel.is-active .predial-impact-tags {
  opacity: 1;
  transform: translateY(0);
}

.predial-impact-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .predial-impact-section {
    padding: 70px 14px;
  }

  .predial-impact-gallery {
    height: auto;
    flex-direction: column;
    padding: 10px;
    border-radius: 28px;
  }

  .predial-impact-panel,
  .predial-impact-panel:hover,
  .predial-impact-panel.is-active {
    flex: none;
    height: 250px;
    transform: none;
    border-radius: 24px;
  }

  .predial-impact-content {
    transform: translateY(0);
    padding: 20px;
  }

  .predial-impact-content p,
  .predial-impact-tags {
    opacity: 1;
    max-height: none;
    transform: none;
  }

  .predial-impact-header {
    margin-bottom: 32px;
  }
}

@media (max-width: 520px) {
  .predial-impact-header h2 {
    font-size: 2.45rem;
  }

  .predial-impact-header p {
    font-size: 0.98rem;
  }

  .predial-impact-panel,
  .predial-impact-panel:hover,
  .predial-impact-panel.is-active {
    height: 230px;
  }

  .predial-impact-badge {
    top: 14px;
    left: 14px;
    padding: 8px 12px;
  }

  .predial-impact-content h3 {
    font-size: 1.55rem;
  }

  .predial-impact-content p {
    font-size: 0.9rem;
  }

  .predial-impact-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.85rem;
  }
}
