/* PALETA MEDITERRÁNEA PREMIUM */
:root {
  --blanco: #ffffff;
  --fondo-limpio: #fdfdfb; /* Blanco roto/marfil muy suave */
  --arena-suave: #f5f2eb; /* Tono arena de playa premium */
  --azul-egeo: #0f2a4a; /* Azul profundo elegante */
  --texto-oscuro: #1a2430; /* Gris azulado oscuro de alta legibilidad */
  --gris-suave: #8a95a5;
  --arena-suave-80: #f5f2eb80; /* Tono arena de playa premium */
}

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

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  font-size: 1.6rem;
  color: var(--texto-oscuro);
  background-color: var(--fondo-limpio);
  line-height: 1.7;
}

/* TIPOGRAFÍAS */
h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  color: var(--azul-egeo);
  font-weight: 600;
}

h1 {
  font-size: 5rem;
  line-height: 1.2;
}
h2 {
  font-size: 3.6rem;
  text-align: center;
  margin-bottom: 5rem;
}
h3 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

/* ==========================================
   ESTILOS DEL MENÚ HAMBURGUESA Y RESPONSIVE
   ========================================== */

/* Botón Hamburguesa oculto por defecto en escritorio */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  z-index: 1200;
}

.hamburger .bar {
  display: block;
  width: 2.5rem;
  height: 2px;
  background-color: var(--azul-egeo);
  transition: all 0.3s ease;
}

/* RESPONSIVE: MÓVILES Y TABLETS */
@media (max-width: 768px) {
  h1 {
    font-size: 3.5rem;
  }
  h2 {
    font-size: 2.8rem;
  }
  .grid-proyectos {
    grid-template-columns: 1fr;
  }

  /* Mostrar la hamburguesa */
  .hamburger {
    display: flex;
  }

  /* Transformación a menú móvil (Oculto a la derecha) */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Completamente fuera de la pantalla */
    width: 80%;
    max-width: 32rem;
    height: 100vh;
    background-color: var(--blanco);
    box-shadow: -10px 0 30px rgba(15, 42, 74, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10rem 4rem 4rem 4rem;
    gap: 3rem;
    transition: right 0.4s cubic-bezier(0.1, 0.9, 0.2, 1);
    z-index: 1100;
  }

  /* Cuando el menú está activo (Se inyecta con JS) */
  .nav-links.active {
    right: 0;
  }

  /* Ajustes de los enlaces dentro del menú móvil */
  .nav-premium .links a,
  .nav-links a {
    margin-left: 0;
    font-size: 1.8rem;
    width: 100%;
  }

  .btn-nav {
    text-align: center;
    margin-top: 2rem;
  }

  /* Ajuste del dropdown de idioma en móvil */
  .dropdown-idioma {
    margin-left: 0;
    width: 100%;
  }

  .dropdown-btn {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-content {
    position: static; /* Se despliega hacia abajo empujando el contenido, no flotando */
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--arena-suave);
    margin-top: 1rem;
    padding-left: 1rem;
  }

  /* Animación del botón hamburguesa cuando se abre (Se transforma en X) */
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ==========================================
   NAVBAR PREMIUM UNIFICADO (ESCRITORIO)
   ========================================== */

.nav-premium {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(15, 42, 74, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1.5rem 0; /* Estiliza la barra haciéndola más elegante */
}

.nav-contenedor {
  max-width: 130rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center; /* Centrado vertical absoluto de los dos bloques principales */
  padding: 0 2rem;
}

/* BRANDING / LOGO */
.nav-premium .logo {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  color: var(--azul-egeo);
}

#logo-a {
  text-decoration: none;
  color: inherit;
  display: flex; /* Activa flexbox interno para alinear imagen y texto */
  align-items: center; /* Clave: fuerza a la imagen y al texto a compartir el mismo centro */
  gap: 1.2rem; /* Espaciado elegante sin usar &nbsp; */
}

#logo-a img {
  display: block;
  object-fit: contain;
}

#logo-a span {
  display: inline-block;
  line-height: 1; /* Resetea alturas de línea extrañas */
}

/* ENLACES DE NAVEGACIÓN */
.nav-links {
  display: flex;
  align-items: center; /* Fuerza a que los enlaces, dropdown y botón compartan el mismo eje */
  gap: 3.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--texto-oscuro);
  font-size: 1.4rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  line-height: 1; /* Sincronizado con el span del logo */
}

.nav-links a:hover {
  color: var(--azul-egeo);
}

/* BOTÓN DE ACCIÓN DESTACADO */
.btn-nav {
  border: 1px solid var(--azul-egeo) !important;
  padding: 1rem 2.2rem;
  border-radius: 2px;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  line-height: 1 !important;
}

.btn-nav:hover {
  background-color: var(--azul-egeo);
  color: var(--blanco) !important;
}

/* CORRECCIÓN PARA QUE EL DROPDOWN NO HEREDE MAYÚSCULAS NI ESTILOS DEL MENÚ */
.dropdown-content a {
  text-transform: none !important;
  letter-spacing: 0 !important;
  width: 100%;
  display: block !important;
}

