/* ══════════════════════════════════════════════════════
   BASE RESET & GLOBALS
   ══════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    padding-bottom: 30px;
}

html {
    font-size: 1.2rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji";
    background: #f5f5f5;
    /*color: #1a1a1a;*/
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ══════════════════════════════════════════════════════
   FULL-SCREEN BACKGROUND
   ══════════════════════════════════════════════════════ */
.full-screen-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    transition: background 0.8s ease;
    overflow: hidden;
}


/* ══════════════════════════════════════════════════════
   SITE HEADER
   ══════════════════════════════════════════════════════ */
.site-header {
    text-align: center;
    padding-top: 0.3rem;
    margin-bottom: 0;
    margin-top: 10px;
}

/* ── Logo / site name ─────────────────────────────── */
.site-brand {
    display: inline-block;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 400;
    font-size: 2.2rem;
    letter-spacing: 0.02em;
    transition: opacity 0.2s;
    white-space: nowrap;
    text-align: center;
}

.site-brand:hover {
    opacity: 0.85;
}

.site-brand-logo {
    display: block;
    margin: 0 auto 0.5rem;
    opacity: 0.55;
}

.site-brand-tagline {
    display: block;
    margin-top: -0.35rem;
    line-height: 1.1;
    font-size: 0.60rem;
    font-weight: 300;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
    opacity: 0.5;
}

/* ══════════════════════════════════════════════════════
   SLIDE WRAPPER (main container)
   ══════════════════════════════════════════════════════ */
.slide-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem 1rem;
    position: relative;
}

/* ══════════════════════════════════════════════════════
   FACT CARD
   ══════════════════════════════════════════════════════ */
