.about-contents {
  flex-grow: 3 !important;
  flex-shrink: 0 !important;
  flex-basis: 80% !important;
}

.about-entity {
  flex-grow: 0 !important;
  flex-shrink: 3 !important;
  flex-basis: 20% !important;
}

/* Shared section header pattern (matches about / events pages) */
.section-label    { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px; color: #2774AE; margin-bottom: 0.4rem; }
.section-title-bar{ font-size: 2rem; font-weight: 800; color: #003B5C; margin: 0 0 0.6rem; padding-bottom: 0.65rem; border-bottom: 3px solid #FFD100; display: inline-block; }

/* Directory landing page */
.directory-landing {
  padding: 2rem 1rem;
}

/* Hero section */
.directory-hero {
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-bottom: 3rem;
}

#clear-all-filters {
    transition: color 0.2s ease;
}

#clear-all-filters:hover {
    color: #2774AE !important; /* UCLA Blue */
    background: none;
}
.directory-hero-text {
  flex: 1 1 50%;
}

.directory-hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #003B5C;
}

.directory-hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 0;
}

.directory-hero-photo {
  flex: 1 1 50%;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

/* Slideshow on Directory Homepage*/
/* 1. Stack the slides and set up the transition */
.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide {
  position: absolute; /* Stack them on top of each other */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Hidden by default */
  transition: opacity 1.2s ease-in-out; /* The "Smooth" factor */
  z-index: 1;
}

.slide.active {
  opacity: 1; /* Fade in */
  z-index: 2; /* Bring to front */
}

/* 2. Ensure the images fill the container perfectly */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* 3. Keep the buttons on top of everything */
.slide-btn {
  z-index: 10;
}

/* Pin the dots to the bottom of the slideshow container */
.slideshow-dots {
  position: absolute;
  bottom: 20px; /* Adjust this number to move them higher or lower on the image */
  left: 50%;
  transform: translateX(-50%); /* Centers the dots horizontally */
  z-index: 20 !important; /* Forces them to stay on top of the images */
  display: flex;
  gap: 12px; /* Space between the dots */
}

/* The Dots - Smaller and Crisper */
.dot {
  cursor: pointer;
  height: 8px;   /* Smaller size (was 12px) */
  width: 8px;    /* Smaller size (was 12px) */
  background-color: #ffffff; /* Solid white for clarity */
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  border: none;  /* Remove the border to stop the blur */
  /* This shadow makes them visible even on bright white parts of a photo */
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5); 
  opacity: 0.6;  /* Dim them slightly when not active */
}

/* Hover effect */
.dot:hover {
  opacity: 1;
  transform: scale(1.2);
  background-color: #FFD100; /* UCLA Gold */
}

/* The Active Dot - Crisp and Defined */
.dot.active {
  opacity: 1;
  background-color: #FFD100 !important; /* UCLA Gold */
  width: 18px; /* Slightly shorter pill shape for the smaller scale */
  border-radius: 4px;
  box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.6);
}

.program-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .directory-hero {
    flex-direction: column;
    gap: 1.5rem;
  }
  .directory-hero-text,
  .directory-hero-photo {
    flex: none;
    width: 100%;
  }
  .directory-hero-photo {
    height: 280px;
  }
  .program-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .directory-program-card {
    height: 260px;
  }
}

@media (max-width: 480px) {
  .program-cards-grid {
    grid-template-columns: 1fr;
  }
  .directory-program-card {
    height: 220px;
  }
}

.program-cards-grid > a {
  display: block;
  text-decoration: none !important;
}

.directory-program-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  height: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.13);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.directory-program-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}

/* Overlay gradient */
.prog-card-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem 1.4rem 1.4rem;
  background: linear-gradient(to top, rgba(0,18,48,0.90) 0%, rgba(0,18,48,0.5) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.prog-card-tag {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  color: #FFD100;
  margin-bottom: 0.1rem;
}

.prog-card-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.prog-card-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-top: 0.45rem;
  transition: color 0.18s, letter-spacing 0.18s;
}

.directory-program-card:hover .prog-card-cta {
  color: #FFD100;
  letter-spacing: 0.03em;
}

.card-img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #e9ecef 0%, #ced4da 100%);
}

/* Category accordion sidebar */
.category-accordion-group {
  margin-bottom: 2px;
}

