/********** Template CSS **********/
:root {
  --primary: #00335a;
  --green: #2b9348;
  --secondary: #525368;
  --light: #E8F5E9;
  --dark: #00335a;
}

.back-to-top {
  position: fixed;
  display: none;
  right: 30px;
  bottom: 30px;
  z-index: 99;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
  font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
  font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
  font-weight: 500 !important;
}




/*** Button ***/
.btn {
  transition: .5s;
  border-radius: 50px;
  font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
  color: var(--light);
}

.btn-square {
  width: 38px;
  height: 38px;
}

.btn-sm-square {
  width: 32px;
  height: 32px;
}

.btn-lg-square {
  width: 48px;
  height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: normal;
}


/*** Navbar ***/
.navbar.sticky-top {
  top: 0; /* Asegura que el navbar esté en la parte superior */
  transition: .5s; /* Transición suave */
  z-index: 1020; /* Asegura que el navbar esté por encima de otros elementos */
}

.navbar .navbar-brand,
.navbar a.btn {
  height: 80px
}

.navbar .navbar-nav .nav-link {
  margin-right: 35px;
  padding: 25px 0;
  color: #00335a;
  font-size: 18px;
  font-weight: 400;
  outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
  color: #00335a !important;
  font-weight: bold;
  text-decoration: none;
}

.navbar .dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

@media (max-width: 991.98px) {
  .navbar .navbar-nav .nav-link  {
    margin-right: 0;
    padding: 10px 0;
  }

  .navbar .navbar-nav {
    border-top: 1px solid #EEEEEE;
  }
}

@media (min-width: 992px) {
  .navbar .nav-item .dropdown-menu {
    display: block;
    border: none;
    margin-top: 0;
    top: 150%;
    opacity: 0;
    visibility: hidden;
    transition: .5s;
  }

  .navbar .nav-item:hover .dropdown-menu {
    top: 100%;
    visibility: visible;
    transition: .5s;
    opacity: 1;
  }
}

/* Estilos para la sección About compacta */
#institucional .container-xxl {
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

#institucional .row.g-0 {
  min-height: 300px; /* Altura mínima para mantener proporción */
}

#institucional img {
  min-height: 100%;
  width: 100%;
  object-position: center;
}

#institucional .bg-light {
  background-color: #f8f9fa!important;
  border-left: 1px solid #dee2e6;
}

/* Ajustes de tipografía y espacios */
#institucional h2 {
  font-size: 1.8rem;
  padding-bottom: 0.5rem;

  display: inline-block;
}

#institucional p {
  font-size: 1.00rem;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 992px) {
  #institucional .row.g-0 {
    flex-direction: column;
    min-height: auto;
  }

  #institucional img {
    height: 300px;
    min-height: auto;
    margin-bottom: 1rem;
  }

  #institucional .bg-light {
    border-left: none;
    border-top: 1px solid #dee2e6;
  }
}

@media (max-width: 768px) {
  #institucional h2 {
    font-size: 1.5rem;
  }

  #institucional .wow.fadeInUp {
    padding: 1rem!important;
  }
}

/*** para el menú móvil ***/
.custom-menu-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 2px solid #00335a;
  border-radius: 30px;
  background-color: #00335a;
  color: #ffffff;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 8px;
  position: relative;
  overflow: hidden;
  margin: 12px 16px; /* Arriba/abajo | Izq/der */
}

.custom-menu-toggler:hover {
  background-color: #00335a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.custom-menu-toggler:active {
  transform: translateY(0);
}

.custom-menu-toggler .fa-bars {
  transition: transform 0.3s ease;
}

.custom-menu-toggler[aria-expanded="true"] .fa-bars {
  transform: rotate(90deg);
}

.custom-menu-toggler .menu-text {
  transition: opacity 0.3s ease;
}

.custom-menu-toggler[aria-expanded="true"] .menu-text {
  opacity: 0.8;
}

/* Efecto de onda al hacer clic */
.custom-menu-toggler::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(58, 134, 255, 0.2) 1%, transparent 1%) center/15000%;
  opacity: 0;
  transition: opacity 0.5s, background-size 0.5s;
}

.custom-menu-toggler:active::after {
  background-size: 100%;
  opacity: 1;
  transition: 0s;
}

/*** para el menú móvil ***/


.page-header .breadcrumb-item+.breadcrumb-item::before {
  color: var(--light);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  font-size: 18px;
  color: var(--light);
}


/*** Top Feature ***/
@media (min-width: 991.98px) {
  .top-feature {
    position: relative;
    margin-top: -80px;
    z-index: 1;
  }
}

