/* Logo Slider WP Documentation — brand: black masthead / crimson accent,
   matching the approved brand banner + plugin icon (see assets/source/). */
:root {
    --brand-black: #0a0a0b;
    --brand-accent: #cd2653;
    --brand-accent-dark: #a51e42;
    --text: #1f2328;
    --text-muted: #5b6470;
    --border: #e3e6ea;
    --bg: #ffffff;
    --bg-subtle: #f6f6f7;
    --sidebar-current-bg: rgba(205, 38, 83, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--brand-accent-dark); }
a:hover { color: var(--brand-accent); }

/* Masthead */
header.site-header {
    background: var(--brand-black);
    border-bottom: 4px solid var(--brand-accent);
}
.site-header-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.85rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
a.site-title {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: #fff;
}
a.site-title:hover { color: #fff; }

/* Logo + "Logo Slider WP" share one row, vertically centered against each
   other; "Documentation" stays a smaller subtitle line underneath — two
   rows total, not three. Stacks back to its own row only below 480px,
   where the two would otherwise crowd/wrap (verified, not accidental). */
.site-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Brand icon — square mark beside the site title, sized to precisely match
   "Logo Slider WP" text's own rendered height, not an eyeballed number.
   .site-title-mark uses font-size: 1.6rem with line-height: 1, so its
   rendered box height is exactly 1.6rem (measured 25.59375px in a real
   headless-Chromium render at desktop width — matches to sub-pixel
   rounding); using the same 1.6rem token here ties the icon's size to the
   text's size by CSS-spec-guaranteed equality, not a coincidence that
   would drift if the title's font-size ever changes. Icon SVG has a 1:1
   viewBox, so width follows automatically. */
.site-brand-logo {
    display: block;
    height: 1.6rem;
    width: 1.6rem;
    border: none;
    border-radius: 2px;
    margin: 0;
}

.site-title-mark {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1;
}
.site-title-sub {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: #cfcfd4;
    margin-top: 0.35rem;
}

@media (max-width: 480px) {
    .site-title-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* Layout: persistent sidebar + content column */
.layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

nav.sidebar {
    position: sticky;
    top: 1.5rem;
    font-size: 0.92rem;
}
.sidebar-group { margin-bottom: 1.5rem; }
.sidebar-group-label {
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.5rem;
}
nav.sidebar ul { list-style: none; margin: 0; padding: 0; }
nav.sidebar li { margin: 0; }
nav.sidebar a {
    display: block;
    padding: 0.32rem 0.6rem;
    margin: 0.05rem 0;
    border-radius: 5px;
    text-decoration: none;
    color: var(--text);
    border-left: 3px solid transparent;
}
nav.sidebar a:hover { background: var(--bg-subtle); }
nav.sidebar a.current {
    font-weight: 700;
    color: var(--brand-accent-dark);
    background: var(--sidebar-current-bg);
    border-left-color: var(--brand-accent);
    padding-left: calc(0.6rem - 3px + 3px);
}

.content-col { min-width: 0; max-width: 720px; }

/* Breadcrumb */
nav.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
nav.breadcrumb a { color: var(--text-muted); text-decoration: none; }
nav.breadcrumb a:hover { color: var(--brand-accent-dark); text-decoration: underline; }
nav.breadcrumb .breadcrumb-sep { margin: 0 0.35rem; color: var(--border); }
nav.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* Typography rhythm */
main h1 { font-size: 2rem; font-weight: 700; line-height: 1.25; margin: 0 0 1.25rem; }
main h2 {
    font-size: 1.4rem; font-weight: 700; margin: 2.5rem 0 1rem;
    padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
}
main h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.75rem; }
main p { margin: 0 0 1.1rem; }
main ul, main ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
main li { margin-bottom: 0.4rem; }
main hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 6px; display: block; margin: 0.5rem 0 1rem; }
pre { background: var(--bg-subtle); padding: 0.9rem 1rem; overflow-x: auto; border-radius: 6px; border: 1px solid var(--border); }
code { background: var(--bg-subtle); padding: 0.15em 0.35em; border-radius: 3px; font-size: 0.9em; }
pre code { background: none; padding: 0; }

p.updated {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 2.5rem 0 0;
}

/* Prev/next pager */
nav.pager {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.pager-item {
    flex: 1 1 0;
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text);
}
.pager-item:hover { border-color: var(--brand-accent); background: var(--bg-subtle); }
.pager-next { text-align: right; }
.pager-empty { border-color: transparent; }
.pager-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.pager-title { display: block; font-weight: 600; margin-top: 0.15rem; }

footer.site-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}
footer.site-footer a { color: var(--text-muted); }
footer.site-footer a:hover { color: var(--brand-accent); }
footer.site-footer .footer-line { margin: 0; }

/* Footer action row — LogicHunt / Demo / Upgrade Pro / Support /
   Legacy Docs. Colors and 4px radius match the plugin admin's own real
   button styling (WP-admin blue #2271b1/#135e96 for general UI,
   #3b8437/#2e672b for the Pro-upgrade CTA — see logo-slider-wp-pro's
   lgx-control-radius token and admin-custom.css), not an approximation.
   Emphasis is by role (Upgrade Pro is always the one filled/primary
   button), not by row position. */
.footer-actions {
    display: grid;
    grid-template-columns: repeat(5, auto);
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.footer-btn {
    display: inline-block;
    padding: 0.55rem 1.15rem;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}
footer.site-footer a.footer-btn--primary {
    background: #3b8437;
    border-color: #3b8437;
    color: #fff;
}
footer.site-footer a.footer-btn--primary:hover { background: #2e672b; border-color: #2e672b; color: #fff; }
footer.site-footer a.footer-btn--outline {
    background: transparent;
    border-color: #2271b1;
    color: #2271b1;
}
footer.site-footer a.footer-btn--outline:hover { background: #135e96; border-color: #135e96; color: #fff; }

@media (max-width: 860px) {
    .layout { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
    nav.sidebar {
        position: static;
        padding-bottom: 1.25rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid var(--border);
    }
    .content-col { max-width: none; }
    nav.pager { flex-direction: column; }
    .pager-next { text-align: left; }

    /* Same breakpoint the sidebar already stacks at (requirement: degrade
       consistently with the sidebar's own mobile behavior, not independently). */
    .footer-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-btn { width: 100%; text-align: center; white-space: normal; }

    /* Five items in a 2-col grid default to a 2-2-1 wrap, but the lone 5th
       item (Legacy Docs) would otherwise sit left-aligned under column 1
       with a dangling empty cell beside it — spanning both columns and
       centering it reads as a deliberate third row, not a layout accident. */
    .footer-actions .footer-btn:last-child {
        grid-column: 1 / -1;
        width: auto;
        justify-self: center;
    }
}

@media (max-width: 480px) {
    .footer-actions { grid-template-columns: 1fr; }

    /* Single column now — revert the tablet-only centering override so all
       five buttons stack full-width and consistent, same as the other four. */
    .footer-actions .footer-btn:last-child {
        grid-column: auto;
        width: 100%;
        justify-self: stretch;
    }
}