/* Bento Grid Container */
.bento-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  grid-auto-rows: auto;
  padding-bottom: 60px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  padding-top: 60px;
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: none;
}

.hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 8px;
  color: #315ca9;
}

.hero-content p {
  text-align: center;
  font-size: 1.1rem;
  margin: 0 0 40px;
  color: #555;
}

/* Bento Box Base Styles */
.bento-box {
  background: #fff;
  padding: 32px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.bento-box:hover {
  box-shadow: 0 8px 32px rgb(0 0 0 / 12%);
}

/* Prevent hover effect from interfering with scroll animation */
.bento-box:not(.bento-hero):hover {
  transform: translateY(-4px);
}

.bento-box h2 {
  margin-bottom: 16px;
  color: #036;
  font-size: 1.8rem;
}

/* President's Welcome - Full width with floating image */
.bento-welcome {
  grid-column: 1 / 13;
  grid-row: 2 / 3;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

/* Our Pillars - Full width column grid */
.bento-pillars {
  grid-column: 1 / 13;
  grid-row: 3 / 4;
  background: linear-gradient(135deg, #fff 0%, #f0f4f8 100%);
}

/* History - Left half */
.bento-history {
  grid-column: 1 / 7;
  grid-row: 4 / 5;
  background: linear-gradient(135deg, #e8f4f8 0%, #fff 100%);
}

/* DEI Commitment - Right half */
.bento-dei {
  grid-column: 7 / 13;
  grid-row: 4 / 5;
  background: linear-gradient(135deg, #f5f8fa 0%, #fff 100%);
}

/* President headshot layout */
.president-welcome {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
  padding: 1rem;
}

.president-photo {
  display: block;
}

.bento-welcome .president-photo {
  margin: 0;
}

/* History and DEI sections - grid layout (not floating) */
.bento-history .president-welcome,
.bento-dei .president-welcome {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.bento-history .president-photo,
.bento-dei .president-photo {
  float: none;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.25s ease;
  display: block;
}

.photo-btn img {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 4px solid #315ca9;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.photo-btn:hover {
  transform: translateY(-4px);
}

.photo-btn:hover img {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgb(0 0 0 / 16%);
}

.president-text {
  overflow: visible;
}

.president-text p {
  line-height: 1.75;
  color: #333;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.president-text p:first-child {
  margin-top: 0;
}

/* General bento box text styling */
.bento-box p {
  line-height: 1.7;
  color: #444;
  margin-bottom: 0.875rem;
}

.bento-box > p:first-of-type {
  font-size: 1.05rem;
  color: #555;
  margin-top: 8px;
}

.bento-box h3 {
  color: #036;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Pillars grid/cards - Column-based layout */

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

@media (width >= 1400px) {
  .pillars-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (width <= 1200px) {
  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pillar-card {
  background: #fff;
  padding: 28px 22px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgb(12 40 60 / 6%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 230px;
  transition:
    transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.9, 0.2, 1),
    background 220ms ease;
  will-change: transform, box-shadow;
}

.pillar-card h3 {
  margin: 14px 0 8px;
  color: #222;
}

.pillar-card p {
  color: #555;
  line-height: 1.6;
  font-size: 0.95rem;
}

.pillar-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Hover / focus pop-up effect */
.pillar-card:hover,
.pillar-card:focus-within {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 12px 36px rgb(12 40 60 / 12%);
  z-index: 8;
}

.pillar-card:focus-within {
  outline: 3px solid rgb(49 92 169 / 12%);
  outline-offset: 6px;
}

/* Make the icon slightly lifted on card hover */
.pillar-card:hover .pillar-icon,
.pillar-card:focus-within .pillar-icon {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 10%);
}

/* mobile touch-active class to simulate hover state */
.pillar-card.touch-active {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 12px 36px rgb(12 40 60 / 12%);
  z-index: 8;
}

.pillar-card.touch-active .pillar-icon {
  transform: translateY(-4px);
}

/* History badge styling */
.history-badge {
  background: transparent;
  padding: 20px;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
  transition: transform 0.3s ease;
}

.history-badge img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
}

/* Modal / lightbox */
.photo-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.photo-modal[aria-hidden="false"] {
  display: flex;
}

.photo-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(4px);
}

.photo-modal__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgb(0 0 0 / 40%);
  background: #fff;
  z-index: 2;
}

.photo-modal__content img {
  display: block;
  max-width: 72vmin;
  max-height: 72vmin;
  width: auto;
  height: auto;
  border-radius: 8px;
}

.photo-modal__close {
  position: absolute;
  right: 8px;
  top: 6px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  transition: color 0.2s ease;
}

.photo-modal__close:hover {
  color: #315ca9;
}

/* Responsive Bento Grid */
@media (width <= 1200px) {
  .bento-container {
    grid-template-columns: repeat(8, 1fr);
  }

  .bento-hero {
    grid-column: 2 / 8;
    grid-row: 1 / 2;
  }

  .bento-welcome {
    grid-column: 1 / 9;
    grid-row: 2 / 3;
  }

  .bento-pillars {
    grid-column: 1 / 9;
    grid-row: 3 / 4;
  }

  .bento-history {
    grid-column: 1 / 5;
    grid-row: 4 / 5;
  }

  .bento-dei {
    grid-column: 5 / 9;
    grid-row: 4 / 5;
  }

  .pillars-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (width <= 980px) {
  .bento-container {
    grid-template-columns: 1fr;
  }

  .bento-hero {
    grid-column: 1;
    grid-row: auto;
    padding: 40px 28px;
  }

  .bento-hero .hero-content h1 {
    font-size: 2.8rem;
  }

  .bento-welcome,
  .bento-pillars,
  .bento-history,
  .bento-dei {
    grid-column: 1;
    grid-row: auto;
  }

  .bento-welcome .president-welcome {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .bento-history .president-welcome,
  .bento-dei .president-welcome {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width <= 880px) {
  .bento-container {
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 40px auto;
    padding: 0 16px;
  }

  .bento-box {
    padding: 28px 24px;
  }

  .bento-hero {
    grid-column: 1;
    grid-row: auto;
    padding: 36px 24px;
  }

  .bento-hero .hero-content h1 {
    font-size: 2.5rem;
  }

  .bento-hero .hero-content p {
    font-size: 1.05rem;
  }

  .bento-welcome,
  .bento-pillars,
  .bento-history,
  .bento-dei {
    grid-column: 1;
    grid-row: auto;
  }

  .bento-box h2 {
    font-size: 1.6rem;
  }

  .bento-welcome .president-welcome {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .bento-history .president-welcome,
  .bento-dei .president-welcome {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .president-photo {
    margin-bottom: 8px;
  }

  .photo-btn img {
    width: 180px;
    height: 180px;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* touch-friendly active state: tapped card lifts slightly */
  .pillar-card:active {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 12px 32px rgb(12 40 60 / 12%);
  }
}

@media (width <= 480px) {
  .bento-hero .hero-content h1 {
    font-size: 2rem;
  }

  .bento-box h2 {
    font-size: 1.4rem;
  }

  .photo-btn img {
    width: 160px;
    height: 160px;
  }
}
