/* =========================================================
   Past Potentates — Decade Timeline (Premium)
   Scoped to template only
========================================================= */

body.page-template-page-past-potentates-php .pp-wrap {
    padding: 0 0 96px;
}

body.page-template-page-past-potentates-php .pp-intro.page-intro {
    margin: 40px auto 34px;
}

body.page-template-page-past-potentates-php .pp-intro .page-intro-head,
body.page-template-page-past-potentates-php .pp-intro .intro-panel {
    max-width: var(--max);
}

body.page-template-page-past-potentates-php .pp-intro .page-intro-sub {
    max-width: var(--max);
}

body.page-template-page-past-potentates-php .pp-intro-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 20px;
    align-items: start;
}

body.page-template-page-past-potentates-php .pp-intro-stats {
    grid-template-columns: 1fr;
    max-width: 280px;
    justify-self: end;
}

body.page-template-page-past-potentates-php .pp-intro-stats .intro-stat {
    min-height: 152px;
}

body.page-template-page-past-potentates-php .pp-intro .intro-panel-prose {
    max-width: 740px;
    text-align: left;
}

body.page-template-page-past-potentates-php .pp-intro .intro-panel-prose p {
    text-align: left;
}

/* Timeline container */
body.page-template-page-past-potentates-php .pp-timeline {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

/* Decade section */
body.page-template-page-past-potentates-php .pp-decade {
    margin: 0 0 34px;
    padding: 24px 0 0;
    position: relative;
}

body.page-template-page-past-potentates-php .pp-decade-title {
    margin: 0 0 14px;
    font-size: 14px;
    letter-spacing: .22em;
    text-transform: none;
    opacity: .75;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

body.page-template-page-past-potentates-php .pp-decade-title::after {
    content: "";
    height: 1px;
    width: 180px;
    background: rgba(0, 0, 0, .12);
}

/* Entries wrapper with gold rail */
body.page-template-page-past-potentates-php .pp-decade-entries {
    position: relative;
    padding-left: 40px;
}

body.page-template-page-past-potentates-php .pp-decade-entries::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 18px;
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg,
            rgba(246, 199, 76, .0),
            rgba(246, 199, 76, .88),
            rgba(246, 199, 76, .0));
    opacity: .95;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .12));
}

/* Individual entry */
body.page-template-page-past-potentates-php .pp-entry {
    position: relative;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    padding: 10px 0;
}

body.page-template-page-past-potentates-php .pp-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(246, 199, 76, .98), rgba(210, 150, 35, .94));
    box-shadow:
        0 10px 18px rgba(0, 0, 0, .16),
        0 0 0 4px rgba(246, 199, 76, .16);
    margin-left: 11px;
    margin-top: 6px;
}

/* Entry card */
body.page-template-page-past-potentates-php .pp-entry-inner {
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .70);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .08);
    padding: 14px 16px;
}

/* Years */
body.page-template-page-past-potentates-php .pp-entry-years {
    font-weight: 900;
    letter-spacing: .02em;
    opacity: .9;
    margin-bottom: 6px;
}

