/* =========================================================
   VARIABLES
========================================================= */

:root {
  --navy: #091d31;
  --blue: #284d6d;
  --gold: #c5a067;
  --ink: #1c405d;
  --page: 1180px;
}


/* =========================================================
   RESET / BASE
========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Montserrat", Arial, sans-serif;
  line-height: 1.55;
}

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

a,
button {
  font: inherit;
}

.page-width {
  width: min(var(--page), calc(100% - 48px));
  margin-inline: auto;
}


/* =========================================================
   HERO
========================================================= */

.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 525px;
  isolation: isolate;

  background:
    var(--navy) url("images/BANNER-PRINCIPAL.png")
    center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(
      90deg,
      rgba(4, 24, 43, 0.94),
      rgba(4, 24, 43, 0.65) 54%,
      rgba(4, 24, 43, 0.12)
    );
}

.hero__content {
  padding-block: 62px;
  color: white;
}

.hero h1 {
  margin: 0;

  font:
    500 clamp(2.8rem, 5.2vw, 5.2rem) / 1.1
    "Cormorant Garamond",
    Georgia,
    serif;
}

.hero h1 span {
  display: inline-block;
  width: 120px;
  height: 4px;
  margin: 0 0 0.25em 22px;

  background: white;
  border-radius: 3px;
}

.hero h1 strong {
  color: #f1cb73;
  font-weight: 600;
}

.hero__content > p {
  display: inline-block;

  margin: 28px 0 0;
  padding: 5px 20px 8px;

  color: white;
  background: rgba(1, 9, 18, 0.9);

  font-size: clamp(1.35rem, 2.3vw, 2.15rem);
  font-weight: 300;
}


/* =========================================================
   INTRO
========================================================= */

.intro {
  padding-block: 48px 52px;
  text-align: center;
}

.intro h2 {
  margin: 0 0 14px;

  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  text-transform: uppercase;
}

.intro h2 strong {
  color: #b28e62;
}

.intro p {
  max-width: 920px;
  margin: 0 auto;

  font-size: clamp(1rem, 1.7vw, 1.35rem);
}


/* =========================================================
   EXPERTISE
========================================================= */

.expertise {
  display: grid;
  align-items: center;
  min-height: 520px;

  background:
    #f4f3f0 url("images/Banner-2.png")
    center / cover no-repeat;
}

.expertise__inner {
  display: flex;
}

.expertise__copy {
  width: 52%;
  padding: 44px 48px 44px 0;

  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.97),
      rgba(255, 255, 255, 0.79),
      transparent
    );
}

.expertise__copy p {
  margin: 0;

  font-size: clamp(1.2rem, 2.1vw, 1.75rem);
}


/* =========================================================
   SECTION HEADING
========================================================= */

.section-heading {
  padding: 24px;

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

  text-align: center;
}

.section-heading h2 {
  margin: 0;

  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  font-weight: 300;
  line-height: 1.35;
  text-transform: uppercase;
}


/* =========================================================
   SERVICES
========================================================= */

.service {
  display: grid;
  align-items: center;
  min-height: 580px;

  background-position: center;
  background-size: cover;
}

.service--contracts {
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.95) 0 38%,
      transparent 66%
    ),
    url("images/Contratos de Prestación de Servicios Médicos.jpg");
}

.service--consent {
  background-image:
    linear-gradient(
      90deg,
      transparent 34%,
      rgba(255, 255, 255, 0.15)
    ),
    url("images/Consentimientos Informados.jpg");
}

.service__content {
  display: flex;
}

.service--consent .service__content {
  justify-content: flex-end;
}

.service__card {
  width: min(760px, 72%);
  color: white;
}

.service__card h3 {
  margin: 0;
  padding: 14px 28px;

  background: rgba(2, 16, 31, 0.96);

  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.service--consent .service__card h3 {
  text-align: right;
}

.service__card p {
  margin: 0 0 22px;
  padding: 18px 28px;

  background: rgba(27, 68, 100, 0.94);

  font-size: clamp(1rem, 1.7vw, 1.3rem);
}

.service__card p + p {
  background: rgba(27, 68, 100, 0.96);
}


/* =========================================================
   WHY / POR QUÉ ELEGIRNOS
========================================================= */

.why {
  position: relative;
  padding: 72px 0;

  isolation: isolate;
  text-align: center;

  background:
    #f5f4f2 url("images/Por Qué Elegir Nuestros Servicios.png")
    center / cover no-repeat;
}

.why::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: rgba(255, 255, 255, 0.77);
}

.why h2 {
  margin: 0 0 26px;

  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  text-transform: uppercase;
}

.why p {
  max-width: 980px;
  margin: 8px auto;

  font-size: clamp(1rem, 1.7vw, 1.28rem);
}


/* =========================================================
   BENEFITS
========================================================= */

.benefits {
  padding: 62px 0 52px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #2b5272,
      #163750
    );
}

.benefits h2 {
  margin: 0 0 48px;

  text-align: center;

  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  text-transform: capitalize;
}