/*** Footer ***/
.footer .btn.btn-link {
  display: block;
  margin-bottom: 5px;
  padding: 0;
  text-align: left;
  color: var(--light);
  font-weight: normal;
  text-transform: capitalize;
  transition: .3s;
}

/* Efectos de hover */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3) !important;
}

.footer .btn.btn-link::before {
  position: relative;
  content: "\f105";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 10px;
}

.footer .btn.btn-link:hover {
  color: var(--primary);
  letter-spacing: 1px;
  box-shadow: none;
}

.copyright {
  color: var(--light);
  background: #072A19;
}

.copyright a {
  color: #FFFFFF;
}

.copyright a:hover {
  color: var(--primary);
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
  width: auto;
  height: auto;
}

/* Estilos para las tarjetas de la Comisión Directiva */
.directiva-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.directiva-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.directiva-card h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.directiva-card ul {
  padding-left: 0;
}

.directiva-card li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #555;
}

.directiva-card li i {
  margin-right: 8px;
}

/* Estilos para la imagen */
.position-relative img {
  transition: transform 0.3s ease-in-out;
}

.position-relative:hover img {
  transform: scale(1.05);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  .directiva-card {
    padding: 15px;
  }

  .directiva-card h4 {
    font-size: 1.1rem;
  }

  .directiva-card li {
    font-size: 0.9rem;
  }
}

/* Fondo de la imagen en PC */
.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
  z-index: 1; /* Asegura que el fondo esté detrás del contenido */
}

.d-none.d-lg-block {
  display: none;
}

@media (min-width: 992px) {
  .d-none.d-lg-block {
    display: block;
  }

  .container.position-relative {
    z-index: 2; /* Asegura que el contenido esté sobre el fondo */
    background: none; /* Fondo semi-transparente para el contenido */
    padding: 20px;
    border-radius: 10px;
  }
}

/* Estilos para las tarjetas */
.directiva-card {
  background: #E8F5E9;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 20px;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.directiva-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.directiva-card h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.25rem;
}

.directiva-card ul {
  padding-left: 0;
}

.directiva-card li {
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #555;
}

.directiva-card li i {
  margin-right: 8px;
}

.page-header {
  background: linear-gradient(rgba(25, 60, 120, 0.4), rgba(25, 60, 120, 0.4)), url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}

.page-header > * {
  position: relative;
  z-index: 2;
}

.hero-banner {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(25, 60, 120, 0.4); /* Azul con 40% de opacidad */
  z-index: 1;
}

.hero-banner > * {
  position: relative;
  z-index: 2;
}

/* Contenedor del fondo con slides */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Slides individuales */
.background-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 20s ease-in-out;
  transform: scale(1);
}

.background-slide.active {
  opacity: 1;
  animation: zoomEffect 20s infinite alternate;
}

/* Contenido principal */
.hero-content {
  padding: 0px;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 0.3s;
}

/* Logo ajustado */
.hero-logo img {
  width: auto;
  height: 220px;
  max-width: 100%;
  margin-bottom: 30px;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

/* Textos */
.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 40px;
  text-shadow: 0 2px 5px rgba(0,0,0,0.5);
  animation: slideUp 1s ease-out forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes zoomEffect {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-banner {
    min-height: 500px;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .hero-logo img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-logo img {
    height: 100px;
  }
}


/* Efecto hover para enlaces del footer */
.custom-hover {
  transition: all 0.2s ease-in-out;
  color: white !important;
  text-decoration: none !important;
  display: inline-block;
}

.custom-hover:hover {
  transform: scale(1.0);
  color: #348E38 !important;
}

/* Efecto para el desarrollador */
.custom-footer-hover {
  transition: all 0.2s ease;
  color: #fff !important; /* Color text-muted */
}

.custom-footer-hover:hover {
  color: #348E38 !important;
  text-decoration: underline !important;
}

/* Efecto para botones de redes sociales */
.btn-square:hover {
  transform: scale(1.5);
  background: #348E38;
  transition: all 0.2s ease;
}

/* Estilos adicionales para armonización */
.section-title {
  position: relative;
  margin-bottom: 2.5rem;
}
.section-title:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
}

.card-feature {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.card-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.bg-light-custom {
  background-color: #f8fafc !important;
}

.border-primary-custom {
  border-color: rgba(var(--primary-rgb), 0.2) !important;
}
.hover-scale:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}


/* Servicios Flip Cards */
.flip-container {
  perspective: 1000px;
  height: 350px;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-container:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front, .flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
}

.flip-front {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0,0,0,0.3);
  background-blend-mode: overlay;
}