/* Name row */
body.page-template-page-past-potentates-php .pp-entry-name {
    font-size: 18px;
    line-height: 1.25;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

body.page-template-page-past-potentates-php .pp-entry-name-text {
    position: relative;
    display: inline-block;
    font-size: clamp(18px, 1.55vw, 22px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -.01em;
    color: var(--maroon);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
}

body.page-template-page-past-potentates-php .pp-entry-name-text::after {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(246, 199, 76, .95), rgba(90, 0, 17, .28));
}

/* Note */
body.page-template-page-past-potentates-php .pp-entry-note {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 650;
    opacity: .75;
}

/* Chips */
body.page-template-page-past-potentates-php .pp-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

body.page-template-page-past-potentates-php .pp-chip-imperial {
    background: rgba(255, 255, 255, .65);
    border: 1px solid rgba(0, 0, 0, .10);
    opacity: .9;
}

body.page-template-page-past-potentates-php .pp-chip-star {
    background: rgba(246, 199, 76, .25);
    border: 1px solid rgba(246, 199, 76, .55);
    color: rgba(0, 0, 0, .80);
    letter-spacing: .08em;
}

/* Responsive */
@media (max-width: 820px) {
    body.page-template-page-past-potentates-php .pp-decade-entries {
        padding-left: 26px;
    }

    body.page-template-page-past-potentates-php .pp-entry {
        grid-template-columns: 26px 1fr;
    }

    body.page-template-page-past-potentates-php .pp-dot {
        margin-left: 6px;
    }
}

/* =========================================================
   Past Potentates — Premium Enhancements
   (Sticky decades, parchment, reveals, dot pulse, top button)
========================================================= */

/* Parchment/heritage texture overlay (CSS only) */
body.page-template-page-past-potentates-php .pp-wrap {
    position: relative;
    overflow: visible;
}

body.page-template-page-past-potentates-php .pp-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .22;
    mix-blend-mode: multiply;
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(246, 199, 76, .22), rgba(255, 255, 255, 0) 60%),
        radial-gradient(900px 500px at 80% 30%, rgba(180, 120, 40, .14), rgba(255, 255, 255, 0) 62%),
        radial-gradient(700px 500px at 30% 90%, rgba(120, 70, 25, .10), rgba(255, 255, 255, 0) 62%),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .016) 0 1px, rgba(255, 255, 255, 0) 1px 7px);
}

body.page-template-page-past-potentates-php .pp-wrap>.container {
    position: relative;
    z-index: 1;
}

/* Sticky decade headers */
body.page-template-page-past-potentates-php .pp-decade-title {
    position: sticky;
    top: 92px;
    /* tweak if your header height differs */
    z-index: 3;
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .55));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .06);
    width: fit-content;
}

body.page-template-page-past-potentates-php .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .55s ease, transform .55s ease;
    will-change: opacity, transform;
}

body.page-template-page-past-potentates-php .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.page-template-page-past-potentates-php .pp-entry.pp-scroll-reveal {
    transition-duration: .50s;
}


/* Dot pulse (tasteful) */
@keyframes pp-dot-pulse {

    0%,
    100% {
        box-shadow: 0 10px 18px rgba(0, 0, 0, .16), 0 0 0 4px rgba(246, 199, 76, .14);
    }

    50% {
        box-shadow: 0 12px 22px rgba(0, 0, 0, .18), 0 0 0 7px rgba(246, 199, 76, .22);
    }
}

body.page-template-page-past-potentates-php .pp-dot {
    animation: pp-dot-pulse 3.4s ease-in-out infinite;
}

/* Back to top button */
body.page-template-page-past-potentates-php .pp-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;

    height: 44px;
    padding: 0 14px;
    border-radius: 999px;

    border: 1px solid rgba(255, 255, 255, .55);
    background: linear-gradient(180deg, rgba(246, 199, 76, .95), rgba(210, 150, 35, .92));
    color: #2b1b12;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;

    box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

body.page-template-page-past-potentates-php .pp-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

body.page-template-page-past-potentates-php .pp-top:hover {
    transform: translateY(-1px);
}

/* Anchor offset so decade pills land nicely under header */
body.page-template-page-past-potentates-php .pp-decade {
    scroll-margin-top: 120px;
}

/* Give the first entry breathing room below the sticky decade header */
body.page-template-page-past-potentates-php .pp-decade-entries {
    padding-top: 10px;
}

body.page-template-page-past-potentates-php .pp-decade-title {
    margin-bottom: 14px;
    z-index: 5;
}

/* Decade pill nav */
body.page-template-page-past-potentates-php .pp-nav {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

body.page-template-page-past-potentates-php .pp-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;

    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .06);

    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
    font-size: 12px;
    color: rgba(0, 0, 0, .78);
}

