:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #f6f7f9;
    --text: #111827;
    --muted: #667085;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
    --radius: 16px;
    --max: 1180px;
}
[data-theme='dark'] {
    --bg: #0b0f17;
    --surface: #111827;
    --surface-2: #171e2b;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --border: #263244;
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    line-height: 1.6;
}
a {
    color: inherit;
    text-decoration: none;
}
button,
input,
textarea,
select {
    font: inherit;
}
button {
    cursor: pointer;
}
.container {
    width: min(var(--max), calc(100% - 32px));
    margin-inline: auto;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    width: 230px;
    height: 70px;
    line-height: 0;
    text-decoration: none;
    overflow: hidden;
    background: transparent;
}

.logo-img {
    display: block;
    flex: 0 0 auto;
    width: 200px;
    max-width: none;
    height: auto;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: 0;
    transform: translateY(-1px);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.logo:hover .logo-img {
    transform: translateY(-1px) scale(1.02);
    opacity: 0.96;
}
.navlinks {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navlinks a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.navlinks a:hover {
    background: var(--surface-2);
    color: var(--text);
    transform: translateY(-1px);
}

/* Active page */
.navlinks a.active {
    background: var(--surface-2);
    color: var(--text);
}

.navlinks a.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--primary);
    transform: translateX(-50%);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.icon-btn,
.menu-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    display: grid;
    place-items: center;
}
.menu-btn {
    display: none;
}
.menu-btn {
    transition: transform 0.2s ease;
}
.nav.open .menu-btn {
    transform: rotate(90deg);
}

.hero {
    padding: 80px 0 58px;
    text-align: center;
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
    margin: 0 auto 20px;
    max-width: 900px;
}
.hero p {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 30px;
}
.searchbar {
    display: flex;
    max-width: 680px;
    margin: 0 auto;
    gap: 10px;
}
.searchbar input,
.field,
.tool-input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}
.searchbar input:focus,
.field:focus,
.tool-input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.btn {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.btn:hover {
    background: var(--primary-hover);
}
.btn.secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* search button main page */
.searchbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: 105px;
    border: 1px solid color-mix(in srgb, var(--primary) 70%, transparent);
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 20%, transparent);
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.searchbar button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 28%, transparent);
}

.searchbar button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px color-mix(in srgb, var(--primary) 20%, transparent);
}

.searchbar button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent);
    outline-offset: 2px;
}
/* end button search main page */

.section {
    padding: 56px 0;
}
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 22px;
}
.section h2 {
    margin: 0;
    font-size: 1.75rem;
    letter-spacing: -0.03em;
}
.muted,
.lead {
    color: var(--muted);
}
.grid {
    display: grid;
    gap: 18px;
}
.tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.tool-card {
    display: block;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease;
}
.tool-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 18px;
}
.tool-card h3,
.category-card h3 {
    margin: 0 0 7px;
    font-size: 1.1rem;
}
.tool-card p,
.category-card p {
    margin: 0 0 14px;
    color: var(--muted);
}
.pill {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.page {
    padding: 52px 0 80px;
}
.page-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
    margin: 0 0 12px;
}
.breadcrumb {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 25px;
}
.breadcrumb a:hover {
    color: var(--primary);
}
.tool-shell {
    max-width: 850px;
    margin: 28px auto 0;
}
.tool-panel {
    padding: 28px;
}
.tool-panel textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}
.stat {
    background: var(--surface-2);
    border-radius: 12px;
    padding: 15px;
}
.stat strong {
    display: block;
    font-size: 1.4rem;
}
.stat span {
    color: var(--muted);
    font-size: 0.82rem;
}

/* new stat layout */
/* =========================================================
   TEXT ANALYZER STATS ONLY
   Affects only: <div class="stats">...</div>
   ========================================================= */

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.stats .stat {
    position: relative;
    overflow: hidden;
    min-height: 92px;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease,
        box-shadow 0.22s ease;
}

