/* PitchDetectors — Main stylesheet
   All colors/fonts come from CSS variables set by the Customizer. */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--pd-font-body);
    font-size: var(--pd-font-size);
    line-height: 1.6;
    color: var(--pd-text);
    background: var(--pd-bg);
    -webkit-font-smoothing: antialiased;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--pd-primary);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--pd-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pd-font-heading);
    color: var(--pd-dark);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 700;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1em;
}

.pd-container {
    width: min(var(--pd-container), 100% - 2rem);
    margin-inline: auto;
}

.pd-muted {
    color: var(--pd-muted);
}

.pd-link {
    color: var(--pd-primary);
    font-weight: 600;
}

/* ---------- Buttons ---------- */
.pd-btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .7em 1.2em;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--pd-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .15s, background .2s, color .2s, box-shadow .2s;
    line-height: 1;
}

.pd-btn:hover {
    transform: translateY(-1px);
}

.pd-btn--primary {
    background: var(--pd-primary);
    color: #fff;
}

.pd-btn--primary:hover {
    background: var(--pd-secondary);
    color: #fff;
}

.pd-btn--ghost {
    background: transparent;
    color: var(--pd-primary);
    border-color: var(--pd-border);
}

.pd-btn--ghost:hover {
    background: var(--pd-primary);
    color: #fff;
    border-color: var(--pd-primary);
}

.pd-btn--lg {
    padding: 1em 1.6em;
    font-size: 1.05rem;
}

/* ---------- Header ---------- */
.pd-header {
    background: var(--pd-header-bg);
    color: var(--pd-header-fg);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 50;
}

.pd-header.is-sticky {
    position: sticky;
    top: 0;
}

.pd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .9rem 0;
}

.pd-header--menu-logo-cta .pd-header__inner {
    justify-content: space-between;
}

.pd-header--menu-logo-cta .pd-header__brand {
    order: 2;
    margin-inline: auto;
}

.pd-header__brand .pd-brand,
.pd-header__brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    color: var(--pd-header-fg);
    font-weight: 700;
    font-size: 1.25rem;
}

.pd-header__brand img.custom-logo {
    max-height: 44px;
    width: auto;
}

.pd-header__nav {
    flex: 1;
}

.pd-menu {
    display: flex;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.pd-menu a {
    color: var(--pd-header-fg);
    padding: .55rem .85rem;
    border-radius: calc(var(--pd-radius) - 4px);
    font-weight: 500;
    display: inline-block;
}

.pd-menu a:hover, .pd-menu .current-menu-item>a {
    background: rgba(255, 255, 255, .15);
    color: var(--pd-header-fg);
}

.pd-header__actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.pd-icon-btn {
    background: transparent;
    border: 0;
    color: var(--pd-header-fg);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.pd-icon-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.pd-menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--pd-header-fg);
    font-size: 1.6rem;
    cursor: pointer;
    padding: .5rem;
    border-radius: var(--pd-radius);
    transition: all 0.3s ease;
    z-index: 51;
}

.pd-search-overlay {
    background: var(--pd-surface);
    border-top: 1px solid var(--pd-border);
    padding: 1rem 0;
    display: none;
}

.pd-search-overlay[hidden] {
    display: none !important;
}

.pd-search-overlay.is-visible {
    display: block;
}

.pd-search-overlay form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.pd-search-overlay [data-search-input-wrapper] {
    position: relative;
    display: flex;
    align-items: center;
    gap: .35rem;
    background: var(--pd-bg);
    border: 1px solid var(--pd-border);
    border-radius: 999px;
    padding: .25rem .75rem;
}

.pd-search-overlay input[type=search] {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .5rem 0;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}
/* ===================================================================
 * TOPBAR TICKER
 * =================================================================== */
.pd-topbar {
    background: var(--pd-dark);
    color: #fff;
    font-size: .85rem;
    padding: .5rem 0;
    text-align: center;
    overflow: hidden;
}

.pd-topbar__ticker {
    display: flex;
    animation: scroll-ticker 30s linear infinite;
    white-space: nowrap;
    padding: 0 100%;
}

