/* ════════════════════════════════════════════════════════════════
   IADA Modern — motion + visual layer
   ════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Roboto:wght@400;500;700&display=swap');

:root {
  --iada-primary:        #003D5C;
  --iada-primary-dark:   #002D44;
  --iada-primary-soft:   #1E5A75;
  --iada-accent:         #0274BE;
  --iada-accent-dark:    #015A91;
  --iada-text:           #0F172A;
  --iada-muted:          #64748B;
  --iada-border:         #E2E8F0;
  --iada-surface:        #F7F8FA;
  --iada-surface-2:      #EEF1F5;
  --iada-bg:             #FFFFFF;

  --iada-ease-spring:    cubic-bezier(0.2, 0.8, 0.2, 1);
  --iada-ease-soft:      cubic-bezier(0.25, 0.1, 0.25, 1);

  --iada-shadow-card:    0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 24px rgba(15, 23, 42, 0.06);
  --iada-shadow-hover:   0 2px 4px rgba(15, 23, 42, 0.06), 0 18px 48px rgba(15, 23, 42, 0.10);
}

::selection { background: rgba(2, 116, 190, 0.30); color: #002D44; }
:focus-visible { outline: 2px solid var(--iada-accent); outline-offset: 3px; border-radius: 6px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { transition: opacity 320ms var(--iada-ease-soft); }

/* Standardize on Inter (matches the React landing) across the whole site.
   The React app inside #iada-front-root already uses Inter via Tailwind, so
   this is consistent everywhere and does not change the front page. */
body, .wp-site-blocks {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}


/* ─────────────────────────────────────────────────────────────────
   1. Scroll progress bar
   ───────────────────────────────────────────────────────────────── */

.iada-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--iada-accent), #7FCEEF);
  z-index: 200;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(2, 116, 190, 0.6);
}


/* ─────────────────────────────────────────────────────────────────
   2. Sticky header with scroll-shrink behaviour
   ───────────────────────────────────────────────────────────────── */

