@import url("./fonts.css");

/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
  --green-dark: #235c4e;
  --green-medium: #144438;
  --green-light: #0b3229;
  --text-light: #fff7e9;
  --text-highlight: #d2eb7d;
  --font-main: 'Lato', 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Geomanist', 'Plus Jakarta Sans', sans-serif;
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--green-dark);
  color: var(--text-light);
  font-family: var(--font-main);
  font-weight: 400; /* Lato Regular */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── OPTIMIZACIÓN DE CARGA DE IMÁGENES ─── */
img {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

img.loaded {
  opacity: 1;
}

/* Imágenes que no deben desvanecerse (si las hay) o para evitar saltos en el Hero */
.acomp-hero__bg img,
.acomp-senor__media img {
  transition-duration: 1.2s;
}

h1 {
  font-family: var(--font-heading);
  font-weight: 700; /* Geomanist Bold */
}

h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500; /* Geomanist Medium */
}

p {
  font-family: var(--font-main);
  font-weight: 400; /* Lato Regular */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   NAV BACK (Copied from innovacion.css style)
   ========================================================================== */
.nav-back {
  position: fixed;              /* Regresado a fixed para que siga el scroll */
  top: 40px;
  left: 40px;
  z-index: 100;
}

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  color: #D4E23C;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.back-link svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.back-link:hover {
  transform: scale(1.1) translateX(-5px);
}

.back-link span {
  display: none;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.acomp-hero {
  position: relative;
  height: 120vh; /* Extends behind the Señor section */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--green-dark);
}

.acomp-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.acomp-hero__bg img {
  width: 100%;
  height: 110%; /* Slightly taller to accommodate parallax movement */
  object-fit: cover;
  object-position: top center;
  will-change: transform; /* Performance optimization */
}

.acomp-hero__logo {
  position: relative;
  z-index: 10;
  max-width: min(85vw, 1200px); /* Larger logo */
  margin-top: -10vh; /* Center visual balance */
  animation: acompFadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes acompFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   SEÑOR & INTRO SECTION
   ========================================================================== */
.acomp-senor {
  position: relative;
  margin-top: -30vh;            /* Subido más a petición del usuario */
  z-index: 20;
  min-height: 1400px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.acomp-senor__content {
  width: 100%;
  padding-left: 8%;
  padding-top: 24vw;            /* ← Proporcional: 350px en 1440px */
  z-index: 25;
}

.acomp-senor__text {
  position: relative;
  text-align: left;
  max-width: 700px;
}

.acomp-senor__text h1 {
  font-family: var(--font-heading);
  font-size: 5rem;
  margin-bottom: 24px;
  color: #FFF7E9; /* Changed to requested color */
  line-height: 1.1;
  margin-left: 5vw;             /* Solo el título se mueve a la derecha para laptops */
}

.acomp-intro-text {
  font-size: 1.5rem;
  line-height: 1.6;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  max-width: 450px;             /* Más estrecho y largo para laptops */
  margin-left: 5vw;             /* Movido un poco a la derecha */
}

.acomp-intro-text p {
  margin-bottom: 24px;
}

/* Efecto Impactante para las secciones principales (Señor y Maya Ka'an) */
.acomp-senor__media.section-observe,
.acomp-maya__media-full.section-observe {
  opacity: 0;
  transform: scale(1.15) translateX(30px);
  filter: blur(15px);
  transition: 
    opacity 1.8s ease, 
    transform 1.8s cubic-bezier(0.165, 0.84, 0.44, 1), 
    filter 1.5s ease;
}

.acomp-senor__media.section-observe.is-visible,
.acomp-maya__media-full.section-observe.is-visible {
  opacity: 1;
  transform: scale(1) translateX(0);
  filter: blur(0);
}

.acomp-senor__text.section-observe,
.acomp-maya__text.section-observe,
.acomp-pueblos__header.section-observe,
.acomp-actividades__header.section-observe,
.container.section-observe {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  transition-delay: 0.2s;         /* Reducido ligeramente para estas secciones */
}

.acomp-senor__text.section-observe.is-visible,
.acomp-maya__text.section-observe.is-visible,
.acomp-pueblos__header.section-observe.is-visible,
.acomp-actividades__header.section-observe.is-visible,
.container.section-observe.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.acomp-senor__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
}

.acomp-senor__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ==========================================================================
   BENEFICIOS SECTION
   ========================================================================== */
.acomp-beneficios {
  padding: 100px 0;
  background-color: var(--green-dark);
  text-align: center;
}

.acomp-beneficios .container {
  max-width: 1600px; /* Ampliado a petición del usuario */
}

.beneficios-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  margin-bottom: 60px;
  color: #FFF7E9;
  text-align: right;             /* Alineado a la derecha */
  max-width: 1250px;             /* Ancho controlado para el desplazamiento */
  margin-left: auto;             /* Empujado a la derecha */
  margin-right: 12%;              /* Alineado con las tarjetas */
}

