/* ════════════════════════════════════════════════════════════════════
   FIP 2026 — NEW HOMEPAGE STYLES (home body only)
   Loaded AFTER Bootstrap 4 on the homepage when the fip2026 switch is on.
   Ported from ../final/assets/css/style.css. Contains only the new
   home-body sections (hero, quick-access, intro, 3 columns, THTP banner,
   feature cards) + their responsive rules. The 2019 reset / utility bar /
   main nav / footer are intentionally NOT included — those keep their
   existing fip2019 styling.
   ════════════════════════════════════════════════════════════════════ */

/* Self-hosted Fira Sans (headings). Path is relative to this file. */
@import url("fip2026/fonts/fira-sans/fira-sans.css");

/* ═══════════════════════════════════════════
   CSS CUSTOM PROPERTIES
   ═══════════════════════════════════════════ */
:root {
    --cyan: #20c4f4;
    --cyan-light: #e8f8fd;
    --cyan-mid: #a8e4f6;
    --dark: #1a2744;
    --dark-blue: #1e3a5f;
    --navy: #1e3a5f;
    --midnight: #0f3460;
    --gold: #e2b714;
    --white: #ffffff;
    --off-white: #f7f8fc;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;

    /* FIP brand colours */
    --fip-blue: #384e74;
    --fip-blue-light: #7bbadd;
    --fip-purple: #6e5b8e;
    --fip-indigo: #3d4e81;
    --fip-gold: #c9a14a;

    /* Four card accents + fills */
    --card1-accent: #8d86c4;
    --card1-fill: #e9e7f1;
    --card2-accent: #9bbf3a;
    --card2-fill: #f1f4d9;
    --card3-accent: #e08a2e;
    --card3-fill: #f6e3cd;
    --card4-accent: #c8597a;
    --card4-fill: #f3dde2;

    /* Body / readable text: default browser font — matches the current live site stack */
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    /* Headings / display: Fira Sans (Google Fonts), Arial fallback */
    --font-display: "Fira Sans", Arial, Helvetica, sans-serif;
    --font-mono: 'Courier New', monospace;
    --container: 1200px;
    /* Design uses square corners on blocks/banners/chips.
       Pills (100px) and circles (50%) are set explicitly and stay round. */
    --radius-sm: 0;
    --radius-md: 0;
    --radius-lg: 0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .12);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ═══════════════════════════════════════════
   LINK RESET (scoped to the new home sections)
   The 2019 theme underlines all <a>; remove it inside the home blocks.
   Intentional underlines (e.g. .feature-card__link-text) re-add their own.
   ═══════════════════════════════════════════ */
.hero a,
.quick-bar a,
.intro-section a,
.main-content a,
.thtp-section a,
.feature-cards a {
    text-decoration: none !important;
}

/* The "More / here / Watch recording" link text is underlined via a dashed
   border-bottom (see .feature-card__link-text below), not text-decoration. */
.feature-card__link-text {
    text-decoration: none !important;
}

/* ═══════════════════════════════════════════
   HERO — FLAT BLUE BAND
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    /* Band tracks the 2000×400 (5:1) art so the image COVERS it exactly — no
       blue gaps. This is right down to the width where the 5:1 band gets too
       short for the two-line title; below that a media query (see bottom) swaps
       to a min-height band that the image still covers. */
    width: 100%;
    aspect-ratio: 2000 / 400;
    max-height: 320px;
    overflow: hidden;
    background: var(--fip-blue);
}

/* carousel slide layers */
.hero__slides {
    position: absolute;
    inset: 0;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}

.hero__slide.is-active {
    opacity: 1;
}

/* nav dots (shown only when JS adds >1 slide) */
.hero__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 8px;
}

.hero__dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
}

.hero__dots button.is-active {
    background: #fff;
}

/* faint cover photo on the right */
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* band is 5:1 like the art → fills with no crop */
    object-position: center center;
    opacity: 1;
}

/* When the hero background is a carousel (HOMEPAGE-HERO), make the whole chain
   fill the band so the image always covers it (no blue showing through). Covers
   both the single-banner (.fip2026-carousel--single) and multi paths, incl. the
   <a> link wrapper around the image. */