header.wp-block-template-part {
  position: sticky; top: 0; z-index: 50;
  /* Transparent over the hero at the top; fades into frosted glass once
     scrolled (.iada-header--scrolled toggled by animations.js at scrollY>16).
     The glass (background + backdrop-filter) lives on the ::before layer below
     so the header ELEMENT never becomes a containing block for fixed
     descendants — otherwise the mobile menu's inset:0 panel would resolve
     against the header box instead of the viewport and get clipped. */
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
/* Glass layer — relocated off the header element so the header does NOT
   establish a containing block for the fixed mobile-menu overlay. */
header.wp-block-template-part::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background 320ms var(--iada-ease-soft),
              -webkit-backdrop-filter 320ms var(--iada-ease-soft),
              backdrop-filter 320ms var(--iada-ease-soft),
              border-color 320ms var(--iada-ease-soft),
              box-shadow 320ms var(--iada-ease-soft);
  pointer-events: none;
}
header.wp-block-template-part.iada-header--scrolled::before {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

/* Header content: kill default inner margins so vertical centering is true.
   Without these, the <ul> from wp:navigation and the link underline padding
   add invisible bottom space that visually pulls the row toward the top. */
header.wp-block-template-part .wp-block-navigation,
header.wp-block-template-part .wp-block-navigation > ul,
header.wp-block-template-part .wp-block-navigation-item,
header.wp-block-template-part .iada-brand--logo,
header.wp-block-template-part .iada-cta-button {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
header.wp-block-template-part .wp-block-navigation a {
  padding: 6px 11px !important;
  border-radius: 9px;
  transition: color 200ms var(--iada-ease-soft), background-color 200ms var(--iada-ease-soft);
}


/* ─────────────────────────────────────────────────────────────────
   3. Content links — clean color-only style (no drawn-underline effect)
   ───────────────────────────────────────────────────────────────── */

/* The old animated drawn-underline "line effect" is gone (the user dislikes
   it). Neutralize any residual line-effect on main links globally; the React
   landing already carries background-image:none !important below, so this
   cannot change the front page. */
main a:not(.wp-block-button__link):not(.wp-block-post-title a):not(.wp-element-button) {
  background-image: none;
  text-decoration: none;
}

/* Interior content links: accent color, accent-dark on hover, no line.
   Scoped to the post-content wrapper so the React app (#iada-front-root,
   a raw div with NO .wp-block-post-content) is never matched. */
.wp-block-post-content a:not(.wp-block-button__link):not(.wp-element-button) {
  color: var(--iada-accent);
  text-decoration: none;
  transition: color 200ms ease;
}
.wp-block-post-content a:not(.wp-block-button__link):not(.wp-element-button):hover,
.wp-block-post-content a:not(.wp-block-button__link):not(.wp-element-button):focus-visible {
  color: var(--iada-accent-dark);
}

/* No drawn-underline "line effect" on the React landing's links (cards have
   their own spotlight hover). Buttons keep their gradient background. */
#iada-front-root a:not(.btn-cruip) {
  background-image: none !important;
}

/* ─────────────────────────────────────────────────────────────────
   3b. Interior-page typography — match the React landing feel
   Scoped to .wp-block-post-title (the page <h1>) and .wp-block-post-content
   (the body), both of which exist ONLY on interior pages. The front page
   (#iada-front-root, a raw div) has neither, so these never touch it.
   ───────────────────────────────────────────────────────────────── */

/* Page title + content headings: bold navy with tight tracking. */
.wp-block-post-title,
.wp-block-post-content h1,
.wp-block-post-content h2,
.wp-block-post-content h3,
.wp-block-post-content h4 {
  color: var(--iada-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Inline media in project / post content (videos + content images). */
.wp-block-post-content video,
.wp-block-post-content img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.75rem auto;
}
.wp-block-post-content video {
  width: 100%;
  background: #000;
}
.wp-block-post-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Body copy: readable measure, comfortable line-height, primary text color. */
.wp-block-post-content {
  color: var(--iada-text);
  line-height: 1.7;
}
.wp-block-post-content p,
.wp-block-post-content li {
  line-height: 1.7;
}

/* Restore even padding on the cards: the global main-a underline rule above
   collapses their bottom padding (specificity beats Tailwind p-5), jamming the
   chips against the edge. */
#iada-front-root a.spotlight-card {
  padding: 1.5rem !important;
}

/* Nav links — modern soft pill highlight on hover (no drawn underline). */
.wp-block-navigation a,
.wp-block-navigation a:hover,
.wp-block-navigation a:focus-visible { text-decoration: none !important; }
.wp-block-navigation a { position: relative; }
.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .wp-block-navigation-item__content:focus-visible {
  color: var(--iada-accent-dark) !important;
  background-color: rgba(2, 116, 190, 0.09);
}
.wp-block-navigation .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
  color: var(--iada-accent-dark) !important;
}

/* Header dropdown submenu (e.g. Research -> Overview / Publications). A white
   rounded panel; opens on hover/focus on desktop. The mobile overlay (<=600px)
   is excluded so WP's overlay shows the sub-items expanded instead. */
header.wp-block-template-part .wp-block-navigation .has-child { position: relative; }
header.wp-block-template-part .wp-block-navigation__submenu-container {
  background: #ffffff;
  border: 1px solid var(--iada-border) !important;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(2, 32, 71, 0.14);
  padding: 6px;
  min-width: 210px;
  left: 0;
  top: 100%;
  margin: 0;
  z-index: 60;
}
header.wp-block-template-part .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  display: block;
  width: 100%;
  padding: 8px 12px !important;
  border-radius: 8px;
  font-size: 0.9rem;
  white-space: nowrap;
}
@media (min-width: 601px) {
  header.wp-block-template-part .wp-block-navigation__submenu-container {
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 160ms var(--iada-ease-soft), transform 160ms var(--iada-ease-soft),
      visibility 160ms var(--iada-ease-soft);
    pointer-events: none;
  }
  header.wp-block-template-part .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
  header.wp-block-template-part .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
/* Mobile overlay: render the submenu inline + indented (not a floating card). */
@media (max-width: 600px) {
  /* the submenu parent <li> is a flex column defaulting to align-items:flex-end
     (right) — force left so Research + its sub-items line up with the rest. */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    align-items: flex-start !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    background: transparent;
    border: 0 !important;
    box-shadow: none;
    padding: 0;
    margin: 0.15rem 0 0.4rem 1.1rem;
    min-width: 0;
  }
  /* Sub-items: smaller, lighter, muted + italic to differentiate from top-level. */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item a {
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
    color: var(--iada-muted);
    letter-spacing: 0.005em;
  }
}

