/* CalcHub Theme v2.0 — Fresh Light Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
    --ch-white:   #FFFFFF;
    --ch-gray-50: #F8FAFC;
    --ch-gray-100:#F1F5F9;
    --ch-gray-200:#E2E8F0;
    --ch-gray-400:#94A3B8;
    --ch-gray-500:#64748B;
    --ch-gray-700:#334155;
    --ch-gray-900:#0F172A;
    --ch-brand:   #6366F1;
    --ch-brand-l: #EEF2FF;
    --ch-font:    'Inter', -apple-system, sans-serif;
    --ch-radius:  12px;
    --ch-radius-sm: 8px;
    --ch-shadow:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --ch-shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

/* ── Base reset for plugin elements ── */
.ch-nav *, .ch-hero *, .ch-section *,
.ch-stats-section *, .ch-footer * {
    box-sizing: border-box;
    font-family: var(--ch-font);
    margin: 0; padding: 0;
}

/* ═══════════════════════════
   NAVBAR
═══════════════════════════ */
.ch-nav {
    background: var(--ch-white);
    border-bottom: 1px solid var(--ch-gray-200);
    position: sticky; top: 0; z-index: 999;
    box-shadow: var(--ch-shadow);
}
.ch-nav-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; gap: 8px;
    height: 62px;
}
.ch-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; flex-shrink: 0; margin-right: 16px;
}
.ch-logo-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--ch-brand-l);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.ch-logo-name {
    font-size: 18px; font-weight: 800; color: var(--ch-gray-900);
    letter-spacing: -.4px;
}
.ch-nav-links { display: flex; align-items: center; gap: 2px; flex: 1; }
.ch-nav-link {
    padding: 6px 14px; border-radius: 8px;
    font-size: 14px; font-weight: 500; color: var(--ch-gray-500);
    text-decoration: none; transition: background .13s, color .13s;
    white-space: nowrap;
}
.ch-nav-link:hover { background: var(--ch-gray-100); color: var(--ch-gray-900); }
.ch-nav-link.ch-active { background: var(--ch-brand-l); color: var(--ch-brand); font-weight: 600; }
.ch-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: 8px; margin-left: auto;
}
.ch-hamburger:hover { background: var(--ch-gray-100); }
.ch-hamburger span { display: block; width: 20px; height: 2px; background: var(--ch-gray-700); border-radius: 2px; }
@media(max-width: 700px) {
    .ch-nav-links {
        display: none; position: absolute; top: 62px; left: 0; right: 0;
        background: var(--ch-white); padding: 10px 16px 14px;
        flex-direction: column; align-items: stretch;
        border-bottom: 1px solid var(--ch-gray-200);
        box-shadow: var(--ch-shadow-md);
    }
    .ch-nav-links.ch-open { display: flex; }
    .ch-hamburger { display: flex; }
}

/* ═══════════════════════════
   HERO
═══════════════════════════ */
.ch-hero {
    background: linear-gradient(135deg, #F8F9FF 0%, #EEF2FF 50%, #F0FDF4 100%);
    padding: 60px 24px 56px;
    border-bottom: 1px solid var(--ch-gray-200);
}
.ch-hero-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.ch-hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--ch-white); border: 1px solid var(--ch-gray-200);
    border-radius: 20px; padding: 6px 16px; font-size: 13px;
    font-weight: 600; color: var(--ch-gray-700); margin-bottom: 20px;
    box-shadow: var(--ch-shadow);
}
.ch-hero-title {
    font-size: clamp(30px, 5vw, 48px); font-weight: 800;
    color: var(--ch-gray-900); letter-spacing: -1.5px; line-height: 1.1;
    margin-bottom: 14px;
}
.ch-hero-sub {
    font-size: 17px; color: var(--ch-gray-500); margin-bottom: 36px;
    line-height: 1.65;
}

/* Search */
.ch-search-wrap { position: relative; max-width: 520px; margin: 0 auto; }
.ch-search-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--ch-white); border: 1.5px solid var(--ch-gray-200);
    border-radius: 14px; padding: 13px 16px;
    box-shadow: var(--ch-shadow-md);
    transition: border-color .15s, box-shadow .15s;
}
.ch-search-box:focus-within {
    border-color: var(--ch-brand);
    box-shadow: 0 0 0 4px rgba(99,102,241,.1), var(--ch-shadow-md);
}
.ch-search-svg { flex-shrink: 0; }
.ch-search-input {
    flex: 1; border: none; outline: none;
    font-size: 15px; color: var(--ch-gray-900); background: none;
}
.ch-search-input::placeholder { color: var(--ch-gray-400); }
.ch-search-clear {
    background: none; border: none; cursor: pointer; color: var(--ch-gray-400);
    font-size: 14px; padding: 2px 4px; border-radius: 4px;
    display: none;
}
.ch-search-clear:hover { background: var(--ch-gray-100); color: var(--ch-gray-700); }
.ch-search-box.has-value .ch-search-clear { display: block; }
.ch-search-results {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--ch-white); border: 1px solid var(--ch-gray-200);
    border-radius: var(--ch-radius); box-shadow: var(--ch-shadow-md);
    z-index: 100; max-height: 340px; overflow-y: auto;
}
.ch-search-results.ch-open { display: block; }
.ch-sr-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px; text-decoration: none;
    border-bottom: 1px solid var(--ch-gray-100);
    transition: background .1s;
}
.ch-sr-item:last-child { border-bottom: none; }
.ch-sr-item:hover { background: var(--ch-gray-50); }
.ch-sr-name { font-size: 14px; font-weight: 600; color: var(--ch-gray-900); }
.ch-sr-cat { font-size: 12px; color: var(--ch-gray-400); margin-top: 1px; }
.ch-sr-arrow { font-size: 12px; color: var(--ch-gray-400); }
.ch-sr-empty { padding: 20px; text-align: center; font-size: 14px; color: var(--ch-gray-400); }