.hero__bg .fip2026-carousel,
.hero__bg .fip2026-carousel--single,
.hero__bg .carousel-inner,
.hero__bg .carousel-item,
.hero__bg .fip2026-carousel__link {
    height: 100%;
    display: block;
}

.hero__bg .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;          /* band is 5:1 like the art → fills with no crop */
    border-radius: 0;
}

/* left-to-right navy → light-blue gradient over the photo */
.hero__gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* gradient hidden for now — show the pure banner image. Restore the
       linear-gradient() background to bring the navy→light-blue overlay back. */
    display: none;
    background: linear-gradient(90deg,
            var(--fip-blue) 0%,
            rgba(56, 78, 116, 0.92) 35%,
            rgba(123, 186, 221, 0.55) 75%,
            rgba(123, 186, 221, 0.25) 100%);
}

/* subtle molecular dotted overlay */
.hero__pattern {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.25;
    background-image:
        radial-gradient(rgba(255, 255, 255, .35) 1.5px, transparent 1.6px),
        radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1.2px);
    background-size: 46px 46px, 28px 28px;
    background-position: 0 0, 14px 14px;
}

.hero .container {
    position: relative;
    z-index: 3;
    height: 100%;                  /* fill the band so the text centres vertically */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero__eyebrow {
    font-family: var(--font-display);
    color: var(--cyan);
    font-weight: 900;
    /* "100+ years" — title is 1.5× this. Low min so it shrinks on phones,
       bigger vw + max so it reads large on desktop. */
    font-size: clamp(1.2rem, 4vw, 3.2rem);
    line-height: 1.05;
    white-space: nowrap;
    margin-bottom: 0;
}

.hero__title {
    font-family: var(--font-display);
    color: var(--white);
    font-weight: 800;
    /* "Advancing…" is 1.5× the eyebrow at every stop (1.8/6/4.8 = 1.2/4/3.2 ×
       1.5). Low min so it shrinks on phones; bigger vw + max for desktop. */
    font-size: clamp(1.8rem, 6vw, 4.8rem);
    line-height: 1.05;
    margin: 0;
    white-space: nowrap;          /* honour the <br> only; no mid-line wrap → no 3rd line */
    text-shadow: 0 2px 14px rgba(0, 0, 0, .25);
}

/* Below 400px the 5:1 band is short (~70px) but the title's clamp() floors
   (1.8rem title / 1.2rem eyebrow) stop shrinking, so the two title lines hit the
   top & bottom edges. Lower the floors so the text keeps shrinking to fit.
   NOTE: must come AFTER the base .hero__title/.hero__eyebrow rules above — equal
   specificity means later-in-file wins, media query or not. */
@media (max-width: 399.98px) {
    .hero__eyebrow {
        font-size: clamp(0.7rem, 3.5vw, 1.2rem);
    }
    .hero__title {
        font-size: clamp(1rem, 5vw, 1.8rem);
    }
}
.hero__newsletter {
    position: absolute;
    top: 18px;
    right: max(20px, calc((100% - var(--container)) / 2 + 20px));
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 100px;
    box-shadow: var(--shadow-md);
}

.hero__newsletter i {
    color: var(--fip-blue);
}

/* ═══════════════════════════════════════════
   QUICK ACCESS STRIP
   ═══════════════════════════════════════════ */
.quick-bar {
    background: #f6f8fb;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.quick-bar__label {
    font-family: var(--font-display);
    color: var(--dark);
    font-size: 0.95rem;
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    white-space: nowrap;
    /* sits inline with the pills as text (no pill background); a little extra
       space before the first pill */
    margin-right: 8px;
}

/* The label is the first item in this wrapping row, followed by the pills.
   On desktop it's all one line; pills wrap to more lines when space runs out. */
.quick-bar__links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
}

.quick-bar__link {
    color: #000;
    background: #cbe3eb;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 100px;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition);
}

.quick-bar__link:hover,
.quick-bar__link:focus {
    text-decoration: none;
}

.quick-bar__link:hover {
    background: var(--cyan-mid);
    border-color: var(--cyan);
    color: var(--dark-blue);
}

/* ═══════════════════════════════════════════
   WE ARE FIP — INTRO SECTION
   ═══════════════════════════════════════════ */