/* Submenu chevron: rotate when the dropdown opens (desktop); hidden on mobile
   where the submenu is rendered inline. */
header.wp-block-template-part .wp-block-navigation__submenu-icon {
  transition: transform 220ms var(--iada-ease-soft);
}
@media (min-width: 601px) {
  header.wp-block-template-part .wp-block-navigation .has-child:hover .wp-block-navigation__submenu-icon,
  header.wp-block-template-part .wp-block-navigation .has-child:focus-within .wp-block-navigation__submenu-icon {
    transform: rotate(180deg);
  }
}
@media (max-width: 600px) {
  header.wp-block-template-part .wp-block-navigation__submenu-icon { display: none; }
}

/* Active-page + ancestor highlight in the header nav (the header script tags
   them, since WP doesn't mark current on custom-URL nav links). */
header.wp-block-template-part .iada-nav-current > .wp-block-navigation-item__content,
header.wp-block-template-part .iada-nav-ancestor > .wp-block-navigation-item__content {
  color: var(--iada-accent-dark) !important;
}
header.wp-block-template-part .iada-nav-current > .wp-block-navigation-item__content { font-weight: 700; }

/* "Home" nav item appears on every page EXCEPT the home page. */
body.home header.wp-block-template-part .iada-nav-home { display: none !important; }

/* Deep-linked sections (e.g. the People dropdown jumping to a section) clear
   the sticky header (~78px) when scrolled into view. */
#iada-front-root section[id] { scroll-margin-top: 6rem; }


/* ─────────────────────────────────────────────────────────────────
   4. Hero + Aurora — flowing background with drifting colored blobs
   ───────────────────────────────────────────────────────────────── */

.iada-hero-grid {
  position: relative; isolation: isolate; overflow: hidden;
  border: 0 !important;
  outline: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
}
/* kill block-gap around the hero so no parent bg leaks above/below it */
.iada-hero-grid + *, * + .iada-hero-grid { margin-top: 0 !important; }
/* kill the 1.5rem WP-global block-gap between <header> and <main> that shows the body bg as a white band above the hero */
.wp-site-blocks > main,
body > main,
main { margin-block-start: 0 !important; margin-top: 0 !important; }

/* Base: deep navy gradient. The actual "aurora" lives in ::before. */
.iada-hero-grid > .wp-block-cover__background {
  background:
    linear-gradient(135deg, #002D44 0%, #003D5C 45%, #0F4D5C 100%) !important;
}

/* AURORA layer — four large blurred radial orbs drifting on independent paths.
   Stronger movement: shorter cycle, bigger displacement, slightly more saturation. */
.iada-hero-grid::before {
  content: "";
  position: absolute; inset: -30%; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at center, rgba(2, 116, 190, 0.55) 0%, rgba(2, 116, 190, 0) 58%),  /* amber */
    radial-gradient(circle at center, rgba(30, 90, 117, 0.65) 0%, rgba(30, 90, 117, 0) 58%),   /* primary-soft */
    radial-gradient(circle at center, rgba(2, 116, 190, 0.40) 0%, rgba(2, 116, 190, 0) 58%), /* amber 2 */
    radial-gradient(circle at center, rgba(16, 185, 129, 0.32) 0%, rgba(16, 185, 129, 0) 58%); /* data-green hint */
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 70% 70%, 60% 60%, 50% 50%, 55% 55%;
  filter: blur(55px) saturate(130%);
  animation: iada-aurora 18s ease-in-out infinite alternate;
  will-change: background-position, transform;
}

