/* ============================================================
   BSR TOOLS - Main Stylesheet
   Stable Green Theme + Unified Footer-Based Side Spacing
   Plain PHP + Vanilla CSS/JS Project
   ============================================================ */

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

/* ============================================================
   THEME VARIABLES - GREEN SYSTEM
   ============================================================ */

:root {
    /* Brand Greens */
    --brand-green: #006241;
    --accent: #00754A;
    --accent-hover: #006241;
    --accent-light: #d4e9e2;
    --accent-rgb: 0, 117, 74;

    --house-green: #1E3932;
    --green-uplift: #2b5148;
    --green-light: #d4e9e2;

    /* Warm Surfaces */
    --bg-body: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #edebe9;
    --bg-hover: #f7f5f0;
    --bg-input: #ffffff;

    /* Borders */
    --border: #dfe5df;
    --border-soft: #e7ebe7;
    --border-focus: #00754A;

    /* Text */
    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(2, 48, 32);
    --text-muted: #023020;
    --text-on-dark: #ffffff;
    --text-on-dark-soft: rgba(255, 255, 255, 0.70);

    /* Headings */
    --heading-primary: #006241;
    --heading-dark: #1E3932;

    /* Gold Accent */
    --gold: #cba258;
    --gold-light: #dfc49d;
    --gold-lightest: #faf6ee;

    /* Semantic */
    --red: #c82014;
    --red-light: hsl(4 82% 43% / 5%);
    --yellow: #fbbc05;
    --yellow-light: #fff7d6;
    --success: #00754A;
    --success-light: #d4e9e2;

    /* Backward Compatibility Aliases - Old blue now maps to green */
    --blue: #00754A;
    --blue-light: #d4e9e2;
    --green: #006241;
    --orange: #fbbc05;
    --orange-light: #faf6ee;
    --purple: #1E3932;
    --purple-light: #d4e9e2;
    --cyan: #00754A;
    --cyan-light: #d4e9e2;

    /* Radius */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 50px;
    --radius-card: 12px;
    --radius-pill: 50px;

    /* Shadows */
    --shadow-sm:
        0 0 0.5px rgba(0, 0, 0, 0.14),
        0 1px 1px rgba(0, 0, 0, 0.24);

    --shadow:
        0 1px 3px rgba(0, 0, 0, 0.10),
        0 2px 2px rgba(0, 0, 0, 0.06),
        0 0 2px rgba(0, 0, 0, 0.07);

    --shadow-lg:
        0 8px 12px rgba(0, 0, 0, 0.14);

    --shadow-glow:
        0 0 6px rgba(0, 0, 0, 0.24),
        0 8px 12px rgba(0, 0, 0, 0.14);

    /* Motion */
    --transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --button-active-scale: scale(0.95);

    /* Layout */
    --header-height: 64px;
    --sidebar-width: 360px;
    --container-max: 1200px;
    --site-gutter: 24px;
    --site-side-space: max(var(--site-gutter), calc((100vw - var(--container-max)) / 2));
}

/* ============================================================
   DARK MODE NORMALIZED
   If JS adds html.dark-mode, colors remain stable.
   ============================================================ */