.intro-section {
    padding: 40px 0 8px;
}

/* Intro layout is Bootstrap (.row > .col-lg-9 + .col-lg-3); the badge column
   aligns with the right column of the 3-6-3 row below. */

/* Intro text. Each clamp = (min on small screens, fluid with viewport, max on
   big screens) — the font shrinks automatically as the screen narrows. Sizes
   follow the designer's 75/35/24pt proportions, capped so "We are FIP" matches
   the hero "Advancing…". */
.intro-section__heading {
    font-family: var(--font-display);
    font-size: clamp(2.7rem, 4.5vw, 3.9rem);   /* "We are FIP" */
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 16px;                       /* more space below "We are FIP" */
}

.intro-section__subline {
    font-family: var(--font-display);
    color: var(--cyan);
    font-size: clamp(1.3rem, 2.1vw, 1.8rem);   /* "Integrity, passion, impact!" */
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 16px;
}

.intro-section__text {
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.5vw, 1.25rem);    /* body — Fira Sans Medium */
    font-weight: 500;
    color: var(--gray-700);
    line-height: 1.5;
    max-width: 70ch;
    margin-bottom: 0;                          /* kill the <p> default margin… */
}

.intro-section__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 14px;                          /* …so this is the only gap to "More about FIP" */
}

.intro-section__more:hover {
    color: var(--dark-blue);
}

/* World Pharmacists Day badge box — square block (matches the design) */
.wpd-badge {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--dark-blue);
    color: var(--white);
    padding: 20px 18px;
    text-align: center;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

/* Intro-right banner badge: a square designed image filling the intro's right
   column. The image comes from the CMS banners table later (any campaign, not
   only WPD). Rounded corners — NEW vs final/; backport to ../newtheme/final. */
.intro-banner-badge {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.intro-banner-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* News shoutbox fallback in the intro-right slot (when no banner is set) */
.intro-shoutbox .row,
.intro-shoutbox .col-12 {
    margin: 0;
    padding: 0;
}

.intro-shoutbox .sidebar-notice {
    border: 1px solid var(--cyan) !important;
    border-radius: 12px;
    padding: 16px 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.intro-shoutbox .sidebar-notice h2 {
    font-family: var(--font-display);
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    margin: 0 0 6px !important;
    color: var(--dark);
}

.wpd-badge__kicker {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cyan-mid);
    margin-bottom: 8px;
}

.wpd-badge__title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 6px;
}

.wpd-badge__text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, .8);
    line-height: 1.45;
}

/* ═══════════════════════════════════════════
   3-COLUMN MAIN LAYOUT
   ═══════════════════════════════════════════ */
/* Three-column row uses Bootstrap's grid (.row > .col-lg-3/6/3 = 3-6-3).
   .main-content is the Bootstrap .container wrapper — no width override. */

/* Outer columns get a 12px left/right inset to match the Bootstrap gutter of
   the g-4 rows above (intro, feature cards), so the 3-column row lines up with
   the content above instead of running ~12px wider. */
.col-left {
    border-right: 1px solid var(--gray-100);
    padding: 24px 20px 40px 12px;
}

.col-center {
    padding: 24px 24px 40px;
    border-right: 1px solid var(--gray-100);
}

/* Full-width cyan rule above the center column, matching the side columns */
.col-center::before {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    margin-bottom: 22px;
    background: var(--cyan);
    border-radius: 2px;
}

.col-right {
    padding: 24px 12px 40px 20px;
}

/* ═══════════════════════════════════════════
   COLUMN SHARED STYLES
   ═══════════════════════════════════════════ */
.col-section {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-100);
}

.col-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.col-section__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}

/* Full-width horizontal rule ABOVE the heading row (matches the PDF design) */
.col-section__header::before {
    content: '';
    flex: 0 0 100%;
    width: 100%;
    height: 3px;
    margin-bottom: 12px;
    background: var(--cyan);
    border-radius: 2px;
}

.col-section__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
}

/* "Upcoming events" heading is indigo (#3d4e81) in the design */
.col-right .col-section__title {
    color: var(--fip-indigo);
}

.col-section__more,
.col-section__more:link,
.col-section__more:visited {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2f569a !important;
}