/* Add a subtle whole-layer slow rotation to make the drift feel more alive */
.iada-hero-grid::before {
  animation:
    iada-aurora 18s ease-in-out infinite alternate,
    iada-aurora-spin 60s linear infinite;
}

@keyframes iada-aurora {
  0% {
    background-position:
      90%  10%,
      5%   90%,
      55%  40%,
      10%  15%;
  }
  20% {
    background-position:
      30%  25%,
      90%  60%,
      10%  85%,
      80%  5%;
  }
  40% {
    background-position:
      5%   80%,
      65%  10%,
      85%  55%,
      95%  90%;
  }
  60% {
    background-position:
      80%  95%,
      20%  35%,
      95%  10%,
      30%  60%;
  }
  80% {
    background-position:
      60%  5%,
      95%  85%,
      15%  30%,
      55%  95%;
  }
  100% {
    background-position:
      95%  60%,
      10%  90%,
      40%  5%,
      70%  80%;
  }
}

@keyframes iada-aurora-spin {
  from { transform: rotate(0deg) scale(1.08); }
  to   { transform: rotate(360deg) scale(1.08); }
}

/* Subtle grid mesh overlay (sits between aurora and content).
   Offset by 1px so no horizontal line lands at the very top of the cover. */
.iada-hero-grid::after {
  content: "";
  position: absolute; inset: 1px 0 1px 0; pointer-events: none; z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: 0 32px, 32px 0;
  -webkit-mask-image: radial-gradient(ellipse at top right, black 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at top right, black 0%, transparent 70%);
}

/* Hero content sits above the overlay layers */
.iada-hero-grid .wp-block-cover__inner-container { position: relative; z-index: 3; }



/* Reusable aurora — stronger version for CTAs, footer, etc.
   Higher amplitude than before to match the hero. */
.iada-aurora { position: relative; isolation: isolate; overflow: hidden; }
.iada-aurora::before {
  content: "";
  position: absolute; inset: -30%; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at center, rgba(2, 116, 190, 0.42) 0%, rgba(2, 116, 190, 0) 58%),
    radial-gradient(circle at center, rgba(30, 90, 117, 0.55) 0%, rgba(30, 90, 117, 0) 58%),
    radial-gradient(circle at center, rgba(2, 116, 190, 0.30) 0%, rgba(2, 116, 190, 0) 58%);
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: 65% 65%, 55% 55%, 50% 50%;
  filter: blur(60px) saturate(125%);
  animation:
    iada-aurora-slow 22s ease-in-out infinite alternate,
    iada-aurora-spin 80s linear infinite;
  will-change: background-position, transform;
}
.iada-aurora > * { position: relative; z-index: 2; }

@keyframes iada-aurora-slow {
  0%   { background-position: 90% 10%, 10% 90%, 50% 50%; }
  25%  { background-position: 25% 60%, 80% 25%,  5% 85%; }
  50%  { background-position: 80% 90%,  5% 35%, 95% 15%; }
  75%  { background-position: 10% 25%, 65% 95%, 30% 55%; }
  100% { background-position: 60% 75%, 90% 10%, 75% 85%; }
}


