/* GenAI Style Theme */
body.page-tools {
    background-color: #f7f8fa;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
body.page-tools .navbar.navbar-white {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: none;
}

body.page-tools .navbar .navbar-brand {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-color: #0d9488;
    color: #fff;
    border-radius: 8px;
    font-size: 20px;
    text-align: center;
    line-height: 32px;
}

.navbar-brand-text .title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.navbar-brand-text .subtitle {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

body.page-tools .navbar .navbar-nav>li>a {
    color: #4b5563;
    font-weight: 500;
}

body.page-tools .navbar .navbar-nav>li>a:hover,
body.page-tools .navbar .navbar-nav>li>a:focus {
    color: #0d9488;
    background: transparent;
}

/* Main Content - Override to fix sticky sidebar */
body.page-tools main.content {
    padding: 0;
    overflow: visible;
}

/* Hero Section */
.tools-hero {
    padding: 60px 0 48px;
    text-align: center;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    margin: -24px -24px 40px -24px;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow: hidden;
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.tools-hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tools-hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* Section Heading */
.section-heading {
    margin-top: 48px;
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    text-align: left;
    padding-left: 12px;
    border-left: 4px solid #0d9488;
}

/* Tool Cards */
.tool-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488 0%, #14b8a6 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover,
.tool-card:focus {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(13, 148, 136, 0.12), 0 8px 16px -4px rgba(0, 0, 0, 0.06);
    border-color: #99f6e4;
    text-decoration: none;
}

.tool-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.tool-card-body {
    flex-grow: 1;
}

.tool-card-title {
    font-weight: 600;
    font-size: 17px;
    color: #1f2937;
    margin: 0 0 6px;
}

.tool-card-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.tool-card-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tool-card:hover .tool-card-arrow {
    color: #0d9488;
    transform: translateX(4px);
}

.tool-grid {
    margin-top: 16px;
}

.tool-grid .col-md-6 {
    margin-bottom: 16px;
}

/* General Panel/Detail Styles */
body.page-tools .panel {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

body.page-tools .panel-heading {
    display: none;
    /* Hide old panel heading */
}

body.page-tools .panel-body {
    padding: 24px;
}

/* Detail Page Header */
/* Detail Page Header */
.tool-detail-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.tool-detail-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    order: 1;
    /* Title first */
}

/* Wrapper for Title + Favorite button since they are in a div */
.tool-detail-head>div:nth-child(2) {
    order: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-detail-meta {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 0;
    order: 2;
    /* Meta second (right of title) */
    display: flex;
    align-items: center;
}

.tool-detail-meta::before {
    content: "|";
    margin-right: 12px;
    color: #e5e7eb;
}

.tool-detail-meta a {
    color: #6b7280;
    text-decoration: none;
}

.tool-detail-meta a:hover {
    color: #0d9488;
}

.tool-detail-desc {
    margin-top: 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 0;
    order: 3;
    /* Description last */
    width: 100%;
    /* Force new line */
}

/* Forms & Buttons */
body.page-tools .form-control {
    background-color: #fff;
    border: 1px solid #d1d5db;
    color: #1f2937;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    padding: 10px 12px;
    height: auto;
}

body.page-tools .form-control:focus {
    border-color: #99f6e4;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

body.page-tools .btn.btn-primary {
    background-color: #0d9488;
    border-color: #0d9488;
    color: #fff;
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 16px;
}

body.page-tools .btn.btn-primary:hover {
    background-color: #0f766e;
    border-color: #0f766e;
}

body.page-tools .btn.btn-default {
    background-color: #fff;
    border-color: #d1d5db;
    color: #374151;
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 16px;
}

body.page-tools .btn.btn-default:hover {
    background-color: #f9fafb;
    border-color: #adb5bd;
}

body.page-tools .input-group .input-group-btn .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Specific Tool Enhancements */
.case-result-item .input-group .form-control {
    background-color: #f9fafb;
}

#hash-output,
#ts-iso {
    background-color: #f9fafb;
}

/* Favorite Button */
.btn-favorite {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 16px;
    line-height: 34px;
    text-align: center;
    color: #9ca3af;
}

.btn-favorite:hover {
    color: #facc15;
    background-color: #fefce8;
}

.btn-favorite.active {
    color: #f59e0b;
    background-color: #fffbeb;
    border-color: #fde68a;
}

.btn-favorite.active .fa-star-o:before {
    content: "\f005";
    /* fa-star */
}

/* Knowledge Base Section */
.panel-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
}

.panel-body h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
}

.panel-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}

body.page-tools p {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}

/* Timestamp Tool Compact Layout Styles */
.tool-content .card-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-content .input-group-addon {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #4b5563;
    font-weight: 500;
    font-size: 13px;
    min-width: 60px;
    text-align: center;
}

.tool-content .input-group-sm .input-group-addon {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 50px;
}

.tool-content .input-group-sm .form-control {
    height: 30px;
    padding: 5px 10px;
    font-size: 13px;
}

.tool-content .input-group-sm .btn {
    padding: 5px 10px;
    font-size: 12px;
    height: 30px;
}

.tool-content .form-inline .form-control-sm {
    font-size: 13px;
    height: 30px;
}

.tool-content .form-inline .btn-sm {
    padding: 5px 12px;
    font-size: 13px;
}

.tool-content .form-inline>* {
    margin-bottom: 5px;
}

/* Button styles for timestamp tool */
#toggle-timestamp-update {
    white-space: nowrap;
}