/* HERO SECTION */
.hero-premium {
  /* Imagen aspiracional: Reemplázala por una foto tuya de stock de una piscina infinita en Grecia */
  background-image: url("https://images.unsplash.com/photo-1533105079780-92b9be482077?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  height: 85vh;
}

.hero-overlay {
  background-color: rgba(
    15,
    42,
    74,
    0.4
  ); /* Filtro azulado suave para legibilidad del texto */
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-contenido {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 4rem;
  color: var(--blanco);
}

.hero-contenido h1 {
  color: var(--blanco);
  font-size: 5.5rem;
  margin-bottom: 2rem;
}
.hero-contenido h1 .serif {
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 400;
}
.hero-contenido p {
  font-size: 2rem;
  max-width: 60rem;
  margin-bottom: 4rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

/* BOTONES */
.btn-principal {
  display: inline-block;
  background-color: var(--azul-egeo);
  color: var(--blanco);
  text-decoration: none;
  padding: 1.5rem 4rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.btn-principal:hover {
  background-color: var(--texto-oscuro);
}

/* SECCIONES Y GRIDS */
.seccion-blanca {
  padding: 10rem 2rem;
  background-color: var(--fondo-limpio);
}
.seccion-arena {
  padding: 10rem 2rem;
  background-color: var(--arena-suave);
}
.contenedor {
  max-width: 110rem;
  margin: 0 auto;
}
.contenedor-corto {
  max-width: 90rem;
  margin: 0 auto;
}
.subtitulo-seccion {
  text-align: center;
  font-size: 1.8rem;
  margin-top: -4rem;
  margin-bottom: 6rem;
  color: var(--gris-suave);
}

.grid-beneficios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 4rem;
  margin-top: 6rem;
}

.beneficio {
  background: var(--blanco);
  padding: 4rem 3rem;
  border-bottom: 3px solid var(--arena-suave);
}

/* PROYECTOS (Tarjetas limpias, sin bordes toscos) */
.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(45rem, 1fr));
  gap: 4rem;
}

.tarjeta-proyecto {
  background-color: var(--blanco);
  box-shadow: 0 10px 30px rgba(26, 36, 48, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.foto-proyecto {
  height: 28px; /* Altura ideal */
  min-height: 250px;
  background-size: cover;
  background-position: center;
}

.info-proyecto {
  padding: 3rem;
}
.info-proyecto p {
  color: var(--gris-suave);
  margin-bottom: 2rem;
  font-size: 1.5rem;
}
.info-proyecto a {
  text-decoration: none;
  color: var(--azul-egeo);
  font-weight: 600;
  font-size: 1.5rem;
}

/* FORMULARIO PREMIUM */

#contacto {
  background-image: url("../img/AdobeStock_1330041912.jpeg");
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
  background-size: 100%;
  background-position-y: 10px;
}
.form-contenedor {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
  background-color: var(--arena-suave-80);
  border-radius: 10%;
}
.form-contenedor p {
  margin-bottom: 4rem;
  color: var(--azul-egeo);
  font-size: 1.7rem;
}

.form-premium {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.form-premium input,
.form-premium textarea {
  width: 100%;
  padding: 1.8rem;
  border: 1px solid rgba(15, 42, 74, 0.1);
  background-color: #fafafa;
  font-family: inherit;
  font-size: 1.5rem;
  outline: none;
}

.form-premium input:focus,
.form-premium textarea:focus {
  border-color: var(--azul-egeo);
  background-color: var(--blanco);
}

.form-premium textarea {
  height: 15rem;
  resize: none;
}

/* FOOTER */
.footer-premium {
  background-color: var(--azul-egeo);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 4rem 2rem;
  font-size: 1.4rem;
}

/* RESPONSIVE SENCILLO */
@media (max-width: 768px) {
  h1 {
    font-size: 3.8rem;
  }
  h2 {
    font-size: 2.8rem;
  }
  .nav-premium .links {
    display: none;
  } /* En producción harías tu menú hamburguesa anterior */
  .grid-proyectos {
    grid-template-columns: 1fr;
  }
}

/* CONTAINER DEL DROPDOWN */
.dropdown-idioma {
  position: relative;
  display: inline-block;
  margin-left: 3rem; /* Lo alinea con tus otros enlaces del menú */
}

/* BOTÓN PRINCIPAL */
.dropdown-btn {
  background: none;
  border: 1px solid var(--texto-oscuro);
  color: var(--texto-oscuro);
  padding: 0.8rem 1.6rem;
  font-size: 1.4rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.dropdown-btn:hover {
  background-color: var(--azul-egeo);
  border-color: var(--azul-egeo);
  color: var(--blanco);
}

/* CAJA DESPLEGABLE (OCULTA POR DEFECTO) */
.dropdown-content {
  display: none;
  position: absolute;
  right: 0; /* Lo alinea al borde derecho para que no se desborde la pantalla */
  background-color: var(--blanco);
  min-width: 14rem;
  box-shadow: 0px 8px 16px 0px rgba(15, 42, 74, 0.08);
  border: 1px solid var(--arena-suave);
  z-index: 1100;
  margin-top: 0.5rem;
}

/* ENLACES DENTRO DEL DROPDOWN */
.dropdown-content a {
  color: var(--texto-oscuro) !important;
  padding: 1.2rem 1.6rem;
  text-decoration: none;
  display: block !important;
  font-size: 1.4rem;
  margin-left: 0 !important; /* Resetea el margen de los enlaces normales del nav */
  transition: background-color 0.2s ease;
}

/* EFECTO HOVER EN LAS OPCIONES */
.dropdown-content a:hover {
  background-color: var(--arena-suave);
  color: var(--azul-egeo) !important;
}

/* MOSTRAR MENÚ AL PASAR EL RATÓN */
.dropdown-idioma:hover .dropdown-content {
  display: block;
}
