@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ============================================================
   SCOPED CSS — .pm-bridging
   All selectors scoped under .pm-bridging. Cannot leak globally.
   Product colours: #D4A017 (gold) / #9F458C (purple)
   ============================================================ */

/* --- Typography --- */
.pm-bridging h1, .pm-bridging h2, .pm-bridging h3 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    line-height: 1.2;
}
.pm-bridging p {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
}
.pm-bridging { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
.pm-bridging * { box-sizing: border-box; }

/* Override ALL auto-linked text inside this plugin */
.pm-bridging a { color: inherit; text-decoration: none; }
.pm-bridging a:hover { color: #D4A017; }

/* --- Hero Section --- */
.pm-bridging .pm-hub-hero {
    height: auto;
    max-height: none;
    min-height: 360px;
    padding: 6rem 0 3rem;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg,
            rgba(15, 10, 30, 0.80) 0%,
            rgba(159, 69, 140, 0.55) 50%,
            rgba(212, 160, 23, 0.40) 100%),
        url('hero_bg.png') !important;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.pm-bridging .pm-hub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at bottom left,
        rgba(212, 160, 23, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}
/* All hero text must be white and centred */
.pm-bridging .pm-hub-hero,
.pm-bridging .pm-hub-hero h1,
.pm-bridging .pm-hub-hero p,
.pm-bridging .pm-hub-hero span,
.pm-bridging .pm-hub-hero a {
    color: #fff !important;
    text-align: center !important;
}

/* Hero kicker — compact pill, NOT full-width */
.pm-bridging .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    padding: 0.4rem 1.2rem;
    font-size: 0.78rem;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 auto 1rem;
    width: fit-content !important;
}
.pm-bridging .hero-kicker span {
    color: #D4A017 !important;
    font-weight: 800;
}
/* Force auto-linked text inline inside kicker */
.pm-bridging .hero-kicker a,
.pm-bridging .hero-kicker span a {
    display: inline !important;
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none;
}

.pm-bridging .hero-content {
    position: relative;
    z-index: 1;
    text-align: center !important;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}
.pm-bridging .pm-hub-hero h1 {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem) !important;
    font-weight: 800 !important;
    margin-bottom: 1rem;
    line-height: 1.1 !important;
    text-align: center !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.pm-bridging .pm-hub-hero h1 em {
    font-style: normal;
    font-size: inherit !important;
    color: #D4A017 !important;
    text-shadow: 0 0 30px rgba(212, 160, 23, 0.5);
}
.pm-bridging .pm-hub-hero p {
    font-size: 1.15rem !important;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    text-align: center !important;
    opacity: 0.9;
}

/* Hero stats */
.pm-bridging .hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    text-align: center;
}
.pm-bridging .hero-stats .stat {
    text-align: center;
}
.pm-bridging .hero-stats .stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    margin-bottom: 0.3rem;
    text-align: center;
}
.pm-bridging .hero-stats .stat-lbl {
    display: block;
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
    text-align: center;
}

/* --- Buttons --- */
.pm-bridging .btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.pm-bridging .btn-primary {
    background: linear-gradient(135deg, #D4A017, #9F458C);
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}
.pm-bridging .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 160, 23, 0.4);
    color: #fff !important;
}
.pm-bridging .btn-secondary {
    background: transparent;
    color: #D4A017 !important;
    border: 2px solid #D4A017;
    width: auto !important;
}
.pm-bridging .btn-secondary:hover {
    background: #D4A017;
    color: #fff !important;
}

