/* =============================
   RESET GENERAL
============================= */
body{
  margin:0;
  font-family:'Poppins',sans-serif;
  background:#0f0f0f;
  color:white;
}

/* =============================
   HEADER
============================= */
.topbar{
  background:#2c5f5f;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:15px 40px;
  position:relative;
}

.logo img{
  height:45px;
  width:auto;
}

/* NAV */
nav{
  display:flex;
}

nav a{
  color:white;
  margin:0 10px;
  text-decoration:none;
}

nav a:hover{
  color:#00d1b2;
}

/* MENÚ MÓVIL */
.menu-toggle{
  display:none;
  font-size:28px;
  cursor:pointer;
  color:white;
}

/* =============================
   HERO INTERNO
============================= */
.hero.interno{
  height:450px;
  position:relative;
  overflow:hidden;
}

/* =============================
   HISTORIA
============================= */
.historia{
  padding:60px;
  background:#111;
  text-align:center;
}

.historia-contenido{
  display:flex;
  justify-content:center;
  gap:40px;
  flex-wrap:wrap;
}

.historia-texto{
  max-width:600px;
  line-height:1.6;
  text-align:justify; /* TEXTO JUSTIFICADO */
}

.historia-texto h2 {
  text-align: center; /* Mantiene el título centrado */
}

.historia-imagen img{
  width:100%;
  max-width:500px;
  border-radius:10px;
}

.historia-header{
    position: relative;
    height: 450px;
    overflow: hidden;
}

.hero-img{
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.overlay{
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.4);
}

/* =============================
   ACERCA (Corregido a .Acerca para coincidir con el HTML)
============================= */
.Acerca{
  padding:60px;
  background:#111;
  text-align:center;
}

.acerca-contenido{
  display:flex;
  justify-content:center;
  gap:40px;
  flex-wrap:wrap;
}

.acerca-texto{
  max-width:600px;
  line-height:1.6;
  text-align:justify; /* TEXTO JUSTIFICADO */
}

.acerca-texto h2 {
  text-align: center; /* Mantiene el título centrado */
}

.acerca-imagen img{
  width:100%;
  max-width:500px;
  border-radius:10px;
}

/* =============================
   FILOSOFÍA (MVV)
============================= */
.mvv-contenedor{
  display:flex;
  justify-content:center;
  gap:25px;
  flex-wrap:wrap;
  align-items:stretch;
}


.mvv-card{
  background:#1c1c1c;
  padding:20px;
  width:300px;
  border-radius:10px;  
  display:flex;
  flex-direction:column;
  transition: .3s;
}
.mvv-card p {
  text-align: justify; /* TEXTO JUSTIFICADO */
  line-height: 1.6;
}

.mvv-card:hover{
  transform:translateY(-8px);
  border:1px solid #00d1b2;
}

.mvv-card img{
  width:160px;
  height:250px;      /* mismo tamaño para todas */
  object-fit:cover;  /* evita deformaciones */
  display:block;
  margin-top:auto;   /* coloca todas las imágenes al mismo nivel */
  margin-left:auto;
  margin-right:auto;
  border-radius:10px;
}

/* =============================
   FORMULARIOS Y BOTONES
============================= */
form{
  display:flex;
  flex-direction:column;
  gap:15px;
}

input, textarea{
  padding:10px;
  border-radius:5px;
  border:none;
}

button{
  background:#00d1b2;
  border:none;
  padding:10px;
  border-radius:6px;
  cursor:pointer;
  transition:0.3s;
}

button:hover{
  background:#00a896;
}

/* =============================
   IMÁGENES
============================= */
img{
  max-width:100%;
  height:auto;
  border-radius:10px;
}

/* =============================
   FOOTER
============================= */
footer{
  background:#2c5f5f;
  text-align:center;
  padding:20px;
  margin-top:40px;
}

/* =============================
   📱 RESPONSIVE
============================= */
@media(max-width:768px){

  /* NAV */
  nav{
    display:none;
    flex-direction:column;
    background:#2c5f5f;
    position:absolute;
    top:70px;
    right:0;
    width:100%;
    text-align:center;
  }

  nav.active{
    display:flex;
  }

  nav a{
    padding:15px;
  }

  .menu-toggle{
    display:block;
  }

  /* HERO */
  .hero.interno{
    height:200px;
  }

  /* CONTENEDORES */
  .historia-contenido,
  .acerca-contenido,
  .mvv-contenedor{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }

  /* Opcional: En móviles muy pequeños el justificado genera espacios raros (ríos de blanco). 
     Si notas que se ve extraño en móvil, puedes descomentar la siguiente línea: */
  /* .historia-texto, .acerca-texto, .mvv-card p { text-align: left; } */

  /* ESPACIADOS */
  .historia,
  .Acerca,
  .mvv{
    padding:30px;
  }

  /* TARJETAS */
  .mvv-card{
    width:90%;
  }
}


/* ==========================
   NOTICIAS Y ARTÍCULOS
========================== */

.noticias{
  padding: 80px 8%;
  background: #f8f9fa;
  margin-top: 80px; /* Espacio superior */
}

.noticias h2{
  text-align:center;
  margin-bottom:50px;
  color:#0b5d4b;
  font-size:2.5rem;
}

.noticias-contenedor{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:30px;
}

.noticia-card{
  background:#fff;
  border-radius:15px;
  overflow:hidden;
  box-shadow:0 5px 20px rgba(0,0,0,.08);
  transition:.3s;
}

.noticia-card:hover{
  transform:translateY(-8px);
}

.noticia-card img{
  width:100%;
  height:220px;
  object-fit:cover;
}

.noticia-info{
  padding:25px;
}

.noticia-info span{
  color:#888;
  font-size:.9rem;
}

.noticia-info h3{
  margin:12px 0;
  color:#0b5d4b;
}

.noticia-info p{
  color:#555;
  line-height:1.6;
  text-align: justify; /* TEXTO JUSTIFICADO */
}

.noticia-info a{
  display:inline-block;
  margin-top:15px;
  color:#0b5d4b;
  text-decoration:none;
  font-weight:600;
}

.noticia-info a:hover{
  color:#0f8a6d;
}