/* ─────────────────────────────────────────────────────────────────
   5. Hero text staggered fade-in on load
   ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .iada-hero-grid .wp-block-cover__inner-container > .wp-block-group > * {
    opacity: 0; transform: translate3d(0, 24px, 0);
    animation: iada-rise 900ms var(--iada-ease-spring) forwards;
  }
  .iada-hero-grid .wp-block-cover__inner-container > .wp-block-group > *:nth-child(1) { animation-delay:  80ms; }
  .iada-hero-grid .wp-block-cover__inner-container > .wp-block-group > *:nth-child(2) { animation-delay: 220ms; }
  .iada-hero-grid .wp-block-cover__inner-container > .wp-block-group > *:nth-child(3) { animation-delay: 380ms; }
  .iada-hero-grid .wp-block-cover__inner-container > .wp-block-group > *:nth-child(4) { animation-delay: 540ms; }
  @keyframes iada-rise {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
}


/* ─────────────────────────────────────────────────────────────────
   6. Scroll-reveal — sections fade up when entering viewport
   ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .iada-reveal {
    opacity: 0; transform: translate3d(0, 28px, 0);
    transition: opacity 760ms var(--iada-ease-spring),
                transform 760ms var(--iada-ease-spring);
    transition-delay: var(--iada-reveal-delay, 0ms);
    will-change: opacity, transform;
  }
  .iada-reveal.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
}


/* ─────────────────────────────────────────────────────────────────
   7. Cards — lift + accent glow + animated top border
   ───────────────────────────────────────────────────────────────── */

.iada-card {
  position: relative;
  background: var(--iada-bg);
  border: 1px solid var(--iada-border);
  border-radius: 20px;
  padding: 2rem;
  height: 100%;
  overflow: hidden;
  transition: transform 360ms var(--iada-ease-spring),
              box-shadow 360ms var(--iada-ease-soft),
              border-color 360ms ease;
  isolation: isolate;
}
.iada-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--iada-accent), var(--iada-primary-soft));
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 540ms var(--iada-ease-spring);
}
.iada-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(2, 116, 190, 0.08) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 320ms ease;
  pointer-events: none;
  z-index: -1;
}
.iada-card:hover, .iada-card:focus-within {
  transform: translateY(-6px);
  box-shadow: var(--iada-shadow-hover);
  border-color: #CBD5E1;
}
.iada-card:hover::before, .iada-card:focus-within::before { transform: scaleX(1); }
.iada-card:hover::after { opacity: 1; }
.iada-card h3 { margin-top: 0; }
.iada-card .iada-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--iada-accent);
  display: inline-block;
  margin-bottom: 0.75rem;
}


/* ─────────────────────────────────────────────────────────────────
   8. Stats — large numbers with count-up support
   ───────────────────────────────────────────────────────────────── */

.iada-stat {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.25rem 0;
}
.iada-stat__value {
  font-size: clamp(2.25rem, 4.5vw + 0.5rem, 3.75rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1;
  color: var(--iada-primary);
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--iada-primary) 0%, var(--iada-primary-soft) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.iada-stat__label {
  font-size: 0.95rem;
  color: var(--iada-muted);
  font-weight: 500;
  letter-spacing: 0.005em;
}


/* ─────────────────────────────────────────────────────────────────
   9. Pill eyebrow
   ───────────────────────────────────────────────────────────────── */

.iada-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(0, 61, 92, 0.07);
  color: var(--iada-primary);
  font-size: 0.78rem;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid rgba(0, 61, 92, 0.05);
}
.iada-pill::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--iada-accent);
  box-shadow: 0 0 0 0 rgba(2, 116, 190, 0.6);
  animation: iada-pulse 2.4s ease-out infinite;
}
@keyframes iada-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(2, 116, 190, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(2, 116, 190, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 116, 190, 0); }
}


/* ─────────────────────────────────────────────────────────────────
   10. Buttons — shimmer sheen on hover, smooth lift
   ───────────────────────────────────────────────────────────────── */

.wp-element-button, .wp-block-button__link {
  position: relative;
  overflow: hidden;
  transition: transform 240ms var(--iada-ease-spring),
              box-shadow 280ms var(--iada-ease-soft),
              background-color 200ms ease,
              color 200ms ease;
}
.wp-element-button::after, .wp-block-button__link::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 50%; height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.25) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 700ms var(--iada-ease-spring);
  pointer-events: none;
}
.wp-element-button:hover, .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 61, 92, 0.18);
}
.wp-element-button:hover::after, .wp-block-button__link:hover::after { left: 160%; }