/* Animated shine */
.stats .stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 7%, transparent), transparent);
    transform: skewX(-15deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.stats .stat:hover {
    transform: translateY(-4px);
    background: var(--surface);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    box-shadow:
        0 8px 24px color-mix(in srgb, var(--text) 8%, transparent),
        0 0 0 1px color-mix(in srgb, var(--primary) 5%, transparent);
}

.stats .stat:hover::before {
    left: 140%;
}

.stats .stat strong {
    position: relative;
    display: block;
    margin-bottom: 4px;
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.stats .stat:hover strong {
    color: var(--primary);
    transform: translateX(2px);
}

.stats .stat span {
    position: relative;
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Optional: pulse when JavaScript updates a number */
.stats .stat strong.stat-updated {
    animation: statsNumberPulse 0.35s ease;
}

@keyframes statsNumberPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
        color: var(--primary);
    }

    100% {
        transform: scale(1);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 600px) {
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stats .stat {
        min-height: 84px;
        padding: 14px;
    }

    .stats .stat strong {
        font-size: 1.3rem;
    }

    .stats .stat span {
        font-size: 0.74rem;
    }
}
/* end of new stat layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 7px;
}
.result {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
}
.search-results {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}
.site-footer {
    border-top: 1px solid var(--border);
    padding: 38px 0;
    color: var(--muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}
.footer-links {
    display: grid;
    gap: 7px;
}
.footer-links a:hover {
    color: var(--primary);
}
.empty {
    padding: 35px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 14px;
}
/* @media (max-width: 900px) {
    .logo {
        width: 200px;
        height: 70px;
    }

    .logo-img {
        width: 218px;
    }

    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nav-links {
        display: none;
    }
    .menu-btn {
        display: grid;
    }
    .nav.open .nav-links {
        display: flex;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
    }
} */
@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .navlinks {
        /* was .nav-links */
        display: none;
    }
    .menu-btn {
        display: grid;
    }
    .nav.open .navlinks {
        /* was .nav.open .nav-links */
        display: flex;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
    }
}
@media (max-width: 600px) {
    .logo {
        width: 170px;
        height: 64px;
    }

    .logo-img {
        width: 170px;
    }

    .container {
        width: min(var(--max), calc(100% - 22px));
    }
    .hero {
        padding: 55px 0 40px;
    }
    .hero h1 {
        font-size: 2.55rem;
    }
    .searchbar {
        flex-direction: column;
    }
    .searchbar .btn {
        width: 100%;
    }
    .tools-grid,
    .cat-grid,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .section,
    .page {
        padding: 40px 0 60px;
    }
}

/* word counter button improved style */

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.actions .btn {
    position: relative;
    overflow: hidden;
    min-width: 105px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Shine effect */
.actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
}

.actions .btn:hover::before {
    left: 140%;
}

/* Copy button */
.actions #copy {
    background: var(--primary);
    color: #fff;
    border-color: color-mix(in srgb, var(--primary) 70%, transparent);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 18%, transparent);
}

.actions #copy:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Clear button */
.actions #clear {
    background: var(--surface);
    color: var(--muted);
    border-color: var(--border);
}

.actions #clear:hover {
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 35%, var(--border));
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(239, 68, 68, 0.12);
}

/* Click effect */
.actions .btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
}

/* Keyboard accessibility */
.actions .btn:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 25%, transparent);
    outline-offset: 2px;
}

/* Mobile */
@media (max-width: 600px) {
    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .actions .btn {
        width: 100%;
        min-width: 0;
    }
}
/* end of word counter button improved style */

/* start copy to clipboad style */
.copy-wrapper {
    position: relative;
    display: inline-flex;
}

.copy-toast {
    position: absolute;

    /* Directly above the Copy button */
    bottom: calc(100% + 8px);
    left: 50%;

    transform: translateX(-50%) translateY(6px);

    white-space: nowrap;

    padding: 8px 12px;
    border-radius: 9px;

    background: var(--text);
    color: var(--bg);

    font-size: 0.8rem;
    font-weight: 700;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

/* Small arrow pointing toward the button */
.copy-toast::after {
    content: '';

    position: absolute;
    left: 50%;
    bottom: -5px;

    width: 10px;
    height: 10px;

    background: var(--text);

    transform: translateX(-50%) rotate(45deg);
}

/* Visible state */
.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* end of copy to clipboard style */

/* start of date calculator style */
.date-input {
    margin-top: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}
/* end of date calculator style */

.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    outline: none;
}

/* start preview image style */
.preview-box img {
    display: block;
    max-width: 100%;
    max-height: 350px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 8px auto 0;
}
.preview-box[hidden] {
    display: none;
}
[hidden] {
    display: none !important;
}
/*end preview image style */

.form-section {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}
.form-section:first-of-type {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}
[hidden] {
    display: none !important;
}

/*start drop zone image style */
/* ===== Dropzone emphasis ===== */
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    padding: 44px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
    cursor: pointer;
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface));
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 6px;
    transition: transform 0.2s ease;
}

.dropzone strong {
    font-size: 1.05rem;
}

.dropzone .muted {
    margin: 0;
    font-size: 0.85rem;
}

/* Hover state — invites interaction even without dragging */
.dropzone:hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: color-mix(in srgb, var(--primary) 4%, var(--surface-2));
}

.dropzone:hover .dropzone-icon {
    transform: translateY(-3px);
}

/* Active drag state — toggled by your JS via .drag class */
.dropzone.drag {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--surface-2));
    transform: scale(1.01);
}

