/* =========================================
   BASE GLOBAL
========================================= */
*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:'Libre Franklin', sans-serif;
  color:#333;
  background:#fff;
  line-height:1.6;
}

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

.wrap{
  width:90%;
  max-width:1200px;
  margin:auto;
}

.wrap-narrow{
  width:90%;
  max-width:700px;
  margin:auto;
}

/* =========================================
   NAV / HEADER
========================================= */
.nav-header{
  background:#111;
  padding:10px 0;
  position:sticky;
  top:0;
  z-index:200;
}

.nav{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.nav ul{
  display:flex;
  list-style:none;
  gap:20px;
}

.nav a{
  color:#eee;
  text-decoration:none;
  font-weight:500;
  transition:0.3s;
}

.nav a:hover{
  color:#e63900;
}

/* =========================================
   HERO FULLSCREEN
========================================= */
.hero-full{
  height:100vh;
  background-size:cover;
  background-position:center;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.55);
}

.hero-content{
  position:relative;
  text-align:center;
  color:#fff;
  padding:20px;
  max-width:700px;
}

.hero-title{
  font-size:3rem;
  font-weight:600;
  margin-bottom:10px;
}

.hero-subtitle{
  font-size:1.2rem;
  opacity:.85;
  margin-bottom:20px;
}

.btn-primary{
  display:inline-block;
  padding:12px 28px;
  background:#e63900;
  color:#fff;
  font-weight:600;
  border-radius:4px;
  text-decoration:none;
  transition:0.3s;
}

.btn-primary:hover{
  background:#ff4d1a;
}

/* =========================================
   SECCIONES
========================================= */
.section{
  padding:80px 0;
}

.text-center{
  text-align:center;
}

.muted{
  opacity:.7;
}

/* =========================================
   BLOQUES IMAGEN + TEXTO
========================================= */
.feature-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:80px;
  align-items:center;
}

.feature.alt .feature-grid{
  direction:rtl;
}

.feature.alt .feature-text{
  direction:ltr;
}

.feature-text h3{
  font-size:2rem;
  margin-bottom:10px;
}

.feature-text p{
  opacity:.85;
  font-size:1.05rem;
}

.feature-grid img{
  border-radius:10px;
  box-shadow:0 3px 12px rgba(0,0,0,0.10);
}

/* =========================================
   BLURBS
========================================= */
.bg-light{
  background:#f5f5f5;
}

.blurb-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:30px;
}

.blurb{
  text-align:center;
  background:#fff;
  padding:40px;
  border-radius:8px;
  box-shadow:0 4px 10px rgba(0,0,0,0.08);
}

.blurb-icon{
  font-size:3rem;
  margin-bottom:10px;
}

/* =========================================
   GALERÍA
========================================= */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

.gallery-item{
  overflow:hidden;
  border-radius:10px;
  box-shadow:0 4px 15px rgba(0,0,0,0.15);
}

.gallery-item img{
  width:100%;
  height:220px;
  object-fit:cover;
  transition:.5s;
}

.gallery-item:hover img{
  transform:scale(1.08);
}