html.dark-mode {
    color-scheme: light;

    --brand-green: #006241;
    --accent: #00754A;
    --accent-hover: #006241;
    --accent-light: #d4e9e2;
    --accent-rgb: 0, 117, 74;

    --house-green: #1E3932;
    --green-uplift: #2b5148;
    --green-light: #d4e9e2;

    --bg-body: #f2f0eb;
    --bg-card: #ffffff;
    --bg-subtle: #edebe9;
    --bg-hover: #f7f5f0;
    --bg-input: #ffffff;

    --border: #dfe5df;
    --border-soft: #e7ebe7;
    --border-focus: #00754A;

    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.58);
    --text-muted: #33433d;
    --text-on-dark: #ffffff;
    --text-on-dark-soft: rgba(255, 255, 255, 0.70);

    --heading-primary: #006241;
    --heading-dark: #1E3932;

    --gold: #cba258;
    --gold-light: #dfc49d;
    --gold-lightest: #faf6ee;

    --red: #c82014;
    --red-light: hsl(4 82% 43% / 5%);
    --yellow: #fbbc05;
    --yellow-light: #fff7d6;
    --success: #00754A;
    --success-light: #d4e9e2;

    --blue: #00754A;
    --blue-light: #d4e9e2;
    --green: #006241;
    --orange: #fbbc05;
    --orange-light: #faf6ee;
    --purple: #1E3932;
    --purple-light: #d4e9e2;
    --cyan: #00754A;
    --cyan-light: #d4e9e2;

    --shadow-sm:
        0 0 0.5px rgba(0, 0, 0, 0.14),
        0 1px 1px rgba(0, 0, 0, 0.24);

    --shadow:
        0 1px 3px rgba(0, 0, 0, 0.10),
        0 2px 2px rgba(0, 0, 0, 0.06),
        0 0 2px rgba(0, 0, 0, 0.07);

    --shadow-lg:
        0 8px 12px rgba(0, 0, 0, 0.14);

    --shadow-glow:
        0 0 6px rgba(0, 0, 0, 0.24),
        0 8px 12px rgba(0, 0, 0, 0.14);
}

/* ============================================================
   RESET
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    letter-spacing: -0.01em;
    background: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* ============================================================
   MATERIAL SYMBOLS
   ============================================================ */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
}

/* ============================================================
   TOP HEADER + MOBILE NAVIGATION
   Logo left, desktop menu right, dark-mode toggle removed
   ============================================================ */

.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 22px;
    padding-left: var(--site-side-space);
    padding-right: var(--site-side-space);
    margin: 0;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

/* Brand / Logo */
.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    margin: 0;
    padding: 0;
}

.header-brand-icon,
.header-brand .material-symbols-outlined {
    font-size: 28px;
    line-height: 1;
}

.header-brand-text {
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1;
}

/* Desktop menu pushed to the right */
.header-nav {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    padding: 0;
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.header-nav a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.header-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 800;
}

/* Dark-mode toggle removed */
.theme-toggle,
#themeToggle,
#themeIcon {
    display: none !important;
}

/* Header actions kept safe in case mobile button is inside it */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
}

/* Mobile hamburger */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 8px;
    margin: 0;
}

/* Existing search dropdown compatibility */
.search-results-dropdown {
    display: none;
    position: fixed;
    top: 68px;
    right: var(--site-side-space);
    width: 360px;
    max-height: 400px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    overflow-y: auto;
    padding: 8px;
}

/* ============================================================
   MOBILE NAV OVERLAY / DRAWER
   Premium right-side drawer for mobile menu
   ============================================================ */

.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.mobile-nav-overlay.active {
    display: block;
}

/* Drawer shell */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    width: min(88vw, 380px);
    max-width: 380px;
    padding: 18px;
    background:
        radial-gradient(circle at top right, rgba(0, 117, 74, 0.12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    border-left: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: -20px 0 50px rgba(15, 23, 42, 0.24);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.mobile-nav.active {
    transform: translateX(0);
}

/* Top row: brand left, close right */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 6px 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

/* Drawer brand */
.mobile-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    text-decoration: none;
    font-size: 20px;
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.mobile-nav-brand .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eef7f2;
    color: var(--accent);
    font-size: 24px;
}

/* Close button */
.mobile-nav-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 14px;
    background: #ffffff;
    color: #0f172a;
    padding: 0;
    margin: 0;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: all 0.22s ease;
}

.mobile-nav-close:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
    transform: rotate(90deg) scale(1.03);
}

.mobile-nav-close .material-symbols-outlined {
    font-size: 24px;
    line-height: 1;
}