.category-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.category-accordion-header:hover {
  background: rgba(39, 116, 174, 0.08);
}

.accordion-label {
  flex: 1;
}

.accordion-arrow {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.2s ease;
}

.accordion-arrow.open {
  transform: rotate(90deg);
  transition: transform 0.2s ease;
}

.category-accordion-items {
  padding-left: 10px;
  padding-bottom: 4px;
}

.category-accordion-items .category {
  display: block;
  padding: 3px 6px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.82rem;
}

.category-accordion-items .category:hover {
  background: rgba(39, 116, 174, 0.08);
}

.directory-program-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.38s ease;
}

.directory-program-card:hover img {
  transform: scale(1.05);
}


/* These lines set the width and height for the the directory home page images */
.quarto-grid-item {
  max-width: 200px;
}

.quarto-grid-item .card-img-top img.thumbnail-image {
  width: 100% !important;
  height: 300px !important;
  object-fit: cover !important;
  object-position: center 20% !important;
}

/* This controls automatic entries per row */
#listing-listing .list.grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
}

/* Accordian style for alumni */
details {
  margin-bottom: 1.5rem;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.5rem 1rem;
}

details summary {
  font-size: 1.3rem;
  font-weight: 600;
  color: #003B5C;
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
}


[id^="listing-"][id$="-grid"],
[id^="listing-"][id$="-table"] {
  display: none;
}



.quarto-listing-category .category.active {
    cursor: default !important;
    pointer-events: none; /* This also helps prevent double-clicks */
}



/* 1. Ensure the container doesn't clip the hop */
.quarto-listing-grid .grid-item {
  padding-top: 15px !important; /* Creates 'headroom' for the jump */
}

/* 2. The Card Base */
.quarto-grid-link .quarto-grid-item.card {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
  border: 1px solid #dee2e6 !important;
  position: relative;
  overflow: hidden; /* Keeps the gold bar contained */
}

/* 3. The Gold Bar (UCLA Gold) */
/* We place it absolutely at the very top of the card */
.quarto-grid-link .quarto-grid-item.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px; /* Slightly thicker for visibility */
  background-color: #FFD100;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 5; /* Ensures it stays above the image */
}

/* 4. The Hover State Trigger */
.quarto-grid-link:hover .quarto-grid-item.card {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 35px rgba(39, 116, 174, 0.25) !important;
  border-color: #2774AE !important;
}

/* 5. Activate the Gold Bar on Hover */
.quarto-grid-link:hover .quarto-grid-item.card::before {
  transform: scaleX(1);
}

/* 6. Smooth out the image zoom */
.quarto-grid-link .card-img-top img {
  transition: transform 0.6s ease !important;
}

.quarto-grid-link:hover .card-img-top img {
  transform: scale(1.04);
}


/* 1. Fix the Image Container Height */
.quarto-listing-grid .grid-item .card-img-top {
  height: 220px !important; /* Adjust this number to your preferred height */
  overflow: hidden;
  background-color: #f8f9fa; /* Light grey placeholder if image fails */
}

/* 2. Force the Image to fill that space without stretching */
.quarto-listing-grid .grid-item .card-img-top img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; /* This is the magic line */
  object-position: center 20% !important; /* Keeps faces in frame */
}

/* 3. Ensure the card itself doesn't grow weirdly */
.quarto-listing-grid .grid-item .card {
  height: 100% !important;
  display: flex;
  flex-direction: column;
}

/* 4. Make sure the body text area stays consistent */
.quarto-listing-grid .grid-item .card-body {
  flex-grow: 1;
  padding: 1rem !important;
}


#listing-grid .list.grid {
  display: grid !important;
  /* Dropping to 180px ensures 5-across on most laptops */
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 1rem !important; /* Slightly tighter gap to save horizontal space */
}

/* Match the max-width to keep it from stretching too far on giant monitors */
.quarto-grid-item {
  max-width: 200px !important;
}

/* Keep your image height fixed as we discussed */
.quarto-listing-grid .grid-item .card-img-top {
  height: 200px !important; /* Slightly shorter height looks better with 180px width */
}


/* Disable the horizontal scroll in the sidebar */
.quarto-listing-category {
  overflow-x: hidden !important;
  white-space: normal !important; /* Allows long names to wrap instead of pushing the width */
}

/* Ensure the accordion groups don't poke out past the container */
.category-accordion-group {
  width: 100%;
  box-sizing: border-box;
}

