/*
 * CPT Styles — Staff, Locations, Stories
 * File: /wp-content/themes/bootscore-child/assets/css/cpt-styles.css
 *
 * Designed to layer cleanly over Bootscore's Bootstrap 5 base.
 * Swap the CSS custom property values to match your brand colors.
 */

/* ── Brand tokens — edit these to match your site ───────────── */
:root {
  --cpt-primary:        #21368b;   /* deep navy — adjust to your brand */
  --cpt-primary-hover:  #154360;
  --cpt-accent:         #2e86c1;
  --cpt-badge-bg:       #d6eaf8;
  --cpt-badge-color:    #21368b;
  --cpt-card-radius:    0.75rem;
  --cpt-photo-ratio:    75%;       /* 4:3 aspect ratio for photos */
  --cpt-transition:     0.25s ease;
}


/* ── Filter Buttons ──────────────────────────────────────────── */

.btn-filter {
  border: 2px solid var(--cpt-primary);
  color:  var(--cpt-primary);
  background: transparent;
  border-radius: 2rem;
  padding: 0.375rem 1.1rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background var(--cpt-transition), color var(--cpt-transition);
}

.btn-filter:hover,
.btn-filter:focus-visible {
  background: var(--cpt-primary);
  color: #fff;
  outline: 2px solid var(--cpt-accent);
  outline-offset: 2px;
}

.btn-filter.active {
  background: var(--cpt-primary);
  color: #fff;
}


/* ── Card shared base ────────────────────────────────────────── */

.staff-card,
.location-card,
.story-card {
  border-radius: var(--cpt-card-radius) !important;
  overflow: hidden;
  transition: transform var(--cpt-transition), box-shadow var(--cpt-transition);
  cursor: pointer;
}

.staff-card:hover,
.location-card:hover,
.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.75rem 2rem rgba(0,0,0,0.12) !important;
}


/* ── Photo wrappers (consistent aspect ratio) ────────────────── */

.staff-card__photo-wrap,
.location-card__photo-wrap,
.story-card__photo-wrap {
  position: relative;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.3s ease;
  border: 2px solid #ccc;
  padding-top: 0;
}

.staff-card__photo,
.location-card__photo,
.story-card__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.4s ease;
}

.staff-card:hover .staff-card__photo,
.location-card:hover .location-card__photo,
.story-card:hover .story-card__photo {
  transform: scale(1.07);
}


/* ── Staff card specifics ────────────────────────────────────── */

.staff-card {
  position: relative;
}

/* Square photo for headshots */
.staff-card__photo-wrap {
  padding-top: 100%; /* 1:1 */
}

.staff-card__name {
  font-size: 25px;
  font-weight: 600;
  color: #000;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.staff-card__job-title {
  font-size: 20px;
  font-style: italic;
  color: #000;
  font-weight: 400;
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.staff-card__dept {
  color: var(--cpt-badge-color, #21368b);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2rem;
  padding: 0.2em 0.65em;
  margin-top: 0.5rem;
  display: inline-block;
}

/* "View Bio" hover overlay */
.staff-card__overlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(20, 55, 95, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
  z-index: 2;
}

.staff-card:hover .staff-card__overlay,
.staff-card:focus-within .staff-card__overlay {
  opacity: 1;
}

.staff-card__overlay-text {
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.03em;
  line-height: 1.4;
  text-transform: uppercase;
  border: 0;
  padding: 0;
  display: block;
}


/* ── Location & Story badges ─────────────────────────────────── */

.location-card__badge,
.story-card__badge {
  background: var(--cpt-badge-bg);
  color: var(--cpt-badge-color);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 2rem;
  padding: 0.2em 0.65em;
}

.location-card__meta a,
.story-card a {
  color: var(--cpt-primary);
  text-decoration: none;
}

.location-card__meta a:hover,
.story-card a:hover {
  text-decoration: underline;
}

.story-card__date {
  font-size: 0.78rem;
  border-top: 1px solid #eee;
}


/* ── Staff Modal ─────────────────────────────────────────────── */

.staff-modal__photo {
  max-height: 280px;
  width: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

.staff-modal__name {
  color: var(--cpt-primary);
  font-weight: 800;
}

.staff-modal__title {
  font-size: 0.95rem;
}

.staff-modal__bio {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #333;
}

.staff-modal__bio p:last-child {
  margin-bottom: 0;
}

#staffModal-extras a {
  color: var(--cpt-primary);
  text-decoration: none;
}

#staffModal-extras a:hover {
  text-decoration: underline;
}


/* ── Page Heroes ─────────────────────────────────────────────── */

.staff-hero,
.locations-hero,
.stories-hero {
  background: linear-gradient(135deg, #eaf2fb 0%, #f8fbff 100%);
  border-bottom: 3px solid var(--cpt-accent);
}

.staff-hero__title,
.locations-hero__title,
.stories-hero__title {
  font-weight: 800;
  color: var(--cpt-primary);
}


/* ── AJAX fade-in animation ──────────────────────────────────── */

@keyframes cptFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cpt-fade-in {
  animation: cptFadeUp 0.35s ease both;
}


/* ── Responsive tweaks ───────────────────────────────────────── */

@media (max-width: 575.98px) {
  .btn-filter {
    font-size: 0.8rem;
    padding: 0.3rem 0.85rem;
  }

  .staff-modal__photo {
    max-height: 200px;
  }
}
