/**
 * Calculator Hub - Master Design System & Stylesheet v3.0
 * Modern, User-Friendly, High-Contrast Light & Dark Mode Design System
 * Features:
 * - Sticky Glassmorphic Navbar with Interactive Dark Mode Toggle
 * - Impactful Hero Section with Ambient Mesh Glow & Micro-animations
 * - Prominent, Keyboard-Accessible Quick Search Card
 * - Ultra-Clean Category, Calculator, Blog & Review Cards
 * - Informative & Trust-Focused Footer
 * - 100% Client-Side Calculator Engine UI Integration
 */

/* =============================================
   1. DESIGN TOKENS (LIGHT & DARK THEMES)
   ============================================= */
:root {
    /* Brand Primary & Accents */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --primary-rgb: 99, 102, 241;

    --accent: #ec4899;
    --accent-hover: #db2777;
    --accent-light: #fdf2f8;

    --success: #10b981;
    --warning: #f59e0b;
    --info: #06b6d4;
    --danger: #ef4444;

    /* Light Theme Neutral Surfaces */
    --body-bg: #f8f9fc;
    --section-surface: #f4f5fa;
    --card-bg: #ffffff;
    --card-border: #e2e4ef;
    --border-subtle: #eeeff6;

    /* Typography Colors */
    --text-main: #1e1e2f;
    --text-sub: #3f3f56;
    --text-muted: #6e6e87;
    --text-placeholder: #a0a0b8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #f97316 100%);
    --gradient-hero: linear-gradient(135deg, #f5f3ff 0%, #f0f7ff 50%, #fdf2f8 100%);
    --gradient-mesh: radial-gradient(ellipse at 15% 10%, rgba(99, 102, 241, 0.12) 0, transparent 55%),
                     radial-gradient(ellipse at 85% 20%, rgba(139, 92, 246, 0.10) 0, transparent 50%),
                     radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.08) 0, transparent 60%);

    /* Depth, Elevation & Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px -1px rgba(99, 102, 241, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(99, 102, 241, 0.09), 0 2px 8px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 48px -10px rgba(99, 102, 241, 0.15), 0 4px 16px -2px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.25);

    /* Radii */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================
   DARK MODE TOKEN OVERRIDES
   ============================================= */
[data-theme="dark"],
[data-bs-theme="dark"] {
    --body-bg: #0b0b14;
    --section-surface: #10101d;
    --card-bg: #151525;
    --card-border: #22223a;
    --border-subtle: #1c1c30;

    --text-main: #f1f2f8;
    --text-sub: #c8c9dc;
    --text-muted: #8d8ea7;
    --text-placeholder: #5c5d75;

    --primary-light: rgba(99, 102, 241, 0.16);
    --accent-light: rgba(236, 72, 153, 0.15);

    --gradient-hero: linear-gradient(135deg, #0e0e1a 0%, #131227 50%, #1a0f2b 100%);
    --gradient-mesh: radial-gradient(ellipse at 15% 10%, rgba(99, 102, 241, 0.20) 0, transparent 55%),
                     radial-gradient(ellipse at 85% 20%, rgba(139, 92, 246, 0.16) 0, transparent 50%),
                     radial-gradient(ellipse at 50% 90%, rgba(236, 72, 153, 0.12) 0, transparent 60%);

    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 48px -10px rgba(0, 0, 0, 0.65);
    --shadow-glow: 0 0 45px rgba(99, 102, 241, 0.35);
}

/* =============================================
   2. GLOBAL BASE & TYPOGRAPHY
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--body-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Space Grotesk for Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.font-heading, .navbar-brand {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

a {
    color: var(--primary);
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

.text-main { color: var(--text-main) !important; }
.text-sub { color: var(--text-sub) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-xs { font-size: 0.76rem; }
.border-subtle { border-color: var(--border-subtle) !important; }
.section-surface { background-color: var(--section-surface) !important; }
.section-card { background-color: var(--card-bg) !important; }

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--body-bg);
}
::-webkit-scrollbar-thumb {
    background: #c5c7d8;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #33334d;
}

/* =============================================
   3. STICKY NAVBAR & GLASSMORPHISM (AZPPS STYLE)
   ============================================= */
/* Top Announcement Bar */
.top-announcement-bar {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 50%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.announcement-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border-radius: var(--radius-full);
    padding: 0.15rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.announcement-link {
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: underline;
    transition: opacity 0.15s ease;
}
.announcement-link:hover {
    opacity: 0.85;
}
.btn-announcement-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    padding: 0 0.35rem;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease;
    line-height: 1;
}
.btn-announcement-close:hover {
    opacity: 1;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    z-index: 1040;
}

[data-theme="dark"] .navbar {
    background-color: rgba(15, 15, 26, 0.90) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
}
[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    display: flex;
    align-items: center;
    color: var(--text-main) !important;
}

.brand-subline {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    line-height: 1;
    margin-top: 1px;
}

/* Quick Category Shortcut Pills in Navbar (Inspired by azpps.com) */
.nav-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-sub) !important;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-category-pill:hover {
    border-color: var(--primary);
    color: var(--primary) !important;
    background: var(--primary-light);
    transform: translateY(-1px);
}

