/*
Theme Name: FinCalc Pro
Theme URI: https://example.com/fincalc-pro
Author: FinCalc Team
Description: A professional financial calculator WordPress theme with 40+ calculators organized by category.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: fincalc-pro
*/

/* =============================================
   CSS VARIABLES & RESET
   ============================================= */
:root {
  /* ── Richnook brand colors — extracted from official wordmark ── */
  --brand-text:    #052f2d;   /* Dark teal-green: "RICHNO" letters */
  --accent:        #6ab22d;   /* Bright lime: "OK" + arrow in logo  */
  --accent-dark:   #4f8a1e;   /* Lime hover state                    */

  /* ── Theme palette derived from brand ── */
  --primary:       #2d7a2f;   /* Mid green — buttons, links          */
  --primary-dark:  #1f5c21;   /* Button hover                        */
  --primary-light: #eaf5ea;   /* Light green tint                    */
  --dark:          #072922;   /* Hero / footer background            */
  --dark-2:        #0d3a26;   /* Gradient mid                        */
  --dark-3:        #144d30;   /* Gradient light                      */
  --text:          #1a2e1b;   /* Body text                           */
  --text-muted:    #5a7a5b;   /* Secondary text                      */
  --text-light:    #8aaa8b;   /* Tertiary text                       */
  --border:        #d8ebd8;   /* Card borders                        */
  --border-2:      #c0dcc0;   /* Input borders                       */
  --bg:            #f4faf4;   /* Page background                     */
  --bg-card:       #ffffff;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(45,122,47,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:        0 4px 16px rgba(45,122,47,0.10);
  --shadow-lg:     0 12px 40px rgba(7,41,30,0.15);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --font-heading:  'Plus Jakarta Sans', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
  --transition:    0.2s ease;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
ul, ol { list-style: none; }

h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--text); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--white); border-bottom: 1px solid var(--border); height: var(--header-height); box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.site-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; color: var(--dark); }
.site-logo__icon { width: 36px; height: 36px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.site-logo span { color: var(--primary); }
.site-nav ul { display: flex; align-items: center; gap: 8px; }
.site-nav a { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); padding: 6px 14px; border-radius: 8px; transition: all var(--transition); }
.site-nav a:hover,.site-nav a.active { color: var(--primary); background: var(--primary-light); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 0.875rem; font-weight: 600; font-family: var(--font-body); cursor: pointer; transition: all var(--transition); border: none; }
.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,179,134,0.3); }
.btn--outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn--outline:hover { background: var(--primary-light); }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--sm { padding: 7px 14px; font-size: 0.8125rem; }

/* HERO */
.hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 60%, #0f4a2a 100%); padding: 72px 0 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 50%, rgba(106,173,40,0.10) 0%, transparent 65%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,179,134,0.15); border: 1px solid rgba(0,179,134,0.3); color: var(--primary); font-size: 0.8125rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; margin-bottom: 24px; }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: white; line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 1.0625rem; color: rgba(255,255,255,0.65); margin-bottom: 36px; line-height: 1.7; max-width: 520px; }
.hero-search { position: relative; max-width: 520px; }
.hero-search input { width: 100%; padding: 16px 20px 16px 52px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.08); backdrop-filter: blur(12px); color: white; font-size: 0.9375rem; outline: none; transition: all var(--transition); }
.hero-search input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search input:focus { border-color: var(--primary); background: rgba(255,255,255,0.12); box-shadow: 0 0 0 4px rgba(0,179,134,0.15); }
.hero-search__icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.4); pointer-events: none; }
.hero-stats { display: flex; gap: 40px; margin-top: 48px; }
.hero-stat__num { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 800; color: white; line-height: 1; }
.hero-stat__label { font-size: 0.8125rem; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* SEARCH RESULTS */
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; display: none; z-index: 100; max-height: 360px; overflow-y: auto; }
.search-results.active { display: block; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); text-decoration: none; color: var(--text); }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg); }
.search-result-item__icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.search-result-item__title { font-weight: 600; font-size: 0.875rem; }
.search-result-item__cat { font-size: 0.75rem; color: var(--text-muted); }