/* ─────────────────────────────────────────────────────────────────
   11. News list — clean rows with slide hover
   ───────────────────────────────────────────────────────────────── */

.iada-news-list .wp-block-post-template { gap: 0; list-style: none; padding: 0; margin: 0; }
.iada-news-list .wp-block-post {
  border-top: 1px solid var(--iada-border);
  padding: 1.85rem 0;
  transition: padding-left 360ms var(--iada-ease-spring), background-color 240ms ease;
  position: relative;
}
.iada-news-list .wp-block-post::before {
  content: "→"; position: absolute; left: -1.8rem; top: 1.95rem;
  color: var(--iada-accent); opacity: 0;
  transition: opacity 280ms ease, transform 280ms var(--iada-ease-spring);
  transform: translateX(-8px);
  font-weight: 700;
}
.iada-news-list .wp-block-post:hover { padding-left: 1rem; }
.iada-news-list .wp-block-post:hover::before { opacity: 1; transform: translateX(0); }
.iada-news-list .wp-block-post:last-child { border-bottom: 1px solid var(--iada-border); }
.iada-news-list .wp-block-post-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.4rem; letter-spacing: -0.015em; }
.iada-news-list .wp-block-post-title a { color: var(--iada-text); text-decoration: none; }
.iada-news-list .wp-block-post-title a:hover { color: var(--iada-primary); }
.iada-news-list .wp-block-post-date,
.iada-news-list time { font-size: 0.85rem; color: var(--iada-muted); }


/* ─────────────────────────────────────────────────────────────────
   12. Form polish
   ───────────────────────────────────────────────────────────────── */

input, textarea, select {
  font-family: inherit;
  border: 1px solid var(--iada-border);
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
  font-size: 1rem;
  background: #FFFFFF;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--iada-primary);
  box-shadow: 0 0 0 4px rgba(0, 61, 92, 0.12);
}


/* ─────────────────────────────────────────────────────────────────
   13. Table styling for HPC page etc.
   ───────────────────────────────────────────────────────────────── */

.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--iada-shadow-card);
  border: 1px solid var(--iada-border);
}
.wp-block-table thead {
  background: var(--iada-primary);
}
.wp-block-table thead th {
  color: #FFFFFF;
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.wp-block-table tbody td {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--iada-border);
  font-size: 0.95rem;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { background: var(--iada-surface); }


/* ─────────────────────────────────────────────────────────────────
   14. Initial page fade-in
   ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  body {
    animation: iada-page-in 540ms var(--iada-ease-spring) both;
  }
  /* Opacity-only: a transform here (even identity, left by fill-mode) makes
     <body> a containing block for fixed descendants, so the React landing's
     fixed glow would attach to the full-height body and scroll/repaint with
     the page (causing scroll jank). Fade opacity only to keep glow viewport-
     pinned. */
  @keyframes iada-page-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
}


/* ─────────────────────────────────────────────────────────────────
   15. Container utility
   ───────────────────────────────────────────────────────────────── */

.iada-container { max-width: 1180px; margin: 0 auto; }


/* ─────────────────────────────────────────────────────────────────
   16. Header brand + CTA
   ───────────────────────────────────────────────────────────────── */

.iada-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none;
  color: var(--iada-text);
  background: none !important;
}
.iada-brand:hover { color: var(--iada-primary); }
.iada-brand__mark {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--iada-accent) 0%, var(--iada-accent-dark) 100%);
  box-shadow: 0 0 0 4px rgba(2, 116, 190, 0.15);
  flex-shrink: 0;
  transition: box-shadow 320ms ease, transform 320ms var(--iada-ease-spring);
}
.iada-brand:hover .iada-brand__mark {
  box-shadow: 0 0 0 6px rgba(2, 116, 190, 0.20);
  transform: rotate(-15deg) scale(1.08);
}
.iada-brand__name {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--iada-text);
}
.iada-brand__divider {
  width: 1px; height: 16px;
  background: var(--iada-border);
  margin: 0 0.35rem;
}
.iada-brand__sub {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--iada-muted);
}
@media (max-width: 720px) {
  .iada-brand__divider, .iada-brand__sub { display: none; }
}

