/* Centered Flex Container */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* Centers all rows, including incomplete bottom rows */
  gap: 1.75rem;            /* Spacing between buttons */
  max-width: 1040px;       /* Keeps row length capped at ~4 buttons max */
  margin: 1.5rem auto 2.5rem auto; /* Centers the container block */
}

/* Individual Uniform Button Card */
a.app-btn {
  display: flex;
  flex-direction: column;    /* Icon on top of text */
  align-items: center;       /* Horizontal center */
  justify-content: center;   /* Vertical center */
  text-align: center;
  
  /* Lock every button to exact uniform dimensions */
  flex: 0 0 230px;           /* Fixed width of 230px (won't stretch or shrink) */
  height: 115px;             /* Fixed height */
  padding: 1rem 0.75rem;
  
  background-color: #fc0;    /* Base yellow */
  color: #000 !important;    /* Text & icon color */
  text-decoration: none !important;
  border-radius: 8px;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

/* Icon & Label defaults */
a.app-btn i,
a.app-btn span {
  color: inherit !important;
  text-decoration: none !important;
}

a.app-btn i {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
  display: block;
}

a.app-btn span {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
}

/* Hover & Focus state */
a.app-btn:hover,
a.app-btn:focus {
  background-color: #002b49; /* Dark blue background */
  color: #ffffff !important;    /* White text & icon on hover */
  text-decoration: none !important;
  transform: translateY(-2px);  /* Gentle lift effect */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Mobile Screen Tweaks */
@media screen and (max-width: 520px) {
  a.app-btn {
    flex: 1 1 100%; /* Stretch buttons to full width on mobile devices */
    height: auto;
    min-height: 90px;
  }
}
/* Person cards found on the alphabetical pages */
/* 1. Centered Flex Container for Cards */
.person-card-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  max-width: 1140px;
  margin: 2rem auto 3rem auto;
}

/* 2. Individual Profile Card Container */
.person-card {
  position: relative;        /* Required for stretched-link overlay */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  
  flex: 0 0 250px;           /* Fixed card width */
  min-height: 330px;         /* Height accommodates 230px square photo + text */
  padding: 0.85rem;          /* Equal frame padding around image */
  
  background-color: #ffffff;
  border: 2px solid #fc0;    /* Brand yellow border */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 3. Stretched Link Overlay */
.person-card a.stretched-link::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  content: "";
}

/* 4. Perfect 1:1 Square Photo Frame */
.person-card .card-avatar {
  width: 100% !important;
  height: 230px !important;            /* Square aspect ratio (matches 400x400 input) */
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.85rem;
  padding: 0 !important;
  border: 1px solid #e2e8f0;           /* Clean inner border */
  background-color: #f1f5f9 !important;/* Fallback neutral gray */
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

/* 5. Image Fit Rule: 1:1 scaling */
.person-card .card-avatar img {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;       /* Clean edge-to-edge fill */
  object-position: center !important; /* Perfect center alignment for 400x400 images */
  display: block !important;
}

/* 6. Text Container & Typography */
.person-card .card-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.25rem;
}

.person-card .person-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #000000 !important;
  line-height: 1.25;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.person-card .interview-year {
  font-size: 0.85rem;
  font-weight: 600;
  color: #666666 !important;
}

/* 7. Interactive Hover State */
.person-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-color: #002b49;       /* Card border turns dark blue */
}

.person-card:hover .person-name {
  color: #002b49 !important;   /* Text turns dark blue on hover */
}

.person-card:hover .card-avatar {
  border-color: #002b49;       /* Photo frame turns dark blue on hover */
}

/* 8. Text Label for Missing Photos */
.person-card .card-avatar.placeholder,
.person-card .card-avatar:has(img.no-photo),
.person-card .card-avatar:has(img[src=""]),
.person-card .card-avatar:has(img[src*="YOUR_IMAGE_URL_HERE"]) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: #f1f5f9 !important;
}

.person-card .card-avatar.placeholder::before,
.person-card .card-avatar:has(img.no-photo)::before,
.person-card .card-avatar:has(img[src=""])::before,
.person-card .card-avatar:has(img[src*="YOUR_IMAGE_URL_HERE"])::before {
  content: "No Photo Available";
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 0.5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.person-card .card-avatar img.no-photo,
.person-card .card-avatar img[src=""],
.person-card .card-avatar img[src*="YOUR_IMAGE_URL_HERE"] {
  opacity: 0;
}

/* 9. Mobile Responsiveness */
@media screen and (max-width: 540px) {
  .person-card {
    flex: 1 1 100%;
    max-width: 100%;
    flex-direction: row;       /* Horizontal row on mobile screens */
    align-items: center;
    min-height: auto;
    padding: 0.75rem 1rem;
    text-align: left;
  }
  
  .person-card .card-avatar {
    width: 80px !important;
    height: 80px !important;    /* Compact square thumbnail on phones */
    margin-bottom: 0;
    margin-right: 1rem;
  }
}
/* Individual page styling */
/* Container for the 2-Column Profile Layout */
.person-profile-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: flex-start;
  margin: 1.5rem 0 3rem 0;
}

/* Left Media Card  */
.media-card {
  flex: 0 0 420px;             
  width: 420px;
  background-color: #ffffff;
  padding: 20px;               /* Generous inner padding */
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

/* Polaroid-Style Image Box */
.media-card .polaroid-frame {
  width: 100%;
  height: 380px;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  margin-bottom: 1rem;
}

.media-card .polaroid-frame img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 20% !important;
  display: block !important;
  margin: 0 !important;
}

/* Expanded Audio Player Styling */
.media-card .audio-block {
  margin-bottom: 1rem;
  width: 100%;
}

.media-card .audio-block audio {
  width: 100% !important;     /* Spans full 318px inner width */
  height: 44px;               /* Slightly taller target for easier touch/clicking */
  border-radius: 6px;
  display: block;
}

/* Button-Style Transcript Link */
.media-card .transcript-block a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;      /* Taller, easy-to-click button */
  background-color: #fc0 !important;   /* Yellow theme background */
  color: #000000 !important;           /* Dark text */
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none !important;
  border-radius: 6px;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.media-card .transcript-block a:hover {
  background-color: #002b49 !important; /* Dark blue on hover */
  color: #ffffff !important;           /* White text on hover */
}

/* Right Biography Text Column */
.bio-column {
  flex: 1 1 450px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #1e293b;
}

.bio-column p {
  margin-bottom: 1.25rem;
}

.bio-column .interview-date {
  font-style: italic;
  color: #64748b;
  font-size: 0.95rem;
}

/* Mobile Responsiveness (Full width stack on phone screens) */
@media screen and (max-width: 800px) {
  .person-profile-container {
    flex-direction: column;
    align-items: center;
  }

  .media-card {
    width: 100%;
    max-width: 380px;         /* Expands comfortably on mobile screens */
  }
}