/* CATEGORY TABS */
.category-tabs { padding: 24px 0 0; background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: var(--header-height); z-index: 900; }
.tabs-scroll { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 0; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); background: transparent; border: none; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: all var(--transition); font-family: var(--font-body); margin-bottom: -1px; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn__count { background: rgba(0,179,134,0.12); color: var(--primary); font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

/* CALCULATORS GRID */
.calculators-section { padding: 48px 0 80px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.section-title { font-size: 1.25rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.calc-group { margin-bottom: 56px; display: none; }
.calc-group.visible { display: block; }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* CALCULATOR CARD */
.calc-card { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--border); padding: 20px; display: flex; align-items: flex-start; gap: 14px; cursor: pointer; transition: all var(--transition); text-decoration: none; color: var(--text); position: relative; overflow: hidden; }
.calc-card::before { content: ''; position: absolute; inset: 0; background: var(--primary-light); opacity: 0; transition: opacity var(--transition); }
.calc-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(0,179,134,0.12); transform: translateY(-2px); }
.calc-card:hover::before { opacity: 1; }
.calc-card:hover .calc-card__arrow { opacity: 1; transform: translateX(0); }
.calc-card__icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; position: relative; z-index: 1; }
.calc-card__body { flex: 1; position: relative; z-index: 1; }
.calc-card__title { font-size: 0.9375rem; font-weight: 700; color: var(--text); margin-bottom: 4px; transition: color var(--transition); }
.calc-card:hover .calc-card__title { color: var(--primary); }
.calc-card__desc { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; }
.calc-card__arrow { opacity: 0; transform: translateX(-4px); transition: all var(--transition); color: var(--primary); position: relative; z-index: 1; flex-shrink: 0; margin-top: 2px; }

/* Category themes */
.theme-loan .calc-card__icon { background: #fff3e0; color: #e67e22; }
.theme-investment .calc-card__icon { background: #e8f5e9; color: #27ae60; }
.theme-tax .calc-card__icon { background: #fce4ec; color: #e91e63; }
.theme-retirement .calc-card__icon { background: #e8eaf6; color: #5c6bc0; }
.theme-salary .calc-card__icon { background: #e0f7fa; color: #00acc1; }
.theme-general .calc-card__icon { background: #f3e5f5; color: #9c27b0; }

/* POPULAR */
.popular-section { background: var(--white); padding: 48px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.popular-section h2 { font-size: 1.25rem; margin-bottom: 20px; }
.popular-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.popular-item { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 0.875rem; font-weight: 500; transition: all var(--transition); }
.popular-item:hover { background: var(--primary-light); border-color: rgba(0,179,134,0.3); color: var(--primary); }
.popular-item__icon { font-size: 1.1rem; }

/* CALC PAGE */
.calc-page-header { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); padding: 48px 0 72px; position: relative; overflow: hidden; }
.calc-page-header::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 50%, rgba(106,173,40,0.10) 0%, transparent 60%); }
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 0.8125rem; position: relative; z-index: 1; }
.breadcrumb a { color: rgba(255,255,255,0.5); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: rgba(255,255,255,0.25); }
.breadcrumb strong { color: white; font-weight: 600; }
.calc-page-title { position: relative; z-index: 1; }
.calc-page-title h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; color: white; margin-bottom: 12px; letter-spacing: -0.02em; }
.calc-page-title p { color: rgba(255,255,255,0.6); font-size: 1rem; max-width: 560px; line-height: 1.7; }

/* CALC LAYOUT */
.calc-page { padding: 0 0 80px; }
.calc-layout { display: grid; grid-template-columns: 1fr 380px; gap: 28px; margin-top: -40px; position: relative; z-index: 10; }

/* CALC WIDGET */
.calc-widget { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--border); overflow: hidden; }
.calc-widget__tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--bg); }
.calc-widget__tab { flex: 1; padding: 14px 16px; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all var(--transition); text-align: center; border-bottom: 2px solid transparent; background: transparent; border-right: 1px solid var(--border); font-family: var(--font-body); }
.calc-widget__tab:last-child { border-right: none; }
.calc-widget__tab.active { color: var(--primary); background: var(--white); border-bottom-color: var(--primary); }
.calc-widget__body { padding: 28px; }
.form-group { margin-bottom: 24px; }
.form-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.form-label__text { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.form-label__value { font-family: var(--font-heading); font-size: 1rem; font-weight: 700; color: var(--primary); }
.range-input { width: 100%; -webkit-appearance: none; height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--primary) 0%, var(--primary) var(--val, 50%), var(--border-2) var(--val, 50%)); outline: none; cursor: pointer; margin-top: 4px; }
.range-input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: white; border: 3px solid var(--primary); box-shadow: 0 2px 8px rgba(0,179,134,0.3); }
.range-input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: white; border: 3px solid var(--primary); box-shadow: 0 2px 8px rgba(0,179,134,0.3); cursor: pointer; }
.input-field { position: relative; margin-top: 10px; }
.input-field input { width: 100%; padding: 10px 14px 10px 36px; border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); font-size: 0.9375rem; font-weight: 600; color: var(--text); outline: none; transition: all var(--transition); background: var(--bg); }
.input-field input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(0,179,134,0.1); }
.input-field__prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 0.875rem; font-weight: 600; color: var(--text-muted); }

