/* ============================================================
   SOLUTIONS PAGE — SHOWCASE GRID + ZOOM-EXPAND DETAIL MODAL
   Extends global.css / corporate.css tokens. Scoped to this page.
   ============================================================ */

.solutions-hero {
  padding: 152px 0 74px;
  /* Server-room photo on the right; the left fades to dark so the
     headline stays readable. */
  background:
    linear-gradient(90deg, rgba(8,10,16,0.94) 0%, rgba(8,10,16,0.7) 38%, rgba(8,10,16,0.1) 70%),
    url("../images/hero/solutions-server.webp") right center / cover no-repeat,
    #080a10;
  border-bottom: 5px solid var(--red);
}

@media (max-width: 640px) {
  .solutions-hero {
    background:
      linear-gradient(180deg, rgba(8,10,16,0.55) 0%, rgba(8,10,16,0.85) 55%, rgba(8,10,16,0.95) 100%),
      url("../images/hero/solutions-server.webp") 85% center / cover no-repeat,
      #080a10;
  }
}

.solutions-hero .breadcrumb { color: rgba(255,255,255,0.55); }
.solutions-hero .breadcrumb a { color: #fff; }

.solutions-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 18px;
}

.solutions-hero-tag strong { color: #fff; font-weight: 800; }

.solutions-hero h1 {
  max-width: 700px;
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}

.solutions-hero p {
  max-width: 620px;
  color: rgba(255,255,255,0.7);
  font-size: 1.03rem;
  line-height: 1.8;
}

/* ===== SHOWCASE GRID ===== */
.solutions-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.solution-tile {
  position: relative;
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(15,27,45,0.05);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

.solution-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(227,6,19,0.28);
  box-shadow: 0 20px 44px rgba(15,27,45,0.12);
}

.solution-tile--feature {
  grid-column: span 2;
}

.solution-tile-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 190px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.15) 0%, rgba(10,10,10,0.78) 100%),
    var(--tile-grad, linear-gradient(135deg, #1c1c1c, #2d2d2d));
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 480ms ease;
}

.solution-tile--feature .solution-tile-visual { min-height: 240px; }

/* Photo layer for each tile. Each tile sets its own photo through the
   --tile-img variable in solutions.html (and js/solutions.js for the
   modal banner). solutions.JPG is only used as a fallback. */
.solution-tile-visual.has-image {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.1) 0%, rgba(10,10,10,0.8) 100%),
    var(--tile-img, url("../images/solutions/solutions.JPG"));
  background-size: cover;
  background-position: center;
}

.solution-tile:hover .solution-tile-visual { transform: scale(1.03); }

.solution-tile-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.25;
  pointer-events: none;
}

.solution-tile-icon {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(6px);
}

.solution-tile-icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
  stroke-width: 1.8;
}

.solution-tile-label {
  position: relative;
  z-index: 1;
  margin-left: 14px;
  color: rgba(255,255,255,0.82);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.solution-tile-visual-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
}

.solution-tile-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 26px 26px 28px;
}

.solution-tile-body h3 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.solution-tile--feature .solution-tile-body h3 { font-size: 1.36rem; }

.solution-tile-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  margin-bottom: 20px;
  flex: 1;
}

.tile-expand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  color: var(--red);
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  transition: gap 180ms ease;
}

.tile-expand svg { width: 15px; height: 15px; transition: transform 180ms ease; }
.tile-expand:hover { gap: 11px; }
.tile-expand:hover svg { transform: translateX(2px); }

/* ===== ZOOM-EXPAND OVERLAY ===== */
.solution-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  background: rgba(10,10,10,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 420ms ease, backdrop-filter 420ms ease;
}

