/* ===========================================================================
   AL-SAEED ECONOMIC GROUP  —  pages/p-sector-details.css
   ---------------------------------------------------------------------------
   Sector detail. The sixth distinct visual key:
     Home            teal filled eyebrow, expanding six-panel strip
     About           gold filled eyebrow, timeline on one rule
     Chairman        gold-on-dark eyebrow, letter on the dark ground
     Leadership      outlined eyebrow, portrait grid with no card boxes
     Sectors         rule-and-label eyebrow, alternating full-width rows
     Sector detail   a DARK FILLED eyebrow pill on a light ground, and the
                     page's whole structure is a tab set - one page carrying
                     all six sectors, which is also what the source page in
                     the brief (tabs.html) called for.

   One page rather than six keeps the six sector links in the rest of the site
   pointing at a single template, exactly as the MVC route will.
   Direction-agnostic: logical properties throughout.
   =========================================================================== */

.page-sector-details{
  --eyebrow-bg:var(--dark);
  --eyebrow-fg:var(--gold-lt);
  --page-bg:var(--white);
}

/* ---------------------------------------------------------------------------
   TAB STRIP
   --------------------------------------------------------------------------- */
.tabs{background:var(--white)}

.tabs__strip{
  display:flex;gap:.25rem;
  /* scrolls rather than wraps on a phone, so the six stay on one line and the
     reader can swipe through them */
  overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  border-bottom:.0625rem solid var(--line);
  padding-bottom:.0625rem;
}
.tabs__strip::-webkit-scrollbar{display:none}

.tab{
  flex:0 0 auto;position:relative;
  display:inline-flex;align-items:center;gap:.625rem;
  padding:clamp(.875rem,.75rem + .5vw,1.125rem) clamp(1rem,.85rem + .8vw,1.5rem);
  font-family:var(--ff-head, inherit);
  font-size:var(--fs-sm);font-weight:600;
  color:var(--muted);white-space:nowrap;
  background:none;border:0;cursor:pointer;
  transition:color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.tab__idx{
  font-size:var(--fs-xs);font-weight:700;color:var(--gold-dk);
  font-variant-numeric:tabular-nums;
  opacity:.7;transition:opacity var(--dur-fast) var(--ease);
}
/* the underline that marks the selected tab */
.tab::after{
  content:"";position:absolute;inset-inline:0;bottom:-.0625rem;
  height:.1875rem;background:var(--teal);
  transform:scaleX(0);transform-origin:center;
  transition:transform var(--dur) var(--ease);
}
.tab:hover{color:var(--ink)}
.tab[aria-selected="true"]{color:var(--ink)}
.tab[aria-selected="true"]::after{transform:scaleX(1)}
.tab[aria-selected="true"] .tab__idx{opacity:1}

/* ---------------------------------------------------------------------------
   PANELS
   --------------------------------------------------------------------------- */
.tabs__panels{padding-top:clamp(2rem,1.5rem + 2.5vw,3.5rem)}
.panel{outline-offset:.5rem}
/* a panel arriving on screen fades up once; no travel, so switching tabs
   cannot shift the page sideways */
.panel.is-active{animation:panelIn var(--dur-slow) var(--ease-out) both}
@keyframes panelIn{from{opacity:0;transform:translateY(.75rem)}to{opacity:1;transform:none}}

.panel__grid{
  display:grid;gap:clamp(2rem,1.5rem + 2.5vw,3.5rem) var(--gutter);
  grid-template-columns:1fr;
}
@media (min-width:62rem){
  .panel__grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
}

/* Both columns start at the top rather than stretching. A grid item defaults
   to align-self:stretch, which made the figure as tall as whichever column
   was taller - the copy, for every sector - while the picture inside kept its
   4/3 box, so a blank strip appeared under the photograph, up to 130px on the
   longest panel. (It was invisible while the frame was a tall 4/5, because
   then the figure was the taller column.) */
.panel__grid{align-items:start}
/* Without this a single unbreakable child - a monospaced attribute name,
   a long Kurdish compound - sets the item's automatic minimum and the
   one-column grid stops shrinking. Measured at 280px: the panel was 295
   wide inside a 248 box. */
.panel__grid > *{min-width:0}

/* 4/3, which is what four of the six photographs natively are. These are the
   originals out of the reference PDF rather than the tall 384x1272 strips the
   design lays out (see tools/optimize-images.sh), so at 4/3 almost nothing is
   thrown away. The two that differ are why the focal point still travels with
   the sector data as --focus rather than being hard-coded here: Construction
   is a wide 2.19 panorama and Industrial an 0.81 portrait. */
.panel__media{margin:0;overflow:hidden;border-radius:var(--r-md)}
.panel__media picture{display:block;width:100%;aspect-ratio:4/3}
.panel__media img{
  width:100%;height:100%;object-fit:cover;
  object-position:var(--focus, 50% 40%);
}

.panel__name{font-size:var(--fs-h2);margin:0 0 var(--s-2)}
.panel__lead{color:var(--ink-2);font-size:var(--fs-lg);margin:0 0 var(--s-3);max-width:52ch}
.panel__text{color:var(--muted);margin:0 0 var(--s-3);max-width:56ch}

/* facts: a compact definition list, a register this site has not used yet */
.panel__facts{
  display:grid;gap:0;margin:var(--s-3) 0;
  grid-template-columns:1fr;
}
.fact{
  display:grid;gap:.25rem var(--s-2);align-items:baseline;
  grid-template-columns:1fr;
  padding-block:.875rem;
  border-top:.0625rem solid var(--line);
}
.fact:last-child{border-bottom:.0625rem solid var(--line)}
.fact__k{
  font-size:var(--fs-xs);font-weight:700;color:var(--teal-dp);
  letter-spacing:.08em;text-transform:uppercase;
}
.fact__v{margin:0;font-size:var(--fs-sm);color:var(--ink-2)}
@media (min-width:36rem){
  .fact{grid-template-columns:11rem minmax(0,1fr)}
}

.panel__firms{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 var(--s-3)}
.panel__firms li{
  font-size:var(--fs-xs);font-weight:600;color:var(--ink-2);
  background:var(--cream);border:.0625rem solid var(--line);
  border-radius:var(--r-pill);padding:.4375rem .875rem;
}
.panel__actions{display:flex;flex-wrap:wrap;gap:var(--s-2)}
