/* ============================================================
   NextTool.online - Custom Stylesheet
   Author: NextTool.online Team
   Description: Main stylesheet for the NextTool.online website.
   Depends on: Bootstrap 5.3.2, Bootstrap Icons 1.11.1
   ============================================================ */

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
    --primary-color: #0F172A;
    /* Dark Navy */
    --accent-color: #2563EB;
    /* Blue */
    --accent-hover: #1d4ed8;
    --success-color: #10B981;
    /* Green */
    --bg-body: #F8FAFC;
    /* Light Gray Blue */
    --bg-card: #FFFFFF;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 8px;
    --radius-lg: 8px;

    --radius-md: 8px;
    --radius-lg: 8px;
}

/* ============================================================
   2. BASE / RESET
   ============================================================ */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.hero-title,
.page-hero-title,
.footer-title,
.widget-title,
.tool-card-name,
.tool-card h3,
.blog-post-title,
.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4,
.reddit-share-title,
.content-section-title,
.stat-number,
.contact-info-label {
    font-family: 'futura-pt', 'Inter', sans-serif;
}

a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* ============================================================
   3. HEADER / NAVBAR
   ============================================================ */
.navbar {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: none;
    /* Removed standard border for gradient */
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, background-color 0.2s ease;
    position: fixed;
    /* Ensuring position for ::after */
    width: 100%;
    top: 0;
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #870DD9, #A111C2, #D9298A, #f43f5e, #fb7185, #4f46e5);
    background-size: 200% 100%;
    animation: gradientShift 3s linear infinite;
    box-shadow: 0 1px 6px rgba(161, 17, 194, 0.25);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

.navbar-brand span {
    color: var(--accent-color);
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.btn-search-trigger {
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.4rem 0.8rem;
    background: transparent;
    cursor: pointer;
}

.btn-search-trigger:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* ============================================================ */

/* ============================================================
   4. LAYOUT & SIDEBAR
   ============================================================ */
.layout-wrapper {
    padding-top: 100px;
    /* Offset for fixed header */
    padding-bottom: 4rem;
}

.sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    /* Height of header + gap */
    z-index: 100;
}

.widget-box {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-body);
}

/* ============================================================
   5. SIDEBAR LISTS
   ============================================================ */
.category-list,
.tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.tools-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.tools-list a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.category-list a:hover,
.tools-list a:hover {
    color: var(--accent-color);
    transform: translateX(4px);
}

.badge-count {
    background-color: #eff6ff;
    color: var(--accent-color);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    font-weight: 600;
}

.sidebar-search .form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
}

.sidebar-search .form-control:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    border-color: var(--accent-color);
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    filter: blur(60px);
}

.hero-title {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    max-width: 600px;
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn-cta-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-cta-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ============================================================
   8. TOOL CARDS
   ============================================================ */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.25rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    z-index: 1;
}

/* Subtle top border gradient line */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #0ea5e9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    border-color: transparent;
}

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

.tool-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.btn-tool {
    width: 100%;
    padding: 0.6rem;
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-tool i {
    transition: transform 0.3s ease;
}

.tool-card:hover .btn-tool {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.tool-card:hover .btn-tool i {
    transform: translateX(4px);
}

/* ============================================================
   8b. INNER PAGE STYLES (About, Contact, Policy pages)
   ============================================================ */

/* Page Hero */
.page-hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    border-radius: var(--radius-lg);
    color: white;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 250px;
    height: 250px;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    filter: blur(50px);
}

.page-hero-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.page-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.page-hero-subtitle {
    color: #cbd5e1;
    font-size: 1rem;
    max-width: 550px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Content Card */
.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.content-card.bg-primary-soft {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.content-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-body);
}

/* Stat Cards (About page) */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Value Items (About page) */
.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
}

.value-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Contact Info Cards */
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.contact-info-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.contact-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    display: block;
    text-decoration: none;
}

.contact-info-value:hover {
    color: var(--accent-color);
}

