
/* ==========================================================
   PREFABRICADOS NUEVO MUNDO — CSS ÚNICO OPTIMIZADO
   Autor: Juan + Asistente
   Descripción: Archivo integrado con TODO el estilo del sitio,
   reorganizado por secciones, con comentarios y responsive completo.
   ========================================================== */

/* ==========================================================
   1) RESET + VARIABLES + UTILIDADES
   ========================================================== */

/* --- Reset básico y tipografía global --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/* --- Paleta corporativa (usar estas variables siempre que sea posible) --- */
:root {
  --verde: #2e7d32;
  --verde-claro: #66bb6a;
  --naranja: #f57c00;
  --gris: #444;
  --blanco: #fff;
}

/* --- Fondo global y color de texto --- */
body {
  background-image: url('../images/fondo.PNG');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: #333;
}

/* --- Contenedor estándar --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Estados / utilidades --- */
.oculto { display: none !important; }
.no-scroll { overflow: hidden; height: 100vh; }

/* --- Animaciones globales --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   2) HEADER + NAVEGACIÓN
   ========================================================== */

/* --- Header sticky con blur --- */
header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  padding: 1rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

/* --- Logo + título de marca --- */
.logo { font-size: 1.8rem; font-weight: bold; color: var(--verde); }

.logo-container { display: flex; align-items: center; gap: 1rem; }
.logo-img { height: 75px; width: auto; }
.logo-text { font-size: 1.8rem; font-weight: bold; color: var(--verde); }

/* --- Navegador (desktop) --- */
.nav { --padding-container: 0; height: 100%; display: flex; align-items: center; justify-content: center; flex: 1; }
.nav__title { padding-top: 10px; width: 100px; }

.nav__link {
  margin-left: auto;
  padding: 0;
  display: flex;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 2rem;
}

.nav__items { list-style: none; }

.nav__links {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--verde);
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav__links:hover { color: var(--naranja); }

.nav__menu { margin-left: auto; cursor: pointer; display: none; }
.nav__img { display: block; width: 30px; }
.nav__close { display: var(--show, none); }

nav ul { display: flex; gap: 1.5rem; list-style: none; }
nav a { text-decoration: none; color: #444; font-weight: 500; }

/* ==========================================================
   3) HERO
   ========================================================== */

.hero {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(46,125,50,0.6), rgba(245,124,0,0.6)), url('../images/fondo-texturizado.png');
  background-size: cover;
  background-position: center;
  color: var(--blanco);
  padding: 2rem;
}

.hero-content h2 {
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  color: var(--blanco);
}

/* --- Botón primario genérico --- */
.btn {
  display: inline-block;
  background-color: var(--verde);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s, transform 0.2s ease;
}
.btn:hover { background-color: var(--naranja); transform: scale(1.05); }

/* ==========================================================
   4) ESTILO BASE PARA SECCIONES (Nosotros, Beneficios, Modelos, Proyectos, Contacto)
   ========================================================== */

.nosotros,
.beneficios,
.modelos,
.proyectos,
.contacto {
  padding: 4rem 0;
  background: rgba(255,255,255,0.95);
  margin-top: 2rem;
  border-radius: 16px;
}

/* ==========================================================
   5) NOSOTROS
   ========================================================== */

.nosotros-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.nosotros h2 { font-size: 5rem; margin-bottom: 20px; }
.nosotros p  { font-size: 1.1rem; }

.nosotros-img { flex: 1 1 250px; }
.nosotros-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.nosotros-texto { flex: 2 1 500px; }

/* --- Pilares / tarjetas --- */
.pilares-nosotros {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  text-align: center;
}

.pilar {
  flex: 1 1 30%;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, border 0.3s ease;
  border-top: 5px solid var(--naranja);
}
.pilar:hover { transform: translateY(-5px); border-top: 5px solid var(--verde); }

.pilar img { width: 60px; margin-bottom: 1rem; }

/* ==========================================================
   6) BENEFICIOS
   ========================================================== */

.beneficios h2 { font-size: 2.5rem; }

.beneficios .items,
.cards,
.grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.item {
  flex: 1 1 30%;
  text-align: center;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border-top: 5px solid var(--naranja);
}
.item:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); border-top: 5px solid var(--verde); }
.item-icon { width: 60px; margin-bottom: 1rem; }

/* ==========================================================
   7) MODELOS
   ========================================================== */

.modelos h2 { font-size: 2.5rem; }

.card {
  flex: 1 1 30%;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: border 0.3s ease;
}
.card:hover { border-top: 5px solid var(--verde); }

.card img,
.grid img {
  width: 100%;
  height: 200px;   /* Ajusta la altura según lo que te guste */
  object-fit: cover;
  border-radius: 6px;
}
/* ==========================================================
   8) PROYECTOS (listado) + DETALLES (vista individual)
   ========================================================== */

/* --- Sección proyectos (listado) --- */
.proyectos {
  padding: 60px 20px;
  background-color: #f9f9f9;
  text-align: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.proyectos h2 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: var(--verde);
}
.proyectos.fade-out { opacity: 0; visibility: hidden; }