/* =========================================
   CTA FINAL
========================================= */
.cta{
  background:linear-gradient(135deg,#111,#222);
  color:#fff;
  padding:110px 20px;
  text-align:center;
}

.cta h2{
  font-size:2.6rem;
  margin-bottom:10px;
  font-weight:600;
}

.cta p{
  font-size:1.15rem;
  opacity:.85;
  margin-bottom:25px;
}

.cta .btn-primary{
  padding:14px 34px;
  font-size:1.1rem;
  border-radius:6px;
}

/* =========================================
   FOOTER
========================================= */
.footer{
  background:#111;
  color:#ccc;
  padding:40px 0;
}

.footer-grid{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
}

/* =========================================
   VIDEO — BLOQUE UNIFICADO (versión estable)
========================================= */

.video-feature{
  padding:80px 0;
}

.video-grid{
  display:grid;
  grid-template-columns:0.8fr 1.2fr;
  gap:60px;
  align-items:center;
}

.video-box{
  width:100%;
  max-width:400px;
  aspect-ratio:9/16;
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 6px 25px rgba(0,0,0,.20);
}

.video-box video{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.video-text h3{
  font-size:2rem;
  margin-bottom:16px;
  color:#222;
}

.video-text p{
  font-size:1.1rem;
  margin-bottom:24px;
  color:#444;
  line-height:1.7;
}

/* Alternar posición en desktop */
.video-grid.reversed{
  grid-template-columns:1fr 1fr;
}

.video-grid.reversed > .video-text{
  order:1;
}

.video-grid.reversed > .video-box{
  order:2;
}

/* =========================================
   RESPONSIVE — VIDEO
========================================= */
@media(max-width:900px){

  .video-grid{
    grid-template-columns:1fr;
    text-align:center;
  }

  .video-box{
    max-width:350px;
    margin:0 auto 1.5rem auto;
    aspect-ratio:9/16;
  }

  .video-grid.reversed > .video-box{
    order:-1; /* video primero en móvil */
  }
}

/* =========================================
   DEMOSTRACIÓN DEL GLOBO (mantener)
========================================= */

.balloon-demo{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:3rem;
  padding:6rem 0;
}

.balloon-demo .video-column{
  flex:1.2;
}

.balloon-demo .demo-video{
  width:100%;
  max-width:650px;
  border-radius:22px;
  box-shadow:0 15px 35px rgba(0,0,0,0.18);
}

.balloon-demo .text-column{
  flex:0.9;
}

.balloon-demo h2{
  font-size:2.3rem;
  margin-bottom:1rem;
}

.balloon-demo p{
  font-size:1.15rem;
  line-height:1.6;
  margin-bottom:1.7rem;
}

/* Globo — móvil */
@media(max-width:768px){
  .balloon-demo{
    flex-direction:column;
    text-align:center;
    padding:3.5rem 0;
  }

  .balloon-demo .demo-video{
    max-width:100%;
  }
}
/* =========================================
   FIX: Centrar video y texto en móvil para feature-grid
========================================= */

@media(max-width: 900px) {

  .feature-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature-grid .video-box {
    max-width: 330px;
    margin-bottom: 1.5rem;
  }

  .feature-text {
    width: 100%;
    max-width: 500px;
    text-align: center;
  }
}
/* =========================================
   FIX DEFINITIVO: Orden correcto en móvil
========================================= */
@media (max-width: 900px) {

  /* Fuerza a que feature-grid sea columna */
  .feature-grid {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* En móvil: video SIEMPRE debe ir primero */
  .feature-grid .video-box {
    order: -1;
    max-width: 340px;
    margin-bottom: 1.5rem;
  }

  /* Texto centrado y bien limitado */
  .feature-text {
    width: 100%;
    max-width: 500px;
    order: 2;
    text-align: center;
  }
}
/* =========================================
   FIX FINAL PARA MÓVIL: video siempre arriba
========================================= */
@media (max-width: 900px) {

  /* Forzar diseño de columna */
  .video-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    text-align: center;
  }

  /* El video SIEMPRE arriba */
  .video-grid .video-box {
    order: -1 !important;
    width: 100%;
    max-width: 350px;
    margin-bottom: 1.5rem;
  }

  /* El texto abajo */
  .video-grid .video-text {
    order: 2 !important;
    width: 100%;
    max-width: 500px;
  }
}
/* Tamaño controlado del bloque de intumescencia */
.intumescence-image-box img {
  width: 100%;
  max-width: 420px;   /* <-- AJUSTA EL TAMAÑO AQUÍ */
  border-radius: 12px;
  margin: 0 auto;
  display: block;
  box-shadow: 0 6px 22px rgba(0,0,0,0.10);
}
/* =========================================
   FIX PARA ICONOS DE IDIOMA (banderas)
========================================= */
.lang-switch img,
.lang-flag {
    width: 22px !important;
    height: auto !important;
    display: inline-block !important;
    object-fit: contain !important;
}

/* Evitar que el nav estire imágenes por la regla global img { max-width:100% } */
.nav img,
.nav .lang-flag {
    max-width: 22px !important;
}
/* =========================================
   FIX — Iconos de banderas del selector de idioma
========================================= */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-flag {
  width: 22px;
  height: auto;
  display: inline-block;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(0,0,0,0.25);
  transition: transform .2s;
}

.lang-flag:hover {
  transform: scale(1.08);
}
