:root {
  --blue: #0157d0;
  --blue-hover: #0048ad;

  --red: #ff3131;

  --dark: #151923;
  --hero-dark: #202731;
  --hero-dark-light: #303844;

  --gray: #687181;
  --light-gray: #f5f7fa;

  --border: #dce2e9;
  --white: #ffffff;

  --water: #0284c7;
  --water-light: #e0f2fe;

  --electric: #ca8a04;
  --electric-light: #fef3c7;

  --sewer: #f97316;
  --sewer-light: #ffedd5;

  --drainage: #64748b;
  --drainage-light: #f1f5f9;

  --formed-electric: #9333ea;
  --formed-electric-light: #f3e8ff;

  --formed-water: #db2777;
  --formed-water-light: #fce7f3;
}


/* =========================
   CONFIGURACIÓN GENERAL
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  color: var(--dark);
  background: var(--white);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}


/* =========================
   ENCABEZADO
========================= */

.header {
  position: relative;
  z-index: 20;

  width: 100%;
  height: 86px;

  padding: 0 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #f9fafc;
  border-top: 3px solid #243647;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo {
  width: 82px;
  height: auto;
}

.menu-btn {
  padding: 0;

  border: none;
  background: transparent;

  color: #111111;

  font-size: 30px;
  line-height: 1;

  cursor: pointer;
}


/* =========================
   PORTADA
========================= */

.hero {
  min-height: 350px;

  display: flex;
  align-items: center;

  padding: 54px 18px;

  color: var(--white);

  background:
    linear-gradient(
      135deg,
      var(--hero-dark-light) 0%,
      var(--hero-dark) 58%,
      #1e252e 100%
    );
}

.hero-content {
  width: 100%;
  max-width: 520px;
}

.hero-tag {
  display: inline-block;

  margin-bottom: 18px;

  color: #9dc7ff;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2.5px;
}

.hero h1 {
  max-width: 500px;

  color: var(--white);

  font-size: 31px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
}

.hero h1 strong {
  display: block;

  color: #7cb4ff;
  font-weight: 800;
}

.hero p {
  max-width: 440px;

  margin-top: 20px;

  color: #d2d7df;

  font-size: 14px;
  line-height: 1.65;
}


/* =========================
   BUSCADOR
========================= */

.search-box {
  width: 100%;
  max-width: 475px;
  height: 48px;

  margin-top: 28px;

  display: flex;

  overflow: hidden;

  background: var(--white);
  border-radius: 12px;
}

.search-box input {
  min-width: 0;
  flex: 1;

  padding: 0 15px;

  border: none;
  outline: none;

  color: var(--dark);
  background: var(--white);

  font-size: 13px;
}

.search-box input::placeholder {
  color: #929baa;
}

.search-box button {
  min-width: 82px;

  padding: 0 17px;

  border: none;

  color: var(--white);
  background: var(--blue);

  font-size: 12px;
  font-weight: 800;

  cursor: pointer;
  transition: background 0.2s ease;
}

.search-box button:hover {
  background: var(--blue-hover);
}


/* =========================
   BOTONES DE PORTADA
========================= */

.hero-actions {
  margin-top: 18px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 10px;
}

.btn-primary,
.btn-outline {
  min-height: 42px;

  padding: 0 16px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;

  font-size: 12px;
  font-weight: 800;

  text-decoration: none;
  transition: 0.2s ease;
}

.btn-primary {
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--white);
}

.btn-primary:hover {
  color: var(--blue);
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--white);

  background: transparent;
  border: 1px solid #66717f;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}


/* =========================
   CONTENIDO
========================= */

.content {
  width: 100%;

  padding: 58px 18px 70px;

  background: var(--white);
}

.section-label {
  display: block;

  color: var(--blue);

  font-size: 9px;
  font-weight: 900;
  letter-spacing: 4px;
}

.content > h2 {
  margin-top: 12px;

  color: var(--dark);

  font-size: 27px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.7px;
}

.intro {
  max-width: 650px;

  margin-top: 13px;

  color: var(--gray);

  font-size: 14px;
  line-height: 1.6;
}


/* =========================
   GRUPOS DE CATEGORÍAS
========================= */

.category-section {
  margin-top: 34px;
}

.group-title {
  margin-bottom: 18px;

  display: flex;
  align-items: center;

  gap: 10px;
}

