/* Home "Our Experts" section: replaces a 4-slide Swiper carousel with a static
   2-card layout (we only have 2 real tutors). First pass was a thin horizontal pill
   (photo + name + role in one short row) that left the section looking empty and
   under-built next to its own decorative background. Rebuilt as a proper image-left /
   content-right card with real height — same visual weight as the .tutor-profile
   cards on the Tutors page, just in a 2-per-row teaser format instead of full alternating
   bio blocks. Built from the site's own tokens (var(--theme), var(--box-shadow),
   var(--bg4)) rather than reusing the theme's Swiper-slide markup, which doesn't read
   as a plain grid item. */

/* Decorative shapes: main.css positions these via `.team-section .top-shape` /
   `.love-shape` / `.frame-shape` (main.css:15751-15784) — renaming the section wrapper
   to .home-experts-section (to avoid colliding with the theme's other, still-in-use
   .team-section instances elsewhere) meant those absolute-position rules no longer
   matched, so the shapes fell back to normal static-flow div/img elements instead of
   floating in the section's corners. Re-scoped here, values unchanged. */
.home-experts-section {
  position: relative;
}
.home-experts-section .top-shape {
  position: absolute;
  top: 0;
  left: 0;
}
.home-experts-section .love-shape {
  position: absolute;
  bottom: 0;
  left: 30px;
}
@media (max-width: 1199px) {
  .home-experts-section .love-shape {
    display: none;
  }
}
.home-experts-section .frame-shape {
  position: absolute;
  top: 45%;
  right: 0;
  animation: rounded 5s linear infinite;
}
@media (max-width: 1199px) {
  .home-experts-section .frame-shape {
    display: none;
  }
}

.expert-card {
  display: flex;
  align-items: stretch;
  height: 100%;
  min-height: 280px;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.expert-card:hover {
  transform: translateY(-6px);
}

.expert-card__photo {
  flex: 0 0 42%;
  max-width: 42%;
  position: relative;
  overflow: hidden;
}
.expert-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.expert-card:hover .expert-card__photo img {
  transform: scale(1.06);
}

.expert-card__content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 32px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.expert-card__role {
  display: inline-block;
  color: var(--theme);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.expert-card__content h3 {
  font-size: 24px;
  margin-bottom: 14px;
}
.expert-card:hover .expert-card__content h3 {
  color: var(--theme);
}
.expert-card__content p {
  color: var(--text);
  margin-bottom: 20px;
}
.expert-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--theme);
  font-weight: 700;
  font-size: 15px;
  transition: gap 0.3s ease;
}
.expert-card:hover .expert-card__link {
  gap: 12px;
}

@media (max-width: 767px) {
  /* Restores the gap between the section description and the first card. Two things
     were eating it: (1) main.css zeroes out .section-title's margin-bottom site-wide
     below 767px, and (2) Bootstrap's .row.g-4 always carries a literal
     margin-top: -24px (bootstrap.min.css ~L850) — part of how it avoids double
     vertical gutters when columns wrap onto a new line — which pulls the grid up
     over whatever spacing preceded it regardless of that element's own margin/
     padding. Neutralizing the row's negative margin here, then adding real padding
     (not margin, so nothing collapses/cancels it) on the title, is what actually
     produces visible space. */
  .home-experts-section .section-title {
    padding-bottom: 24px;
  }
  .home-experts-section .row {
    margin-top: 0;
  }
  .expert-card {
    flex-direction: column;
    min-height: 0;
  }
  .expert-card__photo {
    flex-basis: auto;
    max-width: 100%;
    aspect-ratio: 16 / 10;
  }
  .expert-card__photo img {
    /* Both photos are shoulders-up shots with the face in the upper portion of the
       frame — object-fit: cover's default center crop, combined with this short
       16:10 box, was cutting into the top of the face. Biasing the crop upward
       keeps the face fully in frame instead. */
    object-position: center 15%;
  }
  .expert-card__content {
    padding: 24px;
  }
}