.solution-overlay.active {
  display: block;
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.solution-overlay-close {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 3002;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(20,20,20,0.55);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, background 180ms ease, transform 180ms ease;
}

.solution-overlay.active .solution-overlay-close {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 200ms;
}

.solution-overlay-close:hover { background: var(--red); transform: rotate(90deg); }

.solution-modal {
  position: fixed;
  overflow: hidden;
  background: #fff;
  will-change: top, left, width, height, border-radius;
  transition:
    top 520ms cubic-bezier(.22,1,.36,1),
    left 520ms cubic-bezier(.22,1,.36,1),
    width 520ms cubic-bezier(.22,1,.36,1),
    height 520ms cubic-bezier(.22,1,.36,1),
    border-radius 520ms cubic-bezier(.22,1,.36,1),
    box-shadow 520ms ease;
}

.solution-modal.open {
  box-shadow: 0 40px 90px rgba(0,0,0,0.38);
}

.solution-modal-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.solution-modal-inner {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms ease, transform 320ms ease;
  transition-delay: 60ms;
}

.solution-modal.open .solution-modal-inner {
  opacity: 1;
  transform: translateY(0);
}

.modal-banner {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 40px;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.05) 0%, rgba(10,10,10,0.85) 100%),
    var(--tile-grad, linear-gradient(135deg, #1c1c1c, #2d2d2d));
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Photo layer — uses the same --tile-img variable as the tiles */
.modal-banner.has-image {
  background:
    linear-gradient(180deg, rgba(10,10,10,0.05) 0%, rgba(10,10,10,0.85) 100%),
    var(--tile-img, url("../images/solutions/solutions.JPG"));
  background-size: cover;
  background-position: center;
}

.modal-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.2;
  pointer-events: none;
}

.modal-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-banner-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-banner-icon svg { width: 30px; height: 30px; color: #fff; stroke-width: 1.7; }

.modal-banner-label {
  color: rgba(255,255,255,0.78);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.modal-banner-title {
  color: #fff;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-top: 4px;
}

.modal-body {
  padding: 40px;
}

.modal-lede {
  max-width: 640px;
  color: var(--text-body);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 34px;
}

.modal-columns {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.modal-block h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.modal-feature-list {
  display: grid;
  gap: 12px;
  margin-bottom: 30px;
}

.modal-feature-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-body);
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-feature-list li svg {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  color: var(--red);
  flex-shrink: 0;
}

.modal-deliverables {
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.modal-deliverables li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-body);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-deliverables li:last-child { border-bottom: 0; }
.modal-deliverables li span:first-child { color: var(--text-muted); }
.modal-deliverables li span:last-child { font-weight: 700; color: var(--text-primary); text-align: right; }

.modal-usecases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 32px;
}

.modal-usecases span {
  display: inline-flex;
  padding: 7px 13px;
  border-radius: 100px;
  background: var(--red-pale);
  border: 1px solid var(--border-red);
  color: var(--red-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.modal-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 28px;
}

/* Wide tile: spans the full row, image on the left and text on the right
   (used for the 6th service so the grid has no empty gaps). */
.solution-tile--wide {
  grid-column: 1 / -1;
  flex-direction: row;
}

.solution-tile--wide .solution-tile-visual {
  flex: 0 0 42%;
  min-height: 220px;
}

.solution-tile--wide .solution-tile-body {
  justify-content: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .solutions-showcase { grid-template-columns: repeat(2, 1fr); }
  .solution-tile--feature { grid-column: span 2; }
  .modal-columns { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .solutions-showcase { grid-template-columns: 1fr; }
  .solution-tile--wide { grid-column: span 1; flex-direction: column; }
  .solution-tile--wide .solution-tile-visual { flex: none; min-height: 190px; }
  .solution-tile--feature { grid-column: span 1; }
  .modal-body { padding: 28px 22px; }
  .modal-banner { padding: 28px 22px; min-height: 190px; }
  .solution-overlay-close { top: 14px; right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .solution-modal { transition: none; }
  .solution-modal-inner { transition: none; opacity: 1; transform: none; }
  .solution-overlay { transition: none; }
}