.btn-copy {
    min-width: 36px;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .tools-hero {
        padding: 40px 20px 32px;
        margin: -15px -15px 30px -15px;
    }

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

    .tools-hero-subtitle {
        font-size: 16px;
    }

    .section-heading {
        font-size: 18px;
        margin-top: 32px;
        margin-bottom: 16px;
    }

    .tool-card {
        padding: 18px;
    }

    .tool-card-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

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

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

    .tool-grid .col-md-6 {
        margin-bottom: 12px;
    }
}

/* Loading Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.tool-card {
    animation: fadeInUp 0.4s ease-out;
}

.tool-grid .col-md-6:nth-child(1) .tool-card {
    animation-delay: 0.05s;
}

.tool-grid .col-md-6:nth-child(2) .tool-card {
    animation-delay: 0.1s;
}

.tool-grid .col-md-6:nth-child(3) .tool-card {
    animation-delay: 0.15s;
}

.tool-grid .col-md-6:nth-child(4) .tool-card {
    animation-delay: 0.2s;
}

.tool-grid .col-md-6:nth-child(5) .tool-card {
    animation-delay: 0.25s;
}

.tool-grid .col-md-6:nth-child(6) .tool-card {
    animation-delay: 0.3s;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Better Focus States */
.tool-card:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Category Tabs */
.category-tabs-container {
    margin: 32px 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    background: #f7f8fa;
    padding: 16px 0;
    margin-left: -15px;
    margin-right: -15px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 15px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

.category-tabs::-webkit-scrollbar {
    height: 6px;
}

.category-tabs::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.category-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.category-tab i {
    font-size: 16px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.category-tab:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}

.category-tab:hover i {
    color: #0d9488;
}

.category-tab.active {
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    border-color: #0d9488;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.category-tab.active i {
    color: #ffffff;
}

/* Tools Container */
.tools-container {
    margin-top: 24px;
}

.category-section {
    margin-bottom: 32px;
}

/* 3-column grid on large screens */
@media (min-width: 1200px) {
    .tool-grid .col-lg-4 {
        margin-bottom: 20px;
    }
}

/* Adjust animations for 3-column layout */
.tool-grid .col-lg-4:nth-child(7) .tool-card {
    animation-delay: 0.35s;
}

.tool-grid .col-lg-4:nth-child(8) .tool-card {
    animation-delay: 0.4s;
}

.tool-grid .col-lg-4:nth-child(9) .tool-card {
    animation-delay: 0.45s;
}

/* Search Box in Hero */
.tools-search-box {
    margin-top: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.tools-search-form {
    display: flex;
    gap: 0;
}

.tools-search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px 0 0 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tools-search-input:focus {
    outline: none;
    background: #ffffff;
}

.tools-search-input::placeholder {
    color: #9ca3af;
}

.tools-search-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 0 12px 12px 0;
    background: #0f766e;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tools-search-btn:hover {
    background: #115e59;
}

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.category-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: #0d9488;
    font-size: 20px;
}

.category-count {
    font-size: 14px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Category Section Spacing */
.category-section {
    margin-bottom: 48px;
}

.category-section:last-child {
    margin-bottom: 24px;
}

/* Markdown Content Styles */
.markdown-body h2 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.markdown-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 20px 0 10px 0;
}

.markdown-body p {
    margin: 0 0 12px 0;
    color: #4b5563;
}

.markdown-body ul {
    margin: 0 0 16px 0;
    padding-left: 20px;
}

.markdown-body li {
    margin: 4px 0;
    color: #4b5563;
}