/* Menu item cards */
.mobile-nav a:not(.mobile-nav-brand) {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 58px;
    padding: 11px 13px;
    margin-bottom: 10px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
    transition: all 0.22s ease;
}

/* Icon boxes */
.mobile-nav a:not(.mobile-nav-brand) .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #f1f5f2;
    color: #64746b;
    font-size: 22px;
    transition: all 0.22s ease;
}

/* Hover state */
.mobile-nav a:not(.mobile-nav-brand):hover {
    background: #ffffff;
    border-color: rgba(148, 163, 184, 0.28);
    color: #0f172a;
    transform: translateX(-3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

.mobile-nav a:not(.mobile-nav-brand):hover .material-symbols-outlined {
    background: #e7f2ee;
    color: var(--accent);
}

/* Active item */
.mobile-nav a.active:not(.mobile-nav-brand) {
    background: linear-gradient(135deg, #dff3ec 0%, #eef8f4 100%);
    border-color: rgba(0, 117, 74, 0.18);
    color: var(--accent);
    box-shadow: 0 12px 24px rgba(0, 117, 74, 0.10);
}

.mobile-nav a.active:not(.mobile-nav-brand) .material-symbols-outlined {
    background: #ffffff;
    color: var(--accent);
}

/* Divider before utility links */
.mobile-nav-divider {
    height: 1px;
    margin: 18px 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(148, 163, 184, 0.45),
        transparent
    );
}

/* Main Website / Admin Panel */
.mobile-nav-divider ~ a {
    min-height: 54px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-nav-divider ~ a .material-symbols-outlined {
    background: #f2f6f3;
    color: var(--house-green);
}

.mobile-nav-divider ~ a:hover {
    background: #ffffff;
    border-color: rgba(0, 117, 74, 0.22);
}

/* Drawer scrollbar */
.mobile-nav::-webkit-scrollbar {
    width: 6px;
}

.mobile-nav::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-nav::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

/* Small mobile */
@media (max-width: 420px) {
    .mobile-nav {
        width: 88vw;
        padding: 16px;
    }

    .mobile-nav-header {
        padding: 6px 4px 16px;
    }

    .mobile-nav-brand {
        font-size: 18px;
    }

    .mobile-nav-brand .material-symbols-outlined,
    .mobile-nav-close,
    .mobile-nav a:not(.mobile-nav-brand) .material-symbols-outlined {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 20px;
    }

    .mobile-nav a:not(.mobile-nav-brand) {
        min-height: 54px;
        font-size: 15px;
        padding: 10px 12px;
    }
}

/* ============================================================
   MAIN LAYOUT
   Footer-based side spacing applied across the whole website
   ============================================================ */

.page-layout {
    display: flex;
    gap: 24px;
    min-height: calc(100vh - var(--header-height));
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: var(--site-side-space);
    padding-right: var(--site-side-space);
}

.main-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 32px 0;
}

/* ============================================================
   RIGHT SIDEBAR - MODERN CARD LAYOUT
   ============================================================ */

.right-sidebar {
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    padding: 24px 0 24px 20px;
    margin-right: 0;
    border-left: 1px solid var(--border);
    background: transparent;
    position: sticky;
    top: var(--header-height);
    height: auto;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
}

.right-sidebar::-webkit-scrollbar {
    width: 7px;
}

.right-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

/* Sidebar card base */
.right-sidebar .sidebar-card {
    display: block;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 22px;
    padding: 18px;
    margin: 0 0 18px 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
    box-sizing: border-box;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.right-sidebar .sidebar-card:hover {
    border-color: rgba(var(--accent-rgb), 0.32);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

/* Search card */
.right-sidebar .sidebar-search-card {
    padding: 16px;
}

.right-sidebar .sidebar-search-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.right-sidebar .sidebar-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: var(--text-muted);
    z-index: 2;
    pointer-events: none;
}

.right-sidebar .sidebar-search-input,
.right-sidebar #toolSearch {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 50px;
    border-radius: 999px;
    border: 1.5px solid rgba(148, 163, 184, 0.45);
    background: #f4f7fb;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.right-sidebar .sidebar-search-input::placeholder,
.right-sidebar #toolSearch::placeholder {
    color: rgba(100, 116, 139, 0.78);
}

.right-sidebar .sidebar-search-input:focus,
.right-sidebar #toolSearch:focus {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

/* Sidebar headings */
.right-sidebar .sidebar-heading-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.right-sidebar .sidebar-heading-row.compact {
    align-items: center;
    margin-bottom: 14px;
}

.right-sidebar .sidebar-heading-icon {
    flex: 0 0 auto;
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}

.right-sidebar .fire-icon {
    color: #ea580c;
}

.right-sidebar .bolt-icon {
    color: var(--accent);
}

.right-sidebar .sidebar-card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.right-sidebar .sidebar-card-subtitle {
    margin: 4px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* Trending tools */
.right-sidebar .sidebar-tool-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.right-sidebar .sidebar-tool-card {
    display: block;
    width: 100%;
    padding: 13px 14px;
    border-radius: 17px;
    background: linear-gradient(135deg, #f8fbff, #f1f7f3);
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    box-sizing: border-box;
}

.right-sidebar .sidebar-tool-card:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
    border-color: rgba(var(--accent-rgb), 0.45);
    background: linear-gradient(135deg, #ffffff, #eef7f3);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

.right-sidebar .sidebar-tool-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.right-sidebar .sidebar-tool-title {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.right-sidebar .sidebar-tool-arrow {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
    transition: transform 0.2s ease, color 0.2s ease;
}

.right-sidebar .sidebar-tool-card:hover .sidebar-tool-arrow {
    color: var(--accent);
    transform: translateX(3px);
}

/* Sidebar badges */
.right-sidebar .sidebar-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.right-sidebar .badge-popular {
    background: #e0f2fe;
    color: #0284c7;
}

.right-sidebar .badge-most-used {
    background: #dcfce7;
    color: #16a34a;
}

.right-sidebar .badge-choice {
    background: #f3e8ff;
    color: #9333ea;
}

.right-sidebar .badge-trending {
    background: #ffedd5;
    color: #ea580c;
}

.right-sidebar .badge-new-sidebar {
    background: #ffe4e6;
    color: #e11d48;
}

.right-sidebar .badge-top-pick {
    background: #fef3c7;
    color: #d97706;
}

.right-sidebar .badge-exam-favorite {
    background: #e0e7ff;
    color: #4f46e5;
}

.right-sidebar .sidebar-empty-message {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* Quick access */
.right-sidebar .quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.right-sidebar .quick-access-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid rgba(148, 163, 184, 0.36);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
    box-sizing: border-box;
}

.right-sidebar .quick-access-chip:hover {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Newsletter sidebar card */
.right-sidebar .sidebar-newsletter-card {
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.14), transparent 36%),
        linear-gradient(135deg, #ffffff, #f5f8ff);
}

.right-sidebar .newsletter-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.10);
    color: var(--accent);
    margin-bottom: 14px;
}

.right-sidebar .newsletter-icon-wrap .material-symbols-outlined {
    font-size: 23px;
}

.right-sidebar .newsletter-title {
    margin: 0 0 8px;
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 850;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.right-sidebar .newsletter-text {
    margin: 0 0 15px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.right-sidebar .sidebar-newsletter-form {
    margin: 0;
}

.right-sidebar .newsletter-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid rgba(148, 163, 184, 0.38);
    border-radius: 15px;
    background: #f4f7fb;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    margin: 0 0 10px;
    box-sizing: border-box;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.right-sidebar .newsletter-input::placeholder {
    color: rgba(100, 116, 139, 0.72);
}

.right-sidebar .newsletter-input:focus {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.right-sidebar .newsletter-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(var(--accent-rgb), 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.right-sidebar .newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(var(--accent-rgb), 0.28);
    filter: brightness(1.03);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    background: transparent;
    padding: 64px 0 48px;
    color: var(--text-primary);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    z-index: 1;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    z-index: 1;
}

.hero-3d-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.hero-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--heading-primary);
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.85;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat {
    text-align: left;
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.hero-stat-label {
    font-size: 13px;
    opacity: 0.8;
    margin-top: 4px;
    color: var(--text-on-dark-soft);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================================
   CATEGORY TABS / HOME FILTER PILLS
   Compact centered pill row, matching sidebar visual scale
   ============================================================ */

.category-tabs,
.tools-filter,
.category-filter,
.home-category-list,
.tool-category-list {
    width: 100%;
    max-width: 980px;
    margin: 0 auto 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.cat-tab,
.filter-chip,
.category-chip,
.tool-pill,
.category-tabs a,
.category-tabs button,
.tools-filter a,
.tools-filter button,
.category-filter a,
.category-filter button,
.home-category-list a,
.home-category-list button,
.tool-category-list a,
.tool-category-list button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: auto;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cat-tab .material-symbols-outlined,
.filter-chip .material-symbols-outlined,
.category-chip .material-symbols-outlined,
.tool-pill .material-symbols-outlined,
.category-tabs a .material-symbols-outlined,
.category-tabs button .material-symbols-outlined,
.tools-filter a .material-symbols-outlined,
.tools-filter button .material-symbols-outlined,
.category-filter a .material-symbols-outlined,
.category-filter button .material-symbols-outlined,
.home-category-list a .material-symbols-outlined,
.home-category-list button .material-symbols-outlined,
.tool-category-list a .material-symbols-outlined,
.tool-category-list button .material-symbols-outlined {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    color: currentColor;
}

.cat-tab:hover,
.filter-chip:hover,
.category-chip:hover,
.tool-pill:hover,
.category-tabs a:hover,
.category-tabs button:hover,
.tools-filter a:hover,
.tools-filter button:hover,
.category-filter a:hover,
.category-filter button:hover,
.home-category-list a:hover,
.home-category-list button:hover,
.tool-category-list a:hover,
.tool-category-list button:hover {
    border-color: rgba(var(--accent-rgb), 0.35);
    background: #ffffff;
    color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.cat-tab.active,
.filter-chip.active,
.category-chip.active,
.tool-pill.active,
.category-tabs a.active,
.category-tabs button.active,
.tools-filter a.active,
.tools-filter button.active,
.category-filter a.active,
.category-filter button.active,
.home-category-list a.active,
.home-category-list button.active,
.tool-category-list a.active,
.tool-category-list button.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.18);
}

@media (max-width: 768px) {
    .category-tabs,
    .tools-filter,
    .category-filter,
    .home-category-list,
    .tool-category-list {
        max-width: 100%;
        gap: 8px;
        margin-bottom: 22px;
    }

    .cat-tab,
    .filter-chip,
    .category-chip,
    .tool-pill,
    .category-tabs a,
    .category-tabs button,
    .tools-filter a,
    .tools-filter button,
    .category-filter a,
    .category-filter button,
    .home-category-list a,
    .home-category-list button,
    .tool-category-list a,
    .tool-category-list button {
        height: 38px;
        padding: 0 13px;
        font-size: 12px;
        gap: 6px;
    }

    .cat-tab .material-symbols-outlined,
    .filter-chip .material-symbols-outlined,
    .category-chip .material-symbols-outlined,
    .tool-pill .material-symbols-outlined,
    .category-tabs a .material-symbols-outlined,
    .category-tabs button .material-symbols-outlined,
    .tools-filter a .material-symbols-outlined,
    .tools-filter button .material-symbols-outlined,
    .category-filter a .material-symbols-outlined,
    .category-filter button .material-symbols-outlined,
    .home-category-list a .material-symbols-outlined,
    .home-category-list button .material-symbols-outlined,
    .tool-category-list a .material-symbols-outlined,
    .tool-category-list button .material-symbols-outlined {
        font-size: 15px;
        width: 15px;
        height: 15px;
    }
}

/* ============================================================
   TOOL CARDS GRID
   ============================================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 32px;
    align-items: stretch;
}

.tool-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    box-shadow: var(--shadow-sm);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 28px;
    background: var(--accent-light);
    color: var(--accent);
    transition: var(--transition);
    flex: 0 0 auto;
}

.tool-card-icon .material-symbols-outlined {
    font-size: 30px;
    line-height: 1;
    color: var(--accent);
}

.tool-card:hover .tool-card-icon {
    transform: scale(1.06);
}

.tool-card-icon.blue,
.tool-card-icon.green,
.tool-card-icon.purple,
.tool-card-icon.cyan {
    background: var(--accent-light);
    color: var(--accent);
}

.tool-card-icon.red {
    background: var(--red-light);
    color: var(--red);
}

.tool-card-icon.orange {
    background: var(--orange-light);
    color: #b77900;
}

.tool-card-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.tool-card-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 24px;
}

/* Badge wrapper supports both project class names */
.tool-card-badge,
.tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    width: fit-content;
    max-width: max-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;
    margin-top: auto;
}

/* Badge icon fix */
.tool-card-badge .material-symbols-outlined,
.tool-badge .material-symbols-outlined {
    font-size: 21px;
    width: 21px;
    height: 21px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 21px;
}

/* Badge color variants */
.badge-new,
.badge-ai {
    background: var(--accent-light);
    color: var(--accent);
}

.badge-new .material-symbols-outlined,
.badge-ai .material-symbols-outlined {
    color: var(--accent);
}

.badge-popular {
    background: var(--orange-light);
    color: #d99a00;
}

.badge-popular .material-symbols-outlined {
    color: var(--yellow);
}

/* ============================================================
   TOOL PAGE LAYOUT
   ============================================================ */

.tool-page-header {
    margin-bottom: 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb .sep {
    color: var(--text-muted);
}

.tool-page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--heading-primary);
    margin-bottom: 8px;
    letter-spacing: -0.16px;
}

.tool-page-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-workspace {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.tool-workspace-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-subtle);
}

.tool-workspace-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}

.tool-workspace-body {
    padding: 28px;
}

.tool-workspace-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid #d6dbde;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2333443d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.95);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary,
.btn-blue,
.btn-success {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.btn-primary:hover,
.btn-blue:hover,
.btn-success:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.3);
}

.btn-danger {
    background: var(--red);
    color: #fff;
    border: 1px solid var(--red);
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: rgba(0, 117, 74, 0.05);
}

.btn-lg {
    padding: 14px 40px;
    font-size: 16px;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 14px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ============================================================
   EMAIL SUBSCRIBE WIDGET
   ============================================================ */

.subscribe-widget {
    background: var(--house-green);
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
}

.subscribe-widget h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.subscribe-widget p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.subscribe-widget .sub-input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.subscribe-widget .sub-input::placeholder {
    color: rgba(255,255,255,0.6);
}

.subscribe-widget .sub-btn {
    width: 100%;
    padding: 10px;
    background: #fff;
    color: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-widget .sub-btn:hover {
    background: #e8f2ed;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1);
    max-width: 400px;
    color: #fff;
}

.toast-success,
.toast-info {
    background: var(--accent);
}

.toast-error {
    background: var(--red);
}

@keyframes toastIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

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

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-card) 100%);
    border-top: 1px solid var(--border);
    padding: 80px var(--site-side-space) 60px;
    margin-top: 80px;
    color: var(--text-secondary);
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.02);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    width: 100%;
    max-width: none;
    margin: 0;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.footer-socials a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.footer-bottom-bar {
    background: var(--bg-card);
    padding: 24px var(--site-side-space);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    gap: 18px;
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: var(--accent);
}


/* Footer newsletter form */
.footer-newsletter,
.footer-subscribe-form,
.footer-col form,
.site-footer form {
    width: 100%;
    max-width: 360px;
    margin: 18px 0 0;
}

.footer-newsletter-row,
.footer-subscribe-row,
.footer-col form .newsletter-row,
.site-footer form .newsletter-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.footer-newsletter input[type="email"],
.footer-subscribe-form input[type="email"],
.footer-col form input[type="email"],
.site-footer form input[type="email"] {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 0 15px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.footer-newsletter input[type="email"]::placeholder,
.footer-subscribe-form input[type="email"]::placeholder,
.footer-col form input[type="email"]::placeholder,
.site-footer form input[type="email"]::placeholder {
    color: rgba(51, 67, 61, 0.62);
}

.footer-newsletter input[type="email"]:focus,
.footer-subscribe-form input[type="email"]:focus,
.footer-col form input[type="email"]:focus,
.site-footer form input[type="email"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.footer-newsletter button,
.footer-subscribe-form button,
.footer-col form button,
.site-footer form button,
.footer-newsletter input[type="submit"],
.footer-subscribe-form input[type="submit"],
.footer-col form input[type="submit"],
.site-footer form input[type="submit"] {
    height: 46px;
    min-width: 118px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 9px 18px rgba(var(--accent-rgb), 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.footer-newsletter button:hover,
.footer-subscribe-form button:hover,
.footer-col form button:hover,
.site-footer form button:hover,
.footer-newsletter input[type="submit"]:hover,
.footer-subscribe-form input[type="submit"]:hover,
.footer-col form input[type="submit"]:hover,
.site-footer form input[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(var(--accent-rgb), 0.22);
}

.footer-newsletter-note,
.footer-col form + p,
.site-footer form + p {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.footer-newsletter-note .material-symbols-outlined,
.footer-col form + p .material-symbols-outlined,
.site-footer form + p .material-symbols-outlined {
    font-size: 16px;
    color: var(--accent);
}

@media (max-width: 576px) {
    .footer-newsletter-row,
    .footer-subscribe-row,
    .footer-col form .newsletter-row,
    .site-footer form .newsletter-row {
        flex-direction: column;
    }

    .footer-newsletter button,
    .footer-subscribe-form button,
    .footer-col form button,
    .site-footer form button,
    .footer-newsletter input[type="submit"],
    .footer-subscribe-form input[type="submit"],
    .footer-col form input[type="submit"],
    .site-footer form input[type="submit"] {
        width: 100%;
    }
}


/* ============================================================
   LOADING & EMPTY STATES
   ============================================================ */

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

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

@media (max-width: 1200px) {
    .page-layout {
        gap: 18px;
    }

    .right-sidebar {
        flex-basis: 330px;
        width: 330px;
        min-width: 330px;
        max-width: 330px;
        padding-left: 14px;
    }
}

@media (max-width: 1024px) {
    :root {
        --site-gutter: 18px;
    }

    .right-sidebar {
        display: none;
    }

    .page-layout {
        gap: 0;
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .top-header {
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
        gap: 14px;
    }

    .header-nav {
        gap: 4px;
        margin-right: 0;
    }

    .header-nav a {
        padding: 9px 12px;
        font-size: 14px;
    }

    .site-footer {
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
    }

    .footer-bottom-bar {
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    :root {
        --site-gutter: 14px;
    }

    .top-header {
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
    }

    .header-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .main-content {
        padding: 16px 0;
    }

    .hero-section {
        padding: 28px 20px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .tools-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .tool-card {
        padding: 18px;
        min-height: 220px;
    }

    .tool-card-icon {
        width: 58px;
        height: 58px;
        font-size: 24px;
        margin-bottom: 18px;
    }

    .tool-card-icon .material-symbols-outlined {
        font-size: 24px;
    }

    .tool-card-title {
        font-size: 18px;
    }

    .tool-card-desc {
        font-size: 14px;
    }

    .tool-page-title {
        font-size: 22px;
    }

    .category-tabs {
        gap: 6px;
    }

    .cat-tab {
        padding: 8px 12px;
        font-size: 12px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-footer {
        padding: 44px var(--site-side-space) 28px;
    }

    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 20px var(--site-side-space);
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

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

    .site-footer {
        padding: 40px var(--site-side-space) 24px;
    }
}

@media (max-width: 480px) {
    .page-layout {
        padding-left: var(--site-side-space);
        padding-right: var(--site-side-space);
    }

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

    .hero-section {
        flex-direction: column;
        padding: 32px 0;
        text-align: left;
    }

    .hero-visual {
        justify-content: flex-start;
        margin-top: 24px;
    }

    .hero-stat {
        text-align: left;
    }

    .hero-stats {
        justify-content: flex-start;
        width: 100%;
        gap: 24px;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 32px;
    }

    .site-footer {
        padding: 40px var(--site-side-space) 24px;
        border-top-left-radius: 24px;
        border-top-right-radius: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================================
   SEO CONTENT ARTICLE BLOCK
   ============================================================ */

.seo-article h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 28px 0 10px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.seo-article h2:first-child {
    margin-top: 0;
}

.seo-article p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.seo-article ul,
.seo-article ol {
    padding-left: 22px;
    margin-bottom: 14px;
}

.seo-article li {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.seo-article strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* ============================================================
   RELATED TOOLS GRID
   ============================================================ */

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.related-tool-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.related-tool-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.related-tool-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-tool-icon.blue { background: #e0f2fe; color: #0284c7; }
.related-tool-icon.red { background: #fee2e2; color: #dc2626; }
.related-tool-icon.green { background: #dcfce7; color: #16a34a; }
.related-tool-icon.orange { background: #ffedd5; color: #ea580c; }
.related-tool-icon.purple { background: #f3e8ff; color: #7c3aed; }
.related-tool-icon.cyan { background: #cffafe; color: #0891b2; }

.related-tool-icon .material-symbols-outlined {
    font-size: 20px;
}

.related-tool-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 4px;
}

.related-tool-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   VERSION 5 SMART TOOL INTELLIGENCE UI
   ============================================================ */
.tool-intelligence-panel{margin:24px 0 0}.tool-intelligence-card{display:flex;align-items:flex-start;gap:14px;padding:18px;background:linear-gradient(135deg,#fff 0%,#f3faf6 100%);border:1px solid rgba(var(--accent-rgb),.18);border-radius:18px;box-shadow:0 10px 24px rgba(15,23,42,.05)}.tool-intelligence-icon{width:42px;height:42px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 42px;background:var(--accent-light);color:var(--accent)}.tool-intelligence-icon .material-symbols-outlined{font-size:22px}.tool-intelligence-card h3{margin:0 0 6px;font-size:16px;font-weight:850;color:var(--text-primary)}.tool-intelligence-card p{margin:0 0 10px;font-size:13px;line-height:1.55;color:var(--text-secondary)}.tool-intelligence-pills{display:flex;flex-wrap:wrap;gap:8px}.tool-intelligence-pills span{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:999px;background:#fff;border:1px solid rgba(0,117,74,.16);color:var(--accent);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.02em}.related-tools-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.related-tool-card{display:flex;align-items:center;gap:12px;padding:14px;background:#fff;border:1px solid var(--border);border-radius:16px;color:inherit;text-decoration:none;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.related-tool-card:hover{transform:translateY(-2px);border-color:rgba(var(--accent-rgb),.35);box-shadow:0 10px 22px rgba(15,23,42,.06)}.related-tool-icon{width:40px;height:40px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;background:var(--accent-light);color:var(--accent)}.related-tool-name{font-size:14px;font-weight:800;color:var(--text-primary);margin-bottom:3px}.related-tool-desc{font-size:12px;color:var(--text-secondary);line-height:1.35}