/* UBD_OCEAN logo: static, aligned inline with the menu. */
.iada-brand--logo {
  display: inline-flex;
  align-items: center;
  padding: 0;
  gap: 0;
  text-decoration: none !important;
  background: none !important;
  background-image: none !important;
  line-height: 0;
}
.iada-brand__logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: clamp(140px, 22vw, 200px);
  object-fit: contain;
  transition: opacity 200ms ease;
}
.iada-brand--logo:hover .iada-brand__logo { opacity: 0.85; }
@media (max-width: 720px) {
  .iada-brand__logo { height: 30px; max-width: 150px; }
}
@media (max-width: 480px) {
  .iada-brand__logo { height: 26px; max-width: 120px; }
}

/* UBD + IADA logos side-by-side group */
.iada-brand-group {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.iada-brand-divider {
  display: inline-block;
  width: 1px;
  height: 32px;
  background: var(--iada-border, rgba(0,0,0,0.15));
}
/* IADA lockup: full logo + tagline on the right */
.iada-lockup {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none !important;
  background: none !important;
  color: var(--iada-text);
  line-height: 1;
}
.iada-lockup__logo {
  /* Match forest's mark size (h-10 = 40px). */
  height: 40px; width: auto; flex: 0 0 auto; display: block;
  transition: opacity 300ms var(--iada-ease-soft);
}
.iada-lockup:hover .iada-lockup__logo { opacity: 0.85; }
/* Forest-style lockup text: small, uppercase, tracked-out Inter. */
.iada-lockup__text {
  display: inline-flex; flex-direction: column; gap: 0;
  margin-top: 0.6rem;
  transition: opacity 320ms var(--iada-ease-soft), transform 320ms var(--iada-ease-soft);
}
.iada-lockup__sub {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #475569;            /* line 1: darkest (most prominent), mirrors forest's two-tone */
  letter-spacing: 0.14em;
  line-height: 1.12;
}
.iada-lockup__sub--2 { color: var(--iada-muted); }   /* line 2: slightly lighter */
.iada-lockup__ubd {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.55rem;
  font-weight: 500;
  text-transform: none;      /* forest keeps "Universiti Brunei Darussalam" mixed-case */
  color: #94A3B8;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-top: 0.05rem;
}
/* Full-width header row so the logo pins to the left edge like forest. */
.wp-block-template-part > .wp-block-group > .wp-block-group { width: 100%; }
/* Forest scroll effect: the institute name fades out once scrolled, leaving
   just the mark (.iada-header--scrolled toggled by animations.js). */
header.wp-block-template-part.iada-header--scrolled .iada-lockup__text {
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
}
header.wp-block-template-part.iada-header--scrolled .iada-lockup__logo {
  opacity: 0.6;
}
@media (max-width: 720px) {
  .iada-lockup__sub { font-size: 0.6rem; }
  .iada-lockup__ubd { font-size: 0.53rem; }
}
@media (max-width: 900px) {
  .iada-lockup__sub { display: none; }
}
/* Small phones: ONE clean, vertically-centered row — the full lockup (logo +
   institute name) pinned left, hamburger pinned right. The "Get in touch" pill
   is dropped on phones. The institute name shows here too and fades on scroll
   via the .iada-header--scrolled rule (same forest effect as desktop).
   All scoped to <=600px so desktop is untouched. */
@media (max-width: 600px) {
  header.wp-block-template-part,
  header.wp-block-group { padding: 0.7rem 1rem !important; }
  .iada-header-row { flex-wrap: nowrap !important; align-items: center; gap: 0.6rem; }
  .iada-header-actions { gap: 0.6rem !important; flex-shrink: 0; }
  .iada-lockup { align-items: center; min-width: 0; }
  /* un-hide the institute name on phones (was display:none at <=900px) */
  .iada-lockup__sub { display: block; }
  .iada-lockup__ubd { display: block; }
  .iada-lockup__logo { height: 32px; flex-shrink: 0; }
  /* remove the header CTA pill on phones */
  .iada-header-actions .iada-cta-button { display: none !important; }
}

/* Header CTA button — a smaller, primary pill */
.iada-cta-button {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 1rem;
  min-height: 40px;
  border-radius: 999px;
  background: var(--iada-primary);
  color: #FFFFFF !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;                          /* normalize height across pages (front bundle's reset vs interior) */
  letter-spacing: -0.005em;
  text-decoration: none;
  background-image: none !important;       /* override animated underline */
  transition: background-color 200ms ease,
              transform 240ms var(--iada-ease-spring),
              box-shadow 280ms ease;
  position: relative; overflow: hidden;
}
.iada-cta-button svg { display: block; transition: transform 280ms var(--iada-ease-spring); }
.iada-cta-button:hover {
  background-color: var(--iada-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 61, 92, 0.25);
}
.iada-cta-button:hover svg { transform: translateX(3px); }
.iada-cta-button::after {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 50%; height: 100%;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.30) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 700ms var(--iada-ease-spring);
  pointer-events: none;
}
.iada-cta-button:hover::after { left: 160%; }

