/* ==========================================================================
   CalcHub — Premium Design System v3.0
   Modern, AdSense-Optimized, Ultra-Fast, Responsive
   ========================================================================== */

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

:root {
    /* Primary Brand Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;
    --primary-glow: rgba(99, 102, 241, 0.25);

    /* Accent Colors */
    --accent: #06b6d4;
    --accent-hover: #0891b2;
    --accent-light: #ecfeff;
    --green: #10b981;
    --green-light: #d1fae5;
    --amber: #f59e0b;
    --amber-light: #fef3c7;
    --red: #ef4444;
    --red-light: #fee2e2;

    /* Dark Backgrounds (main theme) */
    --bg-dark: #0b0f1a;
    --bg-card: #111827;
    --bg-card2: #141d2e;
    --bg-elevated: #1a2235;
    --bg-hover: #1e2a42;

    /* Surfaces for Light mode cards */
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --bg: #f1f5f9;
    --border: #e2e8f0;
    --border-focus: #6366f1;

    /* Dark mode surfaces */
    --border-dark: rgba(255,255,255,0.08);
    --border-dark-hover: rgba(99,102,241,0.4);

    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Dark Text Colors */
    --text-dark-main: #f1f5f9;
    --text-dark-muted: #94a3b8;
    --text-dark-light: #64748b;

    /* Secondary */
    --secondary: #0f172a;

    /* Status */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-primary: 0 8px 32px rgba(99,102,241,0.25);
    --shadow-glow: 0 0 40px rgba(99,102,241,0.15);

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

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

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

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

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* ==========================================================================
   Header & Navigation — Premium Dark Frosted Glass
   ========================================================================== */
.site-header {
    background: rgba(11, 15, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 4px 24px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
    flex-shrink: 0;
}

.logo span { color: var(--primary); }

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    transition: var(--transition);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99,102,241,0.12);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-header-search {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-dark);
    color: rgba(255,255,255,0.6);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-header-search:hover {
    border-color: rgba(99,102,241,0.5);
    color: var(--primary);
    background: rgba(99,102,241,0.08);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-dark);
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
    display: none;
    background: var(--bg-card);
    border-top: 1px solid var(--border-dark);
    padding: 1rem;
}

.mobile-nav-drawer.open { display: block; }
.mobile-nav-drawer .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

/* ==========================================================================
   AdSense Containers
   ========================================================================== */
.ad-slot-wrapper {
    margin: 1.5rem auto;
    text-align: center;
    max-width: 100%;
}

.ad-banner-box {
    background: var(--surface-2);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    display: inline-block;
    min-width: 300px;
}

.ad-tag {
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.06em;
}

.ad-content-slot {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 1.5rem 2rem;
}

.sticky-ad {
    position: sticky;
    top: 90px;
}

/* ==========================================================================
   Hero Section — Dark Gradient with Mesh
   ========================================================================== */
.hero-section {
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99,102,241,0.25) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 80% 60%, rgba(6,182,212,0.12) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 20% 80%, rgba(139,92,246,0.1) 0%, transparent 50%);
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: #ffffff;
    max-width: 860px;
    margin: 0 auto 1.25rem;
    position: relative;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.5);
    max-width: 620px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 400;
    position: relative;
}

/* Hero Live Search */
.hero-search-wrapper {
    max-width: 680px;
    margin: 0 auto 2rem;
    position: relative;
}

.hero-search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.35rem 0.35rem 1.25rem;
    box-shadow: 0 0 0 1px rgba(99,102,241,0), 0 8px 32px rgba(0,0,0,0.3);
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

.hero-search-form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2), 0 8px 32px rgba(0,0,0,0.3);
}

.search-icon {
    color: rgba(255,255,255,0.35);
    font-size: 1.05rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: #ffffff;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.hero-search-input::placeholder {
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
}

.hero-search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}

.hero-search-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    box-shadow: 0 6px 20px rgba(99,102,241,0.5);
    transform: translateY(-1px);
}

/* Live Search Suggestions */
.search-dropdown-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1100;
    display: none;
    text-align: left;
}

.search-result-item {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    cursor: pointer;
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
    background: rgba(99,102,241,0.08);
}

