/* =====================
   Tipografías base
===================== */
body {
  margin: 0;
  font-family: "Inter", sans-serif;
}

/* =====================
   Fondo general
===================== */
.hero {
  min-height: 100vh;
  background-color: #111; /* fondo oscuro */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Fondo exclusivo de inicio */
.hero-index {
  background-image: url("../img/FondoIndex.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Media queries para fondo */
@media (min-width: 1920px) {
  .hero-index {
    background-size: contain;
    background-position: center top;
  }
}

@media (max-width: 768px) {
  .hero-index {
    background-size: cover;
    background-position: center top;
  }
}

/* =====================
   Menú siempre arriba y centrado
===================== */
nav {
  position: absolute; /* siempre sobre el hero */
  top: 20px;
  left: 50%;          /* centro horizontal */
  transform: translateX(-50%);
  display: flex;
  gap: 20px;          /* espacio entre enlaces */
  z-index: 10;        /* sobre hero */
  pointer-events: auto; /* enlaces clickeables */
}

nav a {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  letter-spacing: 1px;
  color: white;
  text-decoration: none;
  font-size: 16px;     /* base para escritorio y móvil */
  padding: 8px 12px;   /* área de toque suficiente */
  display: inline-block;
}

nav a:hover {
  opacity: 0.7;
}

nav a.activo {
  opacity: 1;
  border-bottom: 1px solid white;
  padding-bottom: 4px;
}

/* =====================
   Contenedor general
===================== */
.container {
  max-width: 720px;
  margin: auto;
  padding-left: 30px;
  padding-right: 30px;
  position: relative;
  z-index: 2;
  color: white;
}

/* =====================
   Títulos y texto
===================== */
h1 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 300;
  font-size: 40px;
  margin-bottom: 40px;
}

p {
  line-height: 1.7;
  color: #e6e6e6;
}

/* =====================
   Portfolio
===================== */
.proyecto {
  margin-bottom: 60px;
}

.proyecto h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 10px;
}

iframe {
  width: 100%;
  height: 120px;
  border: 0;
}

/* =====================
   Contacto
===================== */
.contacto {
  font-size: 18px;
  line-height: 1.8;
}

.contacto a {
  color: white;
  text-decoration: none;
}

.contacto a:hover {
  opacity: 0.7;
}

/* =====================
   Página general
===================== */
.page-content {
  padding-top: 180px;
  padding-bottom: 120px;
}

/* =====================
   Ajustes para móviles
===================== */
@media (max-width: 768px) {

  /* Hero y contenedor */
  .hero, .hero-index {
    flex-direction: column;
    align-items: center;
  }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Títulos y párrafos */
  h1 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
  }

  p {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Portfolio */
  .proyecto h2 {
    font-size: 20px;
  }

  iframe {
    height: 160px;
  }

  /* Contacto */
  .contacto {
    font-size: 16px;
  }

  /* Ajustes de padding general */
  .page-content {
    padding-top: 140px;
    padding-bottom: 80px;
  }

  /* Menú en móvil */
  nav {
    top: 15px;   /* un poco más cerca del borde superior */
    gap: 12px;   /* reduce espacio entre enlaces */
  }

  nav a {
    font-size: 18px;
    padding: 8px 12px;
  }
}