.fact-card {
    max-width: 760px;
    width: 100%;
    text-align: center;
    padding: 0 0 2.5rem;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fact-card.is-entering {
    animation: fadeSlideIn 0.5s ease-out;
}

@media (max-width: 767px) {
    .fact-card .fact-image-wrapper {
        width: 100vw;
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .fact-card .fact-image {
        border-radius: 0;
        width: 100%;
    }
}

.fact-number {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.45;
    margin-bottom: 0.8rem;
}

.fact-text {
    font-family: 'New York', 'Iowan Old Style', Georgia, serif;
    /*font-size: clamp(1.4rem, 2vw, 2.2rem);*/
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    /*margin-bottom: 2rem;*/
    /*margin-top: 1rem;*/
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    text-align: left;
    width: 100%;
}

.fact-text strong {
    color: #1a1a1a;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, 0.2);
    text-underline-offset: 4px;
}

/* ══════════════════════════════════════════════════════
   FACT IMAGE
   ══════════════════════════════════════════════════════ */
.fact-image {
    max-width: 100%;
    border-radius: 20px;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.fact-image[hidden] {
    display: none;
}

/* ══════════════════════════════════════════════════════
   FACT REGISTRY MARK
   ══════════════════════════════════════════════════════ */
.fact-registry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    margin-top: 2rem;
    margin-bottom: 0.3rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    width: 100%;
    background: rgba(22, 101, 52, 0.08);
    border: 1px solid rgba(22, 101, 52, 0.15);
}

.fact-registry-main {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #15803d;
}

.fact-registry-icon {
    width: 15px;
    height: 15px;
    color: #15803d;
}

.fact-registry-sub {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1a7a3a;
}

/* ══════════════════════════════════════════════════════
   FACT IMAGE WRAPPER & ACTION BUTTONS
   ══════════════════════════════════════════════════════ */
.fact-image-wrapper {
    display: inline-block;
    width: 100%;
}

.fact-image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fact-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: none;
    color: rgba(0, 0, 0, 0.45);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.fact-action-btn:hover {
    color: rgba(0, 0, 0, 0.75);
}

.fact-action-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Report dropdown ─────────────────────────────── */
.fact-report-wrapper {
    position: relative;
}

.fact-report-menu {
    position: absolute;
    top: calc(100% + 0.3rem);
    right: 0;
    min-width: 190px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.35rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 10;
}

.fact-report-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fact-report-option {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.85rem;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s;
}

.fact-report-option:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ══════════════════════════════════════════════════════
   SHARE BUTTON (legacy)
   ══════════════════════════════════════════════════════ */
.fact-share {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    opacity: 0.4;
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    margin-bottom: 0.8rem;
    font-family: inherit;
}

.fact-share:hover {
    opacity: 0.7;
}

.fact-share svg {
    width: 14px;
    height: 14px;
}

/* ══════════════════════════════════════════════════════
   EXPLAIN MORE BUTTON
   ══════════════════════════════════════════════════════ */
.btn-explain {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.2rem;
    padding: 0.55rem 1.4rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-explain:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.22);
    color: rgba(0, 0, 0, 0.75);
}

.btn-explain svg {
    width: 15px;
    height: 15px;
}

.btn-explain[hidden] {
    display: none;
}

/* ══════════════════════════════════════════════════════
   NEXT FACT BUTTON
   ══════════════════════════════════════════════════════ */
.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 50px;
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-next:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

.btn-next:active {
    background: rgba(0, 0, 0, 0.3);
    transform: scale(0.97);
}

.btn-next:disabled {
    opacity: 1;
    cursor: not-allowed;
}

.btn-next svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-next:hover svg {
    transform: rotate(180deg);
}

.btn-next-icon {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.3s ease;
}

/* Loading state */
.btn-next.is-loading .btn-next-icon {
    display: none;
}

.btn-next.is-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(0, 0, 0, 0.15);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Desktop: show full text, hide short text */
.btn-next-short {
    display: none;
}

.btn-next-full {
    display: inline;
}

/* ── Mobile overrides ────────────────────────────── */
@media (max-width: 767px) {
    /* Home page CTA stays as the big circle */
    .home-action .btn-next {
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
        width: 150px;
        height: 150px;
        padding: 0;
        border: 3px solid rgba(0, 0, 0, 0.15);
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.05);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    }

    .home-action .btn-next-full {
        display: inline;
        font-size: 1.1rem;
        letter-spacing: 0.08em;
    }

    .home-action .btn-next-short {
        display: none;
    }

    .home-action .btn-next:hover,
    .home-action .btn-next:active,
    .home-action .btn-next:focus,
    .home-action .btn-next:focus-visible {
        border: 3px solid rgba(0, 0, 0, 0.25);
        background: rgba(0, 0, 0, 0.12);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
        transform: none;
    }

    /* Prevent content from hiding behind the sticky button */
    .seo-footer {
        padding-bottom: 2rem;
    }
}

/* ══════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ══════════════════════════════════════════════════════ */
.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.lang-switcher a {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.45);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.lang-switcher a:hover {
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.15);
}

.lang-switcher a.active {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.07);
    border-color: rgba(0, 0, 0, 0.15);
}

/* ══════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════ */
.empty-state {
    max-width: 500px;
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.6;
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   FACT COUNTER
   ══════════════════════════════════════════════════════ */
.fact-counter {
    font-family: 'New York', 'Noto Serif', 'Iowan Old Style', Georgia, serif;
    text-align: center;
    margin: 1rem 0;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.85;
}

/* ══════════════════════════════════════════════════════
   SEO FOOTER
   ══════════════════════════════════════════════════════ */
.seo-footer hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    margin: 1rem;
}

.seo-footer {
    max-width: 760px;
    margin: 80px auto 0;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.3;
}

.seo-footer a {
    color: inherit;
    text-decoration: none;
}

.seo-footer a:hover {
    text-decoration: underline;
}

.seo-footer-link {
    display: block;
    margin-top: 0.5rem;
}

.seo-footer-browse {
    padding: 0 1rem;
    text-align: center;
}