.pd-topbar__ticker:hover {
    animation-play-state: paused;
    cursor: pointer;
}

.pd-topbar__ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    padding: 0 1rem;
    flex-shrink: 0;
}

.pd-topbar__ticker-item::before {
    content: "•";
    margin: 0 1rem;
}

.pd-topbar__ticker-item:first-child::before {
    display: none;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* Pause on smaller screens */
@media (max-width: 768px) {
    .pd-topbar__ticker {
        animation: none;
        transform: none;
    }
    
    .pd-topbar__ticker-item::before {
        display: none;
    }
}

@media (max-width: 860px) {
    .pd-menu-toggle {
        display: inline-flex;
    }

    .pd-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--pd-header-bg);
        padding: 1rem;
        display: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
    }

    .pd-header.is-open .pd-header__nav {
        display: block;
    }

    .pd-menu {
        flex-direction: column;
    }

    .pd-header__actions .pd-btn {
        display: none;
    }

    .pd-header.is-open .pd-header__actions .pd-btn {
        display: inline-flex;
    }
}

/* ---------- Hero ---------- */
.pd-hero {
    background: linear-gradient(135deg, var(--pd-dark), color-mix(in oklab, var(--pd-dark), var(--pd-primary) 25%));
    color: #fff;
    padding: clamp(3rem, 8vw, 6rem) 0;
    text-align: center;
}

.pd-hero__title {
    color: #fff;
    max-width: 22ch;
    margin-inline: auto;
}

.pd-hero__sub {
    color: rgba(255, 255, 255, .85);
    max-width: 60ch;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.pd-hero__search {
    display: flex;
    align-items: center;
    gap: .25rem;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    background: #fff;
    padding: .35rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.pd-hero__search i {
    color: var(--pd-muted);
    margin-left: .9rem;
}

.pd-hero__search input {
    flex: 1;
    border: 0;
    outline: 0;
    padding: .8rem 1rem;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
}

.pd-hero__search button {
    background: var(--pd-primary);
    color: #fff;
    border: 0;
    padding: .75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.pd-hero__cta {
    margin-top: 1rem;
}

/* ---------- Sections / grids ---------- */
.pd-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
    background: var(--pd-surface);
}

.pd-section--alt {
    background: var(--pd-bg);
}

.pd-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.pd-section__title {
    margin: 0;
}

.pd-tool-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.pd-tool-card {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.5rem;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}

.pd-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
    border-color: var(--pd-primary);
}

.pd-tool-card__icon {
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in oklab, var(--pd-primary) 12%, transparent);
    color: var(--pd-primary);
    border-radius: calc(var(--pd-radius) - 2px);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.pd-tool-card__title {
    font-size: 1.15rem;
    margin: 0 0 .4rem;
}

.pd-tool-card__title a {
    color: var(--pd-dark);
}

.pd-tool-card__title a:hover {
    color: var(--pd-primary);
}

.pd-tool-card__desc {
    color: var(--pd-muted);
    font-size: .95rem;
    margin-bottom: 1rem;
}

.pd-post-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pd-post-card {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.pd-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, .07);
}

.pd-post-card__thumb img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

.pd-post-card__body {
    padding: 1.25rem;
}

.pd-post-card__title {
    font-size: 1.15rem;
    margin: 0 0 .5rem;
}

.pd-post-card__title a {
    color: var(--pd-dark);
}

.pd-post-card__title a:hover {
    color: var(--pd-primary);
}

.pd-post-card__excerpt {
    color: var(--pd-muted);
    font-size: .95rem;
}

.pd-post-meta {
    display: flex;
    gap: 1rem;
    color: var(--pd-muted);
    font-size: .85rem;
    margin-bottom: .5rem;
}

.pd-post-meta i {
    margin-right: .25em;
}

/* ---------- Pages / Articles ---------- */
.pd-page-head {
    padding: 2rem 0 1rem;
}

.pd-page-title {
    margin-bottom: .25em;
}

.pd-section-head {
    padding: 3rem 0 1rem;
    background: var(--pd-bg);
}

.pd-feature-img {
    border-radius: var(--pd-radius);
    margin: 1.5rem 0;
}