/* --- Accordion — with CSS counter for Q1, Q2, Q3 badges --- */
.pm-bridging .accordion-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    counter-reset: qa-counter;
}
.pm-bridging details.accordion-item {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.3s;
    counter-increment: qa-counter;
}
.pm-bridging details.accordion-item[open] {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: rgba(212, 160, 23, 0.2);
}
.pm-bridging summary.accordion-header {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1A1A1A !important;
    list-style: none;
    gap: 1rem;
    transition: background 0.2s;
    /* Ensure text node fills space between badge and chevron */
    overflow: hidden;
}
/* The question text node — grow to fill, allow wrapping within its own space */
.pm-bridging summary.accordion-header .q-text,
.pm-bridging summary.accordion-header > span.q-text {
    flex: 1 1 0;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
}
/* Force ALL auto-linked and wrapped elements inline inside accordion headers.
   WordPress Internal Links Manager wraps words in <a> tags; this stops them
   becoming rogue flex items that float to the right. */
.pm-bridging summary.accordion-header a,
.pm-bridging summary.accordion-header span:not([class]),
.pm-bridging summary.accordion-header strong,
.pm-bridging summary.accordion-header em {
    display: inline !important;
    flex: none !important;
    color: inherit !important;
    text-decoration: none !important;
    pointer-events: none;
    font-weight: inherit !important;
    font-size: inherit !important;
}
/* Flex text wrapper — grows to fill space between badge and chevron */
.pm-bridging summary.accordion-header .q-text {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    white-space: normal;
}
.pm-bridging summary.accordion-header:hover {
    background: rgba(212, 160, 23, 0.03);
}
/* Numbered Q badge: Q1, Q2, Q3... */
.pm-bridging summary.accordion-header::before {
    content: 'Q' counter(qa-counter);
    flex-shrink: 0;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4A017, #9F458C);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}
.pm-bridging summary.accordion-header::-webkit-details-marker {
    display: none;
}
.pm-bridging summary.accordion-header::after {
    content: '+';
    flex: 0 0 28px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: #D4A017;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.pm-bridging details[open] summary.accordion-header::after {
    content: '×';
    color: #9F458C;
}

/* Accordion content */
.pm-bridging .accordion-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
}

/* TL;DR Box */
.pm-bridging .tldr-box {
    background: linear-gradient(135deg,
        rgba(212, 160, 23, 0.06) 0%,
        rgba(159, 69, 140, 0.04) 100%);
    border-left: 4px solid #D4A017;
    border-radius: 0 12px 12px 0;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.93rem;
    line-height: 1.7;
}
.pm-bridging .tldr-label {
    display: inline-block;
    background: linear-gradient(135deg, #D4A017, #9F458C);
    color: #fff !important;
    padding: 0.15rem 0.7rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* Read Full Article link */
.pm-bridging .read-full-link {
    color: #D4A017 !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}
.pm-bridging .read-full-link:hover {
    color: #9F458C !important;
    text-decoration: underline !important;
}

/* --- Sidebar --- */
.pm-bridging .sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}
.pm-bridging .sidebar-nav {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.06);
}
.pm-bridging .sidebar-nav h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #D4A017;
    margin-bottom: 1rem;
    font-weight: 700;
}
.pm-bridging .sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.pm-bridging .sidebar-links li {
    margin-bottom: 0.5rem;
}
.pm-bridging .sidebar-links a {
    color: #333 !important;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.pm-bridging .sidebar-links a:hover,
.pm-bridging .sidebar-links a.active {
    background: rgba(212, 160, 23, 0.08);
    color: #D4A017 !important;
    font-weight: 600;
}

/* --- Spoke Layout --- */
.pm-bridging .spoke-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding: 4rem 2rem 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .pm-bridging .pm-hub-hero h1 { font-size: 2.2rem !important; }
}
@media (max-width: 768px) {
    .pm-bridging .pm-hub-hero {
        min-height: 350px;
        padding: 4rem 1rem 3rem;
    }
    .pm-bridging .pm-hub-hero h1 { font-size: 2rem !important; }
    .pm-bridging .pm-hub-hero p { font-size: 1rem !important; }
    .pm-bridging .hero-stats { gap: 1.5rem; }
    .pm-bridging .hero-stats .stat-num { font-size: 1.8rem; }
    .pm-bridging .spoke-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem 4rem;
    }
    .pm-bridging .sidebar { position: static; margin-bottom: 2rem; }
}
