/* ============================================================
   RankifyPro — Upgrade Stylesheet (loaded AFTER style.css)
   Purpose: add new components (breadcrumbs, cookie banner,
   content blocks, TOC, quick answer boxes, etc.) without
   breaking any existing selectors or layouts.
   ============================================================ */

:root {
    --rp-ink: #0a0e1a;
    --rp-ink-2: #1f2937;
    --rp-ink-3: #374151;
    --rp-muted: #6b7280;
    --rp-line: #e5e7eb;
    --rp-line-soft: #eef2f7;
    --rp-bg-soft: #f8fafc;
    --rp-bg-sun: #fefce8;
    --rp-accent: #0052ff;
    --rp-accent-dim: #e8f0ff;
    --rp-emerald: #059669;
    --rp-emerald-bg: #ecfdf5;
    --rp-amber: #b45309;
    --rp-amber-bg: #fef3c7;
    --rp-rose: #be123c;
    --rp-rose-bg: #fff1f2;
    --rp-indigo: #4338ca;
    --rp-indigo-bg: #eef2ff;
    --rp-radius-xl: 18px;
    --rp-shadow-card: 0 4px 24px rgba(15,23,42,0.06);
}

/* ---- skip link (a11y) ---- */
.rp-skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    background: var(--rp-ink);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}
.rp-skip-link:focus { left: 0; }

/* ---- breadcrumbs ---- */
.rp-breadcrumbs {
    padding: 14px 0 4px;
    font-size: .82rem;
    color: var(--rp-muted);
}
.rp-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px 10px; list-style: none; padding: 0; margin: 0; }
.rp-breadcrumbs li { display: inline-flex; align-items: center; }
.rp-breadcrumbs li + li::before { content: "›"; margin-right: 10px; color: #94a3b8; }
.rp-breadcrumbs a { color: var(--rp-muted); transition: color .15s ease; }
.rp-breadcrumbs a:hover { color: var(--rp-accent); }
.rp-breadcrumbs li[aria-current="page"] { color: var(--rp-ink); font-weight: 600; }

/* ---- content blocks ---- */
.rp-rich {
    max-width: 860px;
    margin: 0 auto;
    padding: 8px 0 24px;
}
.rp-rich p { font-size: 1.02rem; line-height: 1.85; color: var(--rp-ink-2); margin-bottom: 18px; }
.rp-rich h2 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); font-weight: 800; line-height: 1.3; margin: 44px 0 14px; color: var(--rp-ink); letter-spacing: -.01em; }
.rp-rich h3 { font-size: 1.22rem; font-weight: 700; margin: 30px 0 10px; color: var(--rp-ink); }
.rp-rich h4 { font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; color: var(--rp-ink); }
.rp-rich ul, .rp-rich ol { margin: 0 0 18px 22px; }
.rp-rich li { margin-bottom: 8px; color: var(--rp-ink-2); }
.rp-rich a { color: var(--rp-accent); border-bottom: 1px solid rgba(0,82,255,.25); transition: border-color .15s ease; }
.rp-rich a:hover { border-bottom-color: var(--rp-accent); }
.rp-rich strong { font-weight: 700; color: var(--rp-ink); }
.rp-rich em { font-style: italic; color: var(--rp-ink-2); }
.rp-rich code { font-family: 'JetBrains Mono', monospace; font-size: .9em; background: var(--rp-bg-soft); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--rp-line); }

/* ---- callouts (Quick Answer, Key Takeaways, Tip, Warning) ---- */
.rp-callout {
    border-radius: var(--rp-radius-xl);
    padding: 22px 24px;
    margin: 28px 0;
    border: 1px solid var(--rp-line);
    background: #fff;
    box-shadow: var(--rp-shadow-card);
    position: relative;
}
.rp-callout > .rp-callout-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    margin-bottom: 10px;
}
.rp-callout p { margin-bottom: 10px; font-size: 1rem; line-height: 1.75; }
.rp-callout p:last-child { margin-bottom: 0; }
.rp-callout ul { margin-bottom: 0; }

