/* ============================================================
   HOME PAGE — Page-specific styles
   Sections: Hero · Stats Bar · Why Join · Certifications · Community
   ============================================================ */

/* ============================================================
   4. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 628px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/banner-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-block: var(--space-16);
}

.hero-slider {
    position: relative;
    min-height: 628px;
}

/* Each slide sits on top of each other */
.hero-slide {
    position: absolute;
    inset: 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: all 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile-only background image — hidden on desktop */
.hero__mobile-img {
  display: none;
}

.hero__image-slot {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__img {
  width: 100%;
  max-width: 520px;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero__title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-medium);
  color: var(--clr-white);
  line-height: 1.1;
}

.hero__subtitle {
  font-size: var(--fs-md);
  font-weight: var(--fw-regular);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.hero__cta {
  margin-top: var(--space-2);
}

/* Carousel dots */
.hero__dots {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.hero__dot.active {
  background-color: var(--clr-white);
  width: 24px;
  border-radius: var(--radius-pill);
}

/* ============================================================
   5. STATS BAR
   ============================================================ */
.stats-bar {
  background-color: transparent;
  /* padding-block: var(--space-12); */
  padding-top: var(--space-12);
  padding-bottom: var(--space-6);
}

.stats-bar .container {
  background-color: var(--clr-brand-navy);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
}

.stat-card {
  padding: var(--space-8) var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-5);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card:nth-child(2),
.stat-card:nth-child(4) {
  border-right: none;
}

.stat-card:nth-child(3),
.stat-card:nth-child(4) {
  border-bottom: none;
}

.stat-card__number {
  font-family: "Roboto Mono", monospace;
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
}

.stat-card__number--orange  { color: var(--clr-orange); }
.stat-card__number--lavender { color: var(--clr-purple-light); }
.stat-card__number--green   { color: var(--clr-green); }
.stat-card__number--blue    { color: var(--clr-cyan); }

.stat-card__text {
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* ============================================================
   6. WHY JOIN CARD
   ============================================================ */
.why-join {
  background-color: var(--clr-page-bg);
  padding-block: var(--space-6);
}

.why-join .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.18);
  background: linear-gradient(
    135deg,
    #00284a 0%,
    #1a0a3d 49%,
    #4f17a8 77%,
    #ff6f00 100%
  );
}

.why-join__left {
  padding: var(--space-12) var(--space-10);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  justify-content: center;
  border-right: none;
  position: relative;
}

.why-join__left::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 70%;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.1);
}

.why-join__label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-regular);
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0;
}

.why-join__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  line-height: 1.25;
}

.why-join__title span {
  color: var(--clr-orange);
}

.why-join__body {
  font-size: var(--fs-base);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
}

.why-join__right {
  background: transparent;
  padding: var(--space-12) var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.why-join__bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.why-join__bullet {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.why-join__bullet-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--clr-orange);
  margin-top: 4px;
  flex-shrink: 0;
}

.why-join__bullet-title {
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--clr-white);
  line-height: 1.55;
  margin-bottom: var(--space-1);
}

.why-join__bullet-title strong {
  font-weight: var(--fw-bold);
}

.why-join__bullet-text {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.5;
}

/* ============================================================
   7. CERTIFICATIONS
   ============================================================ */
.certifications {
  background-color: var(--clr-page-bg);
  /* padding-block: var(--space-20); */
  padding-block: var(--space-6);
}

.certifications__header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-24);
  align-items: start;
  margin-bottom: var(--space-16);
}

.certifications__title {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-medium);
  color: var(--clr-brand-dark);
  line-height: 1.05;
}

.certifications__desc {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--clr-purple-mid);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  justify-content: flex-end;
}