/* Policy List */
.policy-list {
    padding-left: 1.25rem;
    color: var(--text-muted);
    line-height: 1.9;
}

.policy-list li {
    margin-bottom: 0.25rem;
}

/* Policy Table */
.policy-table th {
    font-size: 0.85rem;
    font-weight: 600;
}

.policy-table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* ============================================================
   8c. ALL TOOLS PAGE
   ============================================================ */

/* Stats bar */
.all-tools-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.all-tools-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.all-tools-stat strong {
    color: var(--primary-color);
    margin: 0 2px;
}

/* Filter buttons */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    border-radius: 99px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #eff6ff;
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.filter-count {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    font-size: 0.72rem;
    padding: 1px 6px;
    font-weight: 700;
}

.filter-btn:not(.active) .filter-count {
    background: var(--bg-body);
    color: var(--text-muted);
}

/* Search bar */
.all-tools-search .form-control {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
}

.all-tools-search .form-control:focus {
    box-shadow: none;
    border-color: var(--accent-color);
}

.all-tools-search .input-group {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.2s;
}

.all-tools-search .input-group:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.all-tools-search .input-group-text {
    border: none;
    background: white;
}

/* View toggle */
.view-toggle {
    display: flex;
    gap: 0.25rem;
}

.view-btn {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.view-btn.active,
.view-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Tool card name (h2 inside all-tools cards) */
.tool-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* List view layout */
#allToolsGrid.list-view .tool-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
}

#allToolsGrid.list-view .tool-card {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}

#allToolsGrid.list-view .tool-card-top {
    display: none;
}

#allToolsGrid.list-view .tool-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    width: 52px;
    height: 52px;
}

#allToolsGrid.list-view .tool-card-name {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

#allToolsGrid.list-view .tool-card p {
    margin-bottom: 0;
    font-size: 0.85rem;
}

#allToolsGrid.list-view .btn-tool {
    width: auto;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============================================================
   9. FOOTER
   ============================================================ */
.footer {
    background-color: var(--primary-color);
    color: #cbd5e1;
    padding: 4rem 0 2rem 0;
    margin-top: auto;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.social-icons a:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 2rem;
    font-size: 0.875rem;
    text-align: center;
}

/* ============================================================
   10. UTILITIES / BADGES
   ============================================================ */
.badge-new {
    background-color: var(--success-color);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Inline category label inside All Tools sidebar list */
.tool-list-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============================================================
   11. HERO STATS
   ============================================================ */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1;
    position: relative;
}

.hero-stat-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.hero-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hero-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   12. TOOL CARD — TOP ROW (category badge + hot badge)
   ============================================================ */
.tool-card-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}

/* Category badges */
.tool-category-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-finance {
    background: #eff6ff;
    color: #2563eb;
}

.badge-tax {
    background: #fffbeb;
    color: #d97706;
}

