/* =====================================================================
   Ecuador Mountain Guides — Capa de pulido UI/UX (mejoras.css)
   Refina la propuesta visual existente SIN reemplazarla:
   foco accesible, micro-interacciones, consistencia y reduced-motion.
   Se carga DESPUÉS de style.css.
   ===================================================================== */

:root {
  --mge-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mge-dur: 240ms;
  --mge-ring: #14592c;
  --mge-shadow-md: 0 16px 36px rgba(22, 25, 32, 0.16);
}

/* 1) FOCO VISIBLE ACCESIBLE
   El tema hace `a:focus { outline: 0 }`, lo que rompe la navegación por
   teclado (WCAG 2.4.7). Restauramos un anillo visible solo para teclado. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
.offcanvas-icon:focus-visible,
.navbar-toggler:focus-visible,
.background-button-prev:focus-visible,
.background-button-next:focus-visible {
  outline: 3px solid var(--mge-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 2) BOTONES — elevación sutil al interactuar (feedback claro) */
.btn {
  transition: transform var(--mge-dur) var(--mge-ease),
              box-shadow var(--mge-dur) var(--mge-ease),
              background-color var(--mge-dur) var(--mge-ease),
              color var(--mge-dur) var(--mge-ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--mge-shadow-md);
}
.btn:active {
  transform: translateY(0);
}

/* 3) CARDS — levitan y la imagen hace zoom contenido (microinteracción) */
.featured-destination-card,
.trip-card,
.blog-card-two {
  transition: transform var(--mge-dur) var(--mge-ease),
              box-shadow var(--mge-dur) var(--mge-ease);
}
.featured-destination-card:hover,
.trip-card:hover,
.blog-card-two:hover {
  transform: translateY(-6px);
  box-shadow: var(--mge-shadow-md);
}
/* contenedores con recorte para el zoom */
.trip-card { overflow: hidden; }
.blog-card-two .post-img { overflow: hidden; }
.featured-destination-card img,
.trip-card img,
.blog-card-two .post-img img {
  transition: transform 600ms var(--mge-ease);
  will-change: transform;
}
.featured-destination-card:hover img,
.trip-card:hover img,
.blog-card-two:hover .post-img img {
  transform: scale(1.06);
}

/* 4) ENLACES DE NAVEGACIÓN — transición de color consistente */
.navbar-nav a,
.footer-nav a,
.touria-dd-menu a,
.mge-text-link {
  transition: color var(--mge-dur) var(--mge-ease),
              opacity var(--mge-dur) var(--mge-ease);
}

/* 5) OBJETIVOS TÁCTILES — controles mínimos de 44×44px en móvil */
.background-button-prev,
.background-button-next,
.social-icons a,
.social-nav a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 6) FORMULARIOS — borde de foco suave en campos (coherente con la marca) */
.form-control:focus,
.touria-select:focus,
select:focus {
  border-color: var(--mge-ring);
  box-shadow: 0 0 0 3px rgba(20, 89, 44, 0.15);
}

/* 7) IMÁGENES — evita saltos de layout (reserva de espacio) */
img { height: auto; }

