/* 3D curved gallery on the home page (14/11/2026). The photos stand on the inside of an arc:
   the one in the middle faces the visitor, the ones at the sides bend toward them. Behaviour in js/gallery3d.js. */
.g3d { position: relative; margin-top: 26px; }
.g3d-stage { position: relative; height: 470px; overflow: hidden; perspective: 1100px; perspective-origin: 50% 50%; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; border-radius: 22px;
  background: radial-gradient(900px 380px at 50% 50%, rgba(25, 67, 145, .10), transparent 70%); }
.g3d-stage.is-drag { cursor: grabbing; }
/* soft fade at both edges, so photos leave the arc instead of being cut */
.g3d-stage { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.g3d-ring { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.g3d-item { position: absolute; top: 50%; left: 50%; width: var(--g3d-w, 250px); height: var(--g3d-h, 340px); margin: calc(var(--g3d-h, 340px) / -2) 0 0 calc(var(--g3d-w, 250px) / -2); border-radius: 18px; overflow: hidden; background: #e2e8f0; box-shadow: 0 30px 60px -30px rgba(2, 6, 23, .55); pointer-events: auto; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.g3d-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.g3d-item.is-front { box-shadow: 0 34px 70px -28px rgba(25, 67, 145, .6); }
.g3d-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.g3d-cap { margin: 0; min-height: 3em; flex: 0 1 520px; display: grid; place-items: center; text-align: center; font-weight: 600; font-size: 1rem; line-height: 1.5; color: var(--text-primary, #0f172a); transition: opacity .25s ease; }
.g3d-cap.is-swap { opacity: 0; }
.g3d-nav { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(100, 116, 139, .3); background: var(--bg-card, #fff); color: var(--text-primary, #0f172a); cursor: pointer; display: grid; place-items: center; font-size: 1rem; transition: background .15s ease, transform .15s ease, border-color .15s ease; }
.g3d-nav:hover { border-color: #1f4fa8; color: #1f4fa8; transform: scale(1.06); }
.g3d-nav:active { transform: scale(.95); }
.g3d-source[hidden] { display: none !important; }
body.dark-theme .g3d-stage { background: radial-gradient(900px 380px at 50% 50%, rgba(56, 189, 248, .12), transparent 70%); }
body.dark-theme .g3d-nav { background: #111827; color: #e5e7eb; border-color: rgba(148, 163, 184, .3); }
body.dark-theme .g3d-cap { color: #e5e7eb; }

@media (max-width: 900px) { .g3d-stage { height: 400px; } }
@media (max-width: 600px) {
  .g3d-stage { height: 330px; perspective: 800px; border-radius: 16px; }
  .g3d-item { border-radius: 14px; }
  .g3d-cap { font-size: .92rem; }
  .g3d-nav { width: 42px; height: 42px; }
}
