/*
  ==========================================
  REINICIO Y ESTILOS BASE
  ==========================================
*/
:root {
  --color-acento: #F7EBC5;
  --color-negro: #000000;
  --color-gris-oscuro: #000000;
  --color-blanco: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--color-blanco);
  background-color: #000;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-weight: bold;
}

h1 { font-size: clamp(2.5em, 5vw, 3.5em); }
h2 { font-size: clamp(2em, 4vw, 2.7em); }
h3 { font-size: clamp(1.5em, 3vw, 2em); }

p { font-size: clamp(1em, 2vw, 1.25em); }

a {
  text-decoration: none;
  color: inherit;
}

ul { list-style: none; }
li { font-size: 1.25em; }

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.color-acento { color: var(--color-acento); }

/*
  ==========================================
  BOTONES
  ==========================================
*/
button, .btn-overlay, .btn-wsp {
  font-size: 1.25em;
  font-weight: bold;
  padding: 10px 30px;
  border-radius: 5px;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  color: white;
  background-color: var(--color-negro);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

button:hover, .btn-overlay:hover, .btn-wsp:hover {
  background-color: var(--color-gris-oscuro);
  transform: translateY(-2px);
}

/*
  ==========================================
  HEADER
  ==========================================
*/
header {
  background-color: var(--color-negro);
  color: var(--color-blanco);
  padding: 0;
  height: 60px; /* Altura para móviles */
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 0 20px;
  gap: 20px;
}

header .logo img {
  width: 80px; /* Ancho ajustado a 80px */
  height: auto;
  transition: transform 0.3s ease;
}

header .logo img:hover {
  transform: scale(1.05);
}

/*
  ==========================================
  MENÚ HAMBURGUESA Y NAVEGACIÓN (ESTILOS GLOBALES)
  ==========================================
*/
.menu-toggle {
  display: flex; /* Se muestra por defecto en móviles */
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 25px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-blanco);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* NAVEGACIÓN (ESTILOS MÓVILES) */
header nav {
  display: none; /* Oculto por defecto en móviles */
  width: 100%;
  text-align: center;
  position: absolute;
  top: 60px;
  left: 0;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 20px 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

header nav.open {
  display: flex; /* Se muestra al agregar la clase 'open' */
  flex-direction: column;
}

header nav ul {
  display: flex;
  flex-direction: column; /* Menú en columna para móviles */
  gap: 20px;
}

header nav a {
  padding: 10px 12px;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Nuevos estilos para hover */
header nav a:hover {
  color: var(--color-acento);
}

/* Estilos para el submenú de Proyectos */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  flex-direction: column;
  position: static; /* Cambiado a estático para móviles */
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.dropdown-content a {
  padding: 10px 12px;
}

.dropdown.open .dropdown-content {
  display: flex; /* Para mostrar el menú en móviles */
}


/*
  ==========================================
  SECCION HERO
  ==========================================
*/
#hero {
  position: relative;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-blanco);
  overflow: hidden;
}

#hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.hero-content h1 {
  font-size: clamp(3em, 8vw, 5em);
  line-height: 1;
  margin-bottom: 20px;
  color: var(--color-acento);
}

.hero-content h2 {
  font-size: clamp(1.2em, 3vw, 1.8em);
  font-weight: normal;
  margin-top: -10px;
  animation: fadeInUp 1s ease-out;
}

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

/*
  ==========================================
  SECCION NOSOTROS
  ==========================================
*/
#nosotros {
  padding: 80px 20px;
  background-color: var(--color-negro);
}

.fondo-nosotros {
  position: relative;
  background-image: url('media/fondo-nosotros.jpg');
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  padding: 60px 20px;
  overflow: hidden;
}

.fondo-nosotros .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.7), rgba(30, 30, 30, 0.8));
  z-index: 1;
  border-radius: 10px;
}

.contenedor-recuadros {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.recuadro {
  background-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  transition: transform 0.8s ease, opacity 0.8s ease;
  opacity: 0;
}

.recuadro h2 {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: var(--color-acento);
}

.recuadro p {
  font-size: 1em;
  line-height: 1.6;
  color: #eee;
}

.animar.izquierda { transform: translateX(-100px); }
.animar.derecha { transform: translateX(100px); }
.animar.visible { opacity: 1; transform: translateX(0); }


/*
  ==========================================
  SECCION PROYECTOS (CARRUSEL)
  ==========================================
*/
#proyectos.proyectos1 {
  background-color: var(--color-negro);
  padding: 60px 0;
  color: var(--color-blanco);
  text-align: center;
}

#proyectos.proyectos1 h2 {
  margin-bottom: 40px;
}

.carousel-proyectos {
  position: relative;
  overflow: hidden;
  margin: 0 auto;
  padding: 0 50px;
}

.proyectos {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
  padding: 20px 0;
}

.carta {
  position: relative;
  min-width: 300px;
  height: 400px;
  background-color: rgba(50, 50, 50, 1);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--color-blanco);
  /* Propiedades de fondo ajustadas */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Imágenes de fondo para las cartas */
.carta.misquihue { background-image: url('media/misquihue.jpg'); }
.carta.lomaspargua { background-image: url('media/lomasdepargua/lomas1.jpg'); }
.carta.brisasfresia { background-image: url('media/fresia/fresia1.jpg'); }
.carta.chimbarongo2 { background-image: url('media/chimbarongo2.jpg'); }
.carta.puentenegro { background-image: url('media/puentenegro.jpg'); }
.carta.elsantuario { background-image: url('media/elsantuario.jpeg'); }

.carta h3, .carta p, .carta .precio {
  position: relative;
  z-index: 1;
}

.carta p { margin-bottom: 10px; }
.carta .precio { font-weight: bold; color: var(--color-acento); }