.benefits h2 span,
.benefit h3 {
  color: #f0c966;
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.benefit {
  padding: 18px;

  border-radius: 18px;
  outline: none;

  text-align: center;
  cursor: pointer;

  opacity: 0.24;
  filter: saturate(0.3);
  transform: scale(0.96);

  transition:
    opacity 0.65s,
    filter 0.65s,
    transform 0.65s,
    background 0.65s;
}

.benefit.is-active,
.benefit:hover,
.benefit:focus-visible {
  opacity: 1;
  filter: none;
  transform: scale(1);

  background: rgba(255, 255, 255, 0.06);
}

.benefit:focus-visible {
  box-shadow: 0 0 0 3px var(--gold);
}

.benefit img {
  width: 152px;
  aspect-ratio: 1;
  margin: 0 auto 22px;

  object-fit: contain;
}

.benefit h3 {
  min-height: 2.8em;
  margin: 0 0 14px;

  font-size: 1.12rem;
}

.benefit p {
  margin: 0;

  font-size: 0.9rem;
}


/* =========================================================
   BENEFITS CONTROLS
========================================================= */

.benefits__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;

  margin-top: 34px;
}

.benefits__controls button {
  width: 42px;
  height: 42px;

  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;

  color: white;
  background: transparent;

  font-size: 1.2rem;
  cursor: pointer;
}

.benefits__controls button:hover,
.benefits__controls button:focus-visible {
  color: var(--blue);
  background: white;
  outline: none;
}

.benefits__dots {
  display: flex;
  gap: 8px;
}

.benefits__dots span {
  width: 8px;
  height: 8px;

  border-radius: 10px;

  background: rgba(255, 255, 255, 0.4);

  transition:
    width 0.3s,
    background 0.3s;
}

.benefits__dots span.is-active {
  width: 25px;
  background: #f0c966;
}


/* =========================================================
   CTA
========================================================= */

.cta {
  padding: 30px 0 42px;
  background: white;
}

.cta__inner {
  display: grid;
  grid-template-columns: 1fr 220px;
  align-items: center;
}

.cta p {
  margin: 0;
  padding: 32px 44px;

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

  border-right: 16px solid #b28e62;

  font-size: clamp(1rem, 1.7vw, 1.3rem);
}

.cta img {
  width: 230px;
  margin-left: -10px;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.sr-only {
  position: absolute;

  width: 1px;
  height: 1px;

  padding: 0;
  margin: -1px;

  overflow: hidden;

  clip: rect(0, 0, 0, 0);

  white-space: nowrap;

  border: 0;
}


/* =========================================================
   TABLET — 900px
========================================================= */

@media (max-width: 900px) {

  /* HERO */
  .hero {
    min-height: 440px;
  }


  /* EXPERTISE */
  .expertise {
    min-height: 430px;
    background-position: 60% center;
  }

  .expertise__copy {
    width: 64%;
  }


  /* SERVICES */
  .service {
    min-height: 510px;
  }

  .service__card {
    width: 82%;
  }


  /* BENEFITS */
  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================================================
   MOBILE — 640px
========================================================= */

@media (max-width: 640px) {

  /* BASE */
  .page-width {
    width: min(100% - 30px, var(--page));
  }


  /* HERO */
  .hero {
    min-height: 420px;
    background-position: 62% center;
  }

  .hero::after {
    background:
      linear-gradient(
        90deg,
        rgba(4, 24, 43, 0.96),
        rgba(4, 24, 43, 0.48)
      );
  }

  .hero h1 span {
    display: block;

    width: 92px;
    height: 3px;

    margin: 18px 0;
  }


  /* INTRO */
  .intro {
    padding-block: 38px;
  }


  /* EXPERTISE */
  .expertise {
    min-height: 380px;
    background-position: 68% center;
  }

  .expertise__copy {
    width: 82%;
    padding: 30px 20px 30px 0;
  }


  /* SECTION HEADING */
  .section-heading {
    padding: 20px 14px;
  }


  /* SERVICES */
  .service {
    min-height: 530px;

    align-items: end;

    padding-bottom: 24px;
  }

  .service--contracts,
  .service--consent {
    background-image:
      linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.75),
        transparent 65%
      ),
      var(--service-image);
  }

  .service--contracts {
    --service-image:
      url("images/Contratos de Prestación de Servicios Médicos.jpg");
  }

  .service--consent {
    --service-image:
      url("images/Consentimientos Informados.jpg");
  }

  .service__card {
    width: 100%;
  }

  .service--consent .service__card h3 {
    text-align: left;
  }

  .service__card h3,
  .service__card p {
    padding: 14px 18px;
  }


  /* WHY */
  .why {
    padding-block: 52px;
  }


  /* BENEFITS */
  .benefits__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .benefit {
    padding: 12px 8px;
  }

  .benefit img {
    width: 110px;
  }

  .benefit h3 {
    font-size: 0.95rem;
  }

  .benefit p {
    font-size: 0.78rem;
  }


  /* CTA */
  .cta__inner {
    grid-template-columns: 1fr 84px;
  }

  .cta p {
    padding: 24px 20px;
    border-right-width: 8px;
  }

  .cta img {
    width: 120px;
    margin-left: -8px;
  }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .benefit,
  .benefits__dots span {
    transition: none;
  }
}