/* RESULT PANEL */
.result-panel { background: linear-gradient(135deg, var(--dark), var(--dark-2)); border-radius: var(--radius-lg); padding: 28px; color: white; }
.result-panel h3 { font-size: 0.8125rem; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.result-main { margin-bottom: 24px; }
.result-main__label { font-size: 0.8125rem; color: rgba(255,255,255,0.5); margin-bottom: 6px; }
.result-main__value { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.result-breakdown { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.result-row { display: flex; align-items: center; justify-content: space-between; }
.result-row__label { font-size: 0.8125rem; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 8px; }
.result-row__dot { width: 8px; height: 8px; border-radius: 50%; }
.result-row__val { font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 700; color: white; }

/* DONUT */
.donut-wrap { display: flex; justify-content: center; margin: 24px 0; position: relative; }
.donut-wrap svg { transform: rotate(-90deg); }
.donut-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.donut-center__label { font-size: 0.7rem; color: rgba(255,255,255,0.45); text-transform: uppercase; letter-spacing: 0.08em; }
.donut-center__val { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; color: white; }

/* SIDEBAR */
.calc-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.sidebar-card h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); text-decoration: none; color: var(--text); font-size: 0.875rem; font-weight: 500; transition: all var(--transition); border: 1px solid transparent; }
.related-item:hover { border-color: rgba(0,179,134,0.3); background: var(--primary-light); color: var(--primary); }

/* INFO */
.calc-info { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 32px; margin-top: 8px; }
.calc-info h2 { font-size: 1.25rem; margin-bottom: 14px; }
.calc-info p { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 16px; }
.calc-info h3 { font-size: 1rem; margin: 24px 0 10px; }
.formula-box { background: var(--dark); border-radius: 10px; padding: 20px 24px; font-family: var(--font-mono); font-size: 0.9375rem; color: var(--primary); margin: 16px 0; letter-spacing: 0.02em; border: 1px solid rgba(0,179,134,0.2); }

/* CALC BUTTON */
.calc-btn { width: 100%; padding: 16px; background: var(--primary); color: white; font-size: 1rem; font-weight: 700; border-radius: var(--radius-sm); border: none; cursor: pointer; transition: all var(--transition); font-family: var(--font-heading); display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.calc-btn:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(0,179,134,0.35); transform: translateY(-1px); }

/* FOOTER */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.7); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand p { font-size: 0.875rem; line-height: 1.7; color: rgba(255,255,255,0.5); margin-top: 16px; max-width: 300px; }
.footer-col h5 { font-size: 0.8125rem; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.55); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; font-size: 0.8125rem; color: rgba(255,255,255,0.3); }

/* BADGE */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge--green { background: var(--primary-light); color: var(--primary); }

/* =============================================
   LOGO — image-based
   ============================================= */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--dark);
    text-decoration: none;
}
.site-logo__img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.site-logo__name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--brand-text);    /* dark teal — "RICHNO" */
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
/* The "OK" portion in lime green matching the logo's arrow accent */
.site-logo__ok {
    color: var(--accent);
    font-weight: 800;
}
.footer-logo { text-decoration: none; display: flex; align-items: center; gap: 12px; }
.footer-logo .site-logo__img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.footer-logo .site-logo__name { color: white; font-size: 1.2rem; }
.footer-logo .site-logo__ok   { color: var(--accent); }

/* =============================================
   BREADCRUMB — clean single-line UI
   ============================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    overflow: hidden;
}
.breadcrumb a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color var(--transition);
    white-space: nowrap;
    padding: 3px 0;
    flex-shrink: 0;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-hidden] {
    color: rgba(255,255,255,0.3);
    margin: 0 8px;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.breadcrumb strong {
    color: white;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   MOBILE HAMBURGER + MENU
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}
.hamburger span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.25s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 8px 0;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li a { display: block; padding: 13px 24px; font-size: 0.9375rem; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.mobile-menu li:last-child a { border-bottom: none; }
.mobile-menu li a:hover { background: var(--primary-light); color: var(--primary); }

/* =============================================
   LOADING STATE
   ============================================= */
.calc-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-muted); gap: 12px; }
.calc-loading__icon { font-size: 3rem; animation: pulse 1.6s ease-in-out infinite; }
.calc-loading__text { font-size: 0.9375rem; color: var(--text-muted); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.95)} }

/* =============================================
   MOBILE RESULT PANEL
   ============================================= */
.result-panel--mobile { display: none; }
.result-panel--desktop { display: none; }

