/*
  modern.css (2026-11-04)
  Capa de modernizacion del sitio, cargada AL FINAL (despues de custom.css y motion.css):
   1. Selector de idioma ES | EN en el header (reemplaza las banderas del final de la pagina)
   2. Footer ordenado en columnas
   3. Botones/etiquetas verdes legibles (texto oscuro, contraste >= 7:1) y estados hover/focus
   4. Microinteracciones y hovers
   5. Preloader ludico (logo + pelotitas saltarinas + abeja)
  Respeta prefers-reduced-motion.
*/

:root {
  --sk-teal: #155971;
  --sk-teal-dark: #0f3f52;
  --sk-lime: #c9ed5d;
  --sk-orange: #ef670b;
  --sk-pink: #e8458b;
  --sk-yellow: #ffc93c;
  --sk-blue: #35b6e8;
  --sk-cream: #fff8ec;
  --sk-ease: cubic-bezier(.2, .8, .2, 1);
}

/* =========================================================
   5. PRELOADER LUDICO
   ========================================================= */
body #preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #d9f1ff 0%, #eefaff 45%, #fff7e0 100%);
}

#preloader .pl-cloud {
  position: absolute;
  height: 38px;
  width: 120px;
  background: #fff;
  border-radius: 40px;
  opacity: .9;
  animation: plCloud 26s linear infinite;
}
#preloader .pl-cloud::before,
#preloader .pl-cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}
#preloader .pl-cloud::before { width: 54px; height: 54px; top: -26px; left: 18px; }
#preloader .pl-cloud::after  { width: 40px; height: 40px; top: -16px; right: 18px; }
#preloader .pl-cloud--1 { top: 14%; left: -160px; }
#preloader .pl-cloud--2 { top: 30%; left: -160px; animation-duration: 34s; animation-delay: -12s; transform: scale(.7); }
#preloader .pl-cloud--3 { top: 68%; left: -160px; animation-duration: 40s; animation-delay: -22s; transform: scale(.85); }
@keyframes plCloud { to { transform: translateX(calc(100vw + 360px)); } }

#preloader .pl-stage {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
}

#preloader .preloader-logo {
  display: block;
  position: static;
  left: auto;
  top: auto;
  width: 240px;
  max-width: 70vw;
  height: auto;
  margin: 0 auto 10px;
  transform-origin: 50% 100%;
  animation: plLogo 1.8s var(--sk-ease) infinite;
  filter: drop-shadow(0 10px 14px rgba(21, 89, 113, .18));
}
@keyframes plLogo {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

#preloader .pl-balls {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  height: 64px;
  margin: 6px 0 0;
}
#preloader .pl-balls span {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform-origin: 50% 100%;
  animation: plBounce .9s cubic-bezier(.3, 0, .4, 1) infinite;
}
#preloader .pl-balls span::after {          /* sombra en el piso */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 20px;
  height: 5px;
  margin-left: -10px;
  background: rgba(21, 89, 113, .18);
  border-radius: 50%;
  animation: plShadow .9s cubic-bezier(.3, 0, .4, 1) infinite;
  animation-delay: inherit;
}
#preloader .pl-balls span:nth-child(1) { background: var(--sk-pink);   animation-delay: 0s; }
#preloader .pl-balls span:nth-child(2) { background: var(--sk-yellow); animation-delay: .12s; }
#preloader .pl-balls span:nth-child(3) { background: var(--sk-lime);   animation-delay: .24s; }
#preloader .pl-balls span:nth-child(4) { background: var(--sk-blue);   animation-delay: .36s; }
#preloader .pl-balls span:nth-child(5) { background: var(--sk-orange); animation-delay: .48s; }
@keyframes plBounce {
  0%, 100% { transform: translateY(0) scale(1.18, .8); }
  45%      { transform: translateY(-34px) scale(.92, 1.1); }
  70%      { transform: translateY(-6px) scale(1, 1); }
}
@keyframes plShadow {
  0%, 100% { transform: scale(1.2); opacity: .9; }
  45%      { transform: scale(.55); opacity: .35; }
}