.badge-investment {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-business {
    background: #f0f9ff;
    color: #0284c7;
}

.badge-career {
    background: #f5f3ff;
    color: #7c3aed;
}

.badge-health {
    background: #fff1f2;
    color: #e11d48;
}

/* Hot / New badges on cards */
.badge-hot {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 99px;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
}

.badge-new-tool {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--success-color);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   13. TOOL ICON — COLOR VARIANTS PER NICHE
   ============================================================ */
.tool-icon-finance {
    background: #eff6ff;
    color: #2563eb;
}

.tool-icon-tax {
    background: #fffbeb;
    color: #d97706;
}

.tool-icon-investment {
    background: #f0fdf4;
    color: #16a34a;
}

.tool-icon-business {
    background: #f0f9ff;
    color: #0284c7;
}

.tool-icon-career {
    background: #f5f3ff;
    color: #7c3aed;
}

.tool-icon-health {
    background: #fff1f2;
    color: #e11d48;
}

/* ============================================================
   14. CATEGORY CHIP STRIP
   ============================================================ */
.category-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-color);
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.chip-finance {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.chip-tax {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.chip-investment {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.chip-business {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #bae6fd;
}

.chip-career {
    background: #f5f3ff;
    color: #7c3aed;
    border-color: #ddd6fe;
}

.chip-health {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}

.chip-finance:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.chip-tax:hover {
    background: #d97706;
    color: #fff;
    border-color: #d97706;
}

.chip-investment:hover {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.chip-business:hover {
    background: #0284c7;
    color: #fff;
    border-color: #0284c7;
}

.chip-career:hover {
    background: #7c3aed;
    color: #fff;
    border-color: #7c3aed;
}

.chip-health:hover {
    background: #e11d48;
    color: #fff;
    border-color: #e11d48;
}

/* ============================================================
   15. RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar-sticky {
        position: static;
        margin-bottom: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        margin-top: 1.5rem;
    }

    .hero-stat-item {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 767.98px) {

    /* ── Un-fix the navbar on mobile ──────────────────────────
       Fixed headers eat ~56px of precious mobile screen space
       and cause content to hide underneath on short viewports.
       On mobile the navbar scrolls naturally with the page.
    ───────────────────────────────────────────────────────── */
    .navbar.fixed-top {
        position: relative !important;
        top: auto !important;
    }

    /* Remove the offset padding — no longer needed */
    .layout-wrapper {
        padding-top: 1.5rem;
    }

    /* Give collapsed menu a visual separator */
    .navbar-collapse {
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    /* Compact nav links inside the collapsed drawer */
    .navbar .nav-link {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.95rem;
        border-bottom: 1px solid var(--border-color);
    }

    .navbar .nav-link:last-child {
        border-bottom: none;
    }

    /* Sidebar sticky already set to static below 992px */

    .tool-card {
        margin-bottom: 1rem;
    }

    .category-strip {
        gap: 0.4rem;
    }

    .category-chip {
        font-size: 0.78rem;
        padding: 0.35rem 0.75rem;
    }

    /* ── Hero title scale-down ── */
    .hero-title {
        font-size: 1.6rem;
    }

    /* ── Tool page H1 headings ── */
    h1.display-5,
    h1.display-4 {
        font-size: 1.55rem !important;
        line-height: 1.25 !important;
    }

    /* ── Content H2s (article headings) ── */
    h2.display-6,
    h2.display-5 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }

    /* ── Large result numbers ($0, 0.00%, etc.) ── */
    .display-1 {
        font-size: 2.5rem !important;
    }

    .display-2 {
        font-size: 2.2rem !important;
    }

    .display-3 {
        font-size: 1.9rem !important;
    }

    .display-4 {
        font-size: 1.6rem !important;
    }

    .display-5 {
        font-size: 1.4rem !important;
    }

    .display-6 {
        font-size: 1.15rem !important;
    }

    /* ── Lead / subtitle text ── */
    .lead {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* ── Page hero title ── */
    .page-hero-title {
        font-size: 1.5rem;
    }

    /* ── Blog hero title ── */
    .blog-hero-title {
        font-size: 1.35rem;
    }
}

/* Extra-small phones (<= 480px) — tighten further */
@media (max-width: 480px) {

    h1.display-5,
    h1.display-4 {
        font-size: 1.35rem !important;
    }

    .display-1 {
        font-size: 2rem !important;
    }

    .display-2 {
        font-size: 1.85rem !important;
    }

    .display-3 {
        font-size: 1.65rem !important;
    }

    .display-4 {
        font-size: 1.4rem !important;
    }

    .display-5 {
        font-size: 1.2rem !important;
    }

    .display-6 {
        font-size: 1.05rem !important;
    }

    /* Tighter padding on tool cards for small screens */
    .card-body.p-4 {
        padding: 1rem !important;
    }

    /* Keep hero readable but compact */
    .hero-section {
        padding: 1.75rem 1.25rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .page-hero-title {
        font-size: 1.3rem;
    }

    /* Navbar brand smaller on tiny screens */
    .navbar-brand {
        font-size: 1.2rem;
    }
}


/* ============================================================
   16. SKIP TO CONTENT LINK (Accessibility)
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 1rem;
    color: white;
}

/* ============================================================
   17. NAVBAR SCROLL STATE
   ============================================================ */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border-bottom-color: rgba(226, 232, 240, 0.8) !important;
}

/* ============================================================
   18. TOOL CARD ENTRANCE ANIMATION
   ============================================================ */
.card-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   19. FOOTER BRAND + EXTRAS
   ============================================================ */
.footer-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.footer-brand span {
    color: var(--accent-color);
}

.footer-about {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.footer-made {
    color: #64748b;
    font-size: 0.8rem;
}

.footer-bottom-note {
    color: #64748b;
    font-size: 0.82rem;
}

/* ============================================================
   20. PRINT STYLES
   ============================================================ */
@media print {

    .navbar,
    .sidebar-sticky,
    .footer,
    .btn-cta-primary,
    .btn-tool,
    .category-strip {
        display: none !important;
    }

    .layout-wrapper {
        padding-top: 0 !important;
    }

    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ============================================================
   13. BLOG STYLES
   ============================================================ */

/* ── Blog Hero ── */
.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #1e40af 100%);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    color: white;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 99px;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #93c5fd;
    margin-bottom: 1rem;
}

.blog-hero-title {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    color: white;
}

.blog-hero-sub {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Hero search */
.blog-hero-search-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px 4px 4px 14px;
    max-width: 480px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.blog-hero-search-icon {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-right: 8px;
    flex-shrink: 0;
}

.blog-hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-main);
    background: transparent;
    padding: 6px 0;
}

.blog-hero-search-input::placeholder {
    color: #94a3b8;
}

.blog-hero-search-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: calc(var(--radius-md) - 4px);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.blog-hero-search-btn:hover {
    background: #1d4ed8;
}

/* ── Category Filter Tabs ── */
.blog-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.blog-filter-tab:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #eff6ff;
}

.blog-filter-tab.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.blog-filter-count {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 99px;
    font-size: 0.68rem;
    padding: 1px 5px;
    font-weight: 700;
}

.blog-filter-tab:not(.active) .blog-filter-count {
    background: var(--bg-body);
    color: var(--text-muted);
}

/* ── Featured Post Card ── */
.blog-featured-card {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.blog-featured-left {
    width: 120px;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-featured-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.blog-featured-right {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-featured-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.blog-featured-title {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
}

.blog-featured-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-featured-title a:hover {
    color: var(--accent-color);
}

.blog-featured-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

.blog-featured-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

/* ── Blog Card Strip (replaces old header) ── */
.blog-card-strip {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    font-size: 1.1rem;
    color: white;
    gap: 0.5rem;
}

/* ── Blog Card Tags Row ── */
.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 1.25rem 0.75rem;
}

/* ── Empty State ── */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.blog-empty-icon {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.blog-empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-empty-sub {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

/* Responsive */
@media (max-width: 576px) {
    .blog-hero {
        padding: 2rem 1.25rem;
    }

    .blog-hero-title {
        font-size: 1.45rem;
    }

    .blog-featured-card {
        flex-direction: column;
    }

    .blog-featured-left {
        width: 100%;
        height: 80px;
    }

    .blog-featured-right {
        padding: 1.25rem;
    }
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.blog-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0;
}

.blog-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.blog-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.blog-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.blog-card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--accent-color);
}

.blog-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

.blog-card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.blog-read-more {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-color);
    text-decoration: none;
    white-space: nowrap;
    transition: gap 0.2s;
}

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

/* Active filter badge */
.blog-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: var(--accent-color);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
}

.blog-active-filter a {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
}

.blog-active-filter a:hover {
    opacity: 1;
}

/* ── Blog Post Detail ── */
.blog-post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.blog-post-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.blog-post-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.blog-post-excerpt {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.blog-post-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-post-banner-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

/* Post body typography */
.blog-post-body {
    padding: 2rem;
    line-height: 1.85;
    color: var(--text-main);
}

.blog-post-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--bg-body);
}

.blog-post-body p {
    margin-bottom: 1rem;
}

.blog-post-body ul,
.blog-post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.blog-post-body li {
    margin-bottom: 0.4rem;
}

.blog-post-body a {
    color: var(--accent-color);
    font-weight: 600;
}

.blog-post-body a:hover {
    color: var(--primary-color);
}

.blog-post-body table {
    margin-bottom: 1rem;
}

/* Formula box */
.blog-formula {
    background: #f1f5f9;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 0.9rem 1.25rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

/* Share bar */
.blog-share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-body);
}

.blog-share-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.blog-share-btns {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.blog-share-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.share-twitter {
    background: #000;
    color: white;
}

.share-linkedin {
    background: #0077b5;
    color: white;
}

.share-facebook {
    background: #1877f2;
    color: white;
}

/* Breadcrumb */
.blog-breadcrumb {
    font-size: 0.82rem;
    background: none;
    padding: 0;
    margin: 0;
}

.blog-breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    text-decoration: underline;
}

/* Prev / Next nav */
.blog-post-nav {
    margin-bottom: 2rem;
}

.blog-post-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.blog-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.blog-nav-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-nav-next {
    justify-content: flex-end;
    text-align: right;
}

.blog-nav-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.blog-nav-title {
    font-weight: 600;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* ── Blog Sidebar ── */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.category-list li:last-child a {
    border-bottom: none;
}

.category-list li a:hover {
    color: var(--accent-color);
}

.badge-count {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    color: var(--text-muted);
}

/* Recent posts list */
.blog-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-recent-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s;
}

.blog-recent-item:hover {
    color: var(--accent-color);
}

.blog-recent-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.blog-recent-title {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2px;
}

.blog-recent-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.blog-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.blog-tag:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

/* Responsive */
@media (max-width: 576px) {
    .blog-post-title {
        font-size: 1.35rem;
    }

    .blog-post-header,
    .blog-post-body {
        padding: 1.25rem;
    }

    .blog-share-bar {
        padding: 1rem 1.25rem;
    }

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

/* ============================================================
   REDDIT SHARE BAR & SIDEBAR WIDGET
   ============================================================ */

/* ── Share Bar (above footer) ── */
.reddit-share-bar {
    background: linear-gradient(135deg, #ff4500 0%, #ff6534 100%);
    padding: 1.25rem 0;
    color: white;
}

.reddit-share-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.reddit-share-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reddit-icon-lg {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    opacity: 0.95;
}

.reddit-share-title {
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.reddit-share-sub {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 2px;
}

.reddit-share-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-reddit-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #ff4500;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.55rem 1.25rem;
    border-radius: 99px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-reddit-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #cc3700;
}

.reddit-subreddits-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
}

.reddit-subreddits-hint a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reddit-subreddits-hint a:hover {
    color: rgba(255, 255, 255, 0.75);
}

/* ── Reddit Communities Sidebar Widget ── */
.reddit-widget .widget-title {
    color: #ff4500;
    border-bottom-color: #fff0eb;
}

.reddit-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.reddit-list li {
    margin-bottom: 0;
}

.reddit-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.15s ease;
}

.reddit-list li:last-child a {
    border-bottom: none;
}

.reddit-list a:hover {
    padding-left: 4px;
}

.reddit-sub {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ff4500;
}

.reddit-list a:hover .reddit-sub {
    color: #cc3700;
}

.reddit-members {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.reddit-tip {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #fff7f5;
    border: 1px solid #ffe0d6;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    margin: 0;
    line-height: 1.5;
}

/* ── Mobile: stack share bar vertically ── */
@media (max-width: 640px) {
    .reddit-share-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reddit-subreddits-hint {
        display: none;
        /* too cluttered on tiny screens */
    }

    .btn-reddit-share {
        width: 100%;
        justify-content: center;
    }
}