/* Custom styles for PA Program Consultant */

/* Keep auto — CSS smooth + JS scroll was canceling and landing one section early */
html {
  scroll-behavior: auto;
}

.scroll-mt-22 {
  /* Keep in sync with #site-header height (set by JS) */
  scroll-margin-top: var(--site-header-height, 7.5rem);
}

/* Sticky header: email bar slides away, navbar locks to top */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: hidden;
  /* height set by JS so collapse can animate */
  transition: height 0.32s ease;
}

#header-slide {
  will-change: transform;
  transition: transform 0.32s ease;
}

#top-bar {
  display: none;
}

@media (min-width: 900px) {
  #top-bar {
    display: block;
    background-color: #0b1b57;
  }
}

/* Image placeholders look like real media slots */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  user-select: none;
}

.img-placeholder::before {
  content: "";
  width: 2.5rem;
  height: 2.5rem;
  margin-right: 0.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21zm10.5-11.25h.008v.008h-.008V9.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z'/%3E%3C/svg%3E")
    center / contain no-repeat;
  flex-shrink: 0;
}

.img-placeholder.dark {
  background: linear-gradient(145deg, #1e293b 0%, #334155 50%, #0f172a 100%);
  color: #94a3b8;
}

.img-placeholder.dark::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M3.75 21h16.5A2.25 2.25 0 0022.5 18.75V5.25A2.25 2.25 0 0020.25 3H3.75A2.25 2.25 0 001.5 5.25v13.5A2.25 2.25 0 003.75 21zm10.5-11.25h.008v.008h-.008V9.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z'/%3E%3C/svg%3E");
}

/* Team card hover slide */
.team-card .team-hover {
  transform: translateX(-100%);
}

.team-card:hover .team-hover {
  transform: translateX(0);
}

.team-card:hover .team-default {
  opacity: 0;
}

.team-card:hover .team-photo {
  transform: scale(1.05);
}

/* Desktop nav active underline (slides between links) */
#desktop-nav {
  position: relative;
  flex-wrap: nowrap;
}

.nav-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link .nav-label {
  display: inline-block;
  line-height: 1.25;
  white-space: nowrap;
}

.nav-link.is-active {
  color: #1d4ed8;
}

.nav-indicator {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background-color: #1d4ed8;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transform: scaleX(0);
  transform-origin: center center;
  will-change: left, width, transform;
  /* only slide/expand horizontally — never animate from top */
  transition:
    left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.2s ease;
}

.nav-indicator.is-visible {
  opacity: 1;
}

.nav-indicator.is-ready {
  transform: scaleX(1);
}

/* About media: keep inset image inside bounds on desktop */
.about-media {
  padding-bottom: 0;
}

@media (min-width: 900px) {
  .about-media {
    padding-bottom: 2.5rem;
    padding-left: 1.5rem;
  }
}

/* Mobile active line */
.nav-link-mobile.is-active {
  color: #1d4ed8;
  border-left-color: #1d4ed8;
  background-color: #f3f4f6;
}

/* Feature cards: no layout shift; underline grows from center */
.feature-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.feature-card > * {
  position: relative;
  z-index: 1;
}

/* Bottom line animates from center → ends (no height change = no layout jump) */
.feature-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background-color: #1e3a8a;
  transform: scaleX(0);
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  pointer-events: none;
  border-radius: 0 0 0.75rem 0.75rem;
}

.feature-card:hover::after {
  transform: scaleX(1);
}