.rp-callout-answer { background: linear-gradient(180deg, #f6faff 0%, #fff 100%); border-color: #dbeafe; }
.rp-callout-answer .rp-callout-label { background: var(--rp-accent-dim); color: var(--rp-accent); }

.rp-callout-key { background: var(--rp-emerald-bg); border-color: #a7f3d0; }
.rp-callout-key .rp-callout-label { background: #d1fae5; color: var(--rp-emerald); }

.rp-callout-tip { background: var(--rp-indigo-bg); border-color: #c7d2fe; }
.rp-callout-tip .rp-callout-label { background: #e0e7ff; color: var(--rp-indigo); }

.rp-callout-warn { background: var(--rp-amber-bg); border-color: #fde68a; }
.rp-callout-warn .rp-callout-label { background: #fef3c7; color: var(--rp-amber); }

.rp-callout-myth { background: var(--rp-rose-bg); border-color: #fecdd3; }
.rp-callout-myth .rp-callout-label { background: #ffe4e6; color: var(--rp-rose); }

/* ---- TOC (table of contents) ---- */
.rp-toc {
    background: #fff;
    border: 1px solid var(--rp-line);
    border-radius: 14px;
    padding: 18px 22px;
    margin: 26px 0 36px;
    box-shadow: var(--rp-shadow-card);
}
.rp-toc h3 { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rp-muted); margin-bottom: 12px; }
.rp-toc ol { list-style: none; padding: 0; margin: 0; counter-reset: rp-toc; }
.rp-toc li { counter-increment: rp-toc; padding: 6px 0; border-bottom: 1px dashed var(--rp-line-soft); }
.rp-toc li:last-child { border-bottom: none; }
.rp-toc li::before { content: counter(rp-toc, decimal-leading-zero) ". "; color: var(--rp-accent); font-weight: 700; font-family: 'JetBrains Mono', monospace; font-size: .85rem; }
.rp-toc a { color: var(--rp-ink-2); font-weight: 500; }
.rp-toc a:hover { color: var(--rp-accent); }

/* ---- AEO Q&A list ---- */
.rp-qa-list { display: grid; gap: 14px; margin: 24px 0; }
.rp-qa-item {
    background: #fff;
    border: 1px solid var(--rp-line);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rp-qa-item:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(0,82,255,.06); }
.rp-qa-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--rp-ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.rp-qa-item summary::-webkit-details-marker { display: none; }
.rp-qa-item summary::after {
    content: "+"; font-size: 1.3rem; color: var(--rp-accent); font-weight: 600; transition: transform .25s ease;
    width: 28px; height: 28px; border-radius: 50%; background: var(--rp-accent-dim);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rp-qa-item[open] summary::after { content: "−"; }
.rp-qa-item .rp-qa-body { padding: 0 22px 22px; color: var(--rp-ink-3); line-height: 1.8; font-size: .98rem; }
.rp-qa-item .rp-qa-body p { margin-bottom: 12px; }
.rp-qa-item .rp-qa-body p:last-child { margin-bottom: 0; }
.rp-qa-item .rp-qa-body ul { margin: 8px 0 12px 22px; }
.rp-qa-item .rp-qa-body li { margin-bottom: 6px; }

/* ---- definition / glossary boxes ---- */
.rp-deflist {
    display: grid;
    gap: 16px;
    margin: 24px 0;
    grid-template-columns: 1fr;
}
@media(min-width:720px){ .rp-deflist.cols-2 { grid-template-columns: 1fr 1fr; } }
.rp-deflist .rp-def {
    background: #fff;
    border: 1px solid var(--rp-line);
    border-radius: 12px;
    padding: 16px 18px;
}
.rp-deflist .rp-def dt { font-weight: 700; color: var(--rp-ink); margin-bottom: 6px; font-size: 1rem; }
.rp-deflist .rp-def dd { color: var(--rp-ink-3); font-size: .92rem; line-height: 1.65; }

/* ---- comparison table ---- */
.rp-compare {
    width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .94rem;
    background: #fff; border: 1px solid var(--rp-line); border-radius: 12px; overflow: hidden;
}
.rp-compare th, .rp-compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rp-line); }
.rp-compare th { background: var(--rp-bg-soft); font-weight: 700; color: var(--rp-ink); text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.rp-compare tr:last-child td { border-bottom: none; }
.rp-compare td.good { color: var(--rp-emerald); font-weight: 600; }
.rp-compare td.bad { color: var(--rp-rose); font-weight: 600; }

/* ---- step cards (HowTo) ---- */
.rp-steps { display: grid; gap: 18px; margin: 24px 0; }
.rp-step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--rp-line);
    border-radius: 14px;
    padding: 20px 22px;
}
.rp-step .rp-step-num {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--rp-accent) 0%, #1e3a8a 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(0,82,255,.25);
}
.rp-step h4 { font-size: 1.08rem; font-weight: 700; margin: 0 0 6px; color: var(--rp-ink); }
.rp-step p { font-size: .95rem; line-height: 1.7; color: var(--rp-ink-3); margin: 0; }

/* ---- pillar card grid ---- */
.rp-pillars { display: grid; gap: 20px; margin: 28px 0; grid-template-columns: 1fr; }
@media(min-width:680px){ .rp-pillars { grid-template-columns: 1fr 1fr; } }
@media(min-width:1000px){ .rp-pillars { grid-template-columns: repeat(3, 1fr); } }
.rp-pillar {
    background: #fff; border: 1px solid var(--rp-line); border-radius: 14px;
    padding: 22px 22px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.rp-pillar:hover { border-color: #bfdbfe; transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,82,255,.08); }
.rp-pillar .rp-pillar-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--rp-accent-dim); color: var(--rp-accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 1.2rem; }
.rp-pillar h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; color: var(--rp-ink); }
.rp-pillar p { font-size: .92rem; line-height: 1.65; color: var(--rp-ink-3); margin: 0; }

/* ---- KPI stats inline ---- */
.rp-stats-inline { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 22px 0; }
.rp-stat-inline {
    background: #fff; border: 1px solid var(--rp-line); border-radius: 12px;
    padding: 16px 18px; text-align: center;
}
.rp-stat-inline .rp-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--rp-accent); line-height: 1; }
.rp-stat-inline .rp-stat-lbl { font-size: .78rem; color: var(--rp-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; display: block; }

/* ---- pros/cons grid ---- */
.rp-proscons { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 24px 0; }
@media(min-width:720px){ .rp-proscons { grid-template-columns: 1fr 1fr; } }
.rp-proscons .rp-pros, .rp-proscons .rp-cons {
    background: #fff; border: 1px solid var(--rp-line); border-radius: 14px; padding: 20px 22px;
}
.rp-proscons .rp-pros { border-color: #a7f3d0; background: var(--rp-emerald-bg); }
.rp-proscons .rp-cons { border-color: #fecdd3; background: var(--rp-rose-bg); }
.rp-proscons h4 { font-size: 1rem; font-weight: 800; margin-bottom: 10px; }
.rp-proscons .rp-pros h4 { color: var(--rp-emerald); }
.rp-proscons .rp-cons h4 { color: var(--rp-rose); }
.rp-proscons ul { list-style: none; padding: 0; margin: 0; }
.rp-proscons li { padding: 6px 0 6px 26px; position: relative; font-size: .95rem; line-height: 1.55; }
.rp-proscons .rp-pros li::before { content: "✓"; position: absolute; left: 0; color: var(--rp-emerald); font-weight: 800; }
.rp-proscons .rp-cons li::before { content: "✕"; position: absolute; left: 0; color: var(--rp-rose); font-weight: 800; }

/* ---- author / editorial card ---- */
.rp-author-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px; align-items: center;
    background: #fff; border: 1px solid var(--rp-line);
    border-radius: 14px; padding: 18px 22px; margin: 24px 0;
}
.rp-author-card .rp-author-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--rp-accent) 0%, #1e3a8a 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.2rem;
}
.rp-author-card h4 { font-size: 1rem; margin: 0 0 4px; color: var(--rp-ink); }
.rp-author-card p { font-size: .88rem; color: var(--rp-muted); margin: 0; line-height: 1.55; }

/* ---- featured cta ---- */
.rp-cta-banner {
    background: linear-gradient(135deg, #0a0e1a 0%, #1e3a8a 100%);
    border-radius: var(--rp-radius-xl);
    padding: 36px;
    color: #fff;
    margin: 36px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.rp-cta-banner::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(600px circle at 50% -50%, rgba(0,212,170,.25), transparent 60%);
    pointer-events: none;
}
.rp-cta-banner h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; color: #fff; position: relative; z-index: 1; }
.rp-cta-banner p { color: #cbd5e1; margin-bottom: 22px; position: relative; z-index: 1; }
.rp-cta-banner .btn-primary { background: #00d4aa; color: #0a0e1a; position: relative; z-index: 1; }
.rp-cta-banner .btn-primary:hover { background: #00b894; }

/* ---- enhanced footer ---- */
.rp-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
.rp-footer p, .rp-footer ul li a { color: #9ca3af; }
.rp-footer p { font-size: .9rem; line-height: 1.65; margin-bottom: 12px; }
.rp-footer-trust { font-size: .8rem; color: #6b7280 !important; }
.rp-footer .footer-links h4 { color: #cbd5e1; }
.rp-footer .footer-bottom p { color: #6b7280; }
@media(max-width: 1024px) { .rp-footer-grid { grid-template-columns: 1fr 1fr !important; } }
@media(max-width: 600px)  { .rp-footer-grid { grid-template-columns: 1fr !important; } }

/* ---- cookie banner ---- */
.rp-cookie-banner {
    position: fixed; bottom: 18px; left: 18px; right: 18px;
    max-width: 880px; margin: 0 auto;
    background: #0a0e1a; color: #e5e7eb;
    border: 1px solid #1f2937; border-radius: 16px;
    padding: 18px 22px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    z-index: 150;
    display: flex; flex-direction: column; gap: 14px;
}
.rp-cookie-banner[hidden] { display: none; }
.rp-cookie-inner p { font-size: .9rem; line-height: 1.6; margin: 0; }
.rp-cookie-inner p a { color: #7db3ff; text-decoration: underline; }
.rp-cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.rp-cookie-btn { padding: 10px 22px !important; font-size: .85rem !important; }
#rp-cookie-reject { background: transparent; color: #e5e7eb; border: 1px solid #374151; }
#rp-cookie-reject:hover { background: #1f2937; }
@media(min-width: 720px) {
    .rp-cookie-banner { flex-direction: row; align-items: center; }
    .rp-cookie-inner { flex: 1; }
}

/* ---- hero refinements (additive — no destructive overrides) ---- */
.rp-hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    margin-top: 26px;
    font-size: .82rem;
    color: #9ca3af;
    flex-wrap: wrap;
    justify-content: center;
}
.rp-hero-trust > span { display: inline-flex; align-items: center; gap: 6px; }

/* ---- section dividers ---- */
.rp-divider { height: 1px; background: var(--rp-line); margin: 48px 0; border: none; }

/* ---- tool page extra ---- */
.rp-tool-explainer { padding: 70px 0 30px; background: #fff; }
.rp-content-section { padding: 30px 0; }
.rp-content-section.alt { background: var(--rp-bg-soft); }

/* ---- legal pages ---- */
.rp-legal { max-width: 820px; margin: 0 auto; padding: 50px 20px 70px; }
.rp-legal p, .rp-legal li { color: var(--rp-ink-3); line-height: 1.8; font-size: 1rem; }
.rp-legal h2 { font-size: 1.45rem; font-weight: 800; margin: 36px 0 14px; color: var(--rp-ink); }
.rp-legal h3 { font-size: 1.15rem; font-weight: 700; margin: 26px 0 10px; color: var(--rp-ink); }
.rp-legal ul { margin: 0 0 18px 22px; }
.rp-legal a { color: var(--rp-accent); border-bottom: 1px solid rgba(0,82,255,.25); }

/* ---- nav hover refinement ---- */
.nav-links a { transition: color .15s ease, background .15s ease; }

/* ---- hide the bad legacy footer inline styles override (footer no longer uses inline) ---- */
.site-footer { background: linear-gradient(180deg, #0a0e1a 0%, #111827 100%) !important; color: #e5e7eb; }

/* ---- print ---- */
@media print {
    .site-header, .site-footer, .rp-cookie-banner, .ad-slot, .hero-form, #seoForm { display: none !important; }
    body { background: #fff; color: #000; }
    a { color: #000; text-decoration: underline; }
}