.pd-prose {
    max-width: 75ch;
}

.pd-prose img {
    border-radius: var(--pd-radius);
    margin: 1.5rem 0;
}

.pd-prose h2, .pd-prose h3 {
    margin-top: 1.6em;
}

.pd-prose blockquote {
    border-left: 4px solid var(--pd-primary);
    padding: .25rem 1rem;
    color: var(--pd-muted);
    margin: 1.5rem 0;
}

.pd-prose code {
    background: var(--pd-bg);
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .9em;
}

.pd-prose pre {
    background: var(--pd-dark);
    color: #f5f5f5;
    padding: 1rem;
    border-radius: var(--pd-radius);
    overflow-x: auto;
}

.pd-prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ---------- Sidebar layout ---------- */
.pd-grid-with-sidebar {
    display: grid;
    gap: 2rem;
    padding: 2rem 0 4rem;
}

.pd-blog-sidebar-right {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.pd-blog-sidebar-left {
    grid-template-columns: 300px minmax(0, 1fr);
}

.pd-blog-sidebar-left .pd-content-area {
    order: 2;
}

.pd-blog-no-sidebar {
    grid-template-columns: 1fr;
}

.pd-sidebar .widget {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.widget-title {
    margin-top: 0;
}

@media (max-width: 860px) {
    .pd-blog-sidebar-right, .pd-blog-sidebar-left {
        grid-template-columns: 1fr;
    }

    .pd-blog-sidebar-left .pd-content-area {
        order: 0;
    }
}

/* ---------- Tool page ---------- */
.pd-tool-hero {
    background: linear-gradient(135deg, var(--pd-dark), color-mix(in oklab, var(--pd-dark), var(--pd-primary) 30%));
    color: #fff;
    text-align: center;
    padding: 3rem 0 2.5rem;
}

.pd-tool-hero__icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .1);
    border-radius: var(--pd-radius);
    font-size: 2rem;
    color: var(--pd-primary);
}

.pd-tool-hero__title {
    color: #fff;
}

.pd-tool-hero__sub {
    color: rgba(255, 255, 255, .85);
    max-width: 60ch;
    margin: 0 auto;
}

.pd-tool-body {
    padding: 2.5rem 0 4rem;
}

.pd-tool-embed {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.pd-tool-description {
    margin-top: 2rem;
}

/* ---------- Footer ---------- */
.pd-footer {
    background: var(--pd-footer-bg);
    color: var(--pd-footer-fg);
    padding: 3rem 0 1.25rem;
    margin-top: 3rem;
}

.pd-footer h6, .pd-footer .widget-title {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .85rem;
    margin-bottom: 1rem;
}

.pd-footer a {
    color: var(--pd-footer-fg);
}

.pd-footer a:hover {
    color: var(--pd-primary);
}

.pd-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-footer li {
    padding: .25rem 0;
}

.pd-footer__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(var(--pd-cols, 4), minmax(0, 1fr));
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.pd-footer__tagline {
    color: var(--pd-footer-fg);
    margin-bottom: 1rem;
}

.pd-footer__brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.pd-footer__socials {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}

.pd-footer__socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
    transition: background .2s;
}

.pd-footer__socials a:hover {
    background: var(--pd-primary);
    color: #fff;
}

.pd-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .9rem;
}

.pd-footer__nav .pd-menu a {
    padding: .25rem .75rem;
}

.pd-menu--inline {
    flex-direction: row;
}