.group-title span {
  width: 22px;
  height: 2px;

  flex-shrink: 0;

  background: var(--red);
}

.group-title h3 {
  color: #596475;

  font-size: 10px;
  font-weight: 900;
  letter-spacing: 3px;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;

  gap: 18px;
}


/* =========================
   TARJETAS
========================= */

.category-card {
  min-width: 0;
  min-height: 160px;

  padding: 22px;

  display: flex;
  flex-direction: column;
  align-items: flex-start;

  background: var(--white);

  border: 1px solid var(--border);
  border-radius: 16px;

  box-shadow:
    0 8px 22px rgba(15, 23, 42, 0.07);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-2px);

  border-color: #cbd5e1;

  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.1);
}

.category-card h3 {
  margin-top: 14px;

  color: var(--dark);

  font-size: 15px;
  font-weight: 800;
}

.category-card p {
  margin-top: 9px;
  margin-bottom: 14px;

  color: var(--gray);

  font-size: 12px;
  line-height: 1.55;
}

.category-link {
  margin-top: auto;

  display: inline-flex;
  align-items: center;

  color: var(--blue);

  font-size: 12px;
  font-weight: 800;

  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.category-link:hover {
  color: var(--blue-hover);
  transform: translateX(3px);
}


/* =========================
   ÍCONOS DE CATEGORÍAS
========================= */

.category-icon {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.icon-water {
  color: var(--water);
  background: var(--water-light);
}

.icon-electric {
  color: var(--electric);
  background: var(--electric-light);
}

.icon-sewer {
  color: var(--sewer);
  background: var(--sewer-light);
}

.icon-drainage {
  color: var(--drainage);
  background: var(--drainage-light);
}

.icon-electric-formed {
  color: var(--formed-electric);
  background: var(--formed-electric-light);
}

.icon-water-formed {
  color: var(--formed-water);
  background: var(--formed-water-light);
}


/* =========================
   MENÚ LATERAL
========================= */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;

  background: rgba(0, 0, 0, 0.38);

  opacity: 0;
  visibility: hidden;

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -100%;
  z-index: 60;

  width: 85%;
  max-width: 340px;
  height: 100vh;

  padding: 28px 25px;

  display: flex;
  flex-direction: column;

  gap: 27px;

  background: var(--white);

  box-shadow:
    -10px 0 30px rgba(0, 0, 0, 0.16);

  transition: right 0.3s ease;
}

.side-menu.active {
  right: 0;
}

.close-menu {
  align-self: flex-end;

  border: none;
  background: transparent;

  color: var(--dark);

  font-size: 38px;
  line-height: 1;

  cursor: pointer;
}

.side-menu a {
  color: #626b78;

  font-size: 18px;
  font-weight: 700;

  text-decoration: none;
}

.side-menu a:hover {
  color: var(--blue);
}


/* =========================
   TABLET
========================= */

@media (min-width: 600px) {

  .hero {
    min-height: 380px;
    padding: 65px 45px;
  }

  .content {
    padding:
      70px
      45px
      85px;
  }

  .categories-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================
   ESCRITORIO
========================= */

@media (min-width: 900px) {

  .header {
    height: 96px;
    padding: 0 70px;
  }

  .logo {
    width: 110px;
  }

  .hero {
    min-height: 405px;

    padding:
      62px
      70px;
  }

  .hero-content {
    max-width: 560px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero p {
    font-size: 15px;
  }

  .content {
    max-width: 1800px;

    margin: 0 auto;

    padding:
      82px
      70px
      95px;
  }

  .content > h2 {
    font-size: 31px;
  }

  .intro {
    font-size: 14px;
  }

  .category-section {
    margin-top: 38px;
  }

  .categories-grid {
    gap: 24px;
  }

  .category-card {
    min-height: 170px;
    padding: 24px;
  }

  .category-card h3 {
    font-size: 16px;
  }

  .category-card p {
    font-size: 13px;
  }

  .category-link {
    font-size: 13px;
  }

}


/* =========================
   PANTALLAS GRANDES
========================= */

@media (min-width: 1300px) {

  .hero {
    padding-left: 90px;
    padding-right: 90px;
  }

  .content {
    padding-left: 90px;
    padding-right: 90px;
  }

}