body.page-template-page-past-potentates-php .pp-nav a:hover {
    transform: translateY(-1px);
}

@media (max-width: 820px) {
    body.page-template-page-past-potentates-php .pp-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
    }

    body.page-template-page-past-potentates-php .pp-nav a {
        white-space: nowrap;
    }
}

/* Mobile sticky header offset */
@media (max-width: 820px) {
    body.page-template-page-past-potentates-php .pp-decade-title {
        top: 76px;
    }
}




/* =========================================================
   Past Potentates — Decade Pills + Intro Box (Hard Scoped)
========================================================= */

/* Decade pill nav */
body.page-past-potentates .pp-nav,
body.page-template-page-past-potentates-php .pp-nav {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

body.page-past-potentates .pp-nav a,
body.page-template-page-past-potentates-php .pp-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;

    background: linear-gradient(180deg, rgba(255, 255, 255, .80), rgba(255, 255, 255, .55));
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .06);

    font-weight: 900;
    letter-spacing: .10em;
    text-transform: none;
    font-size: 12px;
    color: rgba(0, 0, 0, .78);

    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.page-past-potentates .pp-nav a:hover,
body.page-template-page-past-potentates-php .pp-nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .10);
    border-color: rgba(246, 199, 76, .45);
}

/* Optional: active pill (we can wire up later with JS) */
body.page-past-potentates .pp-nav a.is-active,
body.page-template-page-past-potentates-php .pp-nav a.is-active {
    background: linear-gradient(180deg, rgba(246, 199, 76, .95), rgba(210, 150, 35, .92));
    color: #2b1b12;
    border-color: rgba(246, 199, 76, .55);
}

@media (max-width: 820px) {

    body.page-past-potentates .pp-nav,
    body.page-template-page-past-potentates-php .pp-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    body.page-past-potentates .pp-nav a,
    body.page-template-page-past-potentates-php .pp-nav a {
        white-space: nowrap;
    }
}

/* =========================================================
   Past Potentates — Elite polish
   (sticky controls + active pills + intro styling + hover)
========================================================= */

/* Make the top area feel intentional */
body.page-template-page-past-potentates-php .pp-top-area {
    margin-top: -26px;
    padding-top: 26px;
}

/* Intro card: stronger presence + styled type */
body.page-template-page-past-potentates-php .pp-intro strong {
    color: rgba(0, 0, 0, .88);
}

/* Sticky controls wrapper (this is why active pills makes sense) */
body.page-template-page-past-potentates-php .pp-controls {
    max-width: 1080px;
    margin: 0 auto 22px;
    padding: 14px 14px 10px;
    border-radius: 22px;

    background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .56));
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .10);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    position: sticky;
    top: 82px;
    /* adjust if your header is taller */
    z-index: 12;
}

@media (max-width: 820px) {
    body.page-template-page-past-potentates-php .pp-controls {
        top: 72px;
    }
}

body.page-template-page-past-potentates-php .pp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 8px;
}

/* Search */
body.page-template-page-past-potentates-php .pp-search {
    flex: 1;
    max-width: 520px;
}

body.page-template-page-past-potentates-php .pp-search-clear {
    font-weight: 900;
    cursor: pointer;
}

body.page-template-page-past-potentates-php .pp-legend {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 2px 12px;
    padding: 0 2px;
    color: rgba(26, 10, 15, .64);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

body.page-template-page-past-potentates-php .pp-legend-mark {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(246, 199, 76, .72);
    background: rgba(255, 244, 220, .92);
    color: rgba(26, 10, 15, .84);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

body.page-template-page-past-potentates-php .pp-results {
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: none;
    font-size: 12px;
    color: rgba(0, 0, 0, .55);
    white-space: nowrap;
}

/* Decade pills */
body.page-template-page-past-potentates-php .pp-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 2px 2px 6px;
}

body.page-template-page-past-potentates-php .pp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;

    background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .55));
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .08);

    font-weight: 900;
    letter-spacing: .10em;
    text-transform: none;
    font-size: 12px;
    color: rgba(0, 0, 0, .78);

    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