.flip-title {
  color: white;
  font-size: 1.5rem;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  padding: 15px;
  position: relative;
  z-index: 2;
}

.flip-back {
  background-color: #fff;
  transform: rotateY(180deg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Servicios Flip Cards */

/* Estilos para las tarjetas de servicios optimizadas */
.service-card {
  position: relative;
  height: 350px;
  perspective: 1000px;
  margin-bottom: 1rem;
}

.service-front, .service-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  transition: transform 0.6s;
  border-radius: none;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.service-front {
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.service-title {
  background: rgba(0,0,0,0.7);
  color: white;
  width: 100%;
  padding: 15px;
  margin: 0;
}

.service-back {
  transform: rotateY(180deg);
}

.service-mobile-content {
  display: none;
  border-radius: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Solo en desktop (mayor a 992px) */
@media (min-width: 992px) {
  .service-card:hover .service-front {
    transform: rotateY(180deg);
  }

  .service-card:hover .service-back {
    transform: rotateY(0deg);
  }
}

/* En móviles (menor a 992px) */
@media (max-width: 991.98px) {
  .service-card {
    height: auto;
    perspective: none;
  }

  .service-front {
    position: relative;
    height: 200px;
  }

  .service-back {
    display: none !important;
  }

  .service-mobile-content {
    display: block;
    margin-top: -10px;
  }
}


/* Estilos Insitucional personalizados para móvil */
@media (max-width: 768px) {
  .lead-on-mobile {
    font-size: 1.1rem;
    font-weight: 500;
  }

  .institutional-section img {
    height: 300px !important;
    width: 100%;
    object-fit: cover;
    margin-bottom: 1.5rem;
  }

  .institutional-section .col-lg-5 {
    padding-top: 0 !important;
  }
}

/* Estilos Cinta De Eventos */
.ribbon-container {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, #2e8b57, #4682b4, #1a2e4a);
  color: white;
  padding: 10px 0;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  border-bottom: 2px solid rgba(0, 0, 0, 0.2);
}

.ribbon-link {
  display: inline-block;
  color: white;
  font-weight: 500;
  text-decoration: none;
  margin-right: 4rem;
  font-size: 1.1rem;
  white-space: nowrap;
  transition: color 0.3s ease;
}

.ribbon-link:hover {
  color: #ffd700; /* Amarillo dorado */
  text-decoration: none;
}

.scrolling-text {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.scrolling-track {
  display: flex;
  width: max-content;
  animation: scroll-left 30s linear infinite;
}

.scrolling-content {
  display: flex;
}
@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* SPONSORS */
.sponsor-title-wrapper {
  margin: 40px auto 20px;
  position: relative;
  display: inline-block;
}

.sponsor-title {
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 1px;
  color: #1a1a1a;
  position: relative;
  padding-bottom: 8px;
}

.sponsor-title::after {
  content: "";
  width: 80px;
  height: 3px;
  background: #c9a24b; /* Dorado elegante */
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

.sponsor-img {
  max-height: 70px;
  width: auto;
  transition: transform .25s ease;
}

.sponsor-img-large {
  max-height: 120px;
  width: auto;
  transition: transform .25s ease;
}

.sponsor-img-small {
  max-height: 50px;
  width: auto;
  transition: transform .25s ease;
}

.sponsor-img:hover,
.sponsor-img-large:hover,
.sponsor-img-small:hover {
  transform: scale(1.08);
}

.fade-in {
  animation: fadeInUp .7s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* MOBILE FIRST OPTIMIZATION */
@media (max-width: 576px) {

  .sponsor-title {
    font-size: 1.4rem;
    margin-top: 25px;
  }

  .sponsor-title::after {
    width: 60px;
    height: 2px;
  }

  /* Distribución más pareja */
  .row.justify-content-center.align-items-center.g-4 > div,
  .row.justify-content-center.align-items-center > div {
    padding: 10px 5px;
  }

  /* Ajustes de tamaños según categoría */
  .sponsor-img {
    max-height: 55px;
  }

  .sponsor-img-large {
    max-height: 85px;
  }

  .sponsor-img-small {
    max-height: 35px;
  }

  /* Centrado perfecto */
  .sponsor-ribbon {
    padding: 10px 0;
  }

  /* Evita que logos altos rompan la fila */
  .sponsor-img,
  .sponsor-img-large,
  .sponsor-img-small {
    object-fit: contain;
  }
}

/* SPONSORS */

#confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0; /* siempre al fondo */
  pointer-events: none; /* no bloquea clics */
}