@media (max-width: 720px) {
    .pd-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

/* ---------- 404 ---------- */
.pd-404 {
    text-align: center;
    padding: 5rem 0;
}

.pd-404 h1 {
    font-size: 7rem;
    margin: 0;
    color: var(--pd-primary);
    line-height: 1;
}

.pd-404 h2 {
    margin-top: .5rem;
}

/* ---------- Pagination ---------- */
.pagination, .nav-links {
    display: flex;
    gap: .25rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination a, .pagination span,
.nav-links a, .nav-links span {
    padding: .55rem .9rem;
    border-radius: calc(var(--pd-radius) - 4px);
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    color: var(--pd-text);
}

.pagination .current, .nav-links .current,
.pagination a:hover, .nav-links a:hover {
    background: var(--pd-primary);
    color: #fff;
    border-color: var(--pd-primary);
}

/* ---------- Forms ---------- */
input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

input[type=text], input[type=email], input[type=url], input[type=search],
input[type=password], input[type=number], textarea, select {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--pd-border);
    border-radius: calc(var(--pd-radius) - 4px);
    background: var(--pd-surface);
    color: var(--pd-text);
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid color-mix(in oklab, var(--pd-primary) 40%, transparent);
    outline-offset: 1px;
    border-color: var(--pd-primary);
}

/* ---------- Comments ---------- */
.pd-comments {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--pd-border);
}

.pd-comment-list {
    list-style: none;
    padding: 0;
}

.pd-comment-list .comment {
    margin-bottom: 1.5rem;
}

/* ---------- Top bar ---------- */
.pd-topbar {
    background: var(--pd-dark);
    color: #fff;
    font-size: .85rem;
    padding: .5rem 0;
    text-align: center;
}

.pd-topbar a {
    color: #fff;
    text-decoration: underline;
}

/* ---------- Header custom block / custom-link menu ---------- */
.pd-header__custom {
    color: var(--pd-header-fg);
    font-size: .9rem;
}

.pd-menu--custom {
    margin-left: .5rem;
}

.pd-menu--custom a {
    opacity: .85;
}

/* ---------- Breadcrumbs ---------- */
.pd-breadcrumbs {
    background: var(--pd-bg);
    border-bottom: 1px solid var(--pd-border);
    padding: .65rem 0;
    font-size: .9rem;
}

.pd-breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}

.pd-breadcrumbs a {
    color: var(--pd-muted);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.pd-breadcrumbs a:hover {
    color: var(--pd-primary);
}

.pd-breadcrumbs [aria-current="page"] {
    color: var(--pd-dark);
    font-weight: 600;
}

.pd-bc-sep i {
    color: var(--pd-muted);
    font-size: .75rem;
}

/* ---------- Tools layout (with sidebar) ---------- */
.pd-tools-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    padding: 2rem 0 4rem;
}

.pd-tools-layout .pd-content-area {
    min-width: 0;
}

@media (max-width: 900px) {
    .pd-tools-layout {
        grid-template-columns: 1fr;
    }

    .pd-tool-sidebar {
        order: -1;
    }
}

/* ---------- Tool sidebar ---------- */
.pd-tool-sidebar {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 1.25rem;
    position: sticky;
    top: 90px;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.pd-tool-sidebar__eyebrow {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--pd-muted);
    font-weight: 700;
}

.pd-tool-sidebar__title {
    font-size: 1.1rem;
    margin: .25rem 0 .5rem;
}

.pd-tool-sidebar__title a {
    color: var(--pd-dark);
}

.pd-tool-sidebar__desc {
    font-size: .85rem;
    color: var(--pd-muted);
    margin-bottom: 1rem;
}

.pd-tool-sidebar__search {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: var(--pd-bg);
    border: 1px solid var(--pd-border);
    border-radius: 999px;
    padding: .25rem .75rem;
    margin-bottom: 1rem;
}

.pd-tool-sidebar__search i {
    color: var(--pd-muted);
}

.pd-tool-sidebar__search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .5rem 0;
    outline: none;
    font-family: inherit;
    font-size: .9rem;
}

.pd-tool-sidebar__list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.pd-tool-sidebar__list li {
    margin: 0;
}

.pd-tool-sidebar__list a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .75rem;
    border-radius: calc(var(--pd-radius) - 4px);
    color: var(--pd-dark);
    font-size: .92rem;
}

.pd-tool-sidebar__list a:hover {
    background: color-mix(in oklab, var(--pd-primary) 8%, transparent);
    color: var(--pd-primary);
}

.pd-tool-sidebar__list i {
    color: var(--pd-primary);
    width: 18px;
    text-align: center;
}

.pd-tool-sidebar__list .is-active>a {
    background: var(--pd-primary);
    color: #fff;
}

