body {
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
  background-color: #f8fafc;
}

.font-title {
  font-family: "Montserrat", sans-serif;
}



.nav-desktop-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.3rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
}

.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 100%;
  height: 16px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.72rem 1rem;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 7px;
  height: 2px;
  border-radius: 999px;
  background: #dc2626;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link i {
  font-size: 0.72rem;
  opacity: 0.9;
  transition: transform 0.25s ease;
}

.dropdown:hover .nav-link i {
  transform: translateY(1px);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 235px;
  background: rgba(11, 31, 94, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  position: relative;
  display: block;
  color: #ffffff;
  padding: 0.8rem 1rem 0.8rem 1.15rem;
  border-radius: 12px;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    padding-left 0.25s ease,
    color 0.25s ease;
}

.dropdown-content a::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px;
  height: 65%;
  background-color: #dc2626;
  border-radius: 999px;
  transition: transform 0.25s ease;
}

.dropdown-content a:hover {
  background: rgba(255, 255, 255, 0.08);
  padding-left: 1.4rem;
}

.dropdown-content a:hover::before {
  transform: translateY(-50%) scaleY(1);
}

.nav-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  padding: 0.78rem 1.2rem;
  border-radius: 9999px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    background-color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.nav-platform:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 400px; 
  margin-top: 0px; 
}

@media (min-width: 1024px) {
  .carousel {
    height: 70vh;
    max-height: 700px;
  }
}

@media (max-width: 768px) {
  .carousel {
    height: 400px;
  }
}

.carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto; 
}

.carousel-item.active {
  opacity: 1;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  cursor: pointer;
  z-index: 50; 
  transition: background-color 0.3s ease;
}

.carousel-control:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control-prev {
  left: 20px;
}

.carousel-control-next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

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

.carousel-indicator.active {
  background-color: white;
}

.level-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.level-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.level-inicial:hover .level-button {
  background-color: #db2777;
}

.level-inicial:hover * {
  color: #db2777 !important;
}

.level-primario:hover .level-button {
  background-color: #1e3a8a;
}

.level-primario:hover * {
  color: #1e3a8a !important;
}

.level-secundario:hover .level-button {
  background-color: #b91c1c;
}

.level-secundario:hover * {
  color: #b91c1c !important;
}

.level-button {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.institution-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border-radius: 1rem;
  overflow: hidden;
}

.institution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.institution-icon {
  transition: transform 0.3s ease;
}

.institution-card:hover .institution-icon {
  transform: scale(1.1);
}

.value-pill {
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
}

.value-pill:hover {
  transform: translateY(-3px);
  background-color: #1e40af;
  color: white;
}

.level-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 24px; 
}

.level-header-text {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  transition: background-color 0.3s ease;
}

.level-card:hover .level-header-text {
  background-color: rgba(0, 0, 0, 0.7);
}

.level-title {
  font-size: 1rem;
  font-weight: bold;
  color: white;
}

.facilities-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
}

.facilities-container {
  display: flex;
  transition: transform 0.5s ease;
  padding: 0 40px; 
}