.carta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 50%);
  z-index: 0;
}

.carta > * {
  position: relative;
  z-index: 2;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  z-index: 3;
}

.carta:hover .overlay {
  opacity: 1;
}

.detalle {
  font-size: 16px;
  margin-bottom: 15px;
}

.btn-overlay {
  background-color: var(--color-acento);
  color: #000;
  border: none;
  font-size: 1em;
  padding: 10px 20px;
  border-radius: 4px;
}
.btn-overlay:hover {
  background-color: #ffe69c;
}

button.proy-prev,
button.proy-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.7);
  border: none;
  color: white;
  font-size: 2.5rem;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 5px;
  user-select: none;
  z-index: 10;
}
button.proy-prev { left: 5px; }
button.proy-next { right: 5px; }

/*
  ==========================================
  SECCION FOOTER
  ==========================================
*/
.footer {
  background-color: #000;
  color: white;
  padding: 40px 20px 20px;
  font-family: sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.footer-column {
  flex: 1 1 200px;
  text-align: center;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.footer-column ul {
  padding: 0;
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-column ul li a {
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--color-acento);
  text-decoration: underline;
}

.social-icons a {
  margin: 0 10px;
  font-size: 20px;
  color: white;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
  color: var(--color-acento);
  transform: scale(1.2);
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  color: #ccc;
}

/*
  ==========================================
  WHATSAPP BOX
  ==========================================
*/
.whatsapp-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}
.whatsapp-box:hover {
  transform: scale(1.05);
}

.whatsapp-box a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.whatsapp-text {
  background-color: var(--color-blanco);
  padding: 6px 10px;
  border-radius: 10px 0 0 10px;
  font-size: 12px;
  color: #111;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.whatsapp-icon {
  background-color: #25D366;
  padding: 12px;
  border-radius: 0 50% 50% 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.whatsapp-icon i {
  color: white;
  font-size: 24px;
}

/*
  ==========================================
  SECCION CONTACTO
  ==========================================
*/
.seccion-contacto {
  background-color: var(--color-negro);
}

.contacto-banner {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.img-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
  z-index: 1;
}

.texto-banner {
  position: relative;
  z-index: 2;
  color: #fff;
}

.logo-banner {
  max-width: 90px;
  height: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 4px #000000aa);
}

.texto-banner h1 {
  font-size: 2.5em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  margin: 0;
}

.container-contacto {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
  background-color: var(--color-negro);
  color: var(--color-blanco);
}

.info-contacto,
.formulario-contacto {
  flex: 1 1 350px;
}

.info-contacto h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--color-acento);
}

.info-contacto p {
  font-size: 1em;
  margin-bottom: 10px;
}

.formulario-contacto form {
  display: flex;
  flex-direction: column;
}

.formulario-contacto label {
  margin-top: 15px;
  font-weight: bold;
  color: var(--color-blanco);
}

.formulario-contacto input,
.formulario-contacto textarea {
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--color-gris-oscuro);
  border-radius: 6px;
  margin-top: 5px;
  background-color: #222;
  color: #fff;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
  outline: none;
  border-color: var(--color-acento);
}

.formulario-contacto button {
  margin-top: 20px;
  padding: 12px;
  background-color: var(--color-acento);
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.formulario-contacto button:hover {
  background-color: #ffe69c;
}


/*
  ==========================================
  MEDIA QUERIES (RESPONSIVE)
  ==========================================
*/
@media (min-width: 768px) {
  /*
    ==========================================
    HEADER (DESKTOP)
    ==========================================
  */
  header {
    height: 80px; /* Altura para desktop */
  }

  header .container {
    padding: 0 20px;
  }
  
  .menu-toggle {
    display: none; /* Oculta el botón en desktop */
  }

  header nav {
    display: flex !important; /* Muestra el menú siempre en desktop */
    position: static;
    flex-direction: row;
    background-color: transparent;
    padding: 0;
    width: auto;
  }

  header nav ul {
    flex-direction: row; /* Menú en fila para desktop */
    gap: 20px;
  }

  header nav a {
    padding: 5px 12px;
  }
  
  /* Submenú en desktop */
  .dropdown:hover .dropdown-content {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: rgba(0, 0, 0, 0.9);
  }

  /* Sección Nosotros */
  .contenedor-recuadros {
    flex-direction: row;
    justify-content: space-between;
  }

  .recuadro {
    width: 48%;
  }

  /* Carrusel de proyectos */
  .carousel-proyectos {
    padding: 0 80px;
  }
  
  button.proy-prev,
  button.proy-next {
    font-size: 3rem;
  }
  button.proy-prev { left: 20px; }
  button.proy-next { right: 20px; }
  
  /* Footer */
  .footer-column {
    text-align: left;
  }
}

@media (max-width: 767px) {
  /*
    ==========================================
    HEADER (MÓVIL)
    ==========================================
  */
  header .container {
    padding: 0 20px;
  }

  /* Ajustes para la sección de contacto en móvil */
  .container-contacto {
    flex-direction: column;
    padding: 30px 20px;
  }

  .info-contacto,
  .formulario-contacto {
    flex: 1 1 100%;
  }

  .boton-proyectos {
    display: inline-block;
    background-color: #000; /* Fondo negro */
    color: #fff; /* Letras blancas */
    text-decoration: none; /* Para quitar el subrayado */
    padding: 15px 30px; /* Tamaño del botón */
    border-radius: 50px; /* Bordes redondos */
    font-weight: bold;
    font-size: 1rem;
    margin-top: 20px; /* Para moverlo un poco más abajo, como mencionaste */
    transition: background-color 0.3s ease;
}

.boton-proyectos:hover {
    background-color: #333; /* Color un poco más claro al pasar el mouse */
}

}