.markdown-body strong {
    color: #111827;
    font-weight: 600;
}

.markdown-body code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #0d9488;
}

.markdown-body pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.markdown-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* ==========================================
   Sidebar Layout Styles
   ========================================== */

/* Page Container */
.tools-page-container {
    padding: 0;
}

.tools-page-container>.row {
    display: flex;
    flex-wrap: nowrap;
}

/* Sidebar Wrapper */
.tools-sidebar-wrapper {
    padding: 0;
    position: fixed;
    left: 0;
    top: 51px;
    width: 16.66667%;
    /* matches col-lg-2 */
    height: calc(100vh - 51px);
    z-index: 100;
    flex-shrink: 0;
}

/* Sidebar */
.tools-sidebar {
    height: 100%;
    /* overflow-y: auto;  removed, moved to content */
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
    flex-shrink: 0;
    /* Don't shrink */
    z-index: 10;
}

.header-title-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    flex: 1;
}

.header-title-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.sidebar-header i {
    font-size: 18px;
}

.sidebar-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

/* Sidebar Header Actions */
.sidebar-header-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.sidebar-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sidebar-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Content */
.sidebar-content {
    padding: 12px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

/* Sidebar Category */
.sidebar-category {
    margin-bottom: 2px;
    border-radius: 0;
}

.category-link,
.category-header-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.category-link:hover,
.category-header-link:hover {
    background: #f9fafb;
    color: #0d9488;
    text-decoration: none;
}

.category-link.active,
.category-header-link.active {
    background: #f0fdfa;
    color: #0d9488;
    border-left-color: #0d9488;
    font-weight: 600;
}

.category-link i,
.category-header-link i:first-child {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.tool-count {
    margin-left: auto;
    font-size: 11px;
    color: #6b7280;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Sidebar Tool List */
.sidebar-tool-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    /* Default hidden */
}

/* Removed CSS-based display block for expanded state to avoid jQuery conflict */
/* .sidebar-category.expanded .sidebar-tool-list { display: block; } */

/* Toggle Icon */
.toggle-icon {
    margin-left: 4px;
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
    /* Default pointing right (collapsed) */
}

/* Rotate icon when expanded */
.sidebar-category.expanded .toggle-icon {
    transform: rotate(0deg);
    /* Pointing down (expanded) */
}

.sidebar-tool-list li a {
    display: block;
    padding: 8px 16px 8px 44px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tool-list li a:hover {
    background: #f0fdfa;
    color: #0d9488;
    padding-left: 48px;
}

/* Main Content Area */
.tools-main-content {
    padding: 20px 30px;
    min-height: calc(100vh - 70px);
    background: #f7f8fa;
    margin-left: 16.66667%;
    /* matches sidebar width */
}

/* Topbar */
.tools-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-wrapper {
    flex: 1;
    max-width: 500px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-form:focus-within {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.search-icon {
    padding: 0 12px;
    color: #9ca3af;
    font-size: 14px;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 14px;
    background: transparent;
    color: #1f2937;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: 12px 20px;
    background: #0d9488;
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: #0f766e;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tools-count {
    font-size: 14px;
    color: #6b7280;
}

.tools-count strong {
    color: #0d9488;
}

/* Tools Grid Container */
.tools-grid-container {
    padding-bottom: 40px;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: #0d9488;
    font-size: 18px;
}

.section-count {
    font-size: 13px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
}

/* New Tool Grid using CSS Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Updated Tool Card for Grid */
.tools-grid .tool-card {
    margin-bottom: 0;
}

.tools-grid .tool-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.tools-grid .tool-info {
    flex: 1;
    min-width: 0;
}

.tools-grid .tool-name {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 4px;
}

.tools-grid .tool-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tools-grid .tool-arrow {
    color: #9ca3af;
    transition: all 0.2s ease;
}

.tools-grid .tool-card:hover .tool-arrow {
    color: #0d9488;
    transform: translateX(4px);
}

/* Category Section */
.category-section {
    margin-bottom: 40px;
    scroll-margin-top: 90px;
}

.category-section:last-child {
    margin-bottom: 20px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .tools-sidebar-wrapper {
        display: none;
    }

    .tools-sidebar-wrapper.show {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1050;
    }

    .tools-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .tools-sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .tools-main-content {
        padding: 20px 15px;
        margin-left: 0;
        /* reset for mobile since sidebar is hidden */
    }

    .tools-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .topbar-actions {
        justify-content: flex-end;
    }
}

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

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-title {
        font-size: 18px;
    }
}