/* ===== PAGE STRUCTURE ===== */
/* Keeps the footer at the bottom on short pages */
body {
  display: flex;
  flex-direction: column;
}

.pageContainer {
  flex: 1;
  width: min(120rem, 100%);
  margin: 0 auto;
  /* extra bottom space so the floating call button never covers content */
  padding: 5rem 2rem 12rem;
}

/* ===== PAGE INTRO ===== */
.pageIntro {
  text-align: center;
  margin-bottom: 4.5rem;
}

.pageTitle {
  display: inline-block;
  font-size: 3rem;
  font-weight: 600;
  color: #42253b;
  padding-bottom: 1rem;
  border-bottom: 0.3rem solid #db0037;
}

.pageSubtitle {
  margin-top: 1.5rem;
  font-size: 1.6rem;
  line-height: 1.5;
  color: #5a5f61;
}

/* ===== EXPERT CARDS ===== */
.expertGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
  gap: 3rem;
}

.expertCard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2.4rem 3rem;
  background-color: #ffffff;
  border-radius: 1.6rem;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 0.6rem 2rem rgba(66, 37, 59, 0.1);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

.expertCard:hover {
  transform: translateY(-0.6rem);
  box-shadow: 0 1.2rem 3rem rgba(66, 37, 59, 0.18);
}

/* Purple strip across the top of each card */
.cardBanner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8rem;
  background: linear-gradient(135deg, #42253b 0%, #5c3452 100%);
}

.imgHeadshot {
  position: relative;
  width: 14rem;
  height: 14rem;
  margin-top: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5rem solid #ffffff;
  box-shadow: 0 0 0 0.3rem #db0037;
}

.nameExpert {
  margin-top: 1.8rem;
  font-size: 2rem;
  font-weight: 600;
  color: #42253b;
}

/* Specialties shown as pills */
.expertTags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.expertTags li {
  padding: 0.6rem 1.4rem;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #42253b;
  background-color: #f5ebe0;
  border: 0.1rem solid rgba(219, 0, 55, 0.35);
  border-radius: 10rem;
}

/* ===== FLOATING CALL BUTTON ===== */
.callButton {
  position: fixed;
  left: calc(2rem + env(safe-area-inset-left));
  bottom: calc(2rem + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.callIcon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 50%;
  background-color: #db0037;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.25);
  transition:
    transform 0.3s,
    background-color 0.3s;
}

.callIcon ion-icon {
  font-size: 2.6rem;
  color: #ffffff;
}

.callText {
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  background-color: #42253b;
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 500;
  white-space: nowrap;
}

.callButton:hover .callIcon,
.callButton:focus-visible .callIcon {
  transform: translateY(-10%);
  background-color: #42253b;
}

.callButton:focus-visible {
  outline: 0.2rem solid #db0037;
  outline-offset: 0.4rem;
  border-radius: 1rem;
}

/* Move the year text so the call button doesn't cover it */
.year {
  left: auto;
  right: 1rem;
}

/* ===== MEDIA QUERIES ===== */
@media (min-width: 900px) {
  .pageContainer {
    padding-top: 7rem;
    padding-bottom: 10rem;
  }
  .expertGrid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .logoInstagram,
  .logoFacebook,
  .logoLinkedin,
  .logoWhatsapp {
    height: 2.5rem;
    width: 2.5rem;
  }
}

@media (max-width: 600px) {
  .pageTitle {
    font-size: 2.6rem;
  }
  .pageSubtitle {
    font-size: 1.4rem;
  }
  .expertGrid {
    gap: 2.4rem;
  }
  .imgHeadshot {
    width: 12rem;
    height: 12rem;
  }
  .cardBanner {
    height: 7rem;
  }
  .nameExpert {
    font-size: 1.8rem;
  }
  .callButton {
    left: calc(1.5rem + env(safe-area-inset-left));
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  .callIcon {
    width: 5rem;
    height: 5rem;
  }
  .callIcon ion-icon {
    font-size: 2.3rem;
  }
  .callText {
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  .expertCard {
    padding: 0 1.6rem 2.4rem;
  }
  .expertTags li {
    font-size: 1.2rem;
  }
  footer {
    grid-template-areas:
      "instagram facebook"
      "linkedin whatsapp";
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .expertCard,
  .callIcon {
    transition: none;
  }
}
