/* ================== SECCIÓN NOSOTROS ================== */
#nosotros {
  width: 100%;
  background-color: white;
  padding: 40px 20px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Contenedor base */
.contenedor-nosotros {
  display: flex;
  flex-direction: column; /* portrait por defecto */
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ================== VIDEO (portrait por defecto) ================== */
.video-nosotros {
  width: 100%;
  height: auto;
  position: relative;
}

.video-nosotros video {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

/* Capa oscura sobre el video (solo portrait) */
#nosotros .capa-oscura {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.45));
  pointer-events: none;
  border-radius: 10px;
}

/* ================== BLOQUE DE TEXTO SOBRE EL VIDEO (portrait) ================== */
.texto-nosotros {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 12px 20px 20px;
  text-align: center;
  font-family: 'Jomolhari', serif;
  --offset-parrafos: 130px;
}

/* ---------- TÍTULO ---------- */
.titulo-nosotros {
  font-family: 'Edwardian Script ITC', cursive;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.15;
  margin-bottom: 32px;
  color: white;
  text-shadow: 2px 2px 6px rgba(0,0,0,.6);
  text-align: center;
  transform: translateY(-6px);
}

/* ---------- CONTENEDOR DE PÁRRAFOS ---------- */
.contenedor-parrafos {
  position: relative;                 /* referencia para absolute en superposición */
  width: 100%;
  max-width: 800px;
  min-height: clamp(220px, 34vh, 380px);
  margin: 0 auto;
}

/* ---------- LOGO (debajo del bloque de texto) ---------- */
.logo_nosotros {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: clamp(12px, 3vh, 28px) auto 0; /* centrado */
  pointer-events: none;
  z-index: 1;
}

/* ================== PÁRRAFOS ANIMADOS (rotativos) ================== */
/* Modo portrait (superposición) */
.parrafoNosotros {
  opacity: 0;
  transition: opacity 1s ease-in-out;
  position: absolute;
  left: 0;
  right: 0;
  max-width: 700px;
  margin: 0 auto;
  top: var(--offset-parrafos);
  font-size: clamp(1.2em, 2.2vw, 2em);
  line-height: 1.35;
  text-align: center;
  color: white;
  text-shadow: 0 1px 5px black;
  padding: 0 10px;
}

.parrafoNosotros.activo { opacity: 1; z-index: 3; }
.parrafoNosotros.oculto { opacity: 0; z-index: 0; }

/* =================================================================== */
/* =====================  LANDSCAPE (CUALQUIER DISPOSITIVO) ========= */
/* =================================================================== */
@media (orientation: landscape) {
  #nosotros {
    height: 100dvh; /* mejor que 100vh en móviles */
    padding: 0;
  }

  .contenedor-nosotros {
    flex-direction: row;   /* dividido 50/50 */
    align-items: stretch;
    justify-content: stretch;
    height: 100%;
    gap: 0;
  }

  .video-nosotros,
  .texto-nosotros {
    width: 50%;
    height: 100%;
    position: relative;
  }

  .video-nosotros video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }


  .texto-nosotros {
    position: relative;
    inset: unset;
    z-index: 1;
    pointer-events: auto;
    padding: clamp(16px, 3vw, 40px);
    align-items: center;
    justify-content: flex-start;
    gap: clamp(12px, 2.2vw, 24px);
    --offset-parrafos: 200px;
    text-align: center; 
  }

  .titulo-nosotros {
    color: #832B87;
    text-shadow: none;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    margin-bottom: clamp(10px, 2vw, 28px);
    transform: translateY(0);
    text-align: center;
  }

  .contenedor-parrafos {
    min-height: unset;
    max-width: 900px;
    margin: 0;
  }

  /* En landscape los párrafos ocupan flujo normal: uno visible a la vez */
  .parrafoNosotros {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    padding: 0;
    margin: 0 0 clamp(6px, 1.2vw, 12px) 0;
    opacity: 1;
    text-shadow: none;
    color: #111;
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    line-height: 1.35;
    transition: none;
    display: none;           
    text-align: center;
  }
  .parrafoNosotros.activo { display: block; }
  .parrafoNosotros.oculto { display: none; }

  /* En landscape el logo sí se muestra bajo el texto */
  .logo_nosotros { 
    display: block; 
    margin: clamp(10px, 2vh, 20px) 0 0 0; 
    width: clamp(120px, 12vw, 160px);
    height: auto;
  }

  /* La capa oscura no se necesita en layout dividido */
  .capa-oscura { display: none; }
}

/* =================================================================== */
/* ========  PORTRAIT “hasta 1400px” (superposición) AJUSTADO) ====== */
/* =================================================================== */
/* Antes tenías @media (max-width: 1400px) a secas. 
   Ahora lo limitamos a portrait para NO romper landscape. */
@media (max-width: 1400px) and (orientation: portrait) {
  .contenedor-nosotros { flex-direction: column; }

  .texto-nosotros {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    padding: 10px 15px 15px;  /* menos padding */
    gap: 10px;                /* menos separación */
    --offset-parrafos: 130px; /* ajustá si querés subir/bajar el bloque */
    text-align: center;
  }

  .titulo-nosotros {
    font-size: clamp(2.2rem, 5.5vw, 3rem);
    margin-bottom: 16px;
    color: white;
    text-shadow: 2px 2px 6px rgba(0,0,0,.6);
    text-align: center;
  }

  .video-nosotros { width: 100%; height: 100%; }

  .video-nosotros video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }

  .parrafoNosotros {
    position: absolute;   
    display: block;       
    font-size: 1.3em;
    line-height: 1.2;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,.9);
    text-align: center;
  }

  /* En superposición el logo NO se muestra */
  .logo_nosotros { display: none; }

  /* En portrait la capa oscura sí ayuda a la legibilidad */
  .capa-oscura { display: block; }
}