.search-result-info h4 {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.search-result-info p {
    font-size: 0.78rem;
    color: var(--text-dark-muted);
}

.search-result-cat {
    font-size: 0.7rem;
    font-weight: 600;
    color: #a5b4fc;
    background: rgba(99,102,241,0.15);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Category Quick Pills */
.hero-quick-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.hero-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.35rem 0.875rem;
    border-radius: var(--radius-full);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-tag:hover {
    color: #a5b4fc;
    border-color: rgba(99,102,241,0.4);
    background: rgba(99,102,241,0.1);
}

/* ==========================================================================
   Stats Bar
   ========================================================================== */
.stats-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-dark);
    padding: 1.25rem 0;
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.stat-icon.blue { background: rgba(99,102,241,0.15); color: #a5b4fc; }
.stat-icon.green { background: rgba(16,185,129,0.15); color: #6ee7b7; }
.stat-icon.amber { background: rgba(245,158,11,0.15); color: #fcd34d; }
.stat-icon.cyan { background: rgba(6,182,212,0.15); color: #67e8f9; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-dark-muted);
    font-weight: 500;
}

/* ==========================================================================
   Section Layouts
   ========================================================================== */
.section {
    padding: 5rem 0;
    background: var(--bg);
}

.section-dark {
    background: var(--bg-dark);
    padding: 5rem 0;
}

.section-card {
    background: var(--surface);
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-border);
}

.section-badge-dark {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #a5b4fc;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    background: rgba(99,102,241,0.15);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(99,102,241,0.3);
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.03em;
    margin-bottom: 0.875rem;
    line-height: 1.2;
}

.section-title-dark {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    margin-bottom: 0.875rem;
    line-height: 1.2;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.section-desc-dark {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
}

/* ==========================================================================
   Category Grid Cards
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition-spring);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-primary);
    border-color: var(--primary-border);
}

.category-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.category-card:hover .category-icon-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}

.category-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.category-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.category-link {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
}

/* ==========================================================================
   Calculator Cards
   ========================================================================== */
.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.calc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition-spring);
    box-shadow: var(--shadow-sm);
    position: relative;
    text-decoration: none;
    color: inherit;
}

.calc-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-primary);
    transform: translateY(-4px);
}

.calc-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.calc-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.calc-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex: 1;
    line-height: 1.5;
}

