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

/* ================================================================= */
/* AFRICA ELECTS — STYLESHEET (same structure as Europe Elects)       */
/* Colours from the Africa Elects logo: black, red, green, yellow.   */
/* ================================================================= */

/* ===================== CSS CUSTOM PROPERTIES ===================== */
:root {
    /* "navy" = the main dark colour (here the logo's black), "yellow" = the accent (the logo's star).
       The names are kept from the Europe Elects stylesheet so both files stay easy to compare. */
    --color-navy:     #1C1C1C;
    --color-yellow:   #FFE500;
    --color-red:      #D04848;   /* the logo's banner red: flag strip */
    --color-red-dark: #A93636;
    --color-green:    #0B6B2E;
    --color-offwhite: #F7F6F2;   /* same warm grey as the embedded pages */
    --color-white:    #ffffff;
    --color-border:   #E4E2DB;   /* same hairline as the embedded pages */
    --color-ink:      #1A1D23;
    --color-muted:    #5E636E;
    --font-display:   'Advent Pro', 'Alegreya Sans', system-ui, sans-serif;
    --color-card-bg:  #F3D9D9;   /* light red cards in the election ticker */
    --color-patreon:  #FF424D;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-up: 0 -3px 0 var(--color-yellow);

    --transition: 0.18s ease;

    --font-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
                  "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

/* ===================== BASE ===================== */
body {
    background-color: var(--color-offwhite);
    overflow-x: hidden;
}

/* ===================== EMOJI FIX ===================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
.textbox,
.textbox p,
.textbox span {
    font-family: var(--font-emoji) !important;
}

/* ===================== SITE HEADER ===================== */
/* Black bar with a thin yellow line underneath. */
#site-header {
    position: relative;
    z-index: 100;
    padding: 0;
    margin-bottom: 0;
    background: var(--color-navy);
    border-bottom: 3px solid var(--color-yellow);
}

.theme-credits {
    display: none;
}

.header-inner {
    background-color: var(--color-navy) !important;
    border-bottom: none;
    padding-top: 1.1rem !important;
    padding-bottom: 1.1rem !important;
    align-items: center;
}

/* Logo — original colours on ONE white badge (drawn on the logo's container, not the image),
   so the black part of the logo stays visible on the black bar. */
