/* ===========================================================================
   AL-SAEED ECONOMIC GROUP  —  pages/p-home.css
   ---------------------------------------------------------------------------
   Home-only sections. Loaded after core.css and before the language sheet,
   so it may lean on the tokens but never on a font family.
   Direction-agnostic: logical properties throughout.
   =========================================================================== */

/* Home's visual signature: teal eyebrows on a white ground. Other pages
   re-point these same aliases to keep each page related but not cloned. */
.page-home{
  --eyebrow-bg:var(--teal-tint);
  --eyebrow-fg:var(--teal-dp);
}

/* ---------------------------------------------------------------------------
   THE GROUP — copy beside a framed photograph
   The two offset rules are pseudo-elements on the figure, so no extra markup
   and nothing to reposition for RTL.
   --------------------------------------------------------------------------- */
/* overflow-x:clip is the backstop for the gold rule below, which is meant to
   sit slightly outside the container. The section runs the full width of the
   page, so this clips at the viewport edge only - the overhang still shows,
   it just can never reach far enough to start a horizontal scrollbar. clip
   rather than hidden, so no scroll container is created. */
.group{
  /* Flat, not a gradient. The reference holds a single very light cream
     across the whole section (sampled 248-253 on each channel); the earlier
     white-to-cream gradient also ran the wrong way, darkening downwards. */
  background:#FAF9F3;
  overflow-x:clip;
}

/* This element is a Bootstrap .row, so it must stay flex - giving it its own
   display:grid re-measures the .col-lg-6 children against a grid track and
   collapses both columns to half their intended width. Only the row gap
   belongs here. */
.group__inner{row-gap:clamp(2.5rem,2rem + 4vw,5rem)}
.group__title{margin:0 0 var(--s-3)}
.group__title span{display:block}
.group__title span:last-child{color:var(--gold-lt)}
.group__text{color:var(--muted);max-width:46ch;margin:0 0 var(--s-4)}

/* The two offset rules are pseudo-elements pinned to the figure's padding
   box, so that padding IS the gap between each rule and the photograph - and
   it has to stay EQUAL on all four sides. An earlier attempt pushed the photo
   to the container edge by loading 84px of padding onto one side only, which
   dragged the teal rule 84px away from the picture on the left while leaving
   it 32px away on top: the corner stopped reading as one L and looked like
   two stray lines. Position the figure with margins, never with padding. */
.group__figure{
  position:relative;margin:0;
  /* 15px, measured between rule and photograph in the reference render */
  padding:var(--frame-offset,.9375rem);
}
/* No drop shadow: sampling across the reference shows the ground stays flat
   right up to the photograph's edge. A shadow here also read as a second,
   softer outline just inside the teal and gold rules. */
.group__frame{
  position:relative;z-index:2;border-radius:var(--r-sm);overflow:hidden;
  aspect-ratio:4/3;
}
.group__frame img{width:100%;height:100%;object-fit:cover}

/* Teal rule on the leading edge, gold rule on the trailing edge.
   The two are NOT the same size in the reference - measured off it, the teal
   L is 450x325 and the gold L is 400x343 inside a 595x458 figure. Giving both
   the same 77% width ran the gold rule 52px too far along the bottom, so its
   end arrived right against the teal 40+ plate and the two read as one joined
   shape instead of two separate corner rules. */
.group__figure::before,
.group__figure::after{
  content:"";position:absolute;z-index:1;pointer-events:none;
}
.group__figure::before{
  width:76%;height:71%;
  top:0;inset-inline-start:0;
  border-top:.1875rem solid var(--teal);
  border-inline-start:.1875rem solid var(--teal);
}
.group__figure::after{
  width:67%;height:75%;
  bottom:0;inset-inline-end:0;
  border-bottom:.1875rem solid var(--gold);
  border-inline-end:.1875rem solid var(--gold);
}

/* The teal "40+ years" plate. In the reference it hangs well clear of the
   photograph's leading edge, into the gap between the two columns - so the
   overhang only applies from 62rem up, where that gap exists. Stacked on a
   phone the same offset would push it into the page gutter. */
.group__badge{
  position:absolute;z-index:3;bottom:clamp(1.5rem,4vw,3rem);
  inset-inline-start:0;
  background:var(--teal);color:var(--white);
  /* 105px tall, measured */
  padding:clamp(.875rem,.6rem + .8vw,1.125rem) clamp(1.25rem,1rem + 1.5vw,2rem);
  border-radius:var(--r-sm);box-shadow:var(--sh-3);
  transition:transform var(--dur) var(--ease);
}
.group__figure:hover .group__badge{transform:translateY(-.375rem)}
/* Kept left-to-right in every edition so the figure always reads "40+" and
   never flips to "+40" under RTL bidi, matching the stat counters. */