.facility-card {
  flex: 0 0 calc(25% - 20px); 
  margin: 0 10px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.facility-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.facility-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(30, 64, 175, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.facility-control:hover {
  background-color: rgba(30, 64, 175, 1);
}

.facility-prev {
  left: 10px;
}

.facility-next {
  right: 10px;
}

.facility-card.no-hover:hover {
  transform: none;
  box-shadow: none;
}

.facility-card.no-shadow {
  box-shadow: none !important;
}

.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow: hidden;
}

.gallery-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 90%;
  max-height: 600px;
  margin: 2% auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.gallery-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: white;
  font-size: 28px;
  cursor: pointer;
  z-index: 1010;
  width: 40px;
  height: 40px;
  background-color: rgba(220, 38, 38, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.gallery-close:hover {
  background-color: rgba(220, 38, 38, 1);
}

.gallery-main {
  width: 100%;
  height: 75%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-image-container {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.gallery-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.gallery-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: rgba(30, 64, 175, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 1005;
}

.gallery-control:hover {
  background-color: rgba(30, 64, 175, 1);
}

.gallery-prev {
  left: 15px;
}

.gallery-next {
  right: 15px;
}

.gallery-thumbnails {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 20%;
  overflow-x: auto;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

.gallery-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border: 3px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-thumbnail:hover {
  transform: scale(1.05);
}

.gallery-thumbnail.active {
  border-color: #3b82f6;
  transform: scale(1.05);
}

.gallery-title {
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
  padding: 5px 0;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(59, 130, 246, 0.7);
  border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
  background: rgba(59, 130, 246, 1);
}

.contact-input {
  transition: border-color 0.3s ease;
}

.contact-input:focus {
  border-color: #1e40af;
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.contact-button {
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.contact-button:hover {
  background-color: #1e3a8a;
  transform: translateY(-2px);
}

.contact-button:active {
  transform: translateY(0);
}

@media (max-width: 1280px) {
  .facility-card {
    flex: 0 0 calc(33.333% - 20px);
  }
}

@media (max-width: 1024px) {
  .facility-card {
    flex: 0 0 calc(33.333% - 20px);
  }

  .gallery-content {
    width: 95%;
    height: 90%;
  }
}

@media (max-width: 768px) {
  .facility-card {
    flex: 0 0 calc(50% - 20px);
  }

  .gallery-content {
    width: 95%;
    height: 85%;
    margin: 5% auto;
  }

  .gallery-thumbnail {
    width: 70px;
    height: 50px;
  }
}

@media (max-width: 640px) {
  .facility-card {
    flex: 0 0 calc(100% - 20px);
  }

  .gallery-content {
    width: 95%;
    height: 80%;
    margin: 10% auto;
  }

  .gallery-thumbnail {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 768px) {
  .carousel-control {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);

    width: 28px;
    height: 28px;
    font-size: 14px; 
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    background-color: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.35;
    transition:
      opacity 0.2s ease,
      background-color 0.2s ease;
    z-index: 5; 
  }
  .carousel-control-prev {
    left: 10px;
  }
  .carousel-control-next {
    right: 10px;
  }

  .carousel-control:active,
  .carousel-control:focus {
    opacity: 0.6;
    background-color: rgba(0, 0, 0, 0.35);
    outline: none;
  }
}

@media (hover: hover) {
  .carousel-control {
    opacity: 0.2;
  }
  .carousel:hover .carousel-control {
    opacity: 0.6;
  }
}


.carousel {
  position: relative;
}
.carousel-control {
  z-index: 999 !important; 
  pointer-events: auto !important; 
}

.carousel .carousel-item > .absolute.inset-0 {
  pointer-events: none !important; 
}

.carousel .carousel-item a,
.carousel .carousel-item button {
  pointer-events: auto;
}

@media (max-width: 768px) {
  .carousel-control {
    width: 28px;
    height: 28px;
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.35;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
      opacity 0.2s,
      background-color 0.2s;
  }
  .carousel-control-prev {
    left: 10px;
  }
  .carousel-control-next {
    right: 10px;
  }
}
@media (hover: hover) {
  .carousel-control {
    opacity: 0.2;
  }
  .carousel:hover .carousel-control {
    opacity: 0.6;
  }
}

.menu-open .carousel-control,
.menu-open .carousel-indicators {
  opacity: 0 !important; 
  pointer-events: none !important; 
}

.facility-photo {
  position: relative;
  border: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 18px;
  cursor: pointer;
  background: #fff;
  transform: translateZ(0);
  outline: none;
}

.facility-photo img {
  width: 100%;
  height: 230px; 
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.facility-photo:hover img {
  transform: scale(1.06);
}

.facility-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.facility-photo:hover .facility-photo-overlay {
  opacity: 1;
}

.facility-photo-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
  transform: translateY(6px);
  transition: transform 0.35s ease;
}

.facility-photo:hover .facility-photo-zoom {
  transform: translateY(0);
}

.facility-photo-zoom i {
  color: #1e3a8a;
  font-size: 16px;
}



.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.gallery-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
  pointer-events: auto;
  touch-action: pinch-zoom;
}

.gallery-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 22px;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.gallery-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 36px;
  line-height: 1;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-arrow.left {
  left: 24px;
}
.gallery-arrow.right {
  right: 24px;
}

.gallery-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

@media (max-width: 640px) {
  .gallery-arrow {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }
  .gallery-image {
    max-width: 94vw;
    max-height: 78vh;
  }
}

.facilities-carousel {
  touch-action: pan-y; 
}

#facilities-container {
  will-change: transform;
  transition: transform 0.25s ease;
  cursor: grab;
}

#facilities-container.is-dragging {
  transition: none;
  cursor: grabbing;
}

.gallery-modal {
  touch-action: pan-y;
}

body.no-scroll {
  overflow: hidden;
}

#instalaciones .facility-premium-card {
  aspect-ratio: 1 / 1; 
  height: auto; 
  overflow: hidden;
  position: relative;
  border-radius: 18px;
}

#instalaciones .facility-premium-card img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: center;
  display: block;
}

#instalaciones .facility-premium-tag {
  display: none !important;
}

#instalaciones .facility-premium-meta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  pointer-events: none; 
}

#instalaciones .facility-premium-zoom {
  pointer-events: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  border: 1px solid rgba(220, 38, 38, 0.25);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

#instalaciones .facility-premium-card:hover .facility-premium-zoom {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  body {
    padding-bottom: 52px;
  }
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 999px;

  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.8);

  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.carousel-indicator.active {
  background-color: white;
  border-color: white;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3);
}