/* Same hover for ALL "All → / overview" links (What we do + Upcoming events):
   a colour change. !important so the 2019 theme's generic a:hover can't override
   it (that was making the events links differ from What we do). */
.col-section__more:hover,
.col-section__more:focus {
    color: var(--cyan) !important;
}

/* ═══════════════════════════════════════════
   LEFT COLUMN — TOPIC LIST
   ═══════════════════════════════════════════ */
.topic-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 2px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none !important;
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.topic-list a:last-child {
    border-bottom: none;
}

.topic-list a:hover {
    color: var(--cyan);
    background: var(--cyan-light);
    padding-left: 10px;
}

/* FontAwesome icon, coloured per-topic via inline style; no background */
.topic-list__icon {
    width: 22px;
    flex-shrink: 0;
    text-align: center;
    font-size: 1.05rem;
}

/* small external-link marker after a "What we do" item that opens a new window */
.topic-list__ext {
    margin-left: 6px;
    font-size: 0.7em;
    color: var(--gray-400);
}

/* Toggle: make all "What we do" icons black instead of their per-topic colour.
   Uncomment to try it. (!important needed to beat the inline style="color:…") */
/*
.topic-list__icon {
    color: #000 !important;
}
*/

/* ═══════════════════════════════════════════
   EVENT COMPACT (right column) — polished chip
   ═══════════════════════════════════════════ */
.event-compact {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition);
    align-items: flex-start;
}

.event-compact:last-child {
    border-bottom: none;
}

.event-compact:hover {
    padding-left: 4px;
}

.event-compact__date {
    flex-shrink: 0;
    /* square box (matches the original design) */
    width: 48px;
    height: 48px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--white);
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    align-self: flex-start;
}

.event-compact__day {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-blue);
    line-height: 1;
    white-space: nowrap;
}

.event-compact__month {
    font-size: 0.58rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.event-compact__info {
    flex: 1;
}

.event-compact__type {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--fip-indigo);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.event-compact__name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.35;
}

.event-compact:hover .event-compact__name {
    color: var(--midnight);
}

/* (the events "overview all" link uses .col-section__more, same as What we do) */


/* ═══════════════════════════════════════════
   FIP MONTREAL 2026 — CONGRESS CARD (center column)
   ═══════════════════════════════════════════ */
/* Center column: a single designed banner image filling the column.
   NOTE: rounded corners here are NEW vs the final/ prototype — backport this
   .center-banner block to ../newtheme/final later. */
.center-banner {
    display: block;
}

/* space between stacked centre banners */
.center-banner + .center-banner {
    margin-top: 16px;
}

.center-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* ═══════════════════════════════════════════
   SHARED HOMEPAGE CAROUSEL (.fip2026-carousel)
   Used by every homepage banner slot. A single banner renders as one image;
   >1 becomes a Bootstrap-4 fading carousel. The extra class (center-banner /
   wide-banner) controls the image styling (radius etc.).
   ═══════════════════════════════════════════ */
.fip2026-carousel {
    display: block;
    position: relative;
}

/* The 2019 style.css hides every carousel image (.carousel-item img {
   visibility:hidden}) and forces object-fit:cover / height:100% — its carousel
   JS reveals the active slide. Our banners aren't driven by that JS, so undo
   those three rules (scoped to our carousel only). */
.fip2026-carousel .carousel-item img,
.fip2026-carousel__img {
    visibility: visible !important;
    width: 100%;
    height: auto !important;
    object-fit: initial !important;
    display: block;
}

/* match the rounded-corner banner look on center/wide carousels */
.fip2026-carousel.center-banner .carousel-item img,
.fip2026-carousel.center-banner.fip2026-carousel--single img,
.fip2026-carousel.wide-banner .carousel-item img,
.fip2026-carousel.wide-banner.fip2026-carousel--single img {
    border-radius: 12px;
}

/* Plain CENTER banner (Montreal): show the FULL image at its natural aspect —
   no forced height, no crop, so the bottom is never cut off. */
.fip2026-carousel.center-banner:not(.center-banner--imgtext) .carousel-item img {
    width: 100% !important;
    height: auto !important;
    object-fit: initial !important;   /* natural scale, no crop */
    display: block;
}

