/* ============================================================
   Solutions list — Apple-style bento grid (trial).
   Loaded after theme.css. Uses the --ds-* palette tokens.

   Desktop (3 columns; a full page of 9 tiles):
     [ featured 2x2 ][ 1 ]
     [              ][ 2 ]
     [ 3 ][ 4 ][ 5 ]
     [ 6 ][ 7 ][ 8 ]
   ============================================================ */

.sol-bento-section {
  background: var(--ds-soft-gray);
  padding: 4rem 0;
}

.sol-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(300px, auto);
  grid-auto-flow: dense;
  gap: 1.25rem;
}

/* ── Tile ───────────────────────────────────────────────────── */
.sol-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--ds-white);
  border-radius: 28px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.sol-tile:hover {
  transform: scale(1.015);
  box-shadow: 0 18px 40px -24px rgba(0, 51, 102, .35);
}
.sol-tile:focus-within { outline: 3px solid var(--ds-primary); outline-offset: 3px; }
.sol-tile .stretched-link:focus-visible { outline: none; }

.sol-tile-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: .75rem .75rem 0;
  border-radius: 20px;
}
.sol-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.sol-tile:hover .sol-tile-media img { transform: scale(1.05); }

.sol-tile-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.4rem 1.4rem;
}

.sol-tile-eyebrow {
  margin: 0 0 .35rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ds-secondary);
}

.sol-tile-title {
  margin: 0 0 .75rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.015em;
}
.sol-tile-title a { color: var(--ds-navy); text-decoration: none; }

.sol-tile-desc {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ds-dark-blue);
}

.sol-tile-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.sol-tile-location {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ds-dark-blue);
}

/* "Read more" inside tiles reuses .sol-btn-more from theme.css */
.sol-tile:hover .sol-btn-more {
  background: var(--ds-secondary);
  border-color: var(--ds-secondary);
  color: var(--ds-white);
}
.sol-tile .sol-btn-more:hover {
  background: var(--ds-navy);
  border-color: var(--ds-navy);
}
.sol-tile:hover .sol-btn-more-arrow { transform: translateX(3px); }

/* ── Featured tile: full-bleed image with text over a gradient ── */
.sol-tile--featured {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--ds-navy);
}
.sol-tile--featured .sol-tile-media {
  position: absolute;
  inset: 0;
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
}
.sol-tile--featured .sol-tile-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 51, 102, 0) 20%, rgba(0, 51, 102, .7) 50%, var(--ds-navy) 72%);
}
.sol-tile--featured .sol-tile-body {
  position: relative;
  justify-content: flex-end;
  padding: 2rem;
}
.sol-tile--featured .sol-tile-eyebrow { color: var(--ds-accent); }
.sol-tile--featured .sol-tile-title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -.02em; }
.sol-tile--featured .sol-tile-title a { color: var(--ds-white); }
.sol-tile--featured .sol-tile-desc { color: rgba(255, 255, 255, .88); max-width: 36ch; }
.sol-tile--featured .sol-tile-footer { margin-top: .5rem; }
.sol-tile--featured .sol-tile-location { color: rgba(255, 255, 255, .9); }
.sol-tile--featured .sol-btn-more { border-color: var(--ds-white); color: var(--ds-white); }
.sol-tile--featured:hover .sol-btn-more,
.sol-tile--featured .sol-btn-more:hover {
  background: var(--ds-white);
  border-color: var(--ds-white);
  color: var(--ds-navy);
}

/* ── Scroll fade-in (class added by reveal.js) ──────────────── */
.sol-reveal .sol-tile {
  opacity: 0;
  translate: 0 24px;
  transition:
    opacity .7s cubic-bezier(.2, .8, .2, 1),
    translate .7s cubic-bezier(.2, .8, .2, 1),
    transform .35s cubic-bezier(.2, .8, .2, 1),
    box-shadow .35s ease;
}
.sol-reveal .sol-tile.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* ── Last-row fill (classes from bento_tile_classes()) ──────────
   A tile that spans 2-3 columns switches to a horizontal layout. */
@media (min-width: 576px) and (max-width: 991.98px) {
  .sol-tile--md-span-2 { grid-column: span 2; }
  .sol-tile--md-span-2:not(.sol-tile--featured) { flex-direction: row; }
  .sol-tile--md-span-2:not(.sol-tile--featured) .sol-tile-media {
    flex: 0 0 45%;
    aspect-ratio: auto;
    min-height: 220px;
    margin: .75rem 0 .75rem .75rem;
  }
}
@media (min-width: 992px) {
  .sol-tile--lg-span-2 { grid-column: span 2; }
  .sol-tile--lg-span-3 { grid-column: span 3; }
  :is(.sol-tile--lg-span-2, .sol-tile--lg-span-3):not(.sol-tile--featured) { flex-direction: row; }
  :is(.sol-tile--lg-span-2, .sol-tile--lg-span-3):not(.sol-tile--featured) .sol-tile-media {
    flex: 0 0 45%;
    aspect-ratio: auto;
    min-height: 240px;
    margin: .75rem 0 .75rem .75rem;
  }
  .sol-tile--lg-span-3:not(.sol-tile--featured) .sol-tile-media { flex-basis: 40%; }
}
:is(.sol-tile--md-span-2, .sol-tile--lg-span-2, .sol-tile--lg-span-3) .sol-tile-body { justify-content: center; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sol-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sol-tile--featured { grid-row: span 1; min-height: 420px; }
}
@media (max-width: 575.98px) {
  .sol-bento-section { padding: 2.5rem 0; }
  .sol-bento { grid-template-columns: minmax(0, 1fr); gap: 1rem; grid-auto-rows: auto; }
  .sol-tile--featured { grid-column: auto; min-height: 380px; }
  .sol-tile { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .sol-tile,
  .sol-tile-media img,
  .sol-btn-more-arrow { transition: none; }
  .sol-tile:hover,
  .sol-tile:hover .sol-tile-media img { transform: none; }
}