.pd-tool-sidebar__list .is-active>a i {
    color: #fff;
}

.pd-tool-sidebar__cats {
    border-top: 1px solid var(--pd-border);
    padding-top: 1rem;
}

.pd-tool-sidebar__cats h4 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pd-muted);
    margin: 0 0 .5rem;
}

.pd-tool-sidebar__cats ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-tool-sidebar__cats a {
    display: flex;
    justify-content: space-between;
    padding: .35rem 0;
    color: var(--pd-text);
    font-size: .9rem;
}

.pd-tool-sidebar__cats a span {
    color: var(--pd-muted);
    font-size: .8rem;
}

.pd-tool-sidebar__cats a:hover {
    color: var(--pd-primary);
}

.pd-tool-sidebar__cats .is-active a {
    color: var(--pd-primary);
    font-weight: 600;
}

/* ---------- Category search bar ---------- */
.pd-cat-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: 999px;
    padding: .35rem .35rem .35rem 1rem;
    max-width: 640px;
    margin: 1rem 0;
}

.pd-cat-search i {
    color: var(--pd-muted);
}

.pd-cat-search input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: .65rem .5rem;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
}

.pd-cat-search button {
    border-radius: 999px;
}

/* ---------- Category pills ---------- */
.pd-cat-pills {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.pd-cat-pills a {
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    padding: .4rem .85rem;
    border-radius: 999px;
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    color: var(--pd-dark);
    font-size: .85rem;
}

.pd-cat-pills a span {
    color: var(--pd-muted);
}

.pd-cat-pills a:hover {
    background: var(--pd-primary);
    color: #fff;
    border-color: var(--pd-primary);
}

.pd-cat-pills a:hover span {
    color: rgba(255, 255, 255, .85);
}

/* ---------- Hero count ---------- */
.pd-hero__count {
    color: rgba(255, 255, 255, .85);
    margin-top: .9rem;
    font-size: .95rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255, 255, 255, .08);
    padding: .4rem .85rem;
    border-radius: 999px;
}

.pd-hero__count strong {
    color: #fff;
    font-weight: 700;
}

/* ---------- Improved tool card ---------- */
.pd-tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.pd-tool-card__cat {
    display: inline-block;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: var(--pd-primary);
    margin-bottom: .35rem;
    position: relative;
    z-index: 2;
}

.pd-tool-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: color-mix(in oklab, var(--pd-primary) 15%, transparent);
    color: var(--pd-primary);
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    z-index: 2;
}

.pd-tool-card__foot {
    margin-top: auto;
    padding-top: 1rem;
    position: relative;
    z-index: 2;
}

.pd-tool-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--pd-radius);
}

.pd-btn--sm {
    padding: .5em .9em;
    font-size: .85rem;
}

/* ---------- Footer extras ---------- */
.pd-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pd-footer__links li {
    margin: .35rem 0;
}

.pd-footer__links a {
    color: rgba(255, 255, 255, .75);
    font-size: .92rem;
}

.pd-footer__links a:hover {
    color: #fff;
}

.pd-socials {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    gap: .5rem;
}

.pd-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.pd-socials a:hover {
    background: var(--pd-primary);
}

.pd-footer__custom {
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
}

.pd-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--pd-primary);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
    z-index: 60;
}

.pd-back-to-top.is-visible {
    display: inline-flex;
}

.pd-back-to-top:hover {
    background: var(--pd-secondary);
    color: #fff;
}

/* ===================================================================
 * LIVE SEARCH STYLES
 * =================================================================== */
.pd-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--pd-surface);
    border-radius: var(--pd-radius);
    border: 1px solid var(--pd-border);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    z-index: 100;
}

.pd-search-group {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pd-border);
}

.pd-search-group:last-child {
    border-bottom: none;
}

.pd-search-group h4 {
    margin: 0.5rem 1rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--pd-muted);
    font-weight: 600;
}

.pd-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--pd-text);
    transition: background 0.2s;
}

.pd-search-item:hover {
    background: var(--pd-bg);
    color: var(--pd-primary);
}