/* IMGTEXT banner: the IMAGE area is locked to a 2:1 box and the image fills it
   as cover (so any banner art looks consistent), with the caption strip below. */
.fip2026-carousel.center-banner--imgtext .carousel-item img {
    width: 100% !important;
    aspect-ratio: 2 / 1;
    height: auto !important;
    object-fit: cover !important;
    display: block;
    border-radius: 12px 12px 0 0 !important;   /* round only the top; caption rounds bottom */
}

/* space stacked single center banners (when CMS returns separate slots) */
.fip2026-carousel.center-banner + .fip2026-carousel.center-banner {
    margin-top: 16px;
}


/* carousel dots */
.fip2026-carousel__dots {
    margin-bottom: 8px;
}

/* ── No-jump multi-slide carousel ───────────────────────────────────────
   The 2019 theme + Bootstrap-4 carousel-fade make slides position:absolute
   during the cross-fade, which (a) collapses the carousel to 0 height — the
   content below (the wide banner) jumps up then back down — and (b) flashes a
   white gap mid-transition. Fix: stack the slides in the SAME grid cell so the
   container always holds the TALLEST slide's height (no collapse, no jump), and
   cross-fade by opacity (no white flash). The active slide is on top. */
.fip2026-carousel .carousel-inner {
    display: grid;
    height: auto !important;     /* 2019 sets height:100% — undo */
}

.fip2026-carousel .carousel-item {
    grid-area: 1 / 1;            /* every slide occupies the one cell */
    display: block !important;   /* override BS4 display:none */
    width: 100%;
    height: auto !important;     /* 2019 sets height:100% — undo */
    opacity: 0;
    transition: opacity .6s ease-in-out;
    pointer-events: none;
}

.fip2026-carousel .carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;          /* active sits above the faded-out ones */
    z-index: 1;
}

/* Single-banner case: no JS, one slide, always visible. */
.fip2026-carousel--single .carousel-item {
    opacity: 1 !important;
    pointer-events: auto;
}

/* ── Rich banner content (show_text / show_background) ──────────────────── */
/* Each slide can carry a title/caption/description block. */
.fip2026-carousel .carousel-item {
    position: relative;
}

/* ── Caption placement: BELOW (default) vs INSIDE the image ──────────────
   Toggle with the private var --imgtext-caption:
     below   (default) → caption is a card footer under the image
     overlay           → caption sits over the bottom of the image, inside the box
   Set it on the carousel, e.g. add the class .fip2026-carousel--caption-overlay
   (or set the var inline) to flip a single banner. */
.fip2026-carousel {
    --imgtext-caption: below;
}

.fip2026-carousel--caption-overlay {
    --imgtext-caption: overlay;
}

/* Caption sits UNDER the image as a card footer (the default). */
.fip2026-carousel__overlay {
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* When the slide carries a caption, the image keeps only its TOP corners
   rounded and the caption block rounds the BOTTOM — one card (BELOW mode). */
.fip2026-carousel .carousel-item:has(.fip2026-carousel__overlay) img {
    border-radius: 12px 12px 0 0 !important;
}

/* No solid colour set → light neutral card footer with dark ink. */
.fip2026-carousel__overlay:not(.fip2026-carousel__overlay--bg) {
    background: #f4f5f7;
    color: var(--fip-ink, #1a2744);
    border-radius: 0 0 12px 12px;
}

/* Solid coloured footer (show_background): keep the bottom corners rounded. */
.fip2026-carousel__overlay--bg {
    border-radius: 0 0 12px 12px;
}

/* ── OVERLAY mode (--imgtext-caption: overlay) ──────────────────────────
   The caption is absolutely positioned over the bottom of the image, inside the
   box. It sits on a SOLID background bar (not a see-through gradient) so the text
   is always readable over any photo, and it's inset ~2px from the edges so the
   photo's border stays visible all the way around. */
.fip2026-carousel--caption-overlay .fip2026-carousel__overlay {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;                     /* inset so the photo edge shows around it */
    z-index: 2;
    border-radius: 0 0 10px 10px;
}

/* image keeps all corners rounded in overlay mode */
.fip2026-carousel--caption-overlay .carousel-item:has(.fip2026-carousel__overlay) img {
    border-radius: 12px !important;
}

/* default (no bg colour) overlay = solid light-grey bar with dark ink, like the
   below-image caption. (A CMS bg colour still overrides via --overlay--bg.) */
.fip2026-carousel--caption-overlay
    .fip2026-carousel__overlay:not(.fip2026-carousel__overlay--bg) {
    background: #f4f5f7;
    color: var(--fip-ink, #1a2744);
}

.fip2026-carousel__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.15;
}

.fip2026-carousel__caption {
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.2;
}

.fip2026-carousel__text {
    font-size: 0.82rem;
    line-height: 1.35;
    opacity: 0.95;
}

.fip2026-carousel__link {
    display: block;
    color: inherit;
    text-decoration: none !important;
}

.congress-card {
    display: flex;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--fip-purple);
    min-height: 240px;
}

.congress-card__text {
    flex: 1 1 47%;
    background: var(--fip-purple);
    color: var(--white);
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.congress-card__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem);
    font-weight: 800;
    margin-bottom: 10px;
}

