/* =========================================
   Linda Mwananchi — Services
   ========================================= */

.services {
  --services-blue: #287bf3;
  --services-card: #12151a;
  --services-card-border: rgba(255, 255, 255, 0.72);
  --services-white: #ffffff;
  --services-text: #c7cbd3;
  --services-orange: #35C392;

  width: 100%;
  min-height: 100vh;
  padding: clamp(4rem, 7vw, 7rem) 0;

  color: var(--services-white);
  background: #435FFF;

  font-family: "Geneva", Tahoma, Verdana, sans-serif;
}

.services *,
.services *::before,
.services *::after {
  box-sizing: border-box;
}

.services__wrap {
  width: min(calc(100% - 2rem), 1180px);
  margin-inline: auto;
}

/* Section heading */

.services__header {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.services__title {
  margin: 0;

  color: var(--services-white);

  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.services__subtitle {
  margin: 0.8rem auto 0;

  color: rgba(255, 255, 255, 0.88);

  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  font-weight: 600;
  line-height: 1.6;
}

/* 2 × 2 services grid */

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);

  margin-top: clamp(3.5rem, 7vw, 6rem);
}

/* Service cards */

.service-card {
  min-width: 0;
  min-height: 620px;

  display: flex;
  flex-direction: column;

  padding: clamp(1.7rem, 3.5vw, 3rem);

  background: var(--services-card);
  border: 1px solid var(--services-card-border);
  border-radius: 1.4rem;

  box-shadow:
    0 20px 28px rgba(0, 0, 0, 0.34),
    0 8px 14px rgba(0, 0, 0, 0.2);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.service-card:hover {
  border-color: #35C392;

  box-shadow:
    0 25px 34px rgba(0, 0, 0, 0.4),
    0 10px 18px rgba(0, 0, 0, 0.22);

  transform: translateY(-4px);
}

/* Icon container */

.service-card__icon-wrap {
  width: 94px;
  height: 94px;

  display: grid;
  place-items: center;

  margin: 0 auto 1.6rem;

  color: var(--services-orange);
  background: #0f1216;
  border: 1px solid rgba(255, 101, 0, 0.3);
  border-radius: 50%;
}

/* Card body */

.service-card__body {
  width: 100%;

  display: flex;
  flex: 1;
  flex-direction: column;
}

.service-card__title {
  min-height: 2.4em;
  max-width: 24ch;

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

  margin: 0 auto;

  color: var(--services-white);

  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.service-card__tagline {
  margin: 0.8rem 0 0;

  color: var(--services-orange);

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
}

.service-card__description {
  max-width: 54ch;
  margin: 1.15rem auto 1.8rem;

  color: var(--services-text);

  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

/* Service details */

.service-card__details {
  padding-top: 1.4rem;

  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.service-card__details h3 {
  margin: 0 0 1rem;

  color: var(--services-white);

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-card__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;

  margin: 0;
  padding: 0;

  list-style: none;
}

.service-card__list li {
  position: relative;
  min-width: 0;

  padding-left: 1.45rem;

  color: var(--services-text);

  font-size: 0.88rem;
  line-height: 1.55;
}

.service-card__list li::before {
  content: "";

  position: absolute;
  top: 0.28rem;
  left: 0;

  width: 0.48rem;
  height: 0.8rem;

  border: solid var(--services-orange);
  border-width: 0 2px 2px 0;

  transform: rotate(45deg);
}

/* Outcome */

.service-card__outcome {
  margin: 1.7rem 0 1.3rem;
  padding: 1rem 1.1rem;

  background: rgba(255, 255, 255, 0.045);
  border-left: 3px solid var(--services-orange);
  border-radius: 0 0.7rem 0.7rem 0;
}

.service-card__outcome strong {
  color: var(--services-orange);

  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-card__outcome p {
  margin: 0.35rem 0 0;

  color: var(--services-text);

  font-size: 0.88rem;
  line-height: 1.55;
}

/* Call-to-action */

.service-card__link {
  min-height: 46px;

  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.65rem;

  margin-top: auto;

  color: var(--services-white);

  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: solid 2px yellow;
}

.service-card__link span {
  color: var(--services-orange);
  font-size: 1.3rem;

  transition: transform 180ms ease;
}

.service-card__link:hover {
  color: var(--services-orange);
}

.service-card__link:hover span,
.service-card__link:focus-visible span {
  transform: translateX(0.35rem);
}

.service-card__link:focus-visible {
  outline: 3px solid var(--services-orange);
  outline-offset: 5px;
}

/* =========================================
   Pure CSS service icons
   ========================================= */

.service-icon,
.service-icon i {
  display: block;
  box-sizing: border-box;
}

.service-icon {
  position: relative;

  width: 50px;
  height: 50px;
}

/* Membership icon */

.service-icon--people i {
  position: absolute;
  top: 7px;

  width: 14px;
  height: 14px;

  border: 2px solid currentColor;
  border-radius: 50%;
}

.service-icon--people i::after {
  content: "";

  position: absolute;
  top: 15px;
  left: 50%;

  width: 18px;
  height: 15px;

  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;

  transform: translateX(-50%);
}

.service-icon--people i:nth-child(1) {
  top: 13px;
  left: 0;
}

.service-icon--people i:nth-child(2) {
  left: 18px;
  z-index: 1;
}

.service-icon--people i:nth-child(3) {
  top: 13px;
  right: 0;
}

/* Coordination icon */

.service-icon--network::before,
.service-icon--network::after {
  content: "";

  position: absolute;
  top: 24px;
  left: 6px;

  width: 38px;
  height: 2px;

  background: currentColor;
}

.service-icon--network::after {
  transform: rotate(90deg);
}

.service-icon--network i {
  position: absolute;
  z-index: 1;

  width: 11px;
  height: 11px;

  background: var(--services-card);
  border: 2px solid currentColor;
  border-radius: 50%;
}

.service-icon--network i:nth-child(1) {
  top: 1px;
  left: 20px;
}

.service-icon--network i:nth-child(2) {
  top: 20px;
  right: 1px;
}

.service-icon--network i:nth-child(3) {
  bottom: 1px;
  left: 20px;
}

.service-icon--network i:nth-child(4) {
  top: 20px;
  left: 1px;
}

.service-icon--network i:nth-child(5) {
  top: 20px;
  left: 20px;
  background: currentColor;
}

/* Resource icon */

.service-icon--resources i {
  position: absolute;
  left: 5px;

  width: 40px;
  height: 14px;

  border: 2px solid currentColor;
  border-radius: 50%;
}

.service-icon--resources i:nth-child(1) {
  top: 5px;
}

.service-icon--resources i:nth-child(2) {
  top: 18px;
}

.service-icon--resources i:nth-child(3) {
  top: 31px;
}

/* International engagement icon */

.service-icon--globe {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.service-icon--globe::before {
  content: "";

  position: absolute;
  inset: 7px 15px;

  border: 2px solid currentColor;
  border-top: 0;
  border-bottom: 0;
  border-radius: 50%;
}

.service-icon--globe::after {
  content: "";

  position: absolute;
  top: 23px;
  right: 3px;
  left: 3px;

  height: 2px;

  background: currentColor;

  box-shadow:
    0 -11px 0 -0.5px currentColor,
    0 11px 0 -0.5px currentColor;
}

/* =========================================
   Tablet and mobile
   ========================================= */

@media (max-width: 900px) {
  .services {
    padding: 4rem 0;
  }

  .services__grid {
    grid-template-columns: 1fr;
    max-width: 680px;
    margin-inline: auto;
  }

  .service-card {
    min-height: auto;
  }
}

@media (max-width: 600px) {
  .services__wrap {
    width: min(calc(100% - 1.25rem), 1180px);
  }

  .services__title {
    font-size: clamp(2.2rem, 11vw, 3.3rem);
  }

  .services__subtitle {
    font-size: 0.95rem;
  }

  .services__grid {
    margin-top: 3rem;
  }

  .service-card {
    padding: 1.5rem 1.2rem;
    border-radius: 1.1rem;
  }

  .service-card__icon-wrap {
    width: 82px;
    height: 82px;
  }

  .service-icon {
    transform: scale(0.84);
  }

  .service-card__title {
    min-height: 0;
    font-size: 1.45rem;
  }

  .service-card__list {
    grid-template-columns: 1fr;
  }

  .service-card__link {
    width: 100%;
    justify-content: space-between;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card__link span {
    transition: none;
  }
}