/* 17. Services page
   ========================================================================== */

.services-page {
  background: var(--color-red-dark);
  color: var(--color-white);
}

.services-page .main-nav a[aria-current="page"] {
  color: var(--color-red);
}

.services-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 50svh;
  min-height: 420px;
}

.service-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: var(--header-height) 40px 40px;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.service-panel::before,
.service-panel::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  transition: opacity var(--transition-default);
}

.service-panel::before {
  background: rgb(0 0 0 / 18%);
}

.service-panel::after {
  background:
    linear-gradient(180deg, rgb(127 0 0 / 50%) 0%, rgb(229 0 0 / 34%) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 20%) 0%, rgb(0 0 0 / 20%) 100%);
  opacity: 0;
}

.service-panel:hover::after,
.service-panel:focus-visible::after {
  opacity: 1;
}

.service-panel:hover::before,
.service-panel:focus-visible::before {
  opacity: 0;
}

.service-oil-gas {
  background-image: url("/servicios/img/oil-gas.png");
}

.service-mining {
  background-image: url("/servicios/img/mineria.png");
}

.service-panel > img {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
}

.service-panel h1,
.service-panel h2 {
  position: relative;
  z-index: 1;
  width: min(419px, 100%);
  margin: 0;
  color: var(--color-white);
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-align: center;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: 50svh;
    min-height: 420px;
  }

  .service-panel {
    height: 100%;
    min-height: 0;
    padding: var(--header-height) 24px 32px;
  }
}

@media (max-width: 580px) {
  .services-grid {
    min-height: 360px;
  }

  .service-panel {
    height: 100%;
    min-height: 0;
    gap: 14px;
    padding-inline: 12px;
  }

  .service-panel > img {
    width: 46px;
    height: 46px;
  }

  .service-panel h1,
  .service-panel h2 {
    font-size: 30px;
  }
}

