/* ==========================================================================
   AEROSPACE & DEFENCE — page-specific additions
   Loaded after sector-detail.css, only by page-aerospace-and-defence.php.
   Mirrors the electronics page's .el-grp / .el-marq logo-rail pattern
   (sector-detail.css, scoped to .sd--elec) under its own .sd--aero scope,
   so neither page's rules touch the other ten sector pages.
   ========================================================================== */

/* ── overview marquee: the names the new "Built for global scale" copy
   promises right after it ─────────────────────────────────────────────── */
.sd--aero .ad-marq{
  position:relative;overflow:hidden;
  border:1px solid var(--line);border-radius:var(--r-lg);
  background:var(--line);
  box-shadow:0 22px 54px rgba(0,36,180,.07);
  display:block;gap:0;
  width:100%;min-width:0;max-width:100%;
  margin-top:clamp(1.6rem,3vw,2.4rem);
}
.sd--aero .ad-marq .sd-rail{display:flex;width:max-content}
.sd--aero .ad-marq .sd-rail__t{display:flex;gap:1px;padding-right:1px;flex:0 0 auto}
.sd--aero .ad-marq .sd-tile{flex:0 0 auto;width:clamp(128px,14vw,180px)}
.sd--aero .ad-marq::before,
.sd--aero .ad-marq::after{
  content:"";position:absolute;top:0;bottom:0;z-index:2;pointer-events:none;
  width:clamp(26px,4.5vw,64px);
}
.sd--aero .ad-marq::before{left:0;background:linear-gradient(90deg,var(--paper),transparent)}
.sd--aero .ad-marq::after{right:0;background:linear-gradient(270deg,var(--paper),transparent)}

@media (prefers-reduced-motion:reduce){
  .sd--aero .ad-marq .sd-rail__t{animation:none}
  .sd--aero .ad-marq .sd-rail__t[aria-hidden="true"]{display:none}
  .sd--aero .ad-marq .sd-rail{overflow-x:auto;width:auto;scrollbar-width:thin}
}
html.no-motion .sd--aero .ad-marq .sd-rail__t{animation:none}
html.no-motion .sd--aero .ad-marq .sd-rail__t[aria-hidden="true"]{display:none}
html.no-motion .sd--aero .ad-marq .sd-rail{overflow-x:auto;width:auto}

/* ── capability tabs: Defence R&D, Space, MRO, Drones share one framed
   panel, switched by a sliding-pill tab bar (assets/js/aerospace.js) ──── */
.sd--aero .ad-tabsec{position:relative;padding-block:clamp(2rem,3.6vw,2.8rem);background:var(--paper-2)}

.sd--aero .ad-tabsec .sec-head{grid-template-columns:1fr;justify-items:center;text-align:center;margin-bottom:1.2rem}
.sd--aero .ad-tabsec .sec-head__t{justify-items:center;gap:.4rem}

