/* ==========================================================================
   AGM pages: archive (agml-*) and detail pages (agmd-*, agm-slider, agm-hcard).
   Uses the site's colour variables from style.css (navy / white / gold).
   ========================================================================== */
:root { --agm-navy:#17275a; --agm-navy-d:#0f1c45; --agm-navy-l:#2a4590; --agm-soft:#eef2fb; }

.agm-crumbs { font-size:.8rem; color:#c9d3ee; margin:0 0 14px; }
.agm-crumbs a { color:#fff; font-weight:500; }
.agm-crumbs a:hover { color:var(--gold-soft); }
.agm-crumbs span { color:#fff; }
.agml-hero .agm-crumbs a:not(:first-child){ text-decoration:underline; }

/* ---------------- Archive page ---------------- */
.agml-hero { position:relative; color:#fff; overflow:hidden; background:var(--agm-navy-d); }
.agml-hero__media { position:absolute; inset:0 0 0 38%; }
.agml-hero__media img { width:100%; height:100%; object-fit:cover; object-position:50% 40%; }
.agml-hero__media::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,var(--agm-navy-d) 0%,rgba(15,28,69,.55) 35%,rgba(15,28,69,.35) 100%); }
.agml-hero::before { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(90deg,#0f2a66 0%,#13285f 45%,transparent 70%); }
.agml-hero__in { position:relative; z-index:2; padding:34px 0 128px; max-width:1200px; }
.agml-hero__in > * { max-width:640px; }
.agml-hero h1 { font-family:'Playfair Display',Georgia,serif; font-weight:700; color:#fff; font-size:clamp(2.2rem,4.6vw,3.4rem); line-height:1.1; margin:0; }
.agml-hero h1 em { font-style:normal; color:var(--gold); }
.agml-hero__bar { display:block; width:64px; height:4px; border-radius:4px; background:var(--gold); margin:12px 0 22px; }
.agml-hero p { color:#e3e9f8; font-size:.98rem; line-height:1.7; margin:0; }
.agml-hero__wave { position:absolute; left:0; right:0; bottom:-1px; width:100%; height:80px; z-index:2; display:block; }

.agml-archive { background:linear-gradient(#f6f8fd,#fff); padding:46px 0 80px; }
.agml-title { text-align:center; margin-bottom:34px; }
.agml-title h2 { font-family:'Playfair Display',Georgia,serif; font-size:clamp(1.8rem,3.2vw,2.4rem); color:var(--agm-navy); margin:0 0 8px; display:inline-flex; align-items:center; gap:26px; }
.agml-title h2::before,.agml-title h2::after { content:""; width:clamp(40px,12vw,230px); height:2px; background:linear-gradient(90deg,transparent,var(--agm-navy-l)); }
.agml-title h2::after { transform:scaleX(-1); }
.agml-title p { margin:0; color:var(--ink); }
.agml-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:26px; align-items:stretch; }
.agml-card { position:relative; background:#fff; border-radius:16px; padding:6px 6px 22px; box-shadow:0 6px 24px rgba(23,39,90,.12); transition:transform .25s var(--ease),box-shadow .25s var(--ease); display:flex; flex-direction:column; }
.agml-card:hover { transform:translateY(-4px); box-shadow:0 14px 34px rgba(23,39,90,.2); }
.agml-card__img { position:relative; aspect-ratio:3/1; border-radius:12px; overflow:hidden; background:var(--agm-soft); }
.agml-card__img img { width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); }
.agml-card:hover .agml-card__img img { transform:scale(1.04); }
.agml-card__badge { position:absolute; left:18px; bottom:0; background:var(--agm-navy); color:var(--gold); font:700 1.05rem var(--font-head); padding:6px 16px; border:2px solid var(--gold); border-radius:12px 12px 0 0; border-bottom:0; }
.agml-card__body { padding:16px 20px 0; display:flex; flex-direction:column; flex:1; }
.agml-card__body h3 { font-size:1.1rem; color:var(--agm-navy); margin:0 0 4px; }
.agml-card__body p { font-size:.85rem; line-height:1.5; color:var(--ink); margin:0 0 16px; flex:1; }
.agml-btn { align-self:flex-start; display:inline-flex; align-items:center; gap:10px; background:var(--agm-navy); color:#fff; font:600 .82rem var(--font-head); padding:9px 16px; border-radius:6px; transition:background .2s; }
.agml-btn:hover { background:var(--gold); color:var(--agm-navy-d); }
.agml-btn::after { content:""; position:absolute; inset:0; border-radius:16px; } /* whole card is clickable */
.agml-btn:focus-visible { outline:3px solid var(--gold); outline-offset:3px; }

/* ---------------- Detail page: hero ---------------- */
.agmd-hero { background:var(--agm-navy); color:#fff; }
.agmd-hero__top { position:relative; overflow:hidden; background:var(--agm-navy-d); }
.agmd-hero__media { position:absolute; top:0; bottom:0; right:0; width:68%; }
.agmd-hero__media img { width:100%; height:100%; object-fit:cover; }
.agmd-hero__media::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg,var(--agm-navy-d) 0%,rgba(15,28,69,.55) 30%,rgba(15,28,69,0) 60%); }
.agmd-hero__in { position:relative; z-index:2; padding:30px 0 120px; min-height:420px; }
.agmd-hero__in > * { max-width:460px; }
.agmd-hero__kicker { display:flex; align-items:center; gap:10px; font:700 1.4rem var(--font-head); margin:6px 0 0; color:#fff; }
.agmd-hero__kicker span { width:22px; height:4px; background:var(--gold); border-radius:3px; }
.agmd-hero h1 { color:#fff; font-size:clamp(2.2rem,4.4vw,3.2rem); line-height:1.08; margin:0 0 14px; }
.agmd-hero__badge { margin:0 0 18px; }
.agmd-hero__badge span { display:inline-block; background:var(--gold); color:var(--agm-navy-d); font:700 clamp(1.3rem,2.6vw,1.9rem) var(--font-head); padding:4px 30px 4px 18px; clip-path:polygon(0 0,100% 0,calc(100% - 16px) 100%,0 100%); }
.agmd-hero__desc { font-size:1.02rem; line-height:1.55; color:#e6ebf8; margin:0; }
.agmd-hero__wave { position:absolute; left:0; bottom:-1px; width:100%; height:84px; z-index:1; display:block; }
.agmd-facts { display:grid; grid-template-columns:repeat(3,1fr); gap:22px; padding:6px 0 30px; position:relative; z-index:2; background:var(--agm-navy); max-width:none; width:100%; padding-inline:max(4%,calc((100% - 1200px)/2)); }
.agmd-fact { display:flex; align-items:center; gap:16px; padding:14px 20px; border:1px solid rgba(255,255,255,.28); border-radius:14px; background:rgba(255,255,255,.04); min-height:92px; }
.agmd-fact__ic { flex:none; width:56px; height:56px; border-radius:50%; border:2px solid var(--gold); color:var(--gold); display:grid; place-items:center; }
.agmd-fact small { display:block; color:var(--gold); font:600 .9rem var(--font-head); }
.agmd-fact b { display:block; font:600 .95rem/1.35 var(--font-head); color:#fff; }
.agmd-fact div > span { display:block; font:500 .9rem/1.35 var(--font-head); color:#fff; }
.agmd-note { background:#fff4d6; border-bottom:1px solid #f0d58a; color:#6b4a00; font-size:.9rem; padding:10px 0; text-align:center; }

/* ---------------- Section headings ---------------- */
.agmd-h { position:relative; font-size:clamp(1.5rem,2.6vw,2rem); color:var(--agm-navy); margin:0 0 26px; padding-bottom:12px; }
.agmd-h::after { content:""; position:absolute; left:0; bottom:0; width:38px; height:4px; border-radius:3px; background:var(--gold); }
.agmd-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.agmd-pill { flex:none; display:inline-flex; align-items:center; gap:8px; border:1.5px solid var(--agm-navy-l); color:var(--agm-navy-l); font:600 .8rem var(--font-head); padding:7px 16px; border-radius:999px; background:#fff; transition:all .2s; }
.agmd-pill:hover { background:var(--agm-navy); color:#fff; border-color:var(--agm-navy); }

/* ---------------- Overview ---------------- */
.agmd-overview { padding:44px 0 30px; }
.agmd-overview__in { display:grid; grid-template-columns:1.05fr .95fr; gap:56px; align-items:center; }
.agmd-overview p { color:var(--ink); line-height:1.75; }
.agmd-overview__img { margin:0; border-radius:14px; overflow:hidden; box-shadow:var(--shadow); aspect-ratio:3/2; background:var(--agm-soft); }
.agmd-overview__img img { width:100%; height:100%; object-fit:cover; }

/* ---------------- Highlights slider ---------------- */
.agmd-highlights { background:var(--agm-soft); padding:40px 0 56px; }
.agm-slider { --cw:340px; --shift:288px; position:relative; padding:0 56px 44px; }
.agm-slider__viewport { position:relative; height:548px; perspective:1500px; perspective-origin:50% 40%; overflow:hidden; }
.agm-slider__track { position:absolute; inset:0; transform-style:preserve-3d; pointer-events:none; }
/* 3D coverflow: every slide is the same size; data-pos decides where it sits (0 = active/centre, -1/1 = neighbours) */
.agm-slide { pointer-events:auto; position:absolute; left:50%; top:20px; width:var(--cw); margin-left:calc(var(--cw) / -2); transform-style:preserve-3d; backface-visibility:hidden; will-change:transform,opacity;
  transition:transform .75s var(--ease),opacity .75s var(--ease),filter .75s var(--ease); }
.agm-slide[data-pos="0"]  { transform:translate3d(0,0,0) rotateY(0) scale(1); opacity:1; z-index:3; }
.agm-slide[data-pos="-1"] { transform:translate3d(calc(var(--shift) * -1),0,-150px) rotateY(38deg) scale(.88); opacity:.95; z-index:2; filter:brightness(.82); cursor:pointer; }
.agm-slide[data-pos="1"]  { transform:translate3d(var(--shift),0,-150px) rotateY(-38deg) scale(.88); opacity:.95; z-index:2; filter:brightness(.82); cursor:pointer; }
.agm-slide[data-pos="hl"] { transform:translate3d(calc(var(--shift) * -1.6),0,-320px) rotateY(48deg) scale(.7); opacity:0; z-index:1; pointer-events:none; }
.agm-slide[data-pos="hr"] { transform:translate3d(calc(var(--shift) * 1.6),0,-320px) rotateY(-48deg) scale(.7); opacity:0; z-index:1; pointer-events:none; }
.agm-slide[data-pos="0"] .agm-hcard { box-shadow:0 26px 54px rgba(23,39,90,.3); }

.agm-hcard { width:100%; height:508px; display:flex; flex-direction:column; background:#fff; border-radius:16px; overflow:hidden; box-shadow:0 8px 26px rgba(23,39,90,.12); }
.agm-hcard__img { position:relative; flex:none; height:190px; background:var(--agm-soft); overflow:hidden; }
.agm-hcard__img img { width:100%; height:100%; object-fit:cover; }
.agm-hcard__no { position:absolute; left:14px; top:14px; background:var(--gold); color:var(--agm-navy-d); font:700 .85rem var(--font-head); padding:2px 11px; border-radius:999px; }
.agm-hcard__body { flex:1; min-height:0; display:flex; flex-direction:column; padding:16px 20px 18px; }
.agm-hcard__chip { align-self:flex-start; background:var(--gold-l); color:var(--gold-d); font:600 .72rem var(--font-head); padding:3px 11px; border-radius:999px; margin-bottom:9px; }
.agm-hcard h3 { font-size:1.02rem; line-height:1.35; color:var(--agm-navy); margin:0 0 6px; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; height:4.05em; }
.agm-hcard__who { height:1.5em; margin:0 0 6px; font-size:.82rem; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--muted); }
.agm-hcard__who b { color:var(--agm-navy); }
.agm-hcard__txt { font-size:.88rem; line-height:1.55; color:var(--ink); margin:0 0 8px; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; height:6.2em; }
.agm-hcard__more { margin-top:auto; align-self:flex-start; display:inline-flex; align-items:center; gap:6px; background:none; border:0; padding:0; font:600 .82rem var(--font-head); color:var(--agm-navy-l); cursor:pointer; }
.agm-hcard__more:hover { color:var(--gold-d); }

.agm-slider__arrow { position:absolute; top:calc(50% - 40px); z-index:3; width:44px; height:44px; border-radius:50%; border:0; background:var(--agm-navy); color:#fff; display:grid; place-items:center; cursor:pointer; box-shadow:var(--shadow-sm); transition:background .2s,transform .2s; }
.agm-slider__arrow:hover { background:var(--gold); color:var(--agm-navy-d); }
.agm-slider__arrow--prev { left:0; transform:scaleX(-1); }
.agm-slider__arrow--next { right:0; }
.agm-slider__arrow[disabled] { opacity:.35; cursor:default; }
.agm-slider__dots { position:absolute; left:0; right:0; bottom:6px; display:flex; justify-content:center; gap:9px; }
.agm-slider__dots button { width:10px; height:10px; padding:0; border:0; border-radius:50%; background:#b5c0e0; cursor:pointer; transition:all .25s; }
.agm-slider__dots button.is-active { width:28px; border-radius:6px; background:var(--agm-navy); }

/* Read-more modal + microgreens stats */
.agm-modal { border:0; border-radius:16px; padding:0; width:min(640px,92vw); max-height:86vh; box-shadow:0 30px 80px rgba(10,18,45,.45); }
.agm-modal::backdrop,.agm-lightbox::backdrop { background:rgba(10,18,45,.72); }
.agm-modal__body { padding:30px 30px 26px; overflow:auto; max-height:86vh; }
.agm-modal__body h3 { color:var(--agm-navy); font-size:1.25rem; margin:0 0 8px; padding-right:30px; }
.agm-modal__body p { color:var(--ink); line-height:1.7; }
.agm-modal__body .agm-hcard__who { height:auto; white-space:normal; margin-bottom:14px; }
.agm-modal__x { position:absolute; right:12px; top:8px; z-index:2; background:none; border:0; font-size:2rem; line-height:1; color:var(--agm-navy); cursor:pointer; }
.agm-stats { list-style:none; padding:0; margin:18px 0 0; display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.agm-stats li { background:var(--agm-soft); border-radius:12px; padding:10px 14px; }
.agm-stats b { display:block; font:700 1.3rem var(--font-head); color:var(--agm-navy); }
.agm-stats span { font-size:.8rem; color:var(--muted); line-height:1.35; display:block; }

/* ---------------- Photo gallery ---------------- */
.agmd-gallery { padding:46px 0 30px; }
.agmd-gallery__grid { display:grid; grid-template-columns:1.2fr 1fr 1fr; grid-template-rows:repeat(2,minmax(0,220px)); gap:12px; }
.agmd-gallery__item { position:relative; display:block; overflow:hidden; border-radius:12px; background:var(--agm-soft); }
.agmd-gallery__item:first-child { grid-row:1 / span 2; }
.agmd-gallery__item img { width:100%; height:100%; object-fit:cover; transition:transform .5s var(--ease); }
.agmd-gallery__item:hover img { transform:scale(1.05); }
.agmd-gallery__item:focus-visible { outline:3px solid var(--gold); outline-offset:2px; }
.is-hidden[hidden] { display:none; }

/* ---------------- Previous AGMs ---------------- */
.agmd-prev { padding:20px 0 70px; }
.agmd-prev__grid { display:grid; grid-template-columns:repeat(5,1fr); gap:18px; }
.agmd-prev__card { display:block; background:#fff; border-radius:12px; padding:5px 5px 12px; box-shadow:0 5px 18px rgba(23,39,90,.12); transition:transform .25s var(--ease); }
.agmd-prev__card:hover { transform:translateY(-4px); }
.agmd-prev__img { display:block; aspect-ratio:12/5; border-radius:9px; overflow:hidden; background:var(--agm-soft); }
.agmd-prev__img img { width:100%; height:100%; object-fit:cover; }
.agmd-prev__body { display:block; padding:12px 12px 0; }
.agmd-prev__body b { display:block; font:700 1.05rem var(--font-head); color:var(--agm-navy); }
.agmd-prev__body small { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:.78rem; margin-top:6px; }
.agmd-prev__body .ic { color:var(--gold); }
.agmd-prev__empty { color:var(--muted); margin:0; }

/* ---------------- Lightbox ---------------- */
.agm-lightbox { border:0; padding:0; background:transparent; max-width:100vw; max-height:100vh; width:100vw; height:100vh; overflow:hidden; }
.agm-lightbox[open] { display:flex; align-items:center; justify-content:center; }
.agm-lightbox figure { margin:0; text-align:center; max-width:86vw; }
.agm-lightbox img { max-width:86vw; max-height:78vh; width:auto; margin:0 auto; border-radius:10px; box-shadow:0 20px 70px rgba(0,0,0,.5); }
.agm-lightbox figcaption { color:#fff; margin-top:12px; font-size:.95rem; }
.agm-lightbox__x { position:absolute; right:22px; top:14px; background:none; border:0; color:#fff; font-size:2.6rem; cursor:pointer; line-height:1; }
.agm-lightbox__nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.16); border:0; color:#fff; width:48px; height:48px; border-radius:50%; font-size:2rem; line-height:1; cursor:pointer; }
.agm-lightbox__nav:hover { background:var(--gold); color:var(--agm-navy-d); }
.agm-lightbox__nav--prev { left:18px; } .agm-lightbox__nav--next { right:18px; }

/* ---------------- Responsive ---------------- */
@media (max-width:1100px) {
  .agm-slider { --cw:320px; --shift:270px; padding:0 50px 44px; }
  .agmd-prev__grid { grid-template-columns:repeat(3,1fr); }
}
@media (max-width:900px) {
  .agml-grid { grid-template-columns:repeat(2,1fr); }
  .agmd-overview__in { grid-template-columns:1fr; gap:28px; }
  .agmd-facts { grid-template-columns:1fr; gap:12px; }
  .agmd-hero__media { width:100%; }
  .agmd-hero__media::after { background:linear-gradient(90deg,rgba(15,28,69,.92) 0%,rgba(15,28,69,.6) 100%); }
  .agmd-hero__in { padding-bottom:100px; min-height:0; }
  .agml-hero__media { inset:0; }
  .agml-hero::before { background:rgba(15,42,102,.82); }
  .agmd-gallery__grid { grid-template-columns:1fr 1fr; grid-template-rows:none; grid-auto-rows:170px; }
  .agmd-gallery__item:first-child { grid-column:1 / -1; grid-row:auto; height:260px; }
}
@media (max-width:640px) {
  .agml-grid { grid-template-columns:1fr; }
  .agml-title h2::before,.agml-title h2::after { display:none; }
  .agm-slider { --cw:min(300px,74vw); --shift:calc(var(--cw) * .8); padding:0 0 64px; }
  .agm-slider__dots { bottom:14px; }
  .agm-slider__arrow { top:auto; bottom:6px; width:38px; height:38px; }
  .agm-slider__arrow--prev { left:calc(50% - 130px); } .agm-slider__arrow--next { right:calc(50% - 130px); }
  .agmd-prev__grid { grid-template-columns:1fr 1fr; }
  .agmd-head { flex-direction:column; align-items:flex-start; gap:0; }
  .agmd-head .agmd-pill { margin:-8px 0 16px; }
  .agm-stats { grid-template-columns:1fr; }
  .agm-lightbox__nav { width:40px; height:40px; }
}
@media (prefers-reduced-motion:reduce) { .agm-slide { transition:none; } }

/* All AGMs list: the current year is highlighted */
.agmd-prev__card.is-current { outline:2px solid var(--gold); outline-offset:3px; }

/* Facts: own section below the banner */
.agmd-factsbar { background:var(--agm-navy); padding:28px 0; }
.agmd-factsbar .agmd-facts { padding:0; width:min(1200px,92%); max-width:none; margin-inline:auto; background:transparent; }