.nav-cta-btn {
    border-radius: var(--radius-full) !important;
    padding: 0.42rem 1.15rem !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.brand-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.38);
    margin-right: 0.6rem;
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}
.navbar-brand:hover .brand-icon-box {
    transform: rotate(-6deg) scale(1.05);
}

.brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 2px;
    margin-bottom: 6px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.8);
    animation: pulseDot 2.5s infinite ease-in-out;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px rgba(236, 72, 153, 1); }
}

.nav-link {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-sub) !important;
    padding: 0.45rem 0.85rem !important;
    border-radius: var(--radius-full);
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--primary-light);
}
.nav-link.active {
    color: var(--primary) !important;
    background-color: var(--primary-light);
    font-weight: 600;
}

/* Dropdown Menus */
.dropdown-menu {
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem;
    background: var(--card-bg);
}
.dropdown-item {
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.55rem 0.85rem;
    color: var(--text-sub);
    transition: var(--transition);
}
.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--primary-light);
    color: var(--primary);
    transform: translateX(3px);
}

/* Navbar Search Input */
.nav-search-form {
    min-width: 220px;
}
.navbar-search-input {
    background: var(--section-surface);
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    padding: 0.42rem 2.2rem 0.42rem 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
    width: 100%;
    outline: none;
}
.navbar-search-input::placeholder {
    color: var(--text-placeholder);
}
.navbar-search-input:focus {
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
}
.navbar-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}
.navbar-search-btn:hover {
    color: var(--primary);
}

/* =============================================
   4. DARK MODE TOGGLE BUTTON
   ============================================= */
.btn-theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--card-border);
    background: var(--section-surface);
    color: var(--text-sub);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    padding: 0;
}
.btn-theme-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(15deg);
}

/* Toggle Sun/Moon Icons */
.light-icon { display: none; }
.dark-icon { display: inline-block; }

[data-theme="dark"] .light-icon,
[data-bs-theme="dark"] .light-icon {
    display: inline-block;
    color: #fbbf24;
}
[data-theme="dark"] .dark-icon,
[data-bs-theme="dark"] .dark-icon {
    display: none;
}

/* =============================================
   5. IMPACTFUL HERO SECTION
   ============================================= */
.hero-section {
    background: var(--gradient-mesh), var(--gradient-hero);
    border-bottom: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

/* Ambient Glow Circle */
.hero-section::before {
    content: "";
    position: absolute;
    top: -120px;
    right: 12%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.16) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

/* Hero Top Eyebrow (as in azpps screenshot) */
.hero-top-eyebrow {
    position: relative;
    z-index: 2;
}
.eyebrow-line {
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
.eyebrow-text {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
}

/* Hero Glass Accent Shape (as in azpps screenshot) */
.hero-glass-accent {
    position: absolute;
    top: -20px;
    left: -15px;
    width: 140px;
    height: 140px;
    border-radius: 1.75rem;
    background: rgba(99, 102, 241, 0.04);
    border: 1.5px solid rgba(99, 102, 241, 0.16);
    pointer-events: none;
    z-index: 1;
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .hero-glass-accent {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.28);
}

/* Category Section Header Badge (as in azpps screenshot) */
.section-pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    background: #fdf2f8;
    border: 1px solid rgba(236, 72, 153, 0.25);
    color: #db2777;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
[data-theme="dark"] .section-pill-badge {
    background: rgba(236, 72, 153, 0.15);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.35);
}

.section-title-large {
    font-size: clamp(1.85rem, 3.2vw, 2.5rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0.95rem;
    background: var(--card-bg);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-full);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.1);
}
.hero-badge-sparkle {
    color: var(--primary);
    font-size: 0.9rem;
    animation: sparkleSpin 3s infinite ease-in-out;
}
@keyframes sparkleSpin {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.3) rotate(15deg); }
}
.hero-badge-text {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-headline {
    font-size: clamp(2.2rem, 4.6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--text-main);
}
.hero-headline-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 500px;
}