/* --- Grid de tarjetas --- */
.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.proyecto-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border-top: 5px solid var(--naranja);
}
.proyecto-card:hover { transform: translateY(-10px); box-shadow: 0 8px 16px rgba(0,0,0,0.2); border-top: 5px solid var(--verde); }

.proyecto-card a { text-decoration: none; color: inherit; display: block; }

.proyecto-card .proyecto-info h3 { color: var(--verde); font-weight: bold; }
.proyecto-card .proyecto-info h3:hover { color: var(--naranja); cursor: pointer; }

/* --- Imagen con overlay --- */
.imagen-container { position: relative; overflow: hidden; }
.imagen-container img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: all 0.3s ease;
}
.overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}
.imagen-container:hover img { transform: scale(1.05); }
.imagen-container:hover .overlay { opacity: 1; }

/* --- Galería simple (si se necesita) --- */
.proyectos-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-top: 20px;
}

.proyecto {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.proyecto:hover { transform: translateY(-5px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }

/* --- Unificación de tamaño de imágenes de tarjetas de proyectos --- */
.proyecto img {
  width: 100%;
  height: 250px;      /* altura uniforme */
  object-fit: cover;  /* recorte sin deformar */
  border-radius: 8px;
  transition: transform 0.3s ease;
}
.proyecto:hover img { transform: scale(1.05); }

.proyecto-info { padding: 20px; }
.proyecto-info h3 { margin-bottom: 10px; color: var(--verde); font-size: 1.5rem; }
.proyecto-info p  { color: #555; font-size: 1rem; }

/* --- Contenedor de detalles (vista individual) --- */
.detalles-proyecto { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; flex-direction: column; padding: 2rem; background: #fff; border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.1); margin: 0 auto; max-width: 1000px; text-align: center; }
.detalles-proyecto.fade-in { animation: fadeIn .3s ease-in both; }

.detalle-container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  animation: fadeIn 0.6s ease-in-out;
}

.detalle-texto h1 { color: var(--verde); margin-bottom: 10px; font-size: 28px; }
.detalle-texto p  { font-size: 16px; color: #444; }

/* --- Imagen principal detalle (unificada con Swiper) --- */
.detalle-imagen-principal img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Mini-galería en detalle --- */
.detalle-galeria {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.detalle-galeria img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.3s ease;
}
.detalle-galeria img:hover { transform: scale(1.05); }

.boton-regresar {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 18px;
  background: var(--verde);
  color: #fff;
  font-weight: bold;
  border-radius: 6px;
  transition: background 0.3s ease;
  text-decoration: none;
}
.boton-regresar:hover { background: var(--naranja); }

/* --- Swiper: carrusel uniforme --- */
.swiper {
  width: 100%;
  height: 350px;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.swiper-slide { display: flex; justify-content: center; align-items: center; }
.swiper-slide img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 8px;
}
.swiper-button-next,
.swiper-button-prev { color: var(--verde); font-weight: bold; transition: color 0.3s ease; }
.swiper-button-next:hover,
.swiper-button-prev:hover { color: var(--naranja); }
.swiper-pagination-bullet { background: var(--verde); }

/* ==========================================================
   9) CONTACTO
   ========================================================== */

.contacto h2 { margin-bottom: 20px; }

.contacto form { display: flex; flex-direction: column; gap: 1rem; }
.contacto input,
.contacto textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.contacto button {
  padding: 0.75rem;
  background-color: var(--verde);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}
.contacto button:hover { background-color: var(--naranja); }

/* --- Layout de contacto (form + info) --- */
.contacto-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
  align-items: flex-start;
}
.formulario, .info-contacto { flex: 1 1 400px; }

.formulario form { display: flex; flex-direction: column; gap: 1rem; }
.formulario input, .formulario textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
.formulario button {
  padding: 0.75rem;
  background-color: var(--verde);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
}

.info-contacto {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  border-top: 5px solid var(--naranja);
}
.info-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.info-item img { width: 28px; height: 28px; }

/* ==========================================================
   10) FOOTER
   ========================================================== */

footer {
  background-color: #1b4332;
  color: #eee;
  padding-top: 3rem;
  margin-top: 3rem;
  font-size: 0.95rem;
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  text-align: center;
}

.footer-col { flex: 1 1 250px; padding: 0 1rem; position: relative; }

/* líneas divisorias solo desktop */
.footer-col:not(:last-child) { border-right: 1px solid rgba(255,255,255,0.5); }

.footer-logo {
  width: 100px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1); /* logo blanco */
}

.footer-col h3 { color: var(--naranja); margin-bottom: 1rem; font-size: 1.2rem; }

.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover { color: var(--naranja); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #ccc;
}

/* ==========================================================
   11) BOTÓN WHATSAPP FLOTANTE
   ========================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25d366;
  color: var(--blanco);
  font-size: 2rem;
  padding: 12px;
  border-radius: 50%;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); }

/* ==========================================================
   12) RESPONSIVE (breakpoints descendentes)
   ========================================================== */

/* --- <= 1024px --- */
@media (max-width: 1024px) {
  .proyecto img { height: 220px; }
  .swiper,
  .swiper-slide img,
  .detalle-imagen-principal img { height: 300px; }
}

/* --- <= 800px (Mobile nav + stacks) --- */
@media (max-width: 800px) {

  /* ==== MENÚ HAMBURGUESA ==== */
  .nav__menu { display: block; }

  .nav__link--menu {
    position: fixed;
    top: 0; left: 0;
    height: 100vh; width: 100%;
    background: linear-gradient(180deg, #1b4332, #081c15);
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2rem;

    /* oculto por defecto */
    opacity: 0; pointer-events: none; transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 3000;

    max-height: 100vh; overflow-y: auto;
  }
  .nav__link--show { opacity: 1; pointer-events: auto; transform: translateY(0); }

  .nav__links {
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInUp 0.6s forwards;
  }
  .nav__links:nth-child(1) { animation-delay: 0.2s; }
  .nav__links:nth-child(2) { animation-delay: 0.4s; }
  .nav__links:nth-child(3) { animation-delay: 0.6s; }
  .nav__links:nth-child(4) { animation-delay: 0.8s; }
  .nav__links:nth-child(5) { animation-delay: 1s; }

  .nav__links::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--naranja);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
  }
  .nav__links:hover::after { transform: scaleX(1); transform-origin: left; }
  .nav__links:hover { color: var(--naranja); }

  .nav__close {
    position: absolute; top: 25px; right: 25px;
    width: 28px; height: 28px; cursor: pointer; display: block;
    filter: invert(1);
    transition: transform 0.3s ease;
  }
  .nav__close:hover { transform: rotate(90deg); }

  @keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

  /* ==== NOSOTROS (stack + centrado) ==== */
  .nosotros-flex { flex-direction: column; text-align: center; gap: 2rem; }
  .nosotros-img { flex: 1 1 100%; max-width: 90%; margin: 0 auto; }
  .nosotros-texto { flex: 1 1 100%; max-width: 90%; margin: 0 auto; }
  .nosotros h2 { font-size: 2.2rem; }
  .nosotros p { font-size: 1rem; line-height: 1.5; }

  .pilares-nosotros { flex-direction: column; align-items: center; text-align: center; gap: 1.8rem; }
  .pilar { flex: 1 1 100%; max-width: 90%; padding: 1.2rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
  .pilar img { width: 45px; margin-bottom: 0.8rem; }
  .pilar h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
  .pilar p  { font-size: 1rem; line-height: 1.5; }

  /* ==== BENEFICIOS + MODELOS (columna) ==== */
  .beneficios .items { flex-direction: column; align-items: center; gap: 1.5rem; }
  .item { flex: 1 1 100%; max-width: 90%; padding: 1.2rem; text-align: center; }
  .item img { width: 45px; }
  .item h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
  .item p  { font-size: 1rem; line-height: 1.5; }

  .modelos .cards { flex-direction: column; align-items: center; gap: 1.5rem; }
  .card { flex: 1 1 100%; max-width: 90%; padding: 1.2rem; text-align: center; }
  .card h3 { font-size: 1.2rem; }
  .card p  { font-size: 1rem; }

  /* ==== FOOTER (apilado + divisorias ocultas) ==== */
  .footer-container { flex-wrap: wrap; text-align: center; gap: 2rem; }
  .footer-col { flex: 1 1 100%; border-right: none !important; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
  .footer-col:last-child { border-bottom: none; }
  .footer-logo { margin: 0 auto 1rem; display: block; }
}

/* --- <= 600px --- */
@media (max-width: 600px) {
  .footer-container { flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
  .footer-col { padding: 0; margin: 0; border: none; }
  .footer-col h3 { margin-top: 1rem; }
  .footer-bottom { font-size: 0.8rem; padding: 1rem; }
}

/* --- <= 480px (micro-ajustes) --- */
@media (max-width: 480px) {
  .nosotros h2 { font-size: 1.8rem; }
  .nosotros p  { font-size: 0.95rem; padding: 0 10px; }

  .nosotros-img img { border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

  .pilares-nosotros { gap: 1.2rem; }
  .pilar { max-width: 95%; padding: 1rem; border-radius: 10px; }
  .pilar img { width: 40px; }
  .pilar h3 { font-size: 1.1rem; }
  .pilar p  { font-size: 0.95rem; padding: 0 8px; }

  .whatsapp-float { bottom: 15px; right: 15px; padding: 10px; font-size: 1.7rem; }

  .beneficios h2, .modelos h2 { font-size: 1.6rem; }
  .item { max-width: 95%; padding: 1rem; border-radius: 10px; }
  .item img { width: 40px; }
  .item h3 { font-size: 1.1rem; }
  .item p  { font-size: 0.95rem; }

  .card { max-width: 95%; padding: 1rem; border-radius: 10px; }
  .card img { border-radius: 8px; }
  .card h3 { font-size: 1.1rem; }
  .card p  { font-size: 0.95rem; }

  /* Proyectos / Swiper / Detalle */
  .proyecto img { height: 180px; }
  .swiper,
  .swiper-slide img,
  .detalle-imagen-principal img { height: 200px; }
  .detalle-galeria img { width: 120px; height: 90px; }
}