/* Ensure individual category items wrap if a name is too long */
.category-accordion-items .category {
  white-space: normal !important;
  word-wrap: break-word;
  display: block;
  width: 100%;
}

/* ══════════════════════════════════════════════════════
   Stats Banner — "By the Numbers" section
   ══════════════════════════════════════════════════════ */
.stats-banner {
  position: relative;
  background: linear-gradient(135deg, #002e48 0%, #003B5C 45%, #1a5f8a 100%);
  border-radius: 24px;
  margin: 3rem 0 2rem;
  overflow: hidden;
  padding: 3.5rem 3rem 3.5rem;
  box-shadow: 0 20px 60px rgba(0, 59, 92, 0.30);
}

/* Subtle dot-grid texture */
.stats-banner-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* Gold accent bar at top */
.stats-banner-gold {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, #FFD100 0%, #ffea70 50%, #FFD100 100%);
}

.stats-banner-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5rem;
}

/* ── Left panel ── */
.stats-banner-left { flex: 1; min-width: 0; }

.stats-banner-tag {
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: #FFD100;
  margin-bottom: 0.9rem;
}

.stats-banner-title {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  margin: 0 0 1.1rem;
  letter-spacing: -0.02em;
}

.stats-banner-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.68);
  line-height: 1.8;
  max-width: 400px;
  margin: 0 0 2.2rem;
}

.stats-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #FFD100;
  color: #002e48;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.9rem;
  border-radius: 100px;
  text-decoration: none !important;
  transition: transform 0.22s, box-shadow 0.22s, background 0.18s;
  box-shadow: 0 6px 22px rgba(255, 209, 0, 0.4);
}
.stats-banner-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(255, 209, 0, 0.55);
  background: #ffe84d;
  color: #002e48;
}
.stats-cta-arrow {
  display: inline-block;
  transition: transform 0.22s;
  font-size: 1.05rem;
}
.stats-banner-cta:hover .stats-cta-arrow { transform: translateX(5px); }

/* ── Right panel: floating stat chips ── */
.stats-banner-right {
  flex: 0 0 320px;
  position: relative;
  height: 250px;
}

.stat-chip {
  position: absolute;
  background: rgba(255,255,255,0.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  padding: 1rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

.chip-num {
  font-size: 2.1rem;
  font-weight: 900;
  color: #FFD100;
  line-height: 1;
  letter-spacing: -0.03em;
}
.chip-label {
  font-size: 0.64rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Chip positions + staggered float animations */
.chip-1 { top: 0;    left: 0;   animation: chipFloat 7s ease-in-out infinite 0s; }
.chip-2 { top: 5px;  right: 0;  animation: chipFloat 7s ease-in-out infinite -2s; }
.chip-3 { bottom: 0; left: 30px; animation: chipFloat 7s ease-in-out infinite -3.5s; }
.chip-4 { bottom: 8px; right: 0; animation: chipFloat 7s ease-in-out infinite -5s; }
.chip-5 {
  top: 50%; left: 50%;
  animation: chipFloat5 7s ease-in-out infinite -1.2s;
  background: rgba(255,209,0,0.15);
  border-color: rgba(255,209,0,0.3);
}

@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}
@keyframes chipFloat5 {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50%       { transform: translate(-50%, -50%) translateY(-9px); }
}

/* ── Mobile stat strip (shown below 768px, replaces chips) ── */
.stats-mobile-strip {
  display: none;
  position: relative;
  margin-top: 2rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(255,255,255,0.14);
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0;
}
.mobile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.4rem;
}
.ms-num {
  font-size: 1.9rem;
  font-weight: 900;
  color: #FFD100;
  line-height: 1;
}
.ms-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.2rem;
}
.mobile-stat-div {
  width: 1px;
  background: rgba(255,255,255,0.2);
  align-self: stretch;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .stats-banner { padding: 2.5rem 1.75rem 2rem; border-radius: 18px; }
  .stats-banner-inner { gap: 0; }
  .stats-banner-right { display: none; }
  .stats-mobile-strip { display: flex; }
  .stats-banner-desc { max-width: 100%; }
}
@media (max-width: 480px) {
  .stats-banner { padding: 2rem 1.25rem 1.75rem; border-radius: 14px; }
  .stats-banner-title { font-size: 1.75rem; }
}