/* 8) RESPETA prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover,
  .featured-destination-card:hover,
  .trip-card:hover,
  .blog-card-two:hover {
    transform: none;
  }
  .featured-destination-card:hover img,
  .trip-card:hover img,
  .blog-card-two:hover .post-img img {
    transform: none;
  }
}

/* Home presentation: the existing photos and hero remain the visual anchors. */
.mge-video-intro { position: relative; z-index: 2; isolation: isolate; padding: 28px 0; background: #f4f7f2; border-bottom: 1px solid #e0e8df; }
.mge-video-intro-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mge-video-intro h2 { font-size: clamp(20px, 2vw, 26px); margin: 0 0 6px; color: #173b26; }
.mge-video-intro p { margin: 0; color: #48594c; font-size: 15px; }
.mge-watch-video { display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex-shrink: 0; min-height: 48px; }
.mge-about-media-actions { display: flex; justify-content: center; margin-top: 22px; }
.mge-about-video-link { display: inline-flex; align-items: center; gap: 10px; border: 1px solid #cbdacb; background: #fff; color: #14592c; padding: 12px 22px; border-radius: 30px; font-weight: 600; min-height: 48px; }
.mge-about-video-link:hover { background: #f4f7f2; }
.mge-affiliation-logos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 24px; margin-top: 26px; padding: 24px; border: 1px solid #e0e8df; border-radius: 16px; background: #fff; }
.mge-affiliation-logos img { display: block; justify-self: center; width: 100%; max-width: 190px; height: 135px; object-fit: contain; }
.mge-affiliation-logos img:last-child { grid-column: 1 / -1; width: min(100%, 350px); max-width: 350px; height: auto; max-height: 170px; }
.mge-video-modal .modal-content { background: #101b15; color: #fff; overflow: hidden; border: 1px solid #3c5143; border-radius: 16px; }
.mge-video-modal .modal-header { border: 0; padding: 16px 20px; }
.mge-video-modal .modal-title { color: #fff; }
.mge-video-modal .btn-close { min-width: 24px; min-height: 24px; opacity: 1; }
.mge-video-modal .modal-body { padding: 0; background: #000; }
.mge-video-modal video { display: block; width: 100%; max-height: 76vh; max-height: 76svh; aspect-ratio: 16 / 9; object-fit: contain; }
@media (max-width: 575.98px) {
  .mge-video-intro-inner { align-items: flex-start; flex-direction: column; gap: 18px; }
  .mge-watch-video { width: 100%; }
  .mge-video-modal .modal-dialog { margin: 12px; }
  .mge-affiliation-logos { gap: 16px; padding: 18px; }
  .mge-affiliation-logos img { height: 108px; }
  .mge-affiliation-logos img:last-child { height: auto; }
}

/* Keep the decorative cloud inside the hero instead of over the video CTA. */
.hero-section.mge-home-hero .cloud-img { bottom: 0; pointer-events: none; }

/* Home: open video frame, text at the foot, then languages and tours. */
.mge-home-hero .background-swiper::before {
  background: linear-gradient(180deg, rgba(9, 24, 17, .08) 30%, rgba(9, 24, 17, .25) 65%, rgba(9, 24, 17, .8) 100%);
  pointer-events: none;
}
.mge-home-hero .hero-content.home-one { max-width: 850px; padding-left: 0; }
.mge-home-hero .hero-content.home-one h3 { font-size: 16px; margin-bottom: 10px; color: #fff !important; }
.mge-home-hero .hero-content.home-one h1 { font-size: clamp(28px, 3.5vw, 48px); line-height: 1.12; margin-bottom: 12px !important; text-wrap: balance; }
.mge-home-hero .hero-content.home-one p { max-width: 620px; line-height: 1.5; }
.mge-guide-languages { display: flex; flex-wrap: wrap; column-gap: 22px; row-gap: 8px; }
.mge-guide-languages span { color: #173b26; font-weight: 600; }
.mge-guide-languages span + span { padding-left: 22px; border-left: 1px solid #b7cbb8; }
.mge-home-tours > .divider { height: 56px; }
@media (max-width: 575.98px) {
  .mge-home-hero .hero-content.home-one { padding: 0; }
  .mge-home-hero .hero-content.home-one p { font-size: 15px; }
  .mge-language-strip .mge-video-intro-inner { gap: 16px; }
  .mge-guide-languages { column-gap: 14px; }
  .mge-guide-languages span + span { padding-left: 14px; }
  .mge-home-tours > .divider { height: 40px; }
}

/* Trilingual guide CTA: explicit language names accompany decorative flags. */
.mge-language-copy { flex: 1; min-width: 0; }
.mge-language-strip h2 { max-width: 660px; font-size: clamp(22px, 2.3vw, 32px); line-height: 1.2; text-wrap: balance; }
.mge-language-strip .mge-language-description { margin: 10px 0 18px; }
.mge-guide-languages > span { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.mge-guide-languages img { display: block; flex: 0 0 32px; width: 32px; height: 32px; object-fit: contain; border-radius: 50%; box-shadow: 0 0 0 1px rgba(23, 59, 38, .12); }
.mge-language-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; flex-shrink: 0; }
.mge-plan-adventure { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; }
@media (max-width: 1199.98px) {
  .mge-language-strip .mge-video-intro-inner { flex-wrap: wrap; }
  .mge-language-actions { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
  .mge-language-copy, .mge-language-actions { width: 100%; }
  .mge-language-actions { flex-direction: column; align-items: stretch; }
  .mge-language-actions > * { width: 100%; }
  .mge-guide-languages { column-gap: 12px; }
  .mge-guide-languages > span + span { padding-left: 0; border-left: 0; }
  .mge-guide-languages > span { font-size: 14px; gap: 6px; }
  .mge-guide-languages img { flex-basis: 26px; width: 26px; height: 26px; }
}