.calc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.btn-calc-use {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-calc-use:hover { color: var(--primary-hover); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
    font-family: inherit;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    box-shadow: 0 6px 20px rgba(99,102,241,0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--surface);
    color: var(--secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.btn-ghost:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
}

/* ==========================================================================
   Calculator Tool Page
   ========================================================================== */
.calc-page-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: start;
    padding: 2.5rem 0;
}

.calc-breadcrumb {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.calc-breadcrumb a { color: var(--text-muted); }
.calc-breadcrumb a:hover { color: var(--primary); }
.calc-breadcrumb span { color: var(--primary); font-weight: 600; }

.calc-tool-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.calc-tool-header {
    margin-bottom: 1.75rem;
}

.calc-tool-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.calc-tool-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Calculator Inputs */
.calc-inputs-section { margin-bottom: 1.5rem; }

.calc-field {
    margin-bottom: 1.25rem;
}

.calc-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

.calc-input, .calc-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.calc-input:focus, .calc-select:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}

.calc-input::placeholder { color: var(--text-light); }

/* Calculator Results */
.calc-result-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    border: 1.5px solid var(--primary-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.25rem;
    display: none;
}

.calc-result-box.visible { display: block; }

.calc-result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.calc-result-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.03em;
    font-family: var(--font-mono);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.calc-result-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.calc-error-box {
    background: var(--red-light);
    border: 1px solid rgba(239,68,68,0.25);
    color: #991b1b;
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    display: none;
    margin-top: 1rem;
}

.calc-error-box.visible { display: block; }

/* Calculator Content Sections */
.calc-content-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.calc-content-section h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-content-section h2 i { color: var(--primary); }

.calc-content-section p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.calc-content-section ol, .calc-content-section ul {
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.calc-content-section li { margin-bottom: 0.4rem; }

.formula-box {
    background: var(--bg-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #a5b4fc;
    overflow-x: auto;
}

/* ==========================================================================
   Blog Cards
   ========================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition-spring);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-border);
}

.blog-card-img {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
}

.blog-card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.05));
}

.blog-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-cat {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-light);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ==========================================================================
   Reviews / Testimonials
   ========================================================================== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.review-card {
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: var(--transition);
}

.review-card:hover {
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.review-stars {
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.review-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.review-author-info .name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
}

.review-author-info .role {
    font-size: 0.75rem;
    color: var(--text-dark-muted);
}

/* ==========================================================================
   Featured Calculators Horizontal Strip
   ========================================================================== */
.featured-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget-title i { color: var(--primary); }

.sidebar-link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link-list li a {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

.sidebar-link-list li a:hover { color: var(--primary); padding-left: 0.3rem; }

/* ==========================================================================
   Forms (Contact, Admin)
   ========================================================================== */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.4rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    background: var(--surface);
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.page-btn.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ==========================================================================
   Utility Tags & Badges
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-green { background: var(--green-light); color: #065f46; }
.badge-amber { background: var(--amber-light); color: #92400e; }
.badge-red { background: var(--red-light); color: #991b1b; }

/* ==========================================================================
   Footer — Dark premium
   ========================================================================== */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-dark);
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-dark-muted);
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-dark);
    color: rgba(255,255,255,0.5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-btn:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
    color: #a5b4fc;
}

.footer-col-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 1.25rem;
}

.footer-link-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-link-list a {
    font-size: 0.875rem;
    color: var(--text-dark-muted);
    transition: var(--transition);
}

.footer-link-list a:hover {
    color: #a5b4fc;
    padding-left: 0.3rem;
}

.footer-bottom {
    border-top: 1px solid var(--border-dark);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-dark-light);
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    font-size: 0.78rem;
    color: var(--text-dark-light);
}

.footer-legal-links a:hover {
    color: rgba(255,255,255,0.7);
}

/* ==========================================================================
   Admin Panel — Clean Professional
   ========================================================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
}

.admin-nav {
    padding: 1rem 0.75rem;
    flex: 1;
}

.admin-nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dark-light);
    padding: 0.875rem 0.75rem 0.375rem;
    margin-top: 0.5rem;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
    margin-bottom: 0.125rem;
    text-decoration: none;
}

.admin-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.9rem;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(99,102,241,0.12);
    color: #a5b4fc;
}

.admin-nav-link.active {
    background: rgba(99,102,241,0.18);
    color: #818cf8;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.admin-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Admin Stat Cards */
.admin-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.admin-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.admin-stat-icon.indigo { background: var(--primary-light); color: var(--primary); }
.admin-stat-icon.green { background: var(--green-light); color: var(--green); }
.admin-stat-icon.amber { background: var(--amber-light); color: var(--amber); }
.admin-stat-icon.cyan { background: var(--accent-light); color: var(--accent); }

.admin-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.03em;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Admin Table */
.admin-table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--bg);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: var(--bg); }

/* Admin Form Cards */
.admin-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.admin-form-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .calc-page-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .btn-header-search span { display: none; }
    .mobile-menu-btn { display: flex; }
    .hero-section { padding: 3.5rem 0 3rem; }
    .hero-title { font-size: 2.25rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-quick-tags { gap: 0.375rem; }
    .hero-tag { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
    .stats-grid { gap: 1.5rem; }
    .section, .section-dark, .section-card { padding: 3.5rem 0; }
    .section-title, .section-title-dark { font-size: 1.75rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-brand p { max-width: 100%; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-stats-row { grid-template-columns: repeat(2, 1fr); }
    .blog-grid, .calculators-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .categories-grid { grid-template-columns: 1fr; }
    .admin-stats-row { grid-template-columns: 1fr; }
    .hero-search-btn { padding: 0.75rem 1.25rem; font-size: 0.85rem; }
    .stats-grid { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }

/* Divider */
.divider {
    height: 1px;
    background: var(--border);
    margin: 2rem 0;
}

.divider-dark {
    height: 1px;
    background: var(--border-dark);
    margin: 2rem 0;
}

/* ==========================================================================
   Animations & Micro-interactions
   ========================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}

.animate-fadeInUp {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease infinite;
}

/* Scroll-to-top button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}

.scroll-top-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.45);
}

/* Alert / Notice Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-success { background: var(--green-light); color: #065f46; border: 1px solid rgba(16,185,129,0.2); }
.alert-error { background: var(--red-light); color: #991b1b; border: 1px solid rgba(239,68,68,0.2); }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid var(--primary-border); }
.alert-warning { background: var(--amber-light); color: #92400e; border: 1px solid rgba(245,158,11,0.2); }