.seo-footer-languages {
    padding: 0 1rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════
   KEYBOARD HINT
   ══════════════════════════════════════════════════════ */
.keyboard-hint {
    font-size: 0.8rem;
    opacity: 0.3;
    text-align: center;
    display: none;
}

@media (min-width: 768px) {
    .keyboard-hint {
        display: block;
    }
}

/* ══════════════════════════════════════════════════════
   EXPLANATION MODAL
   ══════════════════════════════════════════════════════ */
.explain-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.explain-overlay.active {
    opacity: 1;
    visibility: visible;
}

.explain-modal {
    position: relative;
    max-width: 620px;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 2.5rem 2rem 2rem;
    color: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.explain-overlay.active .explain-modal {
    transform: translateY(0) scale(1);
}

.explain-modal-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.4;
    margin-bottom: 0.6rem;
}

.explain-modal-question {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.explain-modal-question[hidden] {
    display: none;
}

.explain-modal-text {
    font-size: 1.05rem;
    line-height: 1.7;
    opacity: 0.75;
}

.explain-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.45);
    transition: all 0.2s;
}

.explain-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════ */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ══════════════════════════════════════════════════════
   FACT EXPLANATION QUESTION & PREVIEW
   ══════════════════════════════════════════════════════ */
.fact-explanation-question {
    font-size: 0.7rem;
    font-weight: 500;
    /*letter-spacing: 0.12em;*/
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    /*margin-bottom: 0.4rem;*/
    line-height: 1.5;
    text-align: left;
    width: 100%;
}

.fact-explanation-question[hidden] {
    display: none;
}

.fact-explanation-preview {
    text-align: left;
    width: 100%;
    color: rgba(0, 0, 0, 0.95);
    font-size: 1rem;
    line-height: 1.5;
    /*margin-top: 1rem;*/
}

/* ══════════════════════════════════════════════════════
   SCIENCE BEHIND CARD
   ══════════════════════════════════════════════════════ */
.science-behind-card {
    /*width: 100%;*/
    /*margin-top: 1.5rem;*/
    /*padding: 1.15rem 1.25rem;*/
    /*background: rgba(99, 102, 241, 0.06);*/
    /*border: 1px solid rgba(99, 102, 241, 0.12);*/
    /*border-radius: 14px;*/
    text-align: left;
}

.science-behind-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.science-behind-icon {
    /* color: #6366f1; */
    flex-shrink: 0;
}

.science-behind-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    /* color: #6366f1; */
}

.science-behind-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.8);
}

/* ══════════════════════════════════════════════════════
   FACT CATEGORY & TAGS
   ══════════════════════════════════════════════════════ */
.fact-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2rem;
}

.fact-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.35);
}

.fact-category[hidden] {
    display: none;
}

.fact-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
}

.fact-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.2s, color 0.2s;
}

.fact-tag:hover {
    background: rgba(0, 0, 0, 0.07);
    color: rgba(0, 0, 0, 0.6);
}

/* ══════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════ */
.fp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.fp-page-btn,
.fp-page-ellipsis {
    min-width: 34px;
    height: 34px;
    padding: 0 0.55rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
    text-decoration: none;
    color: #1a1a1a;
    background: rgba(255, 255, 255, 0.7);
}

.fp-page-btn:hover {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.95);
}

.fp-page-btn.is-active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.fp-page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.fp-page-ellipsis {
    border-color: transparent;
    background: transparent;
}

/* ══════════════════════════════════════════════════════
   FOOTER – Legal links
   ══════════════════════════════════════════════════════ */
.seo-footer-legal {
    padding: 0 1rem;
    text-align: center;
    font-size: 0.75rem;
}

.seo-footer-sep {
    margin: 0 0.35rem;
}

/* ══════════════════════════════════════════════════════
   STATIC PAGES (Terms, Privacy)
   ══════════════════════════════════════════════════════ */
.page-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #222;
}