body.page-template-page-past-potentates-php .pp-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .12);
    border-color: rgba(246, 199, 76, .45);
}

/* Active pill */
body.page-template-page-past-potentates-php .pp-pill.is-active {
    background: linear-gradient(180deg, rgba(246, 199, 76, .95), rgba(210, 150, 35, .92));
    color: #2b1b12;
    border-color: rgba(246, 199, 76, .60);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .14);
}

/* Mobile: scrollable pills inside sticky card */
@media (max-width: 820px) {
    body.page-template-page-past-potentates-php .pp-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    body.page-template-page-past-potentates-php .pp-pill {
        white-space: nowrap;
    }
}

@media (max-width: 900px) {
    body.page-template-page-past-potentates-php .pp-intro-body {
        grid-template-columns: 1fr;
    }

    body.page-template-page-past-potentates-php .pp-intro-stats {
        max-width: 240px;
        justify-self: start;
    }

    body.page-template-page-past-potentates-php .pp-legend {
        margin-bottom: 10px;
    }
}

/* Timeline: nicer line + depth */
body.page-template-page-past-potentates-php .pp-timeline {
    position: relative;
}

body.page-template-page-past-potentates-php .pp-timeline::before {
    content: "";
    position: absolute;
    left: 34px;
    /* adjust if your dots are positioned differently */
    top: 10px;
    bottom: 10px;
    width: 2px;
    border-radius: 99px;
    background: linear-gradient(180deg,
            rgba(246, 199, 76, .12),
            rgba(246, 199, 76, .45),
            rgba(246, 199, 76, .10));
    opacity: .95;
    pointer-events: none;
}

/* Anchor offset for decade jumps */
body.page-template-page-past-potentates-php .pp-decade {
    scroll-margin-top: 160px;
    /* header + sticky controls */
}

/* Fix the “first overlap” feel */
body.page-template-page-past-potentates-php .pp-decade-title {
    margin-bottom: 14px;
    z-index: 6;
}

body.page-template-page-past-potentates-php .pp-decade-entries {
    padding-top: 10px;
}

/* Entry hover polish */
body.page-template-page-past-potentates-php .pp-entry-inner {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

body.page-template-page-past-potentates-php .pp-entry:hover .pp-entry-inner {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .14);
    border-color: rgba(246, 199, 76, .25);
}

/* Dot “responds” on hover */
body.page-template-page-past-potentates-php .pp-entry:hover .pp-dot {
    animation-duration: 2.2s;
}

/* Empty state (when search filters everything out) */
body.page-template-page-past-potentates-php .pp-empty {
    padding: 40px 0 10px;
}

body.page-template-page-past-potentates-php .pp-empty-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 22px 24px;
    border-radius: 22px;
    text-align: center;

    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .62));
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.page-template-page-past-potentates-php .pp-empty-title {
    font-weight: 1000;
    font-size: 18px;
    margin-bottom: 6px;
    color: rgba(0, 0, 0, .82);
}

body.page-template-page-past-potentates-php .pp-empty-sub {
    color: rgba(0, 0, 0, .62);
    margin-bottom: 14px;
}

body.page-template-page-past-potentates-php .pp-empty-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(246, 199, 76, .55);
    background: linear-gradient(180deg, rgba(246, 199, 76, .95), rgba(210, 150, 35, .92));
    color: #2b1b12;
    font-weight: 1000;
    cursor: pointer;
}

body.page-template-page-past-potentates-php .pp-scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.22, .68, 0, 1.2);
    will-change: opacity, transform;
}

body.page-template-page-past-potentates-php .pp-scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

body.page-template-page-past-potentates-php .pp-entry.pp-scroll-reveal {
    transition-duration: .50s;
}