.site-logo {
    display: inline-flex !important;
    align-items: center;
    background: var(--color-white);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    margin: 0 !important;
    line-height: 0;
    transition: transform var(--transition);
}
.site-logo:hover { transform: translateY(-1px); }
.site-logo a,
.site-logo .custom-logo-link,
.site-logo img,
.custom-logo {
    display: inline-block !important;
    visibility: visible !important;
    filter: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
/* Same logo size at all times — also in the sticky header that appears when scrolling
   (the theme/plugin enlarges it there; this keeps it fixed). */
.site-logo img,
.custom-logo,
[class*="sticky"] .site-logo img,
[class*="sticky"] .custom-logo,
[class*="scroll"] .site-logo img,
[class*="scroll"] .custom-logo,
[class*="fixed"] .site-logo img,
[class*="fixed"] .custom-logo {
    height: 4.4rem !important;
    max-height: 4.4rem !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    transition: none !important;
}
.site-logo,
[class*="sticky"] .site-logo,
[class*="scroll"] .site-logo,
[class*="fixed"] .site-logo {
    width: auto !important;
    height: auto !important;
    max-height: none !important;
}

/* ===================== MAIN NAV ===================== */
.main-menu-alt,
.primary-menu {
    color: rgba(255, 255, 255, 0.9);
    margin: -2rem 0 -2rem -3rem;
    align-items: center;
}

.main-menu-alt > li,
.primary-menu > li {
    margin: 0 0.4rem;
    position: relative;
    display: flex;
    align-items: center;
}
/* items with a dropdown: a clear gap between the arrow and the next item */
.main-menu-alt > li.menu-item-has-children,
.primary-menu > li.menu-item-has-children {
    margin-right: 1.4rem;
}
.main-menu-alt > li.menu-item-has-children > .icon,
.primary-menu > li.menu-item-has-children > .icon {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    margin-left: 0.2rem;
}

.main-menu-alt > li a:not(.sub-menu a),
.primary-menu > li a:not(.sub-menu a) {
    font-family: var(--font-display) !important;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 2.4rem 1rem;
    margin: 0;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: none;
    box-shadow: inset 0 0 0 transparent;
    transition: color var(--transition), box-shadow var(--transition);
}

/* Hover/current: yellow underline instead of a coloured block */
.main-menu-alt > li a:not(.sub-menu a):hover,
.main-menu-alt > li a:not(.sub-menu a):focus,
.main-menu-alt > li.current-menu-item a:not(.sub-menu a),
.main-menu-alt > li.current-menu-ancestor a:not(.sub-menu a),
.primary-menu > li a:not(.sub-menu a):hover,
.primary-menu > li a:not(.sub-menu a):focus,
.primary-menu > li.current-menu-item a:not(.sub-menu a),
.primary-menu > li.current-menu-ancestor a:not(.sub-menu a) {
    color: #fff;
    background: none;
    box-shadow: inset 0 -3px 0 var(--color-yellow);
    text-decoration: none;
}

/* Dropdown arrows: right next to their label, in yellow */
.main-menu-alt .ancestor-wrapper,
.primary-menu .ancestor-wrapper {
    display: flex;
    align-items: center;
}
.main-menu-alt > li > .ancestor-wrapper > a,
.primary-menu > li > .ancestor-wrapper > a {
    padding-right: 0.3rem !important;
}
.main-menu-alt .sub-menu-toggle,
.primary-menu .sub-menu-toggle {
    margin: 0 0.8rem 0 0 !important;
    padding: 0.4rem !important;
    background: none !important;
    color: var(--color-yellow) !important;
    width: auto !important;
    height: auto !important;
}
.main-menu-alt .sub-menu-toggle svg,
.primary-menu .sub-menu-toggle svg {
    width: 1rem;
    height: auto;
    fill: currentColor;
}
.main-menu-alt > li > .icon,
.primary-menu > li > .icon {
    right: 1rem;
    color: var(--color-yellow);
    pointer-events: none;
}

/* Last menu item as a yellow button (e.g. "Support us" or "Newsletter") — give that menu item the CSS class "ee-cta"
   under Appearance → Menus (Screen Options → CSS Classes). */
.main-menu-alt > li.ee-cta a:not(.sub-menu a),
.primary-menu > li.ee-cta a:not(.sub-menu a) {
    margin: 1.4rem 0 1.4rem 1rem;
    padding: 1rem 1.6rem;
    background: var(--color-yellow);
    color: var(--color-navy);
    border-radius: var(--radius-sm);
    box-shadow: none;
}
.main-menu-alt > li.ee-cta a:not(.sub-menu a):hover,
.primary-menu > li.ee-cta a:not(.sub-menu a):hover {
    background: #fff;
    color: var(--color-navy);
    box-shadow: none;
}

.header-toggles .toggle {
    height: 40px;
    color: var(--color-white);
}

/* ===================== COUNTRY FLAG MENU ===================== */
/* The red strip from the logo under the black bar: smaller flags, even spacing, hover tooltips. */
.menu2name h3 {
    font-family: var(--font-display) !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: center;
    margin: 0;
    padding: 8px 0 0;
    color: var(--color-white);
    text-transform: uppercase;
}

.menu2name,
div.custom-menu-class,
.home div.custom-menu-class {
    background-color: var(--color-red);   /* the red of the Africa Elects logo banner */
    margin: 0;
}

div.custom-menu-class {
    padding: 0.8rem 4% 0.9rem;
    display: flex;
    justify-content: center;
    border-bottom: 2px solid var(--color-red-dark);
    box-shadow: none;
}

#menu-countries {
    background-color: transparent;
    margin: 0 auto;
    max-width: 104rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 4px;
}

div.custom-menu-class ul {
    text-align: center;
}

div.custom-menu-class ul li {
    margin: 0;
    padding: 0;
    display: inline-block;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* The flag being hovered sits on top, so its country name is never hidden behind the next row of flags */
div.custom-menu-class ul li:hover,
div.custom-menu-class ul li:focus-within {
    z-index: 100;
}

div.custom-menu-class ul li a,
div.custom-menu-class ul li a:link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px 3px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-navy);
    font-size: 20px;
    line-height: 1;
    position: relative;
    transition: background-color var(--transition), transform var(--transition);
}

div.custom-menu-class ul li a:hover,
div.custom-menu-class ul li a:focus {
    padding: 4px 3px;
    background-color: var(--color-white);
    color: var(--color-navy);
    transform: translateY(-1px);
}

