/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Fondos */
  --fondoPrincipal: url('/img/fondoPrincipal.webp');
  --fondoSecundario: url('/img/fondoSecundario.webp');

  /* Colores que se repiten */
  --colorTexto: #2c3e50;
  --colorTextoSecundario: #555;
  --colorBlanco: white;
  --colorFondo: #f4f8fc;
  --colorEnlace: #2646e2;

  /* Valores que se repiten */
  --radio-bordes: 20px;
  --espaciado-estandar: 20px;
  --gradiente-oscuro: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
}

body {
  font-family: 'Public Sans', sans-serif;
  background-color: var(--colorFondo);
  color: #2b2d42;
  line-height: 1.6;
}

.hero-section {
  padding: 24px;
  border-radius: var(--radio-bordes);
  margin: 10px;
}

/* ========== MAIN CONTAINER ========== */
main {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Opcional: ajustar los márgenes de las secciones dentro del main */
main .hero-section {
  margin-left: 10px;
  margin-right: 10px;
}

/* Header */
.header {
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
  padding: 24px;
  position: absolute;
  width: calc(100% - 20px);
  margin: 10px;
  z-index: 1000;
}

.header__logo {
  height: 80px;
}

.menu-icon {
  height: 50px;
  cursor: pointer;
}

/* Menú desktop */
.header__nav {
  display: none;
}

.header__nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.header__nav-link {
  color: var(--colorBlanco);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  padding: 10px 20px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.header__nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.header__nav-link--active {
  background-color: var(--colorEnlace);
  box-shadow: 0 2px 8px rgba(38, 70, 226, 0.3);
}

/* Hero Contact */
.hero-banner {
  background:
    var(--gradiente-oscuro),
    var(--fondoPrincipal);
  color: white;
  background-color: #2b2d42;
  padding: 24px;
  padding-top: 120px;
  border-radius: var(--radio-bordes);
  margin: 10px;
  text-align: left;
  background-size: cover;
  background-position: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-banner__title {
  font-size: 32px;
  margin-bottom: 20px;
}

.hero-banner__description {
  font-size: 18px;
  max-width: 600px;
}

/* Sección de trabajos realizados */
.hero-work {
  background-color: white;
  color: var(--colorTexto);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-work:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-work__title {
  font-size: 1.8rem;
  text-align: center;
  color: var(--colorTexto);
}

.hero-work__text {
  display: block;
  margin-bottom: 10px;
}

.hero-work img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-work img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE DESIGN */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) {
  .hero-section {
    padding: 32px;
    margin: 15px;
  }

  .hero-banner {
    margin: 15px;
    padding: 40px;
    padding-top: 140px;
    min-height: 350px;
    text-align: center;
  }

  .hero-banner__title {
    font-size: 42px;
  }

  .hero-banner__description {
    font-size: 20px;
    margin: 0 auto;
  }

  /* Galería de trabajos en 2 columnas */
  .hero-work {
    margin: 32px 15px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .hero-work h2 {
    grid-column: 1 / -1;
    font-size: 2.2rem;
  }

  .hero-work__title {
    grid-column: 1 / -1;
    font-size: 2.2rem;
  }

  .hero-work__text {
    grid-column: 1 / -1;
  }

  .hero-work img {
    height: 220px;
  }

  main .hero-section {
    margin-left: 15px;
    margin-right: 15px;
  }
}

/* Desktop pequeño (1024px - 1199px) */
@media (min-width: 1024px) {
  .header {
    padding: 24px 40px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(18px);
    margin: 20px 40px;
    border-radius: 18px;
    width: calc(100% - 82px);
  }

  .menu-icon {
    display: none;
  }

  .header__nav {
    display: block;
  }

  .hero-section {
    padding: 40px;
    margin: 20px 40px;
  }

  .hero-banner {
    margin: 20px 40px;
    padding: 60px;
    padding-top: 160px;
    min-height: 400px;
  }

  .hero-banner__title {
    font-size: 48px;
  }

  .hero-banner__description {
    font-size: 22px;
    margin: 0 auto;
  }

  /* Galería de trabajos en 3 columnas */
  .hero-work {
    margin: 40px 40px;
    padding: 50px;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
  }

  .hero-work h2 {
    font-size: 2.2rem;
  }

  .hero-work__title {
    font-size: 2.2rem;
  }

  .hero-work img {
    height: 250px;
  }

  main .hero-section {
    margin-left: 40px;
    margin-right: 40px;
  }
}

/* Desktop grande (1200px+) */
@media (min-width: 1200px) {
  .header {
    padding: 24px 60px;
    width: calc(100% - 104px);
    margin: 20px 52px;
  }

  .hero-section {
    padding: 50px;
    margin: 20px 52px;
  }

  .hero-banner {
    margin: 20px 52px;
    padding: 50px;
    padding-top: 150px;
    min-height: 450px;
  }

  .hero-banner__title {
    font-size: 54px;
  }

  .hero-banner__description {
    font-size: 24px;
    margin: 0 auto;
  }

  /* Galería de trabajos en 4 columnas */
  .hero-work {
    margin: 50px 75px;
    padding: 60px;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
  }

  .hero-work h2 {
    font-size: 2.8rem;
  }

  .hero-work__title {
    font-size: 2.8rem;
  }

  .hero-work img {
    height: 280px;
  }

  main .hero-section {
    margin-left: 75px;
    margin-right: 75px;
  }
}

/* Animaciones suaves */
.hero-section {
  transition: all 0.3s ease;
}

.hero-work img {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-work img:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}