.hero-check-list {
    color: var(--text-sub);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.hero-stat {
    display: flex;
    flex-direction: column;
}
.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-family: 'Space Grotesk', system-ui, sans-serif;
}
.hero-stat-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--card-border);
    flex-shrink: 0;
}

/* =============================================
   6. PROMINENT HERO SEARCH CARD
   ============================================= */
.hero-search-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    padding: 2.2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hero-search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px -10px rgba(99, 102, 241, 0.2);
}

.hero-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}
.hero-card-subtitle {
    font-size: 0.86rem;
    color: var(--text-muted);
    margin-bottom: 1.4rem;
}

.hero-card-form {
    margin-bottom: 1.25rem;
}
.hero-card-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.hero-card-search-icon {
    position: absolute;
    left: 1.1rem;
    color: var(--text-placeholder);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 2;
}
.hero-card-input {
    width: 100%;
    height: 52px;
    padding-left: 2.9rem;
    padding-right: 7.2rem;
    border: 1.75px solid var(--card-border);
    border-radius: var(--radius-full);
    background: var(--section-surface);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.hero-card-input::placeholder {
    color: var(--text-placeholder);
}
.hero-card-input:focus {
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.hero-card-kbd {
    position: absolute;
    right: 5.6rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    pointer-events: none;
}
.hero-card-submit-btn {
    position: absolute;
    right: 4px;
    height: 44px;
    padding: 0 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
}

/* Standalone Search Wrapper (Used on 404, etc.) */
.hero-search-wrapper {
    max-width: 580px;
    margin: 0 auto;
    position: relative;
}
.hero-search-wrapper .hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-placeholder);
    font-size: 1.1rem;
    z-index: 2;
}
.hero-search-wrapper .hero-search-input {
    height: 52px;
    padding-left: 3rem;
    padding-right: 6.5rem;
    border-radius: var(--radius-full);
    border: 1.75px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-main);
}
.hero-search-wrapper .hero-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    height: 42px;
    padding: 0 1.25rem;
    border-radius: var(--radius-full);
}

.hero-card-section-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
}

/* Category Pills */
.hero-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--card-border);
    background: var(--section-surface);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.hero-cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* Trending Pills */
.hero-trend-pill {
    display: inline-block;
    padding: 0.32rem 0.8rem;
    border-radius: var(--radius-full);
    background: var(--section-surface);
    border: 1px solid var(--card-border);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.hero-trend-pill:hover {
    background: var(--primary-light);
    border-color: rgba(99, 102, 241, 0.35);
    color: var(--primary);
    transform: translateY(-1px);
}

/* =============================================
   7. TRUST FEATURES STRIP
   ============================================= */
.trust-features-strip {
    background: var(--card-bg);
}
.trust-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--section-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =============================================
   8. CLEAN CARDS DESIGN SYSTEM
   ============================================= */
.category-card {
    transition: var(--transition);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.4);
}
.category-card:hover .cat-browse-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

.category-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.9rem;
    transition: transform 0.2s ease;
}
.category-card:hover .category-icon-box {
    transform: scale(1.08);
}