/* Flag icons: a little smaller, crisp edges, faint outline so white flags don't vanish */
.flag-icon {
    width: 2.2rem;
    vertical-align: middle;
    overflow: hidden;
    display: inline-block;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.flag-icon img {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    height: auto;
}

img.emoji,
span.emoji,
.wp-smiley {
    display: inline-block !important;
    visibility: visible !important;
}

/* Country name on hover — styled like the tooltips on the embedded pages */
div.custom-menu-class ul li .tag {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 180px;
    top: calc(100% + 6px);
    left: 50%;
    margin-left: 0;
    transform: translateX(-50%);
    background-color: var(--color-white);
    color: var(--color-navy);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-green);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    position: absolute;
    z-index: 50;
    font-family: var(--font-display) !important;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    transition: opacity var(--transition);
}

div.custom-menu-class ul li a:hover .tag,
div.custom-menu-class ul li a:focus .tag {
    visibility: visible;
    opacity: 1;
}

/* Territories that are part of a country outside Africa or not independent (Canary Islands, Ceuta, Melilla,
   Madeira, Mayotte, Réunion, Saint Helena): moved to the end of the strip, smaller and faded, full colour on hover.
   They're found by their link, so add a part of the page address below if one is missing. */
div.custom-menu-class ul li:has(a[href*="canary"]),
div.custom-menu-class ul li:has(a[href*="ceuta"]),
div.custom-menu-class ul li:has(a[href*="melilla"]),
div.custom-menu-class ul li:has(a[href*="madeira"]),
div.custom-menu-class ul li:has(a[href*="mayotte"]),
div.custom-menu-class ul li:has(a[href*="reunion"]),
div.custom-menu-class ul li:has(a[href*="r%c3%a9union"]),
div.custom-menu-class ul li:has(a[href*="saint-helena"]) {
    order: 99;
}
div.custom-menu-class ul li:has(a[href*="canary"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="ceuta"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="melilla"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="madeira"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="mayotte"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="reunion"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="r%c3%a9union"]) .flag-icon,
div.custom-menu-class ul li:has(a[href*="saint-helena"]) .flag-icon {
    width: 1.6rem;
    opacity: 0.55;
    filter: saturate(0.4);
    transition: opacity var(--transition), filter var(--transition);
}
div.custom-menu-class ul li a:hover .flag-icon,
div.custom-menu-class ul li a:focus .flag-icon {
    opacity: 1;
    filter: none;
}

/* Phones: one row that scrolls sideways instead of a tall block of flags */
@media (max-width: 700px) {
    div.custom-menu-class { padding: 0.6rem 0; justify-content: flex-start; }
    #menu-countries { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
    #menu-countries::-webkit-scrollbar { display: none; }
    div.custom-menu-class ul li .tag { display: none; }
}

/* ===================== PATREON BUTTON ===================== */
/* Hidden globally, shown only on single posts */
.patreonButton {
    display: none !important;
}

.single-post .patreonButton {
    display: flex !important;
    justify-content: center;
    padding-top: 1rem;
    margin-top: 40px;
    margin-bottom: 15px;
}

@media (max-width: 740px) {
    .single-post .patreonButton {
        margin-top: 40px;
        margin-bottom: 15px;
    }
}

.patreonButton a {
    background: var(--color-patreon);
    padding: 10px 20px 10px 40px;
    border-radius: 30px;
    color: var(--color-white);
    text-decoration: none;
    font-size: 1.3rem;
    font-family: 'America', 'GT America', 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    position: relative;
    transition: opacity var(--transition), box-shadow var(--transition);
}

.patreonButton a:hover {
    opacity: 0.9;
    box-shadow: 0 4px 14px rgba(255, 66, 77, 0.35);
}

.patreonButton a::before {
    content: '';
    background: url('https://europeelects.eu/wp-content/uploads/2021/11/Digital-Patreon-Logo_White.png') no-repeat center / contain;
    width: 15px;
    height: 15px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
}

/* ===================== CONTENT LAYOUT ===================== */
.post-inner {
    width: 100%;
    margin: 0;
    padding-top: 0 !important;
}

div.entry-content {
    max-width: 100%;
    margin-top: 0 !important;
}

/* ===================== ENTRY HEADER & TITLE ===================== */