#preloader .pl-text {
  margin: 22px 0 0;
  font-family: 'Comic Sans MS', 'Baloo 2', 'Quicksand', 'Lato', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--sk-teal);
}
#preloader .pl-text::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: plDots 1.4s steps(4, end) infinite;
}
@keyframes plDots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%, 100% { content: "..."; }
}

#preloader .pl-bee {
  position: absolute;
  z-index: 3;
  top: 22%;
  left: -70px;
  width: 46px;
  height: auto;
  animation: plBee 7s ease-in-out infinite;
}
@keyframes plBee {
  0%   { transform: translate(0, 0) rotate(8deg); }
  25%  { transform: translate(28vw, -30px) rotate(-6deg); }
  50%  { transform: translate(55vw, 40px) rotate(8deg); }
  75%  { transform: translate(82vw, -24px) rotate(-6deg); }
  100% { transform: translate(calc(100vw + 90px), 10px) rotate(8deg); }
}

/* =========================================================
   1. SELECTOR DE IDIOMA EN EL HEADER
   ========================================================= */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: #fff;
  border: 2px solid var(--sk-lime);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(21, 89, 113, .10);
  font-family: 'Lato', sans-serif;
  line-height: 1;
}
.lang-switch .lang-globe {
  width: 18px;
  height: 18px;
  margin: 0 4px 0 8px;
  color: var(--sk-teal);
  flex: none;
}
.lang-switch a {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--sk-teal) !important;
  text-decoration: none !important;
  background: transparent;
  transition: background-color .25s var(--sk-ease), color .25s var(--sk-ease), transform .25s var(--sk-ease);
}
.lang-switch a:hover { background: rgba(201, 237, 93, .45); transform: translateY(-1px); }
.lang-switch a:active { transform: translateY(0) scale(.96); }
.lang-switch a.is-active,
.lang-switch a[aria-current="true"] {
  background: var(--sk-lime);
  color: var(--sk-teal-dark) !important;
  cursor: default;
}
.lang-switch a:focus-visible { outline: 3px solid var(--sk-teal); outline-offset: 2px; }

/* escritorio: pegado a la derecha, en la misma linea del menu */
.navbar-custom .lang-switch--desktop {
  float: right;
  margin: 24px 3% 0 0;
}
.navbar-custom .lang-switch--mobile { display: none; }

@media (max-width: 1440px) {
  .navbar-custom .lang-switch--desktop { margin-right: 2%; }
  .navbar-custom .padding-nav { padding-right: 1% !important; }
}
@media (max-width: 1199px) {
  .navbar-custom .lang-switch .lang-globe { display: none; }
  .navbar-custom .lang-switch a { padding: 7px 10px; }
}
/* movil: pildora compacta al lado de la hamburguesa */
@media (max-width: 767px) {
  .navbar-custom .lang-switch--desktop { display: none; }
  .navbar-custom .lang-switch--mobile {
    display: inline-flex;
    position: absolute;
    top: 14px;
    right: 64px;
    z-index: 5;
  }
  .navbar-custom .lang-switch--mobile .lang-globe { display: none; }
  .navbar-custom .lang-switch--mobile a { padding: 7px 10px; }
}

/* =========================================================
   2. FOOTER ORDENADO
   ========================================================= */
#footer.site-footer {
  position: relative;
  margin-top: 40px;
  padding: 0;
  background: var(--sk-cream) !important;
  color: var(--sk-teal);
  text-align: left;
}
#footer.site-footer::before {               /* ola decorativa superior */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -34px;
  height: 36px;
  background:
    radial-gradient(circle at 25px 36px, var(--sk-cream) 24px, transparent 25px) 0 0 / 50px 36px repeat-x;
  pointer-events: none;
}
.site-footer .footer-main {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr 1fr;
  gap: 32px 40px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}