.sd--aero .ad-tabs{
  position:relative;isolation:isolate;display:flex;flex-wrap:wrap;gap:.3rem;
  padding:.4rem;margin:0 auto 1.6rem;
  border:1px solid var(--line);border-radius:var(--r-pill);
  background:#fff;width:max-content;max-width:100%;
  justify-content:center;
}
.sd--aero .ad-tab{
  position:relative;z-index:1;display:inline-flex;align-items:center;gap:.6rem;
  padding:.55rem 1.25rem .55rem .55rem;border-radius:var(--r-pill);border:0;
  background:none;font:inherit;font-family:var(--f-head);font-weight:700;font-size:.86rem;
  color:var(--ink-2);cursor:pointer;transition:color .35s var(--e-out);white-space:nowrap;
}
.sd--aero .ad-tab__ic{
  display:grid;place-items:center;flex:0 0 auto;width:30px;height:30px;border-radius:50%;
  background:color-mix(in srgb,var(--sd-accent) 10%,transparent);color:var(--sd-accent);
  transition:background .35s var(--e-out),color .35s var(--e-out),transform .4s var(--e-spring);
}
.sd--aero .ad-tab__ic svg{width:55%;height:55%}
.sd--aero .ad-tab:hover{color:var(--ink)}
.sd--aero .ad-tab.is-on{color:#fff}
.sd--aero .ad-tab.is-on .ad-tab__ic{background:rgba(255,255,255,.22);color:#fff;transform:scale(1.08)}
.sd--aero .ad-tab:focus-visible{outline:2px solid var(--sd-accent);outline-offset:2px}
.sd--aero .ad-tabs__pill{
  position:absolute;top:.4rem;bottom:.4rem;left:0;z-index:0;border-radius:var(--r-pill);
  background:linear-gradient(135deg,var(--sd-accent) 0%,#001E8F 100%);
  box-shadow:0 10px 26px -12px color-mix(in srgb,var(--sd-accent) 60%,transparent);
  transition:transform .55s var(--e-out),width .55s var(--e-out);
}

/* every panel shares the same grid cell so switching tabs never changes the
   section's height, and the browser's own #hash scroll always lands on the
   right box regardless of which panel js has made visible */
/* grid-template-columns is required here, not decorative: without it the
   implicit column defaults to auto, which grows to the widest stacked
   panel's min-content (the 4-stat row alone wants ~560px) — invisible on a
   1200px+ desktop shell, but it blew the whole section past a phone's
   viewport and forced the page into horizontal scroll */
.sd--aero .ad-panels{position:relative;display:grid;grid-template-columns:minmax(0,1fr)}
.sd--aero .ad-panel{
  grid-area:1/1;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(14px);
  transition:opacity .5s var(--e-out),transform .6s var(--e-out),visibility .5s;
  border-radius:var(--r-lg);
  padding:clamp(1.6rem,3vw,2.6rem);
}
.sd--aero .ad-panel.is-on{opacity:1;visibility:visible;pointer-events:auto;transform:none}

/* the figure always sits left, the copy always sits right, whichever tab is
   open — a consistent frame the eye doesn't have to re-learn per click */
.sd--aero .ad-panel__lay{
  display:grid;grid-template-columns:minmax(0,42%) minmax(0,1fr);
  align-items:center;gap:clamp(1.8rem,3.6vw,3rem);
}
.sd--aero .ad-panel__lay .ad-feat__fig{order:1;min-width:0}
/* a grid item's automatic minimum size is ~min-content regardless of its
   track's own minmax(0,...) — .ad-feat__stats' hard 140px-per-column floor
   was forcing this column to grow past its 1fr share and blow out the row */
.sd--aero .ad-panel__lay .ad-feat__panel{order:2;min-width:0}

.sd--aero .ad-feat__t{
  font-family:var(--f-head);font-weight:700;color:var(--ink);
  font-size:clamp(1.3rem,2.3vw,1.9rem);line-height:1.14;letter-spacing:-.03em;margin:0 0 .8rem;
}
.sd--aero .ad-feat__p{font-size:clamp(.94rem,.4vw + .86rem,1.02rem);line-height:1.68;max-width:52ch;margin:0 0 1.4rem;color:var(--ink-2)}

.sd--aero .ad-feat__fig{
  position:relative;border-radius:var(--r-lg);overflow:hidden;aspect-ratio:4/3;
  border:1px solid var(--line);box-shadow:0 24px 48px -22px rgba(2,10,40,.22);
}
.sd--aero .ad-feat__fig::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(205deg,transparent 46%,rgba(2,8,28,.55) 100%);
}
.sd--aero .ad-feat__fig img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;transition:transform .9s var(--e-out)}
.sd--aero .ad-panel:hover .ad-feat__fig img{transform:scale(1.045)}
.sd--aero .ad-feat__cap{
  position:absolute;left:0;right:0;bottom:0;z-index:2;margin:0;padding:1.1rem 1.2rem;
  font-family:var(--f-head);font-weight:700;font-size:.7rem;letter-spacing:.09em;text-transform:uppercase;
  line-height:1.6;color:#fff;
}

.sd--aero .ad-feat__stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.9rem;margin:0 0 1.5rem}
.sd--aero .ad-feat__stat{
  padding:1rem 1.1rem;border-radius:var(--r);
  border:1px solid var(--line);background:#fff;
  transition:transform .35s var(--e-out),border-color .35s var(--e-out),box-shadow .35s var(--e-out);
}
.sd--aero .ad-feat__stat:hover{transform:translateY(-3px);border-color:var(--sd-accent);box-shadow:0 14px 28px -18px rgba(2,10,40,.25)}
.sd--aero .ad-feat__stat-top{display:flex;align-items:center;justify-content:flex-end;margin-bottom:.35rem}
.sd--aero .ad-feat__stat-ic{
  display:flex !important; align-items: center; justify-content: center; place-items:center;width:48px;height:48px;border-radius:50%;
  background:color-mix(in srgb,var(--sd-accent) 10%,transparent);color:var(--sd-accent);
}
.sd--aero .ad-feat__stat-ic svg{width:58%;height:58%}
.sd--aero .ad-feat__stat b{display:block;font-family:var(--f-head);font-weight:700;font-size:1.2rem;margin-bottom:.2rem;color:var(--ink)}
.sd--aero .ad-feat__stat span{font-size:.82rem; display: block; line-height:1.5;color:var(--ink-2)}