.congress-card__sub {
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, .92);
}

.congress-card__theme-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--cyan-mid);
    margin-bottom: 4px;
}

.congress-card__theme em {
    font-size: 0.92rem;
    line-height: 1.4;
}

.congress-card__media {
    position: relative;
    flex: 1 1 53%;
    background: #c9d3df;
}

.congress-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.congress-card__logo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--white);
    color: var(--fip-blue);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 9px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.congress-card__pin {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-42%, -50%);
    width: 106px;
    height: 106px;
    border-radius: 50%;
    background: var(--fip-gold);
    color: var(--white);
    font-style: italic;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1.1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

/* ═══════════════════════════════════════════
   THINK HEALTH, THINK PHARMACY BANNER
   ═══════════════════════════════════════════ */
.thtp-section {
    padding: 8px 0 36px;
}

/* Full-width designed banner image (no text panels). Rounded corners — NEW vs
   the final/ prototype; backport to ../newtheme/final later. */
.wide-banner {
    display: block;
}

.wide-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* On narrow screens the ultrawide banner shrinks to a thin strip — give it a
   usable min-height and crop with object-fit:cover instead. */
@media (max-width: 768px) {
    .wide-banner img {
        height: 140px;
        object-fit: cover;
    }
}

.thtp-banner {
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    min-height: 132px;
    background: linear-gradient(90deg, #5fa860 0%, #5fa860 26%, #8bbf6a 38%, #c98fa0 60%, #4b5aa6 76%, #4b5aa6 100%);
}

.thtp-banner__side {
    flex: 1;
    padding: 22px 28px;
    font-weight: 800;
    font-size: clamp(1rem, .8rem + .7vw, 1.4rem);
    line-height: 1.2;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}

.thtp-banner__side--right {
    text-align: right;
}

.thtp-banner__media {
    width: clamp(180px, 26vw, 360px);
    height: 132px;
}

.thtp-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ═══════════════════════════════════════════
   FOUR FEATURE CARDS
   ═══════════════════════════════════════════ */
.feature-cards {
    padding: 8px 0 48px;
}

/* Grid is Bootstrap (.row.g-4 > .col-lg-3). Card anatomy (matches PDF):
   top accent line → heading → media block → body (tinted background). */
.feature-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    border-top: 4px solid var(--card-accent, var(--cyan));
}

.feature-card__kicker {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.08;
    color: var(--dark);
    padding: 16px 4px 14px;
}

.feature-card__kicker span {
    display: block;
    font-weight: 800;
}

/* Image / graphic block between heading and body */
.feature-card__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--card-accent, var(--cyan));
    /* 1px frame in the card BODY fill colour (so the line blends with the body
       below, not the accent). Set border to 0 to disable. */
    border: 1px solid var(--card-fill, var(--gray-50));
    border-bottom: 0;
}

.feature-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* anchor the top so title/text at the top of event/news thumbs isn't cut */
   /*  object-position: top center; */
}

.feature-card__media--digital {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    line-height: 1.06;
    text-align: center;
}