.beneficios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px;
  margin: 40px 8% 0 auto;        /* Movido un poco a la izquierda */
  max-width: 1100px;             /* Un poco más grandes */
}

.beneficios-grid img {
  width: 100%;
  border-radius: 16px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  cursor: pointer;
}

.beneficios-grid img:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  z-index: 2;
}

/* ==========================================================================
   MAYA KA'AN SECTION
   ========================================================================== */
.acomp-maya {
  position: relative;
  padding: 150px 0;
  background-color: var(--green-dark);
  min-height: 800px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.acomp-maya__content {
  width: 100%;
  padding-left: 14%; /* Moved further to the right */
  z-index: 25;
}

.acomp-maya__text {
  position: relative;
  z-index: 25;
  max-width: 600px;
  text-align: left;
}

.acomp-maya__text h2 {
  font-family: var(--font-heading);
  font-size: 4.5rem;
  margin-bottom: 30px;
  color: var(--text-light);
}

.acomp-maya__text p {
  font-size: 1.45rem;
  line-height: 1.7;
  max-width: 360px; /* Estrechado a petición del usuario para hacerlo más largo verticalmente */
  text-shadow: 0 4px 15px rgba(0,0,0,0.8); /* Stronger shadow for overlap readability */
}

.acomp-maya__media-full {
  position: absolute;
  top: 0;
  right: 14%; /* Shifted further to the left */
  width: 40%;
  height: 100%;
  z-index: 15;
}

.acomp-maya__media-full img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   PUEBLOS MANCOMUNADOS & CAMINO DEL MAYAB
   ========================================================================== */
.acomp-pueblos {
  padding: 100px 0 60px;
  background-color: var(--green-dark);
  text-align: center;
}

.acomp-camino {
  padding: 100px 0 60px;
  background-color: var(--green-dark);
  text-align: center;
}

/* ==========================================================================
   ACTIVIDADES SECTION
   ========================================================================== */
.acomp-actividades {
  padding: 100px 0;
  background-color: transparent; /* Transparent background */
  text-align: center;
}

.acomp-actividades__header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 5%;
}

.acomp-actividades h2 {
  font-family: var(--font-heading);
  font-size: 4rem;
  color: #FFF7E9;
  margin-bottom: 0;
  text-align: center;
}

.acomp-actividades .container {
  max-width: 1100px; /* Narrower container to focus on 2 cards */
}

.acomp-carousel-container {
  position: relative;
  width: 100%;
}

.acomp-carousel-container .nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
}

.acomp-carousel-container .nav-btn.prev {
  left: -90px;
}

