.PrincipalText {
  display: flex;
  align-items: center;
  height: 86dvh;
background:
    linear-gradient(to top, #9037ff, #00000000 10%),
    url('assets/header.webp');
  background-size: cover;
  background-position: center;
  background-position: 80% 50%;
  margin-top: 1em;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 0 2rem;
}

#scroll-button {
  width: 50px;
  height: 50px;
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #9037ff;
  color: white;
  border: none;
  border-radius: 99999px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

#sc2 {
  margin-top: 0em;
  width: 100%;
  height: auto;
  min-height: 40em;
  color: white;
  display: grid;
  grid-template-areas:
    "ne t ni"
    "a a a"
    "na l b";
  grid-template-columns: 43em 38em 39em;
  grid-template-rows: 22em 3em 20em;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: linear-gradient(to bottom, #9037ff, #0e0e0e 17%);

}

#sc2 p {
  grid-area: a;
  width: 55%;
  font-size: 28px;
  margin-left: 22.4%;
  text-align: center;
}

#sc2 img {
  grid-area: l;
}

.sena {
  width: 120px;
  margin-left: 38.5%;
}
.Principal {
  grid-area: b;
  margin-left: 9em;
}

.principal-button {
  background: linear-gradient(180deg, #9037ff 0%, #562199 100%);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.2s;
}

.principal-button:hover {
  transform: translateY(-2px);
}

#sc2 span {
  margin-left: 14%;
  border-radius: 18px;
  grid-area: t;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 400px;
  height: 100px;
  background-color: #9037ff;
}

h1 {
  color: #ffffff;
  font-size: 48px;
  width: 45%;
  margin-left: 3em;
  font-weight: medium;
  font-family: Outfit;
}
h2 {
  font-family: Chillax;
  font-size: 36px;
}

/* Responsive Second Section */
@media (max-width: 1024px) {
  #sc2 {
    grid-template-areas:
      "t"
      "a"
      "l"
      "b";
    grid-template-columns: 1fr;
    grid-template-rows: 9em auto auto auto;
    margin-top: 0em;
    padding: 1rem;
  }

  #sc2 p {
    width: 90%;
    margin-left: 5%;
    font-size: 24px;
  }

  #sc2 span {
    margin-left: 0;
    width: 100%;
    max-width: 400px;
    justify-self: center;
  }

  .sena {
    margin-left: 0;
    justify-self: center;
  }

  .Principal {
    margin-left: 0;
    justify-self: center;
  }

  h1 {
    font-size: 36px;
    width: 80%;
    margin-left: 1em;
  }
}

@media (max-width: 768px) {
  .PrincipalText {
    padding: 0 1rem;
    background-position: center;
  }

  h1 {
    font-size: 28px;
    width: 90%;
    margin-left: 0.5em;
  }

  #sc2 {
    margin-top: 0em;
    padding: 1rem 0.5rem;
        grid-template-rows: 9em auto auto auto;
  }

  #sc2 p {
    font-size: 20px;
    width: 95%;
    margin-left: 2.5%;
  }

  #sc2 span {
    width: 90%;
    height: 80px;
  }

  h2 {
    font-size: 28px;
  }

  .sena {
    width: 100px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px;
    width: 95%;
    margin-left: 0.25em;
  }

  #sc2 p {
    font-size: 18px;
  }

  #sc2 span {
    width: 95%;
    height: 70px;
  }

  h2 {
    font-size: 24px;
  }

  .sena {
    width: 80px;
  }

  #scroll-button {
    width: 40px;
    height: 40px;
    bottom: 60px;
  }
}

/* Sección principal */
#services-section {
  padding: 80px 0;
  margin-top: 0em;
  min-height: 50em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-container {
  position: relative;
  max-width: 1800px;
  width: 100%;
  overflow: hidden;
  cursor: grab;
  padding-top: 20px;
}

.carousel-container.dragging {
  cursor: grabbing;
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.3s ease-out;
  gap: 20px;
  padding: 20px 10px 0 10px;
  will-change: transform;
}