/* Recent-publication preview: dark-green band with a portrait thumb (~1/3) on
   the left and the title + subline (~2/3) on the right. The thumb is optional —
   without it the caption fills the band. */
.pub-preview {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
    /* Match the height of the other cards' media blocks */
    aspect-ratio: 16 / 10;
    background: var(--card-accent-dark, #5a7d1f);
}

/* White text on the dark-green band (override the theme's link colour) */
.pub-preview,
.pub-preview .pub-preview__title,
.pub-preview .pub-preview__sub {
    color: #fff !important;
}

.pub-preview__thumb {
    flex: 0 0 33%;
    align-self: stretch;
    overflow: hidden;
    /* 1px frame in the band colour to hide white image edges. Set border to 0 to disable. */
    border: 1px solid var(--card-accent-dark, #a5c44d);
    background: var(--card-accent-dark, #a5c44d);
}

.pub-preview__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pub-preview__caption {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pub-preview__title {
    display: block;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1.2;
}

.pub-preview__sub {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.92;
}

/* Body sits on the card's tinted fill */
.feature-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--card-fill, var(--gray-50));
    padding: 16px 16px 20px;
}

.feature-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--gray-700);
    line-height: 1.5;
    margin-bottom: 10px;
}

.feature-card__link {
    align-self: flex-start;
    font-weight: 700;
    font-size: 0.82rem;
    color: #000 !important;       /* black text, override the theme link colour */
    transition: color var(--transition);
}

.feature-card__link:visited {
    color: #000 !important;
}

/* Hover: text takes the card accent colour and the underline thickens */
.feature-card__link:hover,
.feature-card__link:focus {
    color: var(--card-accent-dark, var(--card-accent, var(--cyan))) !important;
}

/* Solid underline in the card's accent colour (not the text colour).
   The border-bottom IS the underline, so cancel any text-decoration. */
.feature-card__link-text {
    border-bottom: 1px solid var(--card-accent-dark, var(--card-accent, var(--cyan)));
    text-decoration: none !important;
    padding-bottom: 1px;
}

/* Hover: underline switches to dotted */
.feature-card__link:hover .feature-card__link-text,
.feature-card__link:focus .feature-card__link-text {
    border-bottom-style: dotted;
}

.feature-card__date {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    margin-bottom: 6px;
}

/* Custom, lighter select — fully overrides the 2019 theme's heavier form/select
   styling (multiple `select` rules in style.css bleed in otherwise). */
.feature-card__select select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 9px 34px 9px 12px !important;     /* room for the custom chevron */
    border: 1px solid var(--gray-300) !important;
    border-radius: 4px !important;
    background-color: var(--white) !important;
    /* custom chevron */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'%236b7280'%3E%3Cpath%20d%3D'M7%2010l5%205%205-5z'%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    color: var(--gray-700) !important;
    font-family: var(--font-body) !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
}

.feature-card__select select:focus {
    outline: none;
    border-color: var(--cyan) !important;
}

/* Select label spans the full card width and the field fills it */
.feature-card__select {
    display: block;
    width: 100%;
}

/* Larger dropdown for the Recent Publications card, pinned to the card bottom */
.feature-card__select--lg {
    margin-top: auto;
}

.feature-card__select--lg select {
    padding: 12px 34px 12px 14px !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
}

.feature-card--data {
    --card-accent: var(--card1-accent);
    --card-fill: var(--card1-fill);
}

.feature-card--pub {
    --card-accent: var(--card2-accent);
    --card-accent-dark: #a5c44d;
    --card-fill: var(--card2-fill);
}

.feature-card--events {
    --card-accent: var(--card3-accent);
    --card-fill: var(--card3-fill);
}