.dropzone.drag .dropzone-icon {
    color: var(--primary-hover);
    transform: translateY(-5px) scale(1.1);
}

/* Style the file input trigger like a real button */
.file-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    margin-top: 4px;
}
/*end drop zone image style */

/* qrcode */
/* ===== QR result card ===== */
.qr-card {
    margin-top: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
    text-align: center;
}

.qr-card[hidden] {
    display: none;
}

.qr-output {
    display: inline-flex;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin: 0;
}

.qr-hint {
    margin: 14px 0 0;
    font-size: 0.85rem;
}

.char-count {
    margin-top: 6px;
    font-size: 0.8rem;
    text-align: right;
}
/* qrcode */

/*ai checker start*/

/* =========================================
   AI WRITING CHECKER
========================================= */
.ai-result {
    margin-top: 24px;
}
.ai-score-box {
    text-align: center;
    padding: 28px 20px 20px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px 14px 0 0;
    background: var(--surface, #ffffff);
}
.ai-score-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}
.ai-score {
    display: block;
    font-size: 52px;
    line-height: 1;
    font-weight: 800;
    margin: 10px 0;
}
.ai-level {
    display: block;
    font-size: 15px;
    font-weight: 600;
}
.ai-score-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    overflow: hidden;
}
.ai-score-fill {
    width: 0;
    height: 100%;
    background: #2563eb;
    transition: width 0.5s ease;
}
.analysis-stats {
    margin-top: 20px;
}
.analysis-block {
    margin-top: 32px;
}
.analysis-block h3 {
    margin-bottom: 14px;
}
.analysis-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.analysis-list li {
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: var(--surface, #ffffff);
}
.analysis-list li::before {
    content: '✓';
    margin-right: 10px;
    font-weight: 700;
}
.detail-stats {
    margin-top: 16px;
}
@media (max-width: 640px) {
    .ai-score {
        font-size: 44px;
    }
    .analysis-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
/*aichecker end */

/* =========================================================
   BLOG PAGE
========================================================= */

.blog-header {
    max-width: 780px;
    margin-bottom: 30px;
}

.blog-header .lead {
    max-width: 680px;
    margin: 0;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   BLOG CATEGORY FILTERS
========================================================= */

.blog-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 30px 0 32px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}

.blog-categories::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.filter-btn:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filter-btn span {
    min-width: 19px;
    height: 19px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--text) 7%, transparent);
    font-size: 0.7rem;
    line-height: 1;
}

.filter-btn.active span {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

/* =========================================================
   FEATURED ARTICLE
========================================================= */

.blog-featured {
    margin-bottom: 42px;
}

.featured-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.75fr);
    gap: 30px;
    padding: 32px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 17px;
}

.featured-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    font-size: 1.35rem;
}

.featured-category {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.featured-card h2 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.featured-card h2 a:hover {
    color: var(--primary);
}

.featured-card p {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 680px;
}

.featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.featured-meta .dot {
    opacity: 0.5;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    margin-top: 22px;
    color: var(--primary);
    font-size: 0.88rem;
    font-weight: 800;
}

.featured-link:hover {
    color: var(--primary-hover);
}

.featured-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    border-radius: 14px;
    background: var(--surface-2);
    font-size: 5rem;
}

/* =========================================================
   SECTION HEADING
========================================================= */

.blog-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 19px;
}

.blog-section-heading h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.blog-section-heading p {
    margin: 0;
    font-size: 0.88rem;
}

/* =========================================================
   BLOG CARDS
========================================================= */

.blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    box-shadow: 0 14px 35px color-mix(in srgb, var(--text) 8%, transparent);
}

.blog-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 17px;
}

.blog-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    font-size: 1.15rem;
}