.pd-search-item i {
    opacity: 0.6;
}

.pd-search-item small {
    display: block;
    font-size: 0.75rem;
    color: var(--pd-muted);
    margin-left: auto;
}

.pd-search-empty {
    padding: 1rem;
    color: var(--pd-muted);
    text-align: center;
    margin: 0;
}

/* ===================================================================
 * RESPONSIVE HEADER ENHANCEMENTS
 * =================================================================== */
@media (max-width: 768px) {
    .pd-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--pd-header-bg);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }

    .pd-header.is-open .pd-header__nav {
        max-height: 500px;
        overflow-y: auto;
    }

    .pd-header__nav .pd-menu {
        flex-direction: column;
        padding: 1rem 0;
    }

    .pd-header__nav .pd-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, .05);
    }

    .pd-header__nav .pd-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
    }

    .pd-menu-toggle {
        cursor: pointer;
        transition: all 0.3s;
    }

    .pd-header.is-open .pd-menu-toggle i {
        transform: rotate(90deg);
    }
}

/* ===================================================================
 * TOOL SIDEBAR SEARCH ENHANCEMENTS
 * =================================================================== */
.pd-tool-sidebar__search.is-hidden {
    display: none;
}

[data-pd-sidebar-search-toggle] {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--pd-radius);
    transition: background 0.2s;
}

[data-pd-sidebar-search-toggle]:hover {
    background: var(--pd-bg);
}

[data-pd-sidebar-search-toggle].is-active {
    color: var(--pd-primary);
}

/* ===================================================================
 * CATEGORY GRID
 * =================================================================== */
.pd-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pd-category-card {
    padding: 1.5rem;
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: var(--pd-text);
}

.pd-category-card:hover {
    border-color: var(--pd-primary);
    background: rgba(var(--pd-primary-rgb), 0.02);
    transform: translateY(-2px);
}

.pd-category-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--pd-primary);
}

.pd-category-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--pd-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================================================
 * SECTION STYLING
 * =================================================================== */
.pd-section--cta {
    background: linear-gradient(135deg, var(--pd-primary), var(--pd-secondary));
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.pd-section--cta h2,
.pd-section--cta p {
    color: white;
}

.pd-section--cta p {
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem;
}

.pd-text-center {
    text-align: center;
}

/* ===================================================================
 * FORM ENHANCEMENTS
 * =================================================================== */
.pd-hero__search {
    position: relative;
}

.pd-hero__search input[type="search"] {
    width: 100%;
}

/* ===================================================================
 * MOBILE RESPONSIVENESS IMPROVEMENTS
 * =================================================================== */
@media (max-width: 900px) {
    .pd-tools-layout {
        grid-template-columns: 1fr;
    }

    .pd-tool-sidebar {
        order: 2;
        position: static;
        max-height: none;
        top: auto;
    }

    .pd-tools-layout .pd-content-area {
        order: 1;
    }

    .pd-tool-hero {
        padding: 10px 0px;
    }

    .pd-tool-hero__icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .pd-tool-hero__title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .pd-section {
        padding: 2rem 1rem;
    }

    .pd-tool-grid,
    .pd-post-grid {
        grid-template-columns: 1fr;
    }

    .pd-hero__cta {
        flex-direction: column;
        gap: 1rem;
    }

    .pd-btn--lg {
        width: 100%;
        justify-content: center;
    }

    .pd-category-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
 * RELATED TOOLS SECTION
 * =================================================================== */
.pd-related-tools {
    background: var(--pd-bg);
    padding: 3rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--pd-border);
}

.pd-related-tools h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.pd-related-tools .pd-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ===================================================================
 * ICON BUTTON STYLES
 * =================================================================== */
.pd-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    color: inherit;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.pd-icon-btn:hover {
    background: rgba(0, 0, 0, .05);
    color: var(--pd-primary);
}

/* ===================================================================
 * ANIMATION & TRANSITIONS
 * =================================================================== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pd-search-results {
    animation: slideDown 0.2s ease;
}

/* ===================================================================
 * ACCESSIBILITY IMPROVEMENTS
 * =================================================================== */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}