.carousel-wrapper.no-transition {
  transition: none;
}

.card {
  min-width: 350px;
  height: 500px;
  border-radius: 25px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  background: linear-gradient(
    180deg,
    rgba(147, 51, 234, 0.95) 0%,
    rgba(88, 28, 135, 0.98) 50%,
    rgba(59, 7, 100, 1) 100%
  );
  flex-shrink: 0;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  z-index: 1;
}

.card-1::before {
  background-image: url("assets/indexprogramas/V7A8218.webp");
}

.card-2::before {
  background-image: url("assets/indexprogramas/V7A8178.webp");
}

.card-3::before {
  background-image: url("assets/indexprogramas/V7A8269.webp");
}

.card-4::before {
  background-image: url("assets/indexprogramas/2U2A9408.webp");
}

.card-5::before {
  background-image: url("assets/indexprogramas/2U2A9410.webp");
}

.card-6::before {
  background-image: url("assets/indexprogramas/V7A8440.webp");
}

.card-7::before {
  background-image: url("assets/indexprogramas/V7A8392.webp");
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 50px rgba(147, 51, 234, 0.4);
}

.carousel-container.dragging .card:hover {
  transform: none;
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
  color: white;
  text-align: center;
  z-index: 2;
}

.card-title {
  font-size: 2.2rem;
  font-weight: bold;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  line-height: 1.2;
  letter-spacing: 1px;
}

.card-subtitle {
  font-size: 1rem;
  margin-bottom: 25px;
  opacity: 0.9;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.card-button {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.nav-button.prev {
  left: 20px;
}

.nav-button.next {
  right: 20px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
  height: 3em;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: linear-gradient(135deg, #9333ea, #581c87);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

.drag-hint {
  text-align: center;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

#video {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  padding: 2rem;
  margin-bottom: 6em;
}

.responsive-iframe-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0 auto;
  box-shadow: #9333ea 5px 8px 25px;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-button {
  background: linear-gradient(180deg, #9037ff 0%, #562199 100%);
  border: none;
  color: white;
  padding: 16px 28px;
  border-radius: 10px;
  font-size: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 4em auto 0 auto;
  cursor: pointer;
  gap: 10px;
  transition: 0.5s;
}

.video-button:hover {
  transform: translateY(-4px);
  box-shadow: #9037ff 0px 4px 20px;
}

.video-button img {
  width: 28px;
  height: 28px;
  margin-right: 8px;
}

.video-button p {
  margin: 0;
}

/* Responsive Video Section */
@media (max-width: 768px) {
  #video {
    padding: 1rem;
    margin-bottom: 4em;
  }

  .responsive-iframe-container {
    max-width: 100%;
  }

  .video-button {
    font-size: 18px;
    padding: 12px 20px;
    margin: 1.5em auto 0 auto;
  }

  .video-button img {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  #video {
    padding: 0.5rem;
    margin-bottom: 3em;
  }

  .video-button {
    font-size: 16px;
    padding: 10px 16px;
    margin: 1em auto 0 auto;
  }

  .video-button img {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 1200px) {
  .card {
    min-width: 320px;
    height: 450px;
  }

  .card-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  #services-section {
    padding: 40px 0;
    margin-top: 0em;
    min-height: 35em;
  }

  .card {
    min-width: 280px;
    height: 400px;
  }

  .card-title {
    font-size: 1.6rem;
  }

  .card-content {
    padding: 30px 20px;
  }

  .nav-button {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .nav-button.prev {
    left: 10px;
  }

  .nav-button.next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  #services-section {
    padding: 20px 0;
    margin-top: 0em;
    min-height: 30em;
  }

  .carousel-wrapper {
    gap: 15px;
  }

  .card {
    min-width: 250px;
    height: 350px;
  }

  .card-title {
    font-size: 1.4rem;
  }

  .card-subtitle {
    font-size: 0.9rem;
  }

  .nav-button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .nav-button.prev {
    left: 5px;
  }

  .nav-button.next {
    right: 5px;
  }
}
