/* Modern Bento Box Layout for Values & Mission */
.modern-values-section {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--km-secondary); /* White background for the section to keep alternating flow */
  color: var(--km-primary);
  position: relative;
  z-index: 10;
}

.modern-values-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(70, 130, 180, 0.05), transparent 40%),
              radial-gradient(circle at bottom right, rgba(70, 130, 180, 0.05), transparent 50%);
  pointer-events: none;
}

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 3rem);
}

@media (min-width: 992px) {
  .bento-grid {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(420px, auto);
  }
}

.bento-card {
  position: relative;
  background: var(--km-primary, #4682b4); /* Dark Navy cards */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  backdrop-filter: blur(8px); /* Reduced blur to see images better */
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
  min-height: 420px;
}

.bento-card:hover {
  transform: translateY(-8px);
  border-color: var(--km-accent);
  box-shadow: none;
}

/* Card Sizes for Bento Layout */
@media (min-width: 992px) {
  .bento-card--large { grid-column: span 8; }
  .bento-card--medium { grid-column: span 4; }
  .bento-card--wide { grid-column: span 12; flex-direction: row; align-items: center; justify-content: space-between; }
  .bento-card--half { grid-column: span 6; }
}

.bento-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6; /* Increased for better visibility */
  transition: opacity 0.5s ease, transform 1s ease;
  z-index: 0;
}

.bento-card:hover .bento-bg-image {
  opacity: 0.5;
  transform: scale(1.05);
}

.bento-gradient-overlay {
  position: absolute;
  inset: 0;
  /* Lightened overlay to make background images visible while keeping text readable */
  background: linear-gradient(to top, rgba(14, 29, 66, 0.45) 0%, rgba(14, 29, 66, 0.1) 60%, transparent 100%);
  z-index: 1;
}

.bento-content {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* Added shadow for readability on lighter background */
}

.bento-wide-content {
  max-width: 50%;
}

.bento-eyebrow {
  font-family: var(--md-font-body), "Outfit", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.bento-title {
  font-family: var(--md-font-display), "Syne", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin-bottom: 1rem;
}

.bento-text {
  font-family: var(--md-font-body), "Outfit", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  max-width: 100%;
}

/* Feature List inside Wide Card */
.bento-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  width: 40%;
}

@media (max-width: 991.98px) {
  .bento-features {
    width: 100%;
    margin-top: 2rem;
  }
  .bento-card--wide {
    flex-direction: column;
    align-items: flex-start;
  }
  .bento-wide-content {
    max-width: 100%;
  }
}

.bento-feature h4 {
  font-family: var(--md-font-display), "Syne", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.bento-feature p {
  font-family: var(--md-font-body), "Outfit", sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* Scroll reveal classes */
.bento-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