.site-footer .footer-col h6 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--sk-teal) !important;
  text-transform: none;
}
.site-footer .footer-col p,
.site-footer .footer-col li {
  font-family: 'Lato', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #3d5560 !important;
}
.site-footer .footer-col, .site-footer .footer-col p, .site-footer .footer-col h6 { text-align: left !important; }
.site-footer .footer-brand img { width: 170px; height: auto; margin-bottom: 14px; }
.site-footer .footer-brand p { max-width: 280px; margin: 0; }

.site-footer .footer-hours { list-style: none; margin: 0; padding: 0; }
.site-footer .footer-hours li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; }
.site-footer .footer-hours strong { color: var(--sk-teal); font-weight: 800; }

.site-footer .footer-social { display: flex; gap: 12px; margin-top: 4px; }
.site-footer .footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sk-lime);
  color: var(--sk-teal-dark);
  font-size: 22px;
  transition: transform .3s var(--sk-ease), background-color .3s var(--sk-ease), color .3s var(--sk-ease), box-shadow .3s var(--sk-ease);
}
.site-footer .footer-social a:hover,
.site-footer .footer-social a:focus-visible {
  transform: translateY(-4px) rotate(-6deg);
  background: var(--sk-teal);
  color: #fff;
  box-shadow: 0 10px 18px rgba(21, 89, 113, .25);
  outline: none;
}
.site-footer .footer-social a i { transition: none; }

/* newsletter: campo + boton en una fila */
.site-footer .input-group { display: flex; width: 100%; }
.site-footer .input-group .form-control {
  flex: 1 1 auto;
  height: 46px;
  min-width: 0;
  border: 2px solid #e5e0d2;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #fff;
  color: var(--sk-teal-dark);
  font-size: 15px;
  box-shadow: none !important;
  transition: border-color .25s var(--sk-ease);
}
.site-footer .input-group .form-control:focus { border-color: var(--sk-teal); outline: none; }
.site-footer .input-group-btn { width: auto; }
.site-footer .input-group-btn .btn {
  height: 46px;
  padding: 0 18px;
  border-radius: 0 12px 12px 0 !important;
  font-weight: 800;
}

/* barra inferior */
.site-footer .footer-bottom {
  border-top: 1px solid rgba(21, 89, 113, .14);
  padding: 20px 24px 28px;
  text-align: center;
}
.site-footer .footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.site-footer .footer-bottom p,
.site-footer .footer-bottom a {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #3d5560 !important;
}
.site-footer .footer-bottom a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--sk-lime);
  text-decoration-thickness: 2px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.site-footer .footer-bottom a:hover { color: var(--sk-teal) !important; text-decoration-color: var(--sk-orange); }

