/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --fondoPrincipal: url('/img/fondoPrincipal.webp');
  --fondoSecundario: url('/img/fondoSecundario.webp');

  --colorTexto: #2c3e50;
  --colorTextoSecundario: #555;
  --colorBlanco: white;
  --colorFondo: #f4f8fc;
  --colorEnlace: #2646e2;

  --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;
}

/* ========== 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 */
.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;
  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;
}

.hero-section {
  padding: 24px;
  border-radius: var(--radio-bordes);
  margin: 10px;
}

/* Productos/Servicios */
.hero-products {
  background-color: white;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 24px 10px;
  color: var(--colorTexto);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-products:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Service Cards */
.service-card {
  display: block;
  text-decoration: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #d4d4d4;
  position: relative;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card__image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__image {
  transform: scale(1.05);
}

.service-card p {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: white;
  font-weight: 700;
  font-size: 32px;
  text-align: center;
  padding: 20px 15px;
  margin: 0;
  vertical-align: middle;
}

/* Tablet */
@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;
  }

  .hero-products {
    margin: 32px 15px;
    padding: 40px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .service-card {
    height: 415px;
  }

  main .hero-section {
    margin-left: 15px;
    margin-right: 15px;
  }
}

/* Desktop */
@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;
  }

  .hero-products {
    margin: 40px 40px;
    padding: 50px;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  main .hero-section {
    margin-left: 40px;
    margin-right: 40px;
  }
}

/* Desktop grande */
@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;
  }

  .hero-products {
    margin: 50px 75px;
    padding: 60px;
    max-width: 1400px;
  }

  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
  }

  .service-card {
    height: auto;
  }

  .service-card p {
    font-size: 20px;
    padding: 25px 20px;
  }

  main .hero-section {
    margin-left: 75px;
    margin-right: 75px;
  }
}

/* Hover improvements */
@media (hover: hover) {
  .service-card:hover {
    transform: translateY(-8px) scale(1.02);
  }
}