/* =========================
   RESET GENERAL
========================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap');

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

body{
  font-family:'Montserrat', sans-serif;
  overflow-x:hidden;
  background:#000;
  color:white;
}

/* =========================
   HEADER
========================= */
.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 60px;
  background:#000;
  position:relative;
  z-index:10;
}

/* LOGO */
.logo{
  color:white;
  font-size:28px;
  font-weight:500;
  letter-spacing:2px;
}

/* MENÚ */
.menu a{
  color:white;
  text-decoration:none;
  margin-left:30px;
  font-size:16px;
  font-weight:300;
  letter-spacing:1px;
  position:relative;
  transition:color 0.3s ease;
}

/* EFECTO LÍNEA */
.menu a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-5px;
  width:0%;
  height:1px;
  background:white;
  transition:width 0.3s ease;
}

.menu a:hover::after{
  width:100%;
}

/* LÍNEA GRIS */
.linea{
  width:100%;
  height:20px;
  background:#ccc;
}

/* =========================
   HERO SLIDER
========================= */
.hero{
  position:relative;
  height:100vh;
  overflow:hidden;
}

.slide{
  position:absolute;
  width:100%;
  height:100%;
  background-size:cover;
  background-position:center;
  opacity:0;
  transition:opacity 1.5s ease-in-out;
}

.slide.active{
  opacity:1;
}

/* CAPA OSCURA */
.overlay{
  position:relative;
  z-index:2;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  background:rgba(0,0,0,0.4);
  color:white;
}

.overlay h1{
  font-size:60px;
  margin-bottom:20px;
  font-family:'Playfair Display', serif;
}

/* =========================
   BOTÓN PRINCIPAL
========================= */
.btn-pro{
  display:inline-block;
  margin-top:20px;
  padding:14px 30px;
  border:1px solid white;
  color:white;
  text-decoration:none;
  position:relative;
  overflow:hidden;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

/* EFECTO FONDO */
.btn-pro::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  width:0%;
  height:100%;
  background:white;
  transition:width 0.4s ease;
  z-index:-1;
}

.btn-pro:hover::before{
  width:100%;
}

.btn-pro:hover{
  color:black;
  transform:translateY(-2px);
}

/* =========================
   SECCIONES
========================= */
.section{
  padding:120px 50px;
}

.titulo{
  margin-bottom:40px;
  text-align:center;
  font-size:40px;
  font-family:'Playfair Display', serif;
}

.texto{
  max-width:700px;
  margin:auto;
  text-align:center;
  line-height:1.7;
}

/* =========================
   GRID
========================= */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(300px,1fr));
  gap:20px;
}

/* =========================
   CARDS
========================= */
.card{
  position:relative;
  overflow:hidden;
}

.card img{
  width:100%;
  display:block;
  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.card:hover img{
  transform:scale(1.08);
  filter:brightness(70%);
}

/* TEXTO HOVER */
.card::after{
  content:"Ver proyecto";
  position:absolute;
  bottom:-50px;
  left:0;
  width:100%;
  text-align:center;
  color:white;
  font-weight:bold;
  transition:bottom 0.4s ease;
}

.card:hover::after{
  bottom:20px;
}

/* =========================
   FORMULARIO
========================= */
.form{
  max-width:500px;
  margin:auto;
  display:flex;
  flex-direction:column;
}

.input-group{
  position:relative;
  margin-bottom:20px;
}

input,
textarea{
  width:100%;
  padding:14px;
  border:1px solid #444;
  background:#111;
  color:white;
  outline:none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

input:focus,
textarea:focus{
  border-color:white;
  box-shadow:0 0 5px rgba(255,255,255,0.3);
}

/* ERRORES */
.error{
  color:red;
  font-size:12px;
  position:absolute;
  bottom:-18px;
  left:0;
  display:none;
}

.input-error input,
.input-error textarea{
  border-color:red;
}

/* MENSAJE ÉXITO */
.exito{
  display:none;
  margin-top:15px;
  color:#00ff88;
  font-weight:bold;
}

/* =========================
   BOTONES
========================= */
button{
  background:black;
  color:white;
  border:1px solid white;
  padding:12px 20px;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

/* EFECTO BRILLO OPTIMIZADO */
button::after{
  content:"";
  position:absolute;
  top:0;
  left:-150%;
  width:60%;
  height:100%;
  background:rgba(255,255,255,0.15);
  transform:skewX(-25deg);
  transition:left 0.5s ease;
}

button:hover::after{
  left:150%;
}

button:hover{
  transform:translateY(-2px);
}

/* =========================
   FOOTER
========================= */
footer{
  background:black;
  color:white;
  text-align:center;
  padding:30px 20px;
}

/* REDES */
.redes{
  margin-top:20px;
}

.redes a{
  font-size:22px;
  color:white;
  margin:0 10px;
  display:inline-block;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}

.redes a:hover{
  transform:translateY(-5px) scale(1.15);
  color:#aaa;
}

/* =========================
   ANIMACIONES
========================= */
.fade-in{
  opacity:0;
  transform:translateY(20px);
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.fade-in.active{
  opacity:1;
  transform:translateY(0);
}

/* =========================
   NOSOTROS
========================= */
.info-dinamica{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:60px;
  padding:100px 60px;
  background:#0d0d0d;
}

/* IMÁGENES */
.imagenes{
  position:relative;
  width:400px;
  height:500px;
}

.img{
  position:absolute;
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity 1s ease;
}

.img.active{
  opacity:1;
}

/* CONTENIDO */
.contenido{
  max-width:500px;
}

.contenido h2{
  font-size:45px;
  margin-bottom:20px;
}

.contenido p{
  line-height:1.8;
  color:#ccc;
}

/* TABS */
.tabs{
  margin-top:30px;
}

.tabs button{
  margin-right:15px;
  padding:10px 20px;
  background:transparent;
  border:1px solid white;
  color:white;
  will-change:transform;
}

.tabs button:hover{
  background:white;
  color:black;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  /* Header: Ponemos el logo arriba y el menú abajo para que no se amontonen */
  .header {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  .menu {
    display: flex;
    justify-content: center;
    gap: 15px; /* Espacio entre links */
  }

  .menu a {
    margin-left: 0; /* Quitamos el margen lateral que pusiste antes */
    font-size: 14px;
  }

  /* Hero: Bajamos el tamaño de la letra para que quepa en la pantalla */
  .overlay h1 {
    font-size: 30px;
    padding: 0 20px;
  }

  /* Nosotros: Las fotos y el texto ahora van uno arriba del otro */
  .info-dinamica {
    flex-direction: column;
    padding: 40px 20px;
    gap: 30px;
  }

  .imagenes {
    width: 100%;
    height: 300px; /* Más corto para que no ocupe todo el alto */
  }

  .contenido {
    width: 100%;
    text-align: center;
  }

  .contenido h2 {
    font-size: 32px;
  }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  /* Grid de Proyectos: Una sola columna para que las fotos sean grandes */
  .grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }

  .section {
    padding: 60px 20px;
  }
}