@media (max-width: 991px) {
  .site-footer .footer-main { grid-template-columns: 1fr 1fr; padding-top: 56px; }
}
@media (max-width: 575px) {
  .site-footer .footer-main { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .site-footer .footer-bottom-inner { justify-content: center; text-align: center; }
}

/* =========================================================
   3. BOTONES Y ETIQUETAS VERDES LEGIBLES
   (antes: texto blanco sobre lima #c9ed5d = contraste 1.3:1)
   ========================================================= */
.btn_web,
.btn_web2,
.btn2,
.pills-galeria > li > a,
.team-item .team-caption,
.team-item .team-caption *,
.bg_verde .btn,
.back-to-top i,
.owl-prev,
.owl-next,
.owl-prev i,
.owl-next i {
  color: var(--sk-teal-dark) !important;
}

.btn_web,
.btn_web2 {
  background-color: var(--sk-lime) !important;
  border-color: var(--sk-lime) !important;
  font-weight: 800 !important;
  transition: background-color .3s var(--sk-ease), border-color .3s var(--sk-ease), color .3s var(--sk-ease), transform .2s var(--sk-ease), box-shadow .2s var(--sk-ease) !important;
}
.btn_web:hover,
.btn_web2:hover,
.btn_web:focus-visible,
.btn_web2:focus-visible {
  background-color: var(--sk-teal) !important;
  border-color: var(--sk-teal) !important;
  color: #fff !important;
  box-shadow: 0 12px 22px rgba(21, 89, 113, .28);
}
.btn_web:active,
.btn_web2:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn_web:focus-visible,
.btn_web2:focus-visible,
.btn2:focus-visible { outline: 3px solid var(--sk-orange); outline-offset: 3px; }

.pills-galeria > li > a:hover,
.pills-galeria > li.active > a {
  background-color: var(--sk-teal) !important;
  color: #fff !important;
}
.back-to-top i:hover { background-color: var(--sk-teal) !important; color: #fff !important; }

/* =========================================================
   4. MICROINTERACCIONES Y HOVERS
   ========================================================= */
html { scroll-padding-top: 90px; }

/* menu: subrayado que crece desde el centro + barra que se achica al hacer scroll */
.navbar-custom .nav > li > a { position: relative; }
.navbar-custom .navbar-right > li > a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22px;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--sk-orange);
  transform: translateX(-50%);
  transition: width .3s var(--sk-ease);
}
.navbar-custom .navbar-right > li > a:hover::after,
.navbar-custom .navbar-right > li.active > a::after { width: 60%; }
.navbar-custom .nav > .active > a { border-bottom: 0 !important; }   /* el subrayado ahora es ::after */
.navbar-custom { transition: box-shadow .3s ease; }
.navbar-custom.is-scrolled { box-shadow: 0 8px 24px rgba(21, 89, 113, .14); }
.navbar-custom .margin-logo { transition: transform .35s var(--sk-ease); transform-origin: top left; }
.navbar-custom.is-scrolled .margin-logo { transform: scale(.88); }

/* botones: levantar al pasar, hundir al presionar */
.btn, .btn_web, .btn_web2, .btn2 { will-change: transform; }
.btn:active, .btn2:active { transform: translateY(0) scale(.97); }

/* tarjetas e imagenes de las secciones */
#galeria img,
#servicios img,
#actividades_complementarias img,
#instalaciones img,
#equipo .team-item img {
  transition: transform .45s var(--sk-ease), box-shadow .45s var(--sk-ease), filter .45s ease;
}
#galeria a:hover img,
#servicios .service:hover img,
#actividades_complementarias a:hover img,
#instalaciones a:hover img {
  transform: scale(1.04);
  box-shadow: 0 14px 28px rgba(21, 89, 113, .22);
}
#equipo .team-item:hover img { transform: translateY(-6px) rotate(-2deg); }

/* iconos que "saludan" */
.fa, .flaticon { transition: transform .3s var(--sk-ease), color .3s ease; }
a:hover > .fa, a:hover > i.flaticon, .btn:hover .fa { transform: scale(1.15) rotate(-6deg); }

/* flecha de volver arriba: rebote suave */
.back-to-top i { transition: transform .3s var(--sk-ease), background-color .3s ease; }
.back-to-top:hover i { transform: translateY(-5px); }

/* foco visible para teclado (accesibilidad) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--sk-orange);
  outline-offset: 2px;
}

/* aparicion escalonada de tarjetas (la activa modern.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px) scale(.98);
  transition: opacity .6s var(--sk-ease), transform .6s var(--sk-ease);
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  #preloader .pl-cloud,
  #preloader .pl-bee,
  #preloader .preloader-logo,
  #preloader .pl-balls span,
  #preloader .pl-balls span::after,
  #preloader .pl-text::after { animation: none !important; }
  #preloader .pl-text::after { content: "..."; }
  #preloader .pl-bee { display: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .lang-switch a, .site-footer .footer-social a, .navbar-custom .margin-logo,
  #galeria img, #servicios img, #actividades_complementarias img, #instalaciones img, #equipo .team-item img { transition: none; }
  .site-footer .footer-social a:hover { transform: none; }
  #galeria a:hover img, #servicios .service:hover img, #actividades_complementarias a:hover img,
  #instalaciones a:hover img, #equipo .team-item:hover img { transform: none; }
}