/* ─────────────────────────────────────────────────────────────────
   16b. Mobile navigation overlay + touch targets
   The header no longer establishes a fixed-containing-block (glass moved
   to ::before), so the open menu's inset:0 panel resolves against the
   viewport. Belt-and-suspenders: force full viewport height and give all
   tap targets a >=44px touch area.
   ───────────────────────────────────────────────────────────────── */

/* Ensure the open overlay fills the viewport, not the header box. */
.wp-block-navigation__responsive-container.is-menu-open {
  height: 100dvh;
  min-height: 100dvh;
}

/* Hamburger ("Open menu") + close ("X") toggles — >=44x44 tap target. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

/* Open mobile-menu links — grouped top-left under the X, left-aligned, with
   comfortable padding + larger tap text (instead of hugging the right edge as
   the nav's justifyContent:right would otherwise force). Scoped to the open
   responsive container so the desktop inline nav is untouched. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  padding: 4.5rem 1.75rem 2rem !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0.15rem !important;
  width: 100%;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.55rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--iada-primary);
}


/* ─────────────────────────────────────────────────────────────────
   17. Footer — light forest-style row (copyright left, logos right)
   Replaces the old navy 4-column footer. The markup is now a single inner
   row with a copy line + logo group. Force a transparent background so any
   leftover .has-background / inline navy on the <footer> is overridden.
   ───────────────────────────────────────────────────────────────── */

.iada-footer {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--iada-text) !important;
}

.iada-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--iada-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.iada-footer__copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--iada-muted);
}

.iada-footer__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.iada-footer__logos a {
  background: none !important;
  background-image: none !important;
  opacity: 0.9;
  transition: opacity 200ms ease;
}
.iada-footer__logos a:hover { opacity: 1; }

.iada-footer__logo { display: block; width: auto; }
.iada-footer__logo--ubd { height: 32px; }
.iada-footer__logo--sds { height: 46px; }

@media (max-width: 640px) {
  .iada-footer__inner {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  /* Keep the two partner logos on ONE row (side by side), not stacked. */
  .iada-footer__logos {
    flex-wrap: nowrap;
    gap: 1rem;
    justify-content: center;
  }
  .iada-footer__logo--ubd { height: 26px; }
  .iada-footer__logo--sds { height: 36px; }
}


/* ─────────────────────────────────────────────────────────────────
   18. Reduced motion — disable all decorative motion
   ───────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .iada-progress, .iada-hero-grid::after { display: none !important; }
}