/* Domain-Specific Pastels */
.cat-theme-finance      { background: #eef2ff; color: #6366f1; }
.cat-theme-health       { background: #ecfdf5; color: #10b981; }
.cat-theme-math         { background: #eff6ff; color: #3b82f6; }
.cat-theme-construction { background: #fff7ed; color: #f97316; }
.cat-theme-engineering  { background: #f5f3ff; color: #8b5cf6; }
.cat-theme-business     { background: #ecfeff; color: #06b6d4; }
.cat-theme-marketing    { background: #fdf2f8; color: #ec4899; }
.cat-theme-education    { background: #fffbeb; color: #d97706; }
.cat-theme-converters   { background: #f0fdf4; color: #22c55e; }
.cat-theme-technology   { background: #faf5ff; color: #a855f7; }
.cat-theme-everyday     { background: #fef2f2; color: #ef4444; }
.cat-theme-date-time    { background: #f1f5f9; color: #64748b; }

[data-theme="dark"] .cat-theme-finance      { background: rgba(99, 102, 241, 0.18); color: #818cf8; }
[data-theme="dark"] .cat-theme-health       { background: rgba(16, 185, 129, 0.18); color: #34d399; }
[data-theme="dark"] .cat-theme-math         { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
[data-theme="dark"] .cat-theme-construction { background: rgba(249, 115, 22, 0.18); color: #fb923c; }
[data-theme="dark"] .cat-theme-engineering  { background: rgba(139, 92, 246, 0.18); color: #a78bfa; }
[data-theme="dark"] .cat-theme-business     { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }
[data-theme="dark"] .cat-theme-marketing    { background: rgba(236, 72, 153, 0.18); color: #f472b6; }
[data-theme="dark"] .cat-theme-education    { background: rgba(217, 119, 6, 0.18); color: #fbbf24; }
[data-theme="dark"] .cat-theme-converters   { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
[data-theme="dark"] .cat-theme-technology   { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
[data-theme="dark"] .cat-theme-everyday     { background: rgba(239, 68, 68, 0.18); color: #f87171; }
[data-theme="dark"] .cat-theme-date-time    { background: rgba(100, 116, 139, 0.18); color: #94a3b8; }

.cat-browse-arrow {
    transition: transform 0.2s ease, color 0.2s ease;
    font-size: 0.88rem;
}

/* Calculator Card (.calc-card) */
.calc-card {
    transition: var(--transition);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: var(--card-bg);
}
.calc-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.calc-card h3 a, .calc-card h2 a, .calc-card h6 a {
    color: var(--text-main);
    transition: color 0.15s ease;
}
.calc-card:hover h3 a, .calc-card:hover h2 a, .calc-card:hover h6 a {
    color: var(--primary);
}

.badge-pill-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 600;
    background-color: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
}

/* Stats Highlight Banner */
.stats-highlight-banner {
    background: linear-gradient(135deg, #0e0e1a 0%, #15142a 50%, #1e1338 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.stat-banner-number {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    letter-spacing: -0.04em;
}

/* Blog Cards */
.blog-card-hero {
    background: var(--gradient-primary);
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   9. INTERACTIVE CALCULATOR TOOL STYLES
   ============================================= */
.calculator-tool-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
}
.calculator-form-side {
    background: var(--card-bg);
    border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
}
.calculator-result-side {
    background: var(--section-surface);
    border-left: 1px solid var(--card-border);
    border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
}
@media (max-width: 991.98px) {
    .calculator-form-side {
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    }
    .calculator-result-side {
        border-left: none;
        border-top: 1px solid var(--card-border);
        border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    }
}

.form-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-sub);
    margin-bottom: 0.35rem;
}
.form-control, .form-select {
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--card-border);
    background-color: var(--card-bg);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
    outline: none;
    background-color: var(--card-bg);
    color: var(--text-main);
}

.calculation-result-card {
    background: var(--card-bg);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}
.result-highlight-value {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

/* Primary and Outline Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
    transition: var(--transition);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}

.btn-outline-primary {
    color: var(--primary);
    border: 1.5px solid rgba(99, 102, 241, 0.4);
    background: var(--card-bg);
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Social Share Buttons */
.btn-social-share {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    transition: var(--transition);
}
.btn-social-share:hover {
    opacity: 0.9;
    transform: scale(1.08);
}
.btn-share-facebook { background-color: #1877f2; }
.btn-share-twitter { background-color: #000000; }
.btn-share-linkedin { background-color: #0a66c2; }
.btn-share-whatsapp { background-color: #25d366; }
.btn-share-copy { background-color: #64748b; }

/* Breadcrumbs */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-muted);
}

/* Accordion */
.accordion-item {
    border: 1px solid var(--card-border) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--card-bg);
}
.accordion-button {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    color: var(--text-main);
    padding: 1.1rem 1.25rem;
    background: var(--card-bg);
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Testimonials */
.testimonials-section {
    background: var(--section-surface);
    border-top: 1px solid var(--card-border);
}
.testi-header { max-width: 480px; }
.testi-badge {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.testi-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    border-radius: 50%;
    color: var(--primary);
    font-size: 0.75rem;
}
.testi-badge-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
}
.testi-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}
.testi-sub {
    font-size: 0.97rem;
    color: var(--text-muted);
    margin-bottom: 0;
}
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 991.98px) {
    .testi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
    .testi-grid { grid-template-columns: 1fr; }
}
.testi-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    transition: var(--transition);
}
.testi-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.testi-card-hidden {
    display: none !important;
}
.testi-card-visible {
    display: flex !important;
    animation: testiReveal 0.35s ease forwards;
}
@keyframes testiReveal {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.testi-stars {
    color: #f59e0b;
    font-size: 1.05rem;
    letter-spacing: 2px;
    line-height: 1;
}
.testi-quote {
    font-size: 0.9rem;
    color: var(--text-sub);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 0;
}
.testi-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
}
.testi-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ffffff;
}
.testi-av-purple  { background: #8b5cf6; }
.testi-av-blue    { background: #3b82f6; }
.testi-av-teal    { background: #14b8a6; }
.testi-av-indigo  { background: #6366f1; }
.testi-av-green   { background: #22c55e; }
.testi-av-orange  { background: #f97316; }

.testi-name {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.testi-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.testi-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--card-border);
    background: var(--card-bg);
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.testi-toggle-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

/* Newsletter Card */
.newsletter-card {
    background: var(--section-surface);
    border: 1px solid var(--card-border);
}

/* =============================================
   10. INFORMATIVE FOOTER
   ============================================= */
.site-footer {
    background-color: #0b0b14;
    color: #8b8b9e;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer h6 {
    color: #ffffff !important;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}
.site-footer a {
    color: #9f9fb5;
    text-decoration: none;
    transition: color 0.15s ease;
}
.site-footer a:hover {
    color: #ffffff;
}

.footer-trust-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a5b4fc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c0c0d2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.footer-social-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.footer-status-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.status-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
    animation: statusPulse 2s infinite ease-in-out;
}
@keyframes statusPulse {
    0%, 100% { opacity: 0.7; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: var(--transition);
    z-index: 1020;
}
.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.55);
    color: #ffffff;
}

/* =============================================
   11. PRINT RULES
   ============================================= */
@media print {
    .navbar, .site-footer, .back-to-top-btn, .btn-theme-toggle,
    .btn-social-share, #btnResetCalc, #calculatorSearchBox {
        display: none !important;
    }
    .calculator-tool-container, .calculation-result-card {
        border: none !important;
        box-shadow: none !important;
    }
}

/* =============================================
   12. BOOTSTRAP UTILITIES DARK MODE ADAPTATION
   ============================================= */
[data-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light {
    background-color: var(--section-surface) !important;
}

[data-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-dark {
    color: var(--text-main) !important;
}

[data-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-secondary {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end,
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
    border-color: var(--card-border) !important;
}

[data-theme="dark"] .card,
[data-bs-theme="dark"] .card {
    background-color: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .pagination .page-link,
[data-bs-theme="dark"] .pagination .page-link {
    background-color: var(--card-bg);
    border-color: var(--card-border);
    color: var(--text-sub);
}

[data-theme="dark"] .pagination .page-item.active .page-link,
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

[data-theme="dark"] .pagination .page-link:hover,
[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

[data-theme="dark"] .table,
[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--card-bg);
    --bs-table-color: var(--text-main);
    --bs-table-border-color: var(--card-border);
}

[data-theme="dark"] .btn-outline-secondary,
[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--text-sub);
    border-color: var(--card-border);
    background-color: var(--card-bg);
}
[data-theme="dark"] .btn-outline-secondary:hover,
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