.acomp-carousel-container .nav-btn.next {
  right: -90px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: white;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.nav-btn:hover {
  background: var(--text-highlight);
  color: var(--green-dark);
  border-color: var(--text-highlight);
  transform: scale(1.1);
}

.nav-btn svg {
  width: 28px;
  height: 28px;
}

.acomp-pueblos {
  padding: 40px 0 30px; 
  margin-top: -8vw;            /* ← Proporcional: -120px en 1440px */
  background-color: transparent;
  text-align: center;
}

.acomp-camino {
  padding: 20px 0 0;
  margin-top: -10px; /* Subtle upward shift */
  background-color: transparent;
  text-align: center;
}

.acomp-pueblos__header {
  text-align: center;
  max-width: 1400px;
  margin: 0 auto 30px; /* Removed negative margin */
  padding: 0 20px;
}

.acomp-pueblos h2, .acomp-camino h2 {
  font-family: var(--font-heading);
  font-size: 4rem;
  margin-bottom: 20px;
  color: #FFF7E9;
}

.acomp-camino .container + .container h2 {
  margin-top: 70px;              /* Espacio extra antes de Actividades */
  font-size: 3.5rem;             /* Tamaño reducido a petición */
}

.acomp-pueblos p, .acomp-camino p {
  font-size: 1.6rem;             /* Aumentado a petición del usuario */
  line-height: 1.6;
  max-width: 1000px;             /* Contenedor menos amplio */
  margin: 0 auto 16px;
  color: #FFF7E9;
  text-wrap: balance;            /* Evita líneas huérfanas feas */
}

/* ==========================================================================
   CAROUSEL CARDS
   ========================================================================== */
.acomp-cards-scroll {
  display: flex;
  overflow-x: auto;
  gap: 30px;
  padding: 30px 20px 50px; /* Reduced top padding to move it up */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-top: 0; /* Removed margin */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.acomp-cards-scroll::-webkit-scrollbar {
  display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.acomp-cards-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Portrait Cards (Pueblos Mancomunados) */
.acomp-card-portrait {
  flex: 0 0 calc(50% - 15px); /* Exactly two cards per view within container */
  scroll-snap-align: center;
}

.acomp-card-portrait img {
  width: 100%;
  transition: transform 0.4s ease;
}

.acomp-card-portrait:hover img {
  transform: translateY(-15px);
}

.acomp-pueblos .container {
  max-width: 950px;
}

.acomp-camino .container {
  max-width: 1000px; /* Reduced to make cards smaller */
}

.acomp-camino .container:first-child {
  margin-bottom: 20px;
}

.acomp-camino h2 {
  margin-top: 0;
  font-size: 3.5rem; /* Reduced from 4rem */
}

.acomp-pueblos .acomp-card-landscape {
  flex: 0 0 100%; /* Single card for Pueblos */
}

.acomp-camino .acomp-card-landscape {
  flex: 0 0 calc(50% - 15px); /* Two cards for Camino */
}

.acomp-card-landscape {
  scroll-snap-align: center;
}

.acomp-card-landscape img {
  width: 100%;
  transition: transform 0.4s ease;
}

.acomp-card-360 {
  position: relative;
}

.btn-360 {
  position: absolute;
  top: 75%;
  left: 75%;
  transform: translate(-50%, -50%);
  width: 300px; /* Base size, can be adjusted */
  max-width: 80%;
  z-index: 40;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-360:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.btn-360 img {
  width: 100%;
  height: auto;
  border-radius: 0; /* Button asset likely has its own shape */
  box-shadow: none;
}

.acomp-card-landscape:hover img {
  transform: translateY(-15px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.acomp-footer {
  background-color: var(--green-dark);
  padding-top: 0;
  margin-top: -30px; /* Negative margin to pull footer up further */
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 992px) {
  .beneficios-title {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 100%;
    font-size: 2.2rem;
  }

  .beneficios-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 80%;              /* Más chicas */
    margin: 0 auto;              /* Centradas */
    gap: 20px;
  }

  .nav-back {
    left: 10px;                  /* Casi al límite de la pantalla */
    top: 20px;                   /* Subido un poco más */
  }

  .nav-back .container {
    padding-left: 0;             /* Quitamos padding extra */
  }

  .back-link {
    width: 50px;                 /* Más pequeño en móvil */
    height: 50px;
    animation: nav-breathe 2.5s ease-in-out infinite; /* Efecto respiración */
  }

  @keyframes nav-breathe {
    0%, 100% {
      transform: scale(1);
      filter: drop-shadow(0 0 5px rgba(212, 226, 60, 0.4));
    }
    50% {
      transform: scale(1.1);
      filter: drop-shadow(0 0 15px rgba(212, 226, 60, 0.8));
    }
  }
  
  .acomp-senor {
    flex-direction: column;
    min-height: auto;
    padding: 80px 0 0;
    margin-top: -10vh;
  }

  .acomp-maya {
    flex-direction: column;
    min-height: auto;
    padding: 0;                  /* Quitamos padding para subir */
    margin-top: -10px;          /* Subimos la sección */
  }

  .acomp-senor__content {
    padding: 80px 55px 60px;
  }

  .acomp-maya__content,
  .acomp-pueblos__header,
  .acomp-camino .container:first-child {
    padding: 0 55px 60px;
  }

  .acomp-senor__text, 
  .acomp-maya__text, 
  .acomp-pueblos__header, 
  .acomp-camino .container:first-child {
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
  }

  .acomp-senor__text h1, 
  .acomp-maya__text h2, 
  .acomp-pueblos__header h2, 
  .acomp-camino h2:first-of-type {
    font-size: 3.2rem;
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .acomp-intro-text p,
  .acomp-maya__text p,
  .acomp-pueblos__header p,
  .acomp-camino p {
    font-size: 1.2rem;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
  }

  .acomp-senor__media, .acomp-maya__media-full {
    position: relative;
    width: 100%;
    right: auto;
    left: auto;
    height: 50vh; /* Responsive height */
    min-height: 400px;
  }

  .acomp-maya__media-full {
    width: 90%;                  /* Un poco más chica */
    margin: 0 auto;              /* Centrada */
    border-radius: 20px;         /* Bordes redondeados */
    overflow: hidden;
  }

  .acomp-senor__media img {
    object-position: top center;
  }
  
  .acomp-card-landscape,
  .acomp-camino .acomp-card-landscape {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }
}

@media (max-width: 768px) {
  .acomp-hero {
    height: 80vh;
  }
  
  .acomp-senor__text h1 {
    font-size: 3rem;
  }
  
  .acomp-intro-text {
    font-size: 1.15rem;
    padding: 0 10px;
  }

  .beneficios-title {
    font-size: 2.2rem;
    white-space: normal;
  }

  .beneficios-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .acomp-maya__text h2,
  .acomp-camino h2:first-of-type {
    font-size: 2.8rem;
  }

  .acomp-pueblos__header h2 {
    font-size: 2.5rem;           /* Un poco más grande y centrado de nuevo */
    text-align: center;
    padding-left: 0;
    margin-bottom: 15px;
  }

  .acomp-actividades__header {
    flex-direction: column;
    gap: 20px;
    text-align: center;
    padding: 0 20px;
  }

  .acomp-actividades h2,
  .acomp-camino .container + .container h2 {
    font-size: 2.5rem;           /* Unificado según el primer título */
  }

  .btn-360 {
    width: 140px;                /* Más chico para mobile */
  }

  .acomp-carousel-container .nav-btn {
    top: 40%;                    /* Subido para que no estorbe abajo */
    bottom: auto;
    transform: translateY(-50%);
    z-index: 60;
  }

  .acomp-carousel-container .nav-btn.prev {
    left: 10px;
  }

  .acomp-carousel-container .nav-btn.next {
    right: 10px;
  }

  .nav-btn {
    width: 50px;
    height: 50px;
  }
  
  .acomp-card-portrait,
  .acomp-card-landscape {
    flex: 0 0 100%;
    scroll-snap-align: center;
  }

  .acomp-cards-scroll {
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }

  .acomp-actividades {
    margin-top: -70px;           /* Subimos más la sección de actividades de Maya Ka'an */
  }

  .acomp-actividades .container {
    margin-top: -30px;           /* Juntamos el carrusel con su título */
  }

  .acomp-pueblos {
    margin-top: -90px;           /* Subimos más la sección de pueblos */
  }

  .acomp-pueblos .container {
    margin-top: -40px;           /* Juntamos el carrusel con el texto descriptivo */
  }

  .acomp-camino .container + .container {
    margin-top: -60px;           /* Subimos el carrusel de actividades */
  }
}

/* ==========================================================================
   SCROLL REVEAL (Efecto de aparecer al hacer scroll)
   ========================================================================== */
.section-observe {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-observe.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   OPTIMIZACIÓN PARA MONITORES GRANDES (Min 1900px)
   A pedido del usuario: Ajustes específicos en acompañamiento.html
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1900px) {
  .acomp-senor__content {
    padding-top: 30vw;          /* Bajado de 24vw */
    padding-left: 10%;          /* Movido a la izquierda */
  }

  .acomp-senor__text h1 {
    margin-left: 0;             /* Restaurado para pantallas grandes */
  }

  .acomp-intro-text {
    max-width: none;            /* Restaurado para pantallas grandes */
    margin-left: 0;             /* Restaurado para pantallas grandes */
  }

  /* Beneficios más grandes y movidos a la izquierda */
  .beneficios-title {
    font-size: 4.5rem;          /* Más grande */
    text-align: center;
    margin-left: 4vw;           /* Movido a la izquierda a petición del usuario */
    margin-top: -2vw;           /* Bajado a petición del usuario (antes -10vw) */
    margin-bottom: 12vw;        /* Más espacio con las cards */
    max-width: 1800px;          /* Contenedor aún más amplio */
    width: 100%;
  }

  .beneficios-grid {
    transform: scale(1.4);      /* Cards más grandes */
    transform-origin: left center;
    margin-left: 2vw;           /* Movido a la izquierda a petición del usuario */
    margin-bottom: 10vw;        /* Espacio extra abajo */
  }

  /* Maya Ka'an más abajo (ajustado) */
  .acomp-maya {
    padding-top: 20vw;          /* Ajustado: un poco más arriba que el anterior 25vw */ 
  }

  .acomp-maya__text p {
    max-width: 480px;           /* Restaurado para pantallas grandes */
  }

  /* Bajar todo desde Pueblos Mancomunados */
  .acomp-pueblos,
  .acomp-camino {
    padding-top: 10vw;          /* Bajado considerablemente */
  }
}