.page-content h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.page-content h2 {
    font-size: 1.15rem;
    margin-top: 1.8rem;
    margin-bottom: 0.5rem;
}

.page-content p,
.page-content ul {
    margin-bottom: 0.8rem;
}

.page-content ul,
.page-content ol {
    padding-left: 2.2rem;
}

.page-content li {
    margin-bottom: 0.35rem;
}

.page-updated {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.terms-notice {
    background: #fff5f5;
    border: 1px solid #e53e3e;
    border-left: 4px solid #e53e3e;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    color: #c53030;
    font-size: 0.85rem;
    line-height: 1.6;
}

.terms-notice p:last-child {
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════
   SCREEN READER ONLY (utility)
   ══════════════════════════════════════════════════════ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ══════════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════════ */
.home-wrapper {
    min-height: 70vh;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.home-intro {
    text-align: center;
    max-width: 600px;
    animation: fadeSlideIn 0.8s ease-out;
}

.home-title {
    font-family: 'New York', 'Noto Serif', 'Iowan Old Style', Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.home-subtitle {
    font-size: 1.2rem;
    opacity: 0.7;
    line-height: 1.6;
}

.home-action {
    animation: fadeSlideIn 1s ease-out 0.2s backwards;
}

.home-action .btn-next {
    width: 180px;
    height: 180px;
    padding: 0;
    border-radius: 50%;
    border-width: 3px;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.home-action .btn-next-full {
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.home-action .btn-next-icon {
    font-size: 2.2rem;
}

/* ══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV BAR
   ══════════════════════════════════════════════════════ */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    /* Only on the fact page: hide top header, show bottom nav */
    .page-fact .site-header {
        display: none;
    }

    .page-fact .mobile-bottom-nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        height: 56px;
        padding: 0 1rem;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    }

    /* Add padding at the bottom so content isn't hidden behind the nav */
    body.page-fact {
        padding-bottom: 60px;
    }

    .page-fact .mobile-nav-btn {
        display: flex;
        align-items: center;
        gap: 0.3rem;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        font-size: 0.85rem;
        color: #1a1a1a;
        padding: 0.4rem 0.6rem;
        border-radius: 1.5rem;
        transition: background 0.15s;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .page-fact .mobile-nav-btn:active {
        background: rgba(0, 0, 0, 0.06);
    }

    .page-fact .mobile-nav-icon {
        font-size: 1.3rem;
        line-height: 1;
    }

    .page-fact .mobile-nav-label {
        font-weight: 700;
        font-size: 0.9rem;
        letter-spacing: 0.02em;
    }

    .page-fact .mobile-nav-pop {
        background: rgba(0, 0, 0, 0.06);
        padding: 0.45rem 1rem;
        border-radius: 2rem;
    }

    .page-fact .mobile-nav-pop:active {
        background: rgba(0, 0, 0, 0.12);
        transform: scale(0.95);
    }

    .page-fact .mobile-nav-logo {
        display: flex;
        align-items: center;
    }

    .page-fact .mobile-nav-logo img {
        height: 26px;
        opacity: 0.5;
    }

    /* Hide the old desktop Pop button on fact page mobile (now in bottom nav) */
    .page-fact .slide-wrapper > .btn-next {
        display: none;
    }

    /* Loading overlay on mobile Pop button */
    .page-fact .mobile-nav-pop {
        position: relative;
        overflow: hidden;
    }

    .page-fact .mobile-nav-pop.is-loading::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    .page-fact .mobile-nav-pop.is-loading::before {
        content: '';
        position: absolute;
        z-index: 1;
        width: 18px;
        height: 18px;
        top: 50%;
        left: 50%;
        margin: -9px 0 0 -9px;
        border: 2.5px solid rgba(0, 0, 0, 0.15);
        border-top-color: #1a1a1a;
        border-radius: 50%;
        animation: btn-spin 0.6s linear infinite;
    }
}