.blog-category {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.blog-card h3 {
    margin: 0 0 9px;
    font-size: 1.08rem;
    line-height: 1.32;
    letter-spacing: -0.02em;
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.blog-meta {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
}

.blog-read {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.blog-read:hover {
    color: var(--primary-hover);
}

/* =========================================================
   PAGINATION
========================================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 42px;
    min-height: 42px;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    transform: translateY(-1px);
}

.pagination button.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.pagination .pagination-prev,
.pagination .pagination-next {
    padding-inline: 14px;
}

.pagination .pagination-info {
    display: none;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-visual {
        min-height: 150px;
    }
}

@media (max-width: 600px) {
    .blog-header {
        margin-bottom: 22px;
    }

    .blog-categories {
        margin: 24px -11px 28px;
        padding-left: 11px;
        padding-right: 11px;
    }

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

    .featured-card {
        gap: 20px;
        padding: 24px;
    }

    .featured-card h2 {
        font-size: 1.55rem;
    }

    .featured-visual {
        min-height: 110px;
        font-size: 3.5rem;
    }

    .blog-section-heading {
        margin-bottom: 15px;
    }

    .blog-section-heading h2 {
        font-size: 1.35rem;
    }

    .pagination {
        justify-content: space-between;
        gap: 8px;
    }

    .pagination .page-number {
        display: none;
    }

    .pagination .pagination-info {
        display: block;
        flex: 1;
        text-align: center;
    }

    .pagination .pagination-prev,
    .pagination .pagination-next {
        min-width: 82px;
    }
}
/* ================================
   CATEGORY PAGE
================================ */

.page-header {
    max-width: 760px;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.category-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.category-card:hover {
    transform: translateY(-3px);
}

.category-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 25px;
    background: rgba(37, 99, 235, 0.08);
}

.category-content {
    min-width: 0;
}

.category-content h2 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.3;
}

.category-content p {
    margin: 0;
    line-height: 1.65;
}

.category-link {
    display: inline-block;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
}

.category-cta {
    margin-top: 42px;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.category-cta h2 {
    margin: 0 0 8px;
}

.category-cta p {
    margin: 0 0 18px;
}

@media (max-width: 700px) {
    .cat-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .category-card {
        padding: 20px;
    }

    .category-cta {
        margin-top: 30px;
        padding: 24px 18px;
    }
}
/* =================================
   SEARCH PAGE
================================= */

.search-section {
    max-width: 900px;
    margin-top: 28px;
}

/* Search bar */

.searchbar {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-wrapper input {
    width: 100%;
    min-height: 50px;
    padding: 0 48px 0 44px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 17px;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 50%;

    background: transparent;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    opacity: 0.65;

    transition:
        background-color 0.18s ease,
        opacity 0.18s ease;
}

.search-clear:hover {
    opacity: 1;
    background: rgba(127, 127, 127, 0.12);
}

.search-submit {
    min-width: 100px;
    border: 0;
    border-radius: 8px;

    background: #2563eb;
    color: #fff;

    font-weight: 600;

    padding: 0 20px;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.search-submit:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

/* Suggestions */

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;

    margin-top: 13px;

    font-size: 14px;
}

.suggestion-label {
    color: var(--muted, #6b7280);
}

.search-suggestion {
    border: 1px solid var(--border-color, #e5e7eb);
    background: transparent;

    border-radius: 999px;

    padding: 6px 12px;

    font-size: 13px;

    cursor: pointer;

    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background-color 0.18s ease,
        transform 0.18s ease;
}

.search-suggestion:hover {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.06);
    transform: translateY(-1px);
}

/* Results header */

.search-results-header {
    margin-top: 28px;
    margin-bottom: 12px;

    font-size: 14px;
    font-weight: 600;

    color: var(--muted, #6b7280);
}

/* Results */

.search-results {
    margin-top: 24px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 16px;
}

/*
   This works with most existing RheyKit
   search result cards.
*/

.search-results > * {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.search-results > *:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

/* Initial / empty state */

.search-empty,
.search-no-results {
    max-width: 620px;

    margin: 42px auto 0;

    padding: 42px 24px;

    text-align: center;

    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;
}

.search-empty-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: rgba(37, 99, 235, 0.08);

    font-size: 27px;
}

.search-empty h2,
.search-no-results h2 {
    margin: 0 0 8px;
}

.search-empty p,
.search-no-results p {
    margin: 0;
    line-height: 1.65;
}

/* CTA */

.search-cta {
    margin-top: 44px;

    padding: 30px;

    text-align: center;

    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 16px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.search-cta:hover {
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.search-cta h2 {
    margin: 0 0 8px;
}

.search-cta p {
    margin: 0 0 18px;
}

/* =================================
   SEARCH RESPONSIVE
================================= */

@media (max-width: 900px) {
    .search-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .searchbar {
        flex-direction: column;
    }

    .search-submit {
        min-height: 48px;
    }

    .search-results {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .search-empty,
    .search-no-results {
        margin-top: 30px;
        padding: 32px 18px;
    }

    .search-cta {
        margin-top: 32px;
        padding: 24px 18px;
    }
}

@media (max-width: 380px) {
    .logo {
        width: 150px;
        height: 60px;
    }

    .logo-img {
        width: 150px;
    }
}

/* =================================
   REDUCED MOTION
================================= */

@media (prefers-reduced-motion: reduce) {
    .search-submit,
    .search-clear,
    .search-suggestion,
    .search-results > *,
    .search-cta {
        transition: none;
    }

    .search-submit:hover,
    .search-suggestion:hover,
    .search-results > *:hover {
        transform: none;
    }
}
