@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes zoomInWide {
  0% {
    transform: scale(0.8) translateY(40px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
@keyframes fadeInOut {
  0%,
  45%,
  to {
    opacity: 0;
    transform: scale(1.05);
  }
  15%,
  30% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes ping {
  75%,
  to {
    transform: scale(2);
    opacity: 0;
  }
}
@keyframes riseFromGiantBottom {
  0% {
    transform: translateY(100%) scale(0.3);
    opacity: 0;
  }
  20% {
    transform: translateY(30%) scale(0.7);
    opacity: 0.7;
  }
  50% {
    transform: translateY(0) scale(0.9);
    opacity: 0.9;
  }
  to {
    transform: translateY(-20%) scale(1);
    opacity: 1;
  }
}
@keyframes giantShadowPulse {
  0% {
    opacity: 0;
    transform: scaleX(0.5);
  }
  20% {
    opacity: 0.7;
    transform: scaleX(1);
  }
  to {
    opacity: 0.5;
    transform: scaleX(1.3);
  }
}
@keyframes fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}
@keyframes glitch-anim {
  0% {
    clip: rect(40px, 9999px, 20px, 0);
    transform: skew(0.6deg);
  }
  5% {
    clip: rect(13px, 9999px, 82px, 0);
    transform: skew(0.3deg);
  }
  14% {
    clip: rect(75px, 9999px, 84px, 0);
    transform: skew(0.2deg);
  }
  to {
    clip: rect(67px, 9999px, 35px, 0);
    transform: skew(0.1deg);
  }
}
@keyframes glitch-anim2 {
  0% {
    clip: rect(65px, 9999px, 29px, 0);
    transform: skew(0.3deg);
  }
  5% {
    clip: rect(15px, 9999px, 83px, 0);
    transform: skew(0.6deg);
  }
  14% {
    clip: rect(36px, 9999px, 27px, 0);
    transform: skew(0.1deg);
  }
  to {
    clip: rect(30px, 9999px, 91px, 0);
    transform: skew(0.5deg);
  }
}
@keyframes ultra-glitch-anim-1 {
  0% {
    transform: translate(-2px, 2px);
    opacity: 0.8;
  }
  20% {
    transform: translate(2px, -2px);
    opacity: 0.6;
  }
  40% {
    transform: translate(-1px, 1px);
    opacity: 0.9;
  }
  60% {
    transform: translate(1px, -1px);
    opacity: 0.7;
  }
  80% {
    transform: translate(-3px, 3px);
    opacity: 0.5;
  }
  to {
    transform: translate(3px, -3px);
    opacity: 0.8;
  }
}
@keyframes ultra-glitch-anim-2 {
  0% {
    transform: translate(2px, -2px);
    opacity: 0.8;
  }
  20% {
    transform: translate(-2px, 2px);
    opacity: 0.6;
  }
  40% {
    transform: translate(1px, -1px);
    opacity: 0.9;
  }
  60% {
    transform: translate(-1px, 1px);
    opacity: 0.7;
  }
  80% {
    transform: translate(3px, -3px);
    opacity: 0.5;
  }
  to {
    transform: translate(-3px, 3px);
    opacity: 0.8;
  }
}
@keyframes glitch {
  0%,
  14%,
  to {
    text-shadow: 0.05em 0 0#00fffc, -0.05em 0 0#fc00ff;
  }
  15%,
  49% {
    text-shadow: -0.05em -0.025em 0#00fffc, 0.025em 0.035em 0#fc00ff;
  }
  50%,
  99% {
    text-shadow: 0.05em 0.035em 0#00fffc, 0.05em 0 0#fc00ff;
  }
}
@keyframes slideShow {
  0%,
  33% {
    opacity: 1;
  }
  34%,
  to {
    opacity: 0;
  }
}
@keyframes float {
  0%,
  to {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.page-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.page-content.active {
  opacity: 1;
  pointer-events: all;
}
.pure-text {
  position: relative;
  z-index: 20;
  text-align: center;
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  transform: translateY(12vh);
}
.pure-text * {
  color: #fff !important;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.98), 0 0 30px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(0, 0, 0, 0.8) !important;
  -webkit-text-stroke: 1.4px #000;
  text-stroke: 1.4px black;
  paint-order: stroke fill;
  font-weight: 900 !important;
}
.pure-text h2 {
  font-size: clamp(2.4rem, 7.5vw, 4.8rem) !important;
  line-height: 1;
  margin: 0 0 1.2rem;
  font-family: "Caveat", cursive;
}
.pure-text p {
  font-size: clamp(1.25rem, 3.8vw, 1.8rem);
  margin: 0 0 2.5rem;
  font-weight: 800;
}
.pure-text button,
.pure-text span {
  background: 0 0 !important;
  border-radius: 50px;
}
.pure-text span {
  display: inline-block;
  border: 3px solid #fff !important;
  padding: 0.8rem 1.8rem !important;
  font-size: 1.05rem !important;
  margin: 0.5rem;
}
.pure-text button {
  border: 3.5px solid #fff !important;
  color: #fff !important;
  padding: 1.1rem 2.8rem !important;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 1px;
  margin-top: 1.5rem;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
.pure-text button:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}
.segmento-videos {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #0a0e17, #1a2332);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.segmento-videos h2 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  background: linear-gradient(90deg, #00d4ff, #007bff, #00c6ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 50px;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}
.segmento-videos .galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 14px;
  width: 92%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 10px;
}
.segmento-videos .item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  background: #000;
}
.segmento-videos .item:hover {
  transform: scale(1.04) translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  z-index: 5;
}
.segmento-videos .poster,
.segmento-videos .preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease;
}
.segmento-videos .poster {
  z-index: 1;
}
.segmento-videos .preview {
  z-index: 2;
  opacity: 0;
}
.segmento-videos .item:hover .poster {
  opacity: 0;
}
.segmento-videos .item:hover .overlay,
.segmento-videos .item:hover .preview {
  opacity: 1;
}
.segmento-videos .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
  pointer-events: none;
}
.segmento-videos .wide {
  grid-column: span 2;
}
.segmento-videos .tall {
  grid-row: span 2;
}
@media (max-width: 900px) {
  .segmento-videos .tall,
  .segmento-videos .wide {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }
  .segmento-videos .galeria {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
}
@media (max-width: 500px) {
  .segmento-videos .galeria {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }
}
.segmento-videos .video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}
.segmento-videos .video-modal.active {
  display: flex;
  animation: fadeIn 0.4s ease;
}
.segmento-videos .video-content {
  position: relative;
  width: 95vw;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(0, 212, 255, 0.4), 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: zoomInWide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.segmento-videos .video-content video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.segmento-videos .cerrar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
  font-size: 2.4rem;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.segmento-videos .cerrar:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.15) rotate(90deg);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}
@media (max-width: 768px) {
  .segmento-videos .video-content {
    width: 96vw;
    border-radius: 16px;
  }
  .segmento-videos .cerrar {
    width: 48px;
    height: 48px;
    font-size: 2rem;
    top: 12px;
    right: 12px;
  }
}
.bg-slide {
  animation: fadeInOut 15s infinite;
  transition: opacity 1.5s ease-in-out, transform 2s ease-in-out;
}
.bg-slide:nth-child(1),
.bg-slides .bg-slide:nth-child(1) {
  animation-delay: 0s;
}
.bg-slide:nth-child(2) {
  animation-delay: 5s;
}
.bg-slide:nth-child(3) {
  animation-delay: 10s;
}
#whatsappFloat {
  animation: float 6s ease-in-out infinite;
}
.animate-ping {
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.notebook-page {
  background: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
    inset 0 0 20px rgba(255, 255, 255, 0.8);
}
.page-flip {
  transform-origin: left center;
  perspective: 1000px;
}
.navbar-institute {
  background: linear-gradient(135deg, #2c3e50 0, #3498db 100%);
  border-bottom: 8px solid #e74c3c;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.nav-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  color: white !important;
}
.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #f39c12;
  transition: all 0.3s ease;
}
.nav-link.active::before,
.nav-link:hover::before {
  width: 100%;
  left: 0;
}
.badge-icon,
.content-card {
  position: relative;
  overflow: hidden;
}
.badge-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
  transition: all 0.3s ease;
}
.badge-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.6s;
}
.badge-icon:hover::before,
.group:hover .notebook-card::before {
  left: 100%;
}
.badge-icon:hover {
  transform: translateY(-10px) scale(1.1);
}
.content-card {
  background: #fff;
  border-radius: 24px;
  padding: 50px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.12);
  border: 3px solid #ecf0f1;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.content-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #e74c3c, #f39c12);
}
.content-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.18);
}
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.2;
  filter: brightness(0.7) contrast(1.3) saturate(1.6);
}
.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body {
  background-image: radial-gradient(
      circle at 20% 80%,
      rgba(120, 119, 198, 0.3) 0,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 119, 198, 0.3) 0,
      transparent 50%
    ),
    url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="%233498db" fill-opacity="0.08" d="M0,128L48,149.3C96,171,192,213,288,213.3C384,213,480,171,576,138.7C672,107,768,85,864,106.7C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E');
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: cover, auto 100px;
}
.theme-button {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  padding: 15px 30px;
  border-radius: 50px;
  font-weight: 700;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.theme-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.5s;
}
.theme-button:hover::before {
  left: 0;
}
.theme-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 15px 40px rgba(243, 156, 18, 0.4);
}
.statue-animation {
  width: 800px !important;
  height: 1000px !important;
  z-index: 5;
  filter: drop-shadow(0 0 100px rgba(255, 255, 255, 0.4)) brightness(1.1);
  animation: riseFromGiantBottom 4s ease-out forwards;
}
.statue-animation::after {
  content: "";
  position: absolute;
  bottom: -100px;
  left: 50px;
  width: 500px;
  height: 80px;
  background: radial-gradient(
    ellipse 300px 60px,
    rgba(0, 0, 0, 0.5) 0,
    transparent 70%
  );
  filter: blur(25px);
  animation: giantShadowPulse 4s ease-out forwards;
}
h1,
h2 {
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.15);
  letter-spacing: 1.5px;
}
.page-content {
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.8);
}
.educational-icon {
  animation: float 3s ease-in-out infinite;
}
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.star {
  position: absolute;
  background: radial-gradient(circle, gold 0, orange 50%, #ff8c00 100%);
  border-radius: 50%;
  animation: fall linear infinite;
}
.glitch {
  position: relative;
}
.glitch::after,
.glitch::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.glitch::before {
  animation: glitch-anim 2s infinite linear alternate-reverse;
  color: #3498db;
}
.glitch::after {
  animation: glitch-anim2 2s infinite linear alternate-reverse;
  color: #e74c3c;
}
.carousel-bg {
  background-size: cover;
  background-position: center;
}
.ultra-glitch,
.writing-text {
  display: inline-block;
}
.ultra-glitch::after,
.ultra-glitch::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.ultra-glitch::before {
  animation: ultra-glitch-anim-1 3s infinite linear alternate-reverse;
  color: #3498db;
  z-index: -1;
}
.ultra-glitch::after {
  animation: ultra-glitch-anim-2 3s infinite linear alternate-reverse;
  color: #e74c3c;
  z-index: -2;
}
#avion {
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4)) brightness(1.1);
}
#mapamundi {
  filter: drop-shadow(0 5px 25px rgba(0, 0, 0, 0.3)) saturate(1.2);
  transform-origin: center center;
}
.writing-text {
  overflow: hidden;
  white-space: normal;
  line-height: 1.6;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  color: #4a5568;
}
.ultra-glitch {
  position: relative;
  animation: glitch 2s infinite;
}
.offer-card.visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
.notebook-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: 0.7s;
  transform: skewX(-25deg);
}
.bg-slides .bg-slide {
  animation: slideShow 9s infinite;
}
.bg-slides .bg-slide:nth-child(2) {
  animation-delay: 3s;
}
.bg-slides .bg-slide:nth-child(3) {
  animation-delay: 6s;
}
.modal-content {
  transform: scale(0);
  opacity: 0;
  transition: none !important;
}
.hidden {
  display: none !important;
}
.book-card,
[data-modal] {
  cursor: pointer !important;
}
.gradient-blue-red {
  background: linear-gradient(
    135deg,
    #1e40af 0,
    #3b82f6 35%,
    #dc2626 70%,
    #ef4444 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bg-gradient-primary {
  background: linear-gradient(
    90deg,
    #1e3a8a 0,
    #1e40af 30%,
    #3b82f6 60%,
    #dc2626 100%
  );
}
.bg-gradient-wave {
  background: linear-gradient(135deg, #1e40af 0, #60a5fa 50%, #fca5a5 100%);
}
.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-scale:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}