.feature-card--news {
    --card-accent: var(--card4-accent);
    --card-fill: var(--card4-fill);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
/* "What we do" is as important as the other columns — it is NOT hidden. All
   three columns show side by side at lg+ and stack below lg (Bootstrap). The
   breakpoint where they stack can be revisited later. */

/* Below lg the 3 columns stack (Bootstrap col-lg-*); reset their side padding
   so the stacked blocks sit flush, and cap the WPD badge so it isn't huge when
   it's alone on a row (iPad). */
/* ── Tablet + wide-phone zone (576–991.98px): the 3 big blocks stack FULL WIDTH
   (col-lg collapses below 992px), so each block has room — flow the What-we-do
   and Upcoming-events lists into 2 columns instead of one long skinny list.
   Only below 576px (small phones) do the lists go back to a single column. ── */
@media (min-width: 576px) and (max-width: 991.98px) {
    .topic-list,
    .events-list {
        column-count: 2;
        column-gap: 24px;
    }
    .topic-list a,
    .events-list .event-compact {
        break-inside: avoid;   /* don't split an item across the two columns */
    }
}

@media (max-width: 991.98px) {
    .wpd-badge {
        max-width: 280px;
    }
}

/* ── New-component responsive (congress card, THTP banner, feature cards) ──
   Feature-card grid is now Bootstrap (.col-sm-6 .col-lg-3); no custom override. */

@media (max-width: 768px) {

    /* Below 768px the 3-col grid collapses to 1 column. Give all three columns
       the same full-width padding (col-left was previously omitted, leaving
       "What we do" flush to the screen edges). */
    .col-left,
    .col-center,
    .col-right {
        border-right: none;
        padding: 24px 20px 32px;
    }

    /* When the intro stacks (<768px) the banner column is full width; keep the
       banner itself small — max 50% of the column — and centre it. */
    .intro-section__aside {
        max-width: 50%;
        margin-left: auto;
        margin-right: auto;
    }

    .congress-card {
        flex-direction: column;
    }

    .congress-card__media {
        min-height: 200px;
    }

    .congress-card__pin {
        top: 14px;
        left: auto;
        right: 16px;
        transform: none;
        width: 88px;
        height: 88px;
        font-size: 0.8rem;
    }

    .thtp-banner {
        flex-direction: column;
        text-align: center;
    }

    .thtp-banner__side--right {
        text-align: center;
    }

    .thtp-banner__media {
        width: 100%;
        order: -1;
    }
}

/* ── Small phones (<576px): What-we-do + Events lists collapse to a single
   column (the 2-col rule applies 576–991.98px). ── */
@media (max-width: 575.98px) {
    .topic-list,
    .events-list {
        column-count: 1;
    }
}



/* ═══════════════════════════════════════════
   FIP 2026 homepage: hide the old 2019 "footerlinks" block (partners / works-for
   / contact). This file only loads when the fip2026 switch is on AND it's the
   homepage, so this is automatically scoped to the new homepage only.
   ═══════════════════════════════════════════ */
.footerlinks {
    display: none;
}

/* ── Page minimum width ─────────────────────────────────────────────────
   320px is the standard floor (smallest phones in portrait); below this the
   page scrolls horizontally instead of squishing further. (The 2019 style.css
   already sets body { min-width: 320px }; this keeps that.) Note: at this width
   the 5:1 hero band is short — the hero min-height rule below keeps it tall
   enough for the two-line title. */
body {
    min-width: 320px;
}

/* ── Print / Save-to-PDF ────────────────────────────────────────────────
   PDF paper (~794px A4 portrait) is narrower than the lg breakpoint (992px), so
   the Bootstrap grid collapses the 3 columns to full-width (the "mobile" look).
   Force the desktop layout for print: lay out the homepage at the 1200px design
   width and keep the col-lg-* widths side by side regardless of paper size. */
@media print {
    /* render at the desktop design width, not the paper width */
    .main-content.container,
    .intro-section .container,
    .thtp-section .container,
    .feature-cards .container,
    .quick-bar .container {
        width: 1200px !important;
        max-width: 1200px !important;
    }

    /* keep the 3-6-3 (and 9-3 intro, 4× feature) columns side by side */
    .intro-section__body { flex: 0 0 75% !important; max-width: 75% !important; }
    .col-left  { flex: 0 0 25% !important; max-width: 25% !important; }
    .col-center { flex: 0 0 50% !important; max-width: 50% !important; }
    .col-right { flex: 0 0 25% !important; max-width: 25% !important; }
    .feature-cards .col-12 { flex: 0 0 25% !important; max-width: 25% !important; }

    /* undo the narrow-screen resets so columns don't go flush/full-width */
    .col-left, .col-center, .col-right {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* make sure backgrounds/colours actually print */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