.certifications__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.cert-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.cert-card--purple {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background-image: url("../images/certification_1.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.cert-card__desc {
  color: rgba(255, 255, 255, 0.8);
}

.cert-card__badge {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: white;
}

.cert-card--cream {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background-image: url("../images/certification_2.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.cert-card--teal {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background-image: url("../images/certification_3.png");
  background-size: cover;
  background-position: center;
  color: #ffffff;
}

.cert-card__top {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.cert-card__img {
  width: 60%;
  height: 100%;
  object-fit: contain;
  object-position: bottom right;
  display: block;
}

.cert-card__badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  background-color: transparent;
  color: var(--clr-white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1;
}

.cert-card__badge--dark {
  color: var(--clr-brand-dark);
  border-color: rgba(0, 0, 0, 0.25);
}

.cert-card__body {
  padding: var(--space-6) var(--space-6) var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cert-card__abbr {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.cert-card__abbr--purple { color: #c084fc; }
.cert-card__abbr--dark   { color: var(--clr-brand-dark); }
.cert-card__abbr--cyan   { color: var(--clr-teal); }

.cert-card__name {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  line-height: 1.25;
}

.cert-card__name--dark { color: var(--clr-brand-dark); }

.cert-card__tag {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: rgba(255, 255, 255, 0.9);
}

.cert-card__tag--dark { color: var(--clr-brand-dark); }

.cert-card__desc {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  flex: 1;
}

.cert-card__desc--dark { color: rgba(0, 0, 0, 0.65); }

.cert-card__footer {
  padding: var(--space-2) var(--space-6) var(--space-6);
}

/* ============================================================
   8. COMMUNITY SECTIONS
   ============================================================ */
.community {
  background-color: var(--clr-page-bg);
  /* padding-block: var(--space-20); */
  padding-block: var(--space-6);
}

.community .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.community-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 300px;
  gap: 40px;
  align-items: start;
  padding: 30px 0;
  border-bottom: 1px solid var(--clr-border);
}

.community-row__image {
  overflow: hidden;
  border-radius: var(--radius-md);
}

.community-row__image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
}

.community-row:last-child {
  border-bottom: none;
}

.community-row__description {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.community-row__description p {
  font-size: var(--fs-base);
  color: var(--clr-gray-mid);
  line-height: 1.7;
}

.community-row__title {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-medium);
  color: var(--clr-brand-dark);
  line-height: 1.2;
}

.community-row__text {
  font-size: var(--fs-base);
  color: var(--clr-gray-mid);
  line-height: 1.7;
}

.community-row__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--clr-brand-purple);
  margin-top: var(--space-2);
}

.community-row__link:hover {
  gap: var(--space-3);
}

/* ============================================================
   RESPONSIVE — Home page sections only
   ============================================================ */
@media (max-width: 991px) {
  /* Hero */
  .hero {
    min-height: auto;
  }

  /* Show the full background image (contain) anchored to the top.
     padding-top on .hero itself reserves that exact space; the container
     then sits below it with the text/CTA only — no double-spacing. */
  /* ── Mobile hero: use a real <img> for the background so the browser
        sizes the section to fit the image exactly — no padding-top hacks,
        no aspect-ratio guessing, no empty space. ── */

  /* 1. Hero becomes a plain block — no fixed height, no padding offset */
  .hero {
    min-height: 0;
    padding-top: 0;
    display: block;
  }

  /* 2. Hide the CSS background image on mobile (replaced by the <img>) */
  .hero__bg {
    display: none;
  }

  /* 3. Container: full width, no extra padding */
  .hero .container {
    padding-top: 0;
    padding-bottom: 0;
    max-width: 100%;
    padding-inline: 0;
  }

  /* 4. Slider: height follows the single visible slide */
  .hero-slider {
    min-height: 0;
  }

  /* 5. Only the active slide is in the document flow */
  .hero-slide {
    display: none;
    position: relative;
    inset: unset;
    grid-template-columns: 1fr;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }
  .hero-slide.active {
    display: block;
  }

  /* 6. The mobile background image — full width, natural height, no crop */
  .hero__mobile-img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* 7. Text content below the image */
  .hero__content {
    text-align: center;
    align-items: center;
    padding: var(--space-5) var(--space-4);
    background: #1a2744;
  }

  /* 8. Dots below the image, inside the dark content band */
  .hero__dots {
    position: static;
    transform: none;
    bottom: unset;
    left: unset;
    justify-content: center;
    padding: var(--space-3) 0 var(--space-4);
    background: #1a2744;
    margin-top: 0;
  }
  .hero__image-slot {
    display: none;
  }
  .hero__content {
    text-align: center;
    align-items: center;
  }
  .hero__title {
    font-size: var(--fs-2xl);
  }
  .hero__subtitle {
    font-size: var(--fs-base);
  }
  .hero__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
  }
  .hero__dots {
    justify-content: center;
  }

  /* Why Join */
  .why-join .container {
    grid-template-columns: 1fr;
  }
  .why-join__left::after {
    display: none;
  }

  /* Certifications */
  .certifications__header {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .certifications__cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .cert-card {
    min-height: auto;
  }

  /* Community */
  .community-row {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .community-row__image {
    max-height: 260px;
  }
}

@media (max-width: 767px) {
  .certifications__cards {
    grid-template-columns: 1fr;
  }
  .certifications__title {
    font-size: var(--fs-3xl);
  }
}

@media (max-width: 575px) {
  .hero__title {
    font-size: var(--fs-xl);
  }
  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }
  .stats-bar .container {
    grid-template-columns: 1fr;
  }
  .stat-card {
    border-right: none !important;
  }
  .stat-card:nth-child(1),
  .stat-card:nth-child(2),
  .stat-card:nth-child(3) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .stat-card:nth-child(4) {
    border-bottom: none;
  }
}