/* Pages (non-home) — breathing room from the top */
body.page:not(.home) .site-content {
    padding-top: 40px;
}

body.page:not(.home) .entry-header {
    margin-top: 20px;
}

/* Universal entry-header: transparent container, no padding */
.entry-header {
    background: transparent !important;
    padding: 0 !important;
    margin-top: 50px !important;
    margin-bottom: 20px !important;
    text-align: center;
}

/* Hide home page title (and the empty space it leaves above the home page content) */
.home .entry-title,
.home .page-title,
.home .entry-header {
    display: none !important;
}

/* Page titles (articles list, about, etc.) */
.page .entry-title,
.page-title {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* The ribbon title — a single authoritative block */
.entry-title {
    display: inline-block;
    font-family: var(--font-display) !important;
    background: var(--color-navy);
    color: var(--color-white);
    font-size: 2rem;          /* ~32px, slightly tighter than 35px */
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.3;
    padding: 12px 40px;
    margin: 0 auto 15px auto;
    border-radius: 0;         /* keep the sharp ribbon look */
}

/* Single post: no extra gap between header and content */
.single-post .entry-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.single-post .entry-content {
    margin-top: 0 !important;
}

/* ===================== SOCIAL SHARING (hidden) ===================== */
.post-share,
.entry-social,
.social-sharing {
    display: none !important;
}

/* ===================== SOCIAL ICONS (hidden) ===================== */
ul.social-icons {
    display: none !important;
}

/* VK logo override */
.s-icons a[href*="vk.com"]::before {
    content: '\f189';
    font-family: 'Font Awesome 5 Brands';
}

/* ===================== DROPDOWN MENUS ===================== */
.main-menu-alt .sub-menu,
.primary-menu .sub-menu {
    background-color: var(--color-white) !important;
    border: 1px solid var(--color-border) !important;
    border-top: 3px solid var(--color-yellow) !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16) !important;
    padding: 6px 0 !important;
    z-index: 200 !important;
}

/* Hide the little triangle Twenty Twenty draws above dropdowns */
.main-menu-alt .sub-menu::before,
.main-menu-alt .sub-menu::after,
.primary-menu .sub-menu::before,
.primary-menu .sub-menu::after {
    display: none !important;
}

.main-menu-alt .sub-menu a,
.primary-menu .sub-menu a {
    font-family: var(--font-display) !important;
    color: var(--color-navy) !important;
    padding: 9px 20px !important;
    font-size: 1.6rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    border-bottom: 0 !important;
    background: none !important;
}

.main-menu-alt .sub-menu a:hover,
.main-menu-alt .sub-menu a:focus,
.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus {
    background-color: var(--color-offwhite) !important;
    color: var(--color-navy) !important;
    box-shadow: inset 3px 0 0 var(--color-yellow) !important;
}

#site-footer {
    margin-top: 0;
}

.footer-inner {
    padding: 0;
    background-color: var(--color-offwhite);
}

.footer-menu a {
    padding: 32px 10px;
    margin: 5px;
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition);
}

.footer-menu a:hover {
    color: var(--color-white);
    background-color: var(--color-navy);
}

.wpautoterms-footer {
    background-color: var(--color-yellow);
    padding: 32px 10px;
    margin: 0;
}

.wpautoterms-footer a {
    padding: 32px 10px;
    margin: 5px;
    text-decoration: none;
    transition: color var(--transition), background-color var(--transition);
}

.wpautoterms-footer a:hover {
    color: var(--color-white);
    background-color: var(--color-navy);
}

/* ===================== COOKIES NOTICE ===================== */
@media (min-width: 1240px) {
    .wpautoterms-cookies-notice {
        display: flex;
        background: var(--color-white);
        padding: 1.2rem 3rem;
        justify-content: space-between;
        position: fixed;
        width: 100%;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999999;
        box-shadow: var(--shadow-up);
    }
}

/* ===================== MISC WIDGETS ===================== */
.hw-widget {
    display: none; /* advertisement hidden */
}

.ab-block-layout-column-inner p {
    padding: 0;
    margin: 0;
    color: var(--color-navy);
}

/* ===================== IFRAMES / EMBEDS ===================== */
iframe[data-external="1"],
.wp-block-embed iframe {
    width: 100% !important;
    max-width: 100% !important;
}

.wp-block-embed,
.wp-block-embed__wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

/* ===================== IMAGE VISIBILITY ===================== */