.group__badge b{
  display:block;font-family:var(--ff-head, inherit);
  font-size:clamp(1.75rem,1.2rem + 2vw,2.5rem);font-weight:700;line-height:1;
  direction:ltr;
}
.group__badge small{
  display:block;margin-top:.375rem;
  font-size:var(--fs-xs);font-weight:700;letter-spacing:.1em;
  text-transform:uppercase;opacity:.92;
}

@media (min-width:62rem){
  /* the paragraph is set to a 549px measure in the reference, not 42ch */
  .group__text{max-width:min(34.5rem,100%)}

  /* In the reference the photograph is flush with the container's trailing
     edge and the offset rules sit outside it: a wide inset on the leading
     side carries the teal rule, and the gold rule overhangs the trailing
     edge by 19px. That overhang stays well inside the page gutter at every
     width this rule applies to, so it cannot start a scrollbar. */
  /* The photograph is 558px wide in the reference and sits flush with the
     container's trailing edge, with its gold rule alone stepping outside.
     Sizing the figure and pushing it over with auto/negative MARGINS keeps
     the 17px padding - and therefore both L corners - intact. */
  .group__figure{
    max-width:36.75rem;                 /* 558px photo + 2 x 15px */
    margin-inline-start:auto;
    margin-inline-end:calc(var(--frame-offset,.9375rem) * -1);
  }
  /* the plate hangs 129px clear of the photograph's leading edge and just
     below its bottom, measured off the reference */
  .group__badge{
    inset-inline-start:clamp(-7rem,-5.8vw,-2rem);
    bottom:clamp(-1rem,-.75vw,-.25rem);
  }
  /* the reference leaves 47px between the eyebrow and the headline */
  .group .eyebrow{margin-bottom:2.75rem}
}

/* ---------------------------------------------------------------------------
   AT A GLANCE — counters over a darkened photograph
   --------------------------------------------------------------------------- */
.glance{position:relative;overflow:hidden;background:var(--dark)}
.glance__bg{position:absolute;inset:0;z-index:0}
/* The supplied panorama is already very dark (mean luminance ~0.11), so it
   needs no dimming of its own - fading it as well would leave a flat black
   band. It runs at full opacity with only a light scrim for even contrast,
   which keeps white text well clear of AA while the skyline stays readable. */
.glance__bg img{width:100%;height:100%;object-fit:cover;object-position:50% 45%}
.glance__bg::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(20,17,5,.34) 0%,rgba(20,17,5,.62) 100%);
}
.glance__inner{position:relative;z-index:1}

/* ---------------------------------------------------------------------------
   OUR SECTORS — heading block sits on white, panels run full-bleed below
   --------------------------------------------------------------------------- */
.sectors-section{padding-bottom:0}
.sectors-section .section-head{margin-bottom:clamp(2rem,1rem + 3vw,3.5rem)}

/* ---------------------------------------------------------------------------
   OUR COMPANIES — subsidiary logo row on the soft cream ground
   --------------------------------------------------------------------------- */
.companies{background:var(--cream);text-align:center}
.companies .eyebrow{margin-inline:auto}
.companies__title{margin:0 0 clamp(2rem,1rem + 3vw,3.5rem)}

/* ---------------------------------------------------------------------------
   IMAGERY — project cards in a peeking, draggable slider
   --------------------------------------------------------------------------- */
.imagery{background:var(--white);overflow:hidden}
/* The reference runs this strip FULL-BLEED: its first card is cut off at
   the page edge and its last runs past the other one, and the cards it
   draws are 417x324 at the 1920 design width. Ours were 281x214 inside the
   1392px container - the right shape at two thirds the size.

   The start edge still aligns with the rest of the page, because the strip
   stays inside .shell and only its TRAILING margin is pulled out to the
   viewport. `calc(50% - 50vw)` measures from the shell's own content box,
   so it lands exactly on the viewport edge at any width, and being logical
   it mirrors itself in the Arabic and Kurdish editions.

   50vw counts the vertical scrollbar where one exists, so this can reach a
   few pixels past the true edge - .imagery is overflow:hidden and clips it,
   which is why the bleed cannot turn into a page that scrolls sideways. */
.imagery__swiper{
  margin-inline-end:calc(50% - 50vw);
  padding-bottom:var(--s-1);
}
.imagery__swiper .swiper-slide{height:auto}
/* 417px at the 1920 design width - the size the reference draws - scaling
   with the viewport above 1024 and never dropping below 320. Below 1024
   Swiper counts slides per view instead, which is the right model when the
   strip is only one or two cards wide. */
@media (min-width:64rem){
  .imagery__swiper .swiper-slide{width:clamp(20rem,21.7vw,26.0625rem)}
}
.imagery__swiper .swiper-slide .photo-card{height:100%}
/* Swiper needs an explicit grab affordance since there are no visible arrows */
.imagery__swiper{cursor:grab}
.imagery__swiper:active{cursor:grabbing}
