/* ==========================================================================
   Vindex — swipe cards (featured-grid / article-grid)  ·  v1
   Loaded LAST. Replaces the layered overrides with one coherent layout:
   full-width track · room for lift/shadow · edge fades · glass controls ·
   staggered reveal.
   ========================================================================== */

/* Short alias used below:  P = html body[data-design-version][data-vx-page] */

/* ---------- 1. TRACK ------------------------------------------------------ */
html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all],
html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all]{
  --vx-gap:28px;--vx-cols:3;--fade-l:0px;--fade-r:0px;
  display:flex!important;flex-wrap:nowrap!important;align-items:stretch!important;
  gap:var(--vx-gap)!important;
  width:100%!important;max-width:none!important;box-sizing:border-box!important;
  /* padding gives lift + shadow room; negative margin keeps the page rhythm */
  padding:34px 4px 50px!important;margin:-34px 0 -26px!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scroll-snap-type:x mandatory!important;scroll-padding-inline:4px!important;
  overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:none;-ms-overflow-style:none;
  cursor:grab;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]::-webkit-scrollbar,
html body[data-design-version][data-vx-page] .article-grid[data-swipe-all]::-webkit-scrollbar{display:none}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all].is-dragging,
html body[data-design-version][data-vx-page] .article-grid[data-swipe-all].is-dragging{cursor:grabbing}

html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all]>*,
html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all]>*{
  flex:0 0 calc((100% - var(--vx-gap)*(var(--vx-cols) - 1))/var(--vx-cols))!important;
  width:calc((100% - var(--vx-gap)*(var(--vx-cols) - 1))/var(--vx-cols))!important;
  max-width:none!important;min-width:0!important;
  scroll-snap-align:start!important;scroll-snap-stop:normal;
}
@media(max-width:1199px){
  html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all],
  html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all]{--vx-cols:2;--vx-gap:22px}
}
@media(max-width:760px){
  html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all],
  html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all]{
    --vx-cols:1;--vx-gap:16px;padding-inline:2px!important;
    --vx-card:86%;
  }
  html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all]>*,
  html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all]>*{
    flex-basis:var(--vx-card)!important;width:var(--vx-card)!important;
  }
}

/* ---------- 2. FEATURED CARD ---------------------------------------------- */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card{
  display:flex!important;flex-direction:column!important;
  border-radius:26px!important;
  border:1px solid rgba(139,201,211,.2)!important;
  background:
    radial-gradient(120% 70% at 100% 100%,rgba(76,173,188,.34),transparent 60%),
    linear-gradient(160deg,#04151c 0%,#0a3039 52%,#1d6e7b 100%)!important;
  box-shadow:0 18px 38px -26px rgba(3,31,43,.65),0 1px 0 rgba(210,249,255,.08) inset!important;
  transition:transform .45s cubic-bezier(.2,.7,.2,1)!important;will-change:transform;
  isolation:isolate;
}
/* hover: lift + brighter edge (JS sets data-vx-card-hover, :focus-within for keyboard) */
@media(hover:hover) and (pointer:fine){
  html:not([data-vx-edit-mode]) body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover],:focus-within){
    transform:translate3d(0,-10px,0)!important;
    border-color:rgba(176,230,238,.5)!important;
    box-shadow:0 34px 52px -24px rgba(3,31,43,.7),0 0 0 1px rgba(176,230,238,.12),0 1px 0 rgba(210,249,255,.14) inset!important;
  }
}