/* Hide featured/thumbnail images everywhere */
.featured-media,
.preview-media,
.entry-media,
.post-thumbnail,
.featured-image,
.wp-block-post-featured-image,
.wp-block-latest-posts__featured-image,
.related-posts .post-image,
.related-posts figure,
.jp-relatedposts-post-img {
    display: none !important;
}

/* Remove ghost boxes from related post links */
.related-posts a,
.related-posts a:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Hide images in article-list pages */
body.page .entry-content li img,
body.page .entry-content article img,
body.page .entry-content .type-post img,
body.page .entry-content .wp-block-latest-posts img {
    display: none !important;
}

/* Restore images inside single post content */
body.single .entry-content > .wp-block-image,
body.single .entry-content > p > img,
body.single .entry-content > figure.wp-block-image,
body.single .entry-content > div > .wp-block-image,
body.single .entry-content .wp-block-column > .wp-block-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
}

/* ===================== HOVER INFO BOX ===================== */
.hover-box {
    position: relative;
    display: inline-block;
    background: var(--color-yellow);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.hover-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    color: var(--color-navy);
    padding: 14px;
    min-width: 220px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    z-index: 9999;
}

.hover-box:hover .hover-content {
    display: block;
}

/* ===================== CURRENT EVENTS BLOCK ===================== */
.current-events {
    background: var(--color-white);
    border-left: 6px solid var(--color-yellow);
    padding: 18px 24px;
    margin: 30px auto 60px auto;
    max-width: 1100px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.current-events h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--color-navy);
}

.current-event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.current-event-card {
    background: var(--color-offwhite);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

/* ===================== ELECTION ROTATOR ===================== */
.election-rotator {
    max-width: 900px;
    margin: auto;
    text-align: center;
    padding-top: 0;
}

.election-rotator-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-navy);
}

.election-rotator-box {
    position: relative;
    height: 50px;
    overflow: hidden;
}

.election-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-navy);
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius-lg);
    opacity: 0;
    transform: translateY(-30px);
    animation: electionFade 32s infinite cubic-bezier(0.22, 1, 0.36, 1);
}

.election-item:nth-child(1) { animation-delay: 0s;  }
.election-item:nth-child(2) { animation-delay: 8s;  }
.election-item:nth-child(3) { animation-delay: 16s; }
.election-item:nth-child(4) { animation-delay: 24s; }
.election-item:nth-child(5) { animation-delay: 32s; }

@keyframes electionFade {
    0%   { opacity: 0; transform: translateY(-28px); }
    5%   { opacity: 1; transform: translateY(0);     }
    20%  { opacity: 1; transform: translateY(0);     }
    25%  { opacity: 0; transform: translateY(28px);  }
    100% { opacity: 0; transform: translateY(28px);  }
}

/* Renamed @keyframes (was clashing with the ticker's electionSlide) */

/* ===================== ELECTION TICKER (scrolling strip) ===================== */
.election-track {
    display: flex;
    width: max-content;
    animation: electionTicker 25s linear infinite;
}

.election-slider:hover .election-track {
    animation-play-state: paused;
}

.election-slide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 320px;
    margin-right: 18px;
    padding: 16px 24px;
    background: var(--color-card-bg);
    color: black;
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition), color var(--transition);
}

.election-slide:hover {
    background: var(--color-navy);
    color: var(--color-white);
}

@keyframes electionTicker {
    from { transform: translateX(100vw); }
    to   { transform: translateX(-100%); }
}

/* ===================== PAGE-SPECIFIC RULES ===================== */
/* Europe Elects hid the title / author on some posts by their ID (e.g. .postid-123 .entry-header).
   Add Africa Elects posts here the same way if needed. */

/* Reading text stays in Alegreya Sans; menu, titles and headings use Advent Pro, like the embedded pages. */
body,
button,
input,
textarea,
select,
.entry-content,
.footer-menu {
    font-family: Alegreya Sans, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif !important;
}

.main-menu-alt,
.primary-menu,
.page-title,
.entry-title,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display) !important;
}

.wp-list-table .column-author {
    width: 100px;
}
.wp-list-table .column-title {
    width: auto;
}

/* Post / page 8021490: no headline */
.postid-8021490 .entry-title,
.page-id-8021490 .entry-title,
.postid-8021490 .entry-header,
.page-id-8021490 .entry-header {
    display: none !important;
}