/* ═══════════════════════════
   SECTIONS
═══════════════════════════ */
.ch-section { padding: 52px 24px; background: var(--ch-white); }
.ch-section-alt { background: var(--ch-gray-50); }
.ch-section-inner { max-width: 1200px; margin: 0 auto; }
.ch-sec-hd {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.ch-sec-left { display: flex; align-items: center; gap: 14px; }
.ch-sec-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ch-sec-title { font-size: 20px; font-weight: 700; color: var(--ch-gray-900); }
.ch-sec-desc { font-size: 13px; color: var(--ch-gray-500); margin-top: 3px; }
.ch-cat-icon {
    width: 46px; height: 46px; border-radius: 12px; font-size: 22px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ch-badge {
    font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
}
.ch-view-all {
    font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.ch-view-all:hover { text-decoration: underline; }

/* Popular cards */
.ch-pop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.ch-pop-card {
    display: flex; align-items: center; gap: 10px;
    background: var(--ch-white); border: 1px solid var(--ch-gray-200);
    border-radius: var(--ch-radius-sm); padding: 12px 14px;
    text-decoration: none; transition: box-shadow .13s, border-color .13s, transform .1s;
}
.ch-pop-card:hover {
    border-color: #A5B4FC; box-shadow: var(--ch-shadow-md);
    transform: translateY(-1px);
}
.ch-pop-icon {
    width: 36px; height: 36px; border-radius: 8px; background: var(--ch-gray-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.ch-pop-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--ch-gray-900); }
.ch-pop-arrow { color: var(--ch-gray-400); flex-shrink: 0; transition: color .13s; }
.ch-pop-card:hover .ch-pop-arrow { color: var(--ch-brand); }

/* Calculator cards */
.ch-calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}
.ch-calc-card {
    background: var(--ch-white); border: 1px solid var(--ch-gray-200);
    border-radius: var(--ch-radius); padding: 18px 20px;
    text-decoration: none; display: flex; flex-direction: column; gap: 6px;
    transition: box-shadow .13s, border-color .13s, transform .12s;
}
.ch-calc-card:hover {
    border-color: var(--hover-border, #A5B4FC);
    box-shadow: var(--ch-shadow-md);
    transform: translateY(-2px);
}
.ch-calc-name { font-size: 14px; font-weight: 700; color: var(--ch-gray-900); }
.ch-calc-desc { font-size: 13px; color: var(--ch-gray-500); line-height: 1.5; flex: 1; }
.ch-calc-cta  { font-size: 13px; font-weight: 600; margin-top: 4px; }

/* Stats */
.ch-stats-section {
    background: var(--ch-brand);
    padding: 40px 24px;
}
.ch-stats-grid {
    max-width: 800px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
    text-align: center;
}
@media(max-width:560px){ .ch-stats-grid { grid-template-columns: repeat(2,1fr); gap: 16px; } }
.ch-stat-num { font-size: 32px; font-weight: 800; color: #fff; }
.ch-stat-lbl { font-size: 13px; color: rgba(255,255,255,.75); margin-top: 4px; font-family: var(--ch-font); }

/* ═══════════════════════════
   FOOTER
═══════════════════════════ */
.ch-footer {
    background: var(--ch-gray-900);
    padding: 52px 24px 24px;
}
.ch-footer-grid {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
    gap: 40px; margin-bottom: 40px;
}
@media(max-width:900px){ .ch-footer-grid { grid-template-columns: 1fr 1fr 1fr; } .ch-footer-brand { grid-column: 1/-1; } }
@media(max-width:560px){ .ch-footer-grid { grid-template-columns: 1fr 1fr; } }
.ch-footer-logo { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 10px; }
.ch-footer-tagline { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.6; max-width: 260px; margin-bottom: 12px; }
.ch-footer-copy { font-size: 12px; color: rgba(255,255,255,.3); }
.ch-footer-col-title { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px; }
.ch-footer-link { display: block; font-size: 13px; color: rgba(255,255,255,.6); text-decoration: none; margin-bottom: 9px; transition: color .13s; }
.ch-footer-link:hover { color: #fff; }
.ch-footer-bottom { max-width: 1200px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; font-size: 12px; color: rgba(255,255,255,.3); text-align: center; font-family: var(--ch-font); }