/* =============================================
   SOCIAL ICONS
   ============================================= */
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.footer-social__link { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); transition: all var(--transition); text-decoration: none; border: 1px solid rgba(255,255,255,0.08); }
.footer-social__link:hover { transform: translateY(-2px); color: white; }
.footer-social__link--facebook:hover  { background:#1877f2; border-color:#1877f2; }
.footer-social__link--twitter:hover   { background:#000; border-color:#000; }
.footer-social__link--instagram:hover { background:#d6249f; border-color:#d6249f; }
.footer-social__link--youtube:hover   { background:#ff0000; border-color:#ff0000; }
.footer-social__link--linkedin:hover  { background:#0a66c2; border-color:#0a66c2; }
.footer-social__link--telegram:hover  { background:#229ed9; border-color:#229ed9; }
.footer-social__link--whatsapp:hover  { background:#25d366; border-color:#25d366; }
.footer-social__link--pinterest:hover { background:#e60023; border-color:#e60023; }
.footer-bottom__links { display: flex; gap: 20px; }
.footer-bottom__links a { color: rgba(255,255,255,0.3); font-size:.8125rem; transition: color var(--transition); }
.footer-bottom__links a:hover { color: var(--primary); }

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 0.4s ease both; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .calc-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-nav { display: none; }
    .header-cta { display: none; }
    .hamburger { display: flex; }
    .hero { padding: 48px 0 56px; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .calc-grid { grid-template-columns: 1fr; }
    .popular-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
    .footer-bottom__links { justify-content: center; flex-wrap: wrap; gap: 12px; }

    /* Breadcrumb: allow wrapping, truncate last item */
    .breadcrumb { flex-wrap: wrap; overflow: visible; }
    .breadcrumb strong { max-width: 150px; }
    .breadcrumb span[aria-hidden] { margin: 0 5px; }

    /* Mobile result panel */
    .result-panel--mobile  { display: block !important; margin-top: 20px; }
    .result-panel--desktop { display: none !important; }

    /* Mobile layout */
    .calc-layout { display: flex; flex-direction: column; }
    .calc-main-col { order: 1; }
    .calc-sidebar  { order: 2; display: flex; flex-direction: column; }
    .calc-sidebar .result-panel--desktop { display: none !important; }

    /* Sidebar card order on mobile: How to Use first, Related second, Disclaimer last */
    .sidebar-card--how-to-use  { order: 1; }
    .sidebar-card--related     { order: 2; }
    .sidebar-card--disclaimer  { order: 3; }

    .calc-page-header { padding: 32px 0 48px; }
    .calc-page-title h1 { font-size: 1.5rem; }
}

@media (min-width: 769px) {
    .result-panel--mobile  { display: none !important; }
    .result-panel--desktop { display: block; }
    .mobile-menu { display: none !important; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .popular-grid { grid-template-columns: 1fr; }
    .footer-social { gap: 8px; }
    .breadcrumb strong { max-width: 110px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }


/* =============================================
   BANK EMI CALCULATOR — rate badge
   ============================================= */
.bank-rate-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1.5px solid rgba(45,122,47,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.bank-rate-badge strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

/* =============================================
   BANK COMPARISON TABLE hover
   ============================================= */
.rate-highlight {
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .875rem;
}

/* =============================================
   LOAN SUBSECTIONS
   ============================================= */
.loan-subsection {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.loan-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.loan-subsection__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.loan-subsection__icon {
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.loan-subsection__title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.loan-subsection__count {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

/* ── Bank Rate Strip (top 5 lowest rates) ── */
.bank-rate-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.bank-rate-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.8125rem;
    transition: all var(--transition);
    white-space: nowrap;
}
.bank-rate-chip:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.bank-rate-chip__name {
    font-weight: 600;
}
.bank-rate-chip__rate {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.75rem;
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 10px;
}
.bank-rate-chip:hover .bank-rate-chip__rate {
    background: rgba(45,122,47,0.15);
}
.bank-rate-strip__label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-left: 4px;
}

/* ── Show More button ── */
.show-more-btn {
    font-size: 0.875rem;
    padding: 10px 24px;
    border-radius: 20px;
    gap: 6px;
}
.show-more-btn svg {
    transition: transform var(--transition);
}

/* =============================================
   BANK CALC — page header rate badge
   ============================================= */
.calc-page-header__rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(106,178,45,0.15);
    border: 1px solid rgba(106,178,45,0.35);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.7);
    margin-top: 14px;
}
.calc-page-header__rate-badge strong {
    color: #7ed321;
    font-weight: 700;
    font-size: 1rem;
}
.rate-badge-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-left: 4px;
}

/* =============================================
   RELATED ITEM — rate chip
   ============================================= */
.related-item__text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
}
.related-item__rate {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 7px;
    border-radius: 10px;
    flex-shrink: 0;
}