/* ---------- 3. MEDIA (gallery) -------------------------------------------- */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-media{
  flex:0 0 auto;height:clamp(200px,17vw,250px)!important;border-radius:0!important;overflow:hidden!important;
}
/* blend picture into the body */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-media::before{
  content:""!important;display:block!important;position:absolute;inset:auto 0 0 0;height:55%;z-index:2;pointer-events:none;
  background:linear-gradient(0deg,rgba(4,21,28,.92),rgba(4,21,28,0));
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .media-slide img{
  width:100%!important;height:100%!important;object-fit:cover!important;display:block;
}

/* arrows / counter: back to the ORIGINAL site design (counter + pause were hidden originally) */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .gallery-tools{display:none!important}

/* ---------- 4. CARD BODY --------------------------------------------------- */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card>.featured-body{
  flex:1 1 auto;display:flex!important;flex-direction:column;gap:12px;
  padding:6px 28px 28px!important;transform:none!important;will-change:auto;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body .eyebrow{
  display:flex;align-items:center;gap:12px;margin:0!important;color:#acdfe7!important;-webkit-text-fill-color:#acdfe7!important;
  font-size:14px!important;font-weight:500!important;letter-spacing:.04em;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body .eyebrow::before{
  transition:filter .5s ease;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover],:focus-within) .eyebrow::before{filter:brightness(1.5)}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body h3{margin:0!important;color:#fff!important;-webkit-text-fill-color:#fff!important;line-height:1.28!important;font-size:21px!important;font-weight:600!important;text-align:left!important;letter-spacing:-.01em}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body p:not(.eyebrow){margin:0!important;color:rgba(230,246,248,.82)!important;-webkit-text-fill-color:rgba(230,246,248,.82)!important;line-height:1.6;font-size:15px!important;font-weight:400!important;text-align:left!important}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body h3 br{display:none}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body h3{text-wrap:balance}
/* button pinned to the bottom so all cards align */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body .text-link{
  margin-top:auto!important;align-self:flex-start;gap:10px;height:auto!important;width:auto!important;min-height:0!important;font-size:14px!important;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body{--pad-top:6px}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body p:not(.eyebrow)+.text-link{margin-top:auto!important}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body p:not(.eyebrow){margin-bottom:10px!important}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body .text-link::after{
  display:inline-block;transition:transform .35s cubic-bezier(.2,.7,.2,1)!important;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .featured-body .text-link:hover::after,
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover]) .featured-body .text-link::after{transform:translateX(5px)}

/* ---------- 5. STAGGERED REVEAL (only when JS armed it) -------------------- */
@keyframes vxCardIn{
  from{opacity:0}
  to{opacity:1}
}
html body[data-design-version][data-vx-page] .vx-reveal-ready[data-swipe-all]:not(.is-revealed)>*{opacity:0!important}
html body[data-design-version][data-vx-page] .vx-reveal-ready[data-swipe-all].is-revealed>*{
  animation:vxCardIn .8s ease-out backwards!important;
  animation-delay:calc(var(--i,0)*120ms)!important;
}
html[data-vx-edit-mode] body[data-design-version][data-vx-page] .vx-reveal-ready[data-swipe-all]>*{opacity:1!important;animation:none!important}

/* ---------- 6. ARTICLE CARDS: only the track fixes (shadow room, equal height) */
html body[data-design-version][data-vx-page] .article-grid[data-swipe-all]>.article-card{display:flex;flex-direction:column}

/* ---------- 8. REDUCED MOTION ---------------------------------------------- */
@media(prefers-reduced-motion:reduce){
  html body[data-design-version][data-vx-page] .vx-reveal-ready[data-swipe-all]>*{opacity:1!important;animation:none!important}
  html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card{transition:none!important}
}

/* calm hover: no sweeping overlay, no extra repaints */
html:not([data-vx-edit-mode]) body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card .featured-media::after{transition:none!important;transform:none!important}

/* BUG FIX: while dragging with the mouse, snapping must be OFF, otherwise every scrollLeft write is pulled back
   to the nearest snap point (the "stutter / shaking"). The old is-dragging rule was out-ranked by the rules above. */
html body[data-design-version][data-vx-page] .featured-grid.featured-grid[data-swipe-all].is-dragging,
html body[data-design-version][data-vx-page] .article-grid.article-grid[data-swipe-all].is-dragging{
  scroll-snap-type:none!important;scroll-behavior:auto!important;user-select:none;-webkit-user-select:none;
}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all].is-dragging>.featured-card{transition:none!important;pointer-events:none}
/* each card is its own paint island: scrolling the track never repaints card contents */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card{contain:layout paint style}
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]{touch-action:pan-y pinch-zoom}

/* ==========================================================================
   COLOURFUL PICTURE — pictures rest slightly muted, burst into full colour on hover.
   Only filter / transform / opacity (GPU), no pointer tracking.
   ========================================================================== */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .media-slide img{
  filter:saturate(.5) brightness(.82) contrast(.96)!important;
  transition:filter .7s cubic-bezier(.2,.7,.2,1)!important;will-change:filter;
}
@media(hover:hover) and (pointer:fine){
  html:not([data-vx-edit-mode]) body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover],:focus-within) .media-slide img{
    filter:saturate(1.18) brightness(1.04) contrast(1.04)!important;
  }
  html:not([data-vx-edit-mode]) body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover],:focus-within){
    transform:translate3d(0,-8px,0)!important;
    box-shadow:0 28px 44px -24px rgba(3,31,43,.65),0 0 0 1px rgba(176,230,238,.18)!important;
  }
}
/* touch devices have no hover: show the pictures in full colour */
@media(hover:none){
  html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .media-slide img{filter:saturate(1.05)!important}
}
/* the dark side-gradient over the picture fades away together with the muting */
html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card .featured-media::after{opacity:1;transition:opacity .7s ease!important}
@media(hover:hover) and (pointer:fine){
  html:not([data-vx-edit-mode]) body[data-design-version][data-vx-page] .featured-grid[data-swipe-all]>.featured-card:is([data-vx-card-hover],:focus-within) .featured-media::after{opacity:0;transform:none!important}
}
@media(prefers-reduced-motion:reduce){html body[data-design-version][data-vx-page] .featured-grid[data-swipe-all] .media-slide img{transition:none!important}}

/* Keep long Armenian service titles within narrow cards. */
@media(max-width:1199px){html body[data-design-version][data-vx-page] .featured-grid .scenario-title{min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;word-break:normal!important;height:auto!important}}