/* key players sits in the text column, under the stats — plain logos, no
   card chrome, so they read as a credits line rather than another box */
.sd--aero .ad-feat__players{margin-top:1.4rem}
.sd--aero .ad-feat__players h4{
  display:flex;align-items:center;gap:.6rem;
  font-family:var(--f-head);font-size:.7rem;letter-spacing:.13em;text-transform:uppercase;margin:0 0 .9rem;color:var(--ink-2);
}
.sd--aero .ad-feat__players h4::after{content:"";flex:1;height:1px;background:var(--line)}
.sd--aero .ad-feat__plogos{display:flex;flex-wrap:wrap;align-items:center;gap:2rem}
.sd--aero .ad-feat__plogos img{
  height:58px;width:auto;max-width:190px;object-fit:contain;
  transition:transform .3s var(--e-out),opacity .3s var(--e-out);
  opacity:.85;
}
.sd--aero .ad-feat__plogos img:hover{transform:translateY(-2px);opacity:1}
.sd--aero .ad-feat__plogos img.is-light-logo{filter:invert(1)}

@media (max-width:900px){
  .sd--aero .ad-panel{padding:clamp(1.3rem,5vw,1.8rem)}
  .sd--aero .ad-panel__lay{grid-template-columns:1fr}
  .sd--aero .ad-feat__fig{aspect-ratio:16/9}
}
@media (max-width:560px){
  .sd--aero .ad-tabs{width:100%;justify-content:space-between}
  .sd--aero .ad-tab{padding:.5rem .8rem .5rem .5rem;font-size:.78rem;gap:.45rem}
  .sd--aero .ad-tab__ic{width:26px;height:26px}
}

/* Top Companies uses the same sliding-pill language as the capability
   switcher, while each category keeps its own logo grid. The tab rail scrolls
   sideways on smaller screens instead of wrapping and breaking the pill. */
.sd--aero .ad-company-tabs{
  flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
  margin:0 0 clamp(1.3rem,2.4vw,1.9rem);
}
.sd--aero .ad-company-tabs::-webkit-scrollbar{display:none}
.sd--aero .ad-company-tab{flex:0 0 auto}
.sd--aero .ad-company-panels{min-width:0}
.sd--aero .ad-company-panel{min-width:0;animation:ad-company-in .48s var(--e-out) both}
.sd--aero .ad-company-panel[hidden]{display:none}
@keyframes ad-company-in{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:none}
}
@media (max-width:560px){
  .sd--aero .ad-company-tabs{width:100%;justify-content:flex-start}
}
@media (prefers-reduced-motion:reduce){
  .sd--aero .ad-company-panel{animation:none}
}

/* a slimmer marquee for the text column: same rail/fade machinery as the
   overview section's full-width ticker, just narrower tiles so five very
   differently-cropped DPSU marks glide past evenly instead of sitting in a
   static row of mismatched widths */
.sd--aero .ad-marq--sm{
  --marq-a:var(--paper-2);--marq-b:var(--paper-2);
  border:0;background:none;box-shadow:none;margin-top:0;
}
.sd--aero .ad-marq--sm .sd-tile{width:clamp(112px,12vw,140px);padding:.5rem .3rem;background:none}
.sd--aero .ad-marq--sm .sd-tile img{height:clamp(38px,4.4vw,52px);opacity:.85}
.sd--aero .ad-marq--sm .sd-tile:hover img{opacity:1}
