/* Arima site add-ons v1 (Nov 2026): photo lightbox, video embeds, mobile fixes.
   Loaded after style.css; nothing here changes the builder or forms. */

/* ---------- Gallery tiles ---------- */
.section > .gallery-grid{width:var(--container);margin-inline:auto}
.gallery-tile,.alb-trigger{cursor:zoom-in;position:relative}
.gallery-tile{display:block;width:100%}
.gallery-tile img{transition:transform .4s ease}
.gallery-tile:hover img{transform:scale(1.03)}
.gallery-tile:focus-visible,.alb-trigger:focus-visible{outline:3px solid var(--brand);outline-offset:3px}
.gallery-tile::after{
  content:"";position:absolute;right:.6rem;bottom:.6rem;width:34px;height:34px;border-radius:999px;
  background:rgba(8,18,33,.62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E") center/18px no-repeat;
  pointer-events:none
}

/* ---------- Lightbox ---------- */
html.alb-open,html.alb-open body{overflow:hidden}
html.alb-open body{position:fixed;left:0;right:0;width:100%}
.alb{position:fixed;inset:0;z-index:1000;background:rgba(4,10,20,.95);display:flex;flex-direction:column;
  -webkit-user-select:none;user-select:none;touch-action:none}
.alb[hidden]{display:none}
.alb__stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;
  padding:4.25rem 4.5rem .5rem}
.alb__img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:10px;
  transform-origin:center center;will-change:transform;background:#0b1730}
.alb.is-zoomed .alb__img{cursor:grab;border-radius:0}
.alb.is-loading .alb__img{opacity:.35}
.alb__bar{padding:.5rem 1rem calc(1rem + env(safe-area-inset-bottom,0px));text-align:center;color:#fff}
.alb__caption{margin:0 auto;max-width:44rem;font-size:1rem;line-height:1.4}
.alb__counter{margin:.3rem 0 0;color:rgba(255,255,255,.72);font-size:.9rem;letter-spacing:.05em}
.alb__counter:empty{display:none}
.alb__btn{position:absolute;display:flex;align-items:center;justify-content:center;width:52px;height:52px;
  border:0;border-radius:999px;background:rgba(255,255,255,.94);color:#0a1324;font-size:2rem;line-height:1;
  box-shadow:0 8px 24px rgba(0,0,0,.35);z-index:2;padding:0}
.alb__btn:focus-visible{outline:3px solid var(--brand-2);outline-offset:3px}
.alb__btn[hidden]{display:none}
.alb__close{top:calc(.75rem + env(safe-area-inset-top,0px));right:.75rem}
.alb__nav{top:50%;transform:translateY(-50%);font-size:2.4rem;padding-bottom:4px}
.alb__prev{left:.75rem}
.alb__next{right:.75rem}
.alb.is-zoomed .alb__nav,.alb.is-zoomed .alb__bar{opacity:0;pointer-events:none}

/* ---------- Video (click-to-play YouTube) ---------- */
.video-embed{width:var(--container);margin-inline:auto}
.video-embed__facade,.video-embed__frame{position:relative;display:block;width:100%;aspect-ratio:16/9;
  border-radius:var(--radius);overflow:hidden;background:#000;box-shadow:var(--shadow)}
.video-embed__facade img{width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.video-embed__facade:hover img{transform:scale(1.02)}
.video-embed__play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:76px;height:54px;
  border-radius:16px;background:#e62117;display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px rgba(0,0,0,.35)}
.video-embed__play::before{content:"";border-style:solid;border-width:12px 0 12px 20px;border-color:transparent transparent transparent #fff;margin-left:4px}
.video-embed__frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.video-embed__note{margin:.7rem 0 0;color:var(--ink-soft);font-size:.95rem}
.video-embed__note a{color:#0c5f82;font-weight:600}

/* ---------- Small fixes ---------- */
.model-hero .muted a,.page-hero .muted a{color:var(--brand-2);text-decoration:underline;text-underline-offset:3px}
.footer-links a{overflow-wrap:anywhere}
.breadcrumbs a{display:inline-block;padding:.35rem 0}

/* ---------- Phones and small tablets ---------- */
@media (max-width: 860px){
  /* Compact header: logo left, menu button right, top bar on one line */
  .topbar-inner{flex-direction:row;align-items:center;flex-wrap:wrap;gap:.5rem 1rem;padding:.45rem 0}
  .topbar-actions{gap:.75rem}
  .topbar-link{display:inline-block;padding:.5rem 0}
  .header-inner{flex-direction:row;align-items:center;padding:.55rem 0}
  .brand img{height:52px}
  .nav-toggle{display:flex;flex-direction:column;justify-content:center;align-items:center;width:48px;height:48px;padding:0}
  .site-nav{max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px)}
  .mega-links a{padding:.75rem .6rem}
  .subnav a{display:block;padding:.85rem .9rem}
  .mega-menu .stacked-buttons .button{flex:1 1 auto}
}
@media (max-width: 640px){
  .gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .gallery-tile{border-radius:14px}
  .gallery-tile img{aspect-ratio:4/3}
  .gallery-tile::after{width:28px;height:28px;background-size:15px;right:.4rem;bottom:.4rem}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
  .photo-grid img{border-radius:14px}
  .photo-grid--large img:nth-child(1){grid-column:1 / -1;grid-row:auto}
  .footer-grid{grid-template-columns:1fr 1fr}
  .footer-grid > div:first-child,.footer-grid > div:last-child{grid-column:1 / -1}
  .footer-links li{margin:0}
  .footer-links a{display:inline-block;padding:.45rem 0}
  .model-hero .hero-actions .button,.cta-panel .hero-actions .button{flex:1 1 100%}
  .cta-panel{padding:1.5rem}
  .tabs .tab-buttons .chip{min-height:44px}
  .model-card__actions .button{min-height:44px}
  .alb__stage{padding:4rem .25rem .25rem}
  .alb__img{border-radius:6px}
  .alb__btn{width:48px;height:48px}
  .alb__nav{top:auto;bottom:calc(.9rem + env(safe-area-inset-bottom,0px));transform:none;background:rgba(255,255,255,.9)}
  .alb__bar{padding:.4rem 4.25rem calc(1rem + env(safe-area-inset-bottom,0px));min-height:72px;display:flex;flex-direction:column;justify-content:center}
  .alb__caption{font-size:.92rem}
  .video-embed__play{width:64px;height:46px}
}
@media (prefers-reduced-motion: reduce){
  .gallery-tile img,.video-embed__facade img{transition:none}
}
