/*
  ============================================================
  OnlineConvers — Homepage Design System
  File: homepage.css
  Description: Standalone stylesheet for the homepage.
               All classes use the hp- prefix to avoid
               conflicts with styles.css (used by inner pages).
  ============================================================
*/

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..900;1,14..32,300..900&display=swap');

/* ── Design Tokens — Light Mode ───────────────────────────── */
:root {
  /* Brand Colors */
  --hp-primary:        #2563EB;
  --hp-primary-hover:  #1D4ED8;
  --hp-primary-light:  #EFF6FF;
  --hp-primary-50:     #F0F9FF;
  --hp-secondary:      #0EA5E9;

  /* Backgrounds & Surfaces */
  --hp-bg:             #F8FAFC;
  --hp-surface:        #FFFFFF;
  --hp-border:         #E5E7EB;
  --hp-border-subtle:  #F3F4F6;

  /* Text Hierarchy */
  --hp-heading:        #111827;
  --hp-body:           #374151;
  --hp-muted:          #6B7280;
  --hp-subtle:         #9CA3AF;

  /* Status */
  --hp-success:        #16A34A;
  --hp-success-light:  #ECFDF5;
  --hp-warning:        #F59E0B;
  --hp-warning-light:  #FFFBEB;
  --hp-danger:         #EF4444;

  /* Shadows */
  --hp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --hp-shadow-sm: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
  --hp-shadow-md: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  --hp-shadow-lg: 0 10px 40px rgba(0, 0, 0, .10), 0 4px 12px rgba(0, 0, 0, .06);
  --hp-shadow-xl: 0 20px 64px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .07);
  --hp-shadow-pri: 0 8px 24px rgba(37, 99, 235, .28);

  /* Radii */
  --hp-r-sm:   8px;
  --hp-r-md:   12px;
  --hp-r-lg:   20px;
  --hp-r-xl:   28px;
  --hp-r-full: 9999px;

  /* Layout */
  --hp-container:  1280px;
  --hp-section-py: 96px;

  /* Transitions */
  --hp-ease:      all .2s cubic-bezier(.4, 0, .2, 1);
  --hp-ease-slow: all .35s cubic-bezier(.4, 0, .2, 1);

  /* Typography */
  --hp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Dark Mode Overrides ──────────────────────────────────── */
[data-theme="dark"] {
  --hp-bg:            #0F172A;
  --hp-surface:       #1E293B;
  --hp-border:        #334155;
  --hp-border-subtle: #253347;
  --hp-heading:       #F1F5F9;
  --hp-body:          #CBD5E1;
  --hp-muted:         #94A3B8;
  --hp-subtle:        #64748B;
  --hp-primary-light: rgba(37, 99, 235, .15);
  --hp-primary-50:    rgba(14, 165, 233, .08);
  --hp-success-light: rgba(16, 185, 129, .12);
  --hp-warning-light: rgba(245, 158, 11, .12);
  --hp-shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --hp-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
  --hp-shadow-md: 0 4px 16px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .2);
  --hp-shadow-lg: 0 10px 40px rgba(0, 0, 0, .45), 0 4px 12px rgba(0, 0, 0, .3);
  --hp-shadow-xl: 0 20px 64px rgba(0, 0, 0, .55), 0 8px 24px rgba(0, 0, 0, .4);
}

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

/* ── Skip Navigation (Accessibility) ─────────────────────── */
.hp-skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--hp-primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--hp-r-sm);
  font-weight: 600;
  font-size: 14px;
  transition: top .2s;
}
.hp-skip-nav:focus { top: 16px; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.hp-container {
  max-width: var(--hp-container);
  margin-inline: auto;
  padding-inline: 24px;
}

.hp-section {
  padding-block: var(--hp-section-py);
}

/* Section Header */
.hp-section-head {
  text-align: center;
  margin-bottom: 56px;
}

.hp-label-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hp-primary);
  background: var(--hp-primary-light);
  padding: 5px 16px;
  border-radius: var(--hp-r-full);
  border: 1px solid rgba(37, 99, 235, .15);
  margin-bottom: 16px;
}

.hp-section-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--hp-heading);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.hp-section-sub {
  font-size: 18px;
  color: var(--hp-muted);
  max-width: 560px;
  margin-inline: auto;
  line-height: 1.65;
}

/* Buttons */
.hp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--hp-r-full);
  padding: 13px 32px;
  transition: var(--hp-ease);
  cursor: pointer;
}
.hp-btn-primary {
  background: var(--hp-primary);
  color: #fff;
  border: 2px solid transparent;
}
.hp-btn-primary:hover {
  background: var(--hp-primary-hover);
  box-shadow: var(--hp-shadow-pri);
  transform: translateY(-1px);
}
.hp-btn-outline {
  background: transparent;
  color: var(--hp-primary);
  border: 2px solid var(--hp-primary);
}
.hp-btn-outline:hover {
  background: var(--hp-primary);
  color: #fff;
}

/* View All */
.hp-view-all {
  text-align: center;
  margin-top: 48px;
}

/* Reveal Scroll Animation */
.hp-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
.hp-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.hp-reveal-d1 { transition-delay: .08s; }
.hp-reveal-d2 { transition-delay: .16s; }
.hp-reveal-d3 { transition-delay: .24s; }
.hp-reveal-d4 { transition-delay: .32s; }

/* ============================================================
   1. ANNOUNCEMENT BAR
   ============================================================ */
.hp-ann {
  background: linear-gradient(90deg, var(--hp-primary) 0%, var(--hp-secondary) 100%);
  color: #fff;
  text-align: center;
  padding: 11px 48px;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  z-index: 100;
}
.hp-ann a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hp-ann-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, .75);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--hp-r-sm);
  transition: var(--hp-ease);
}
.hp-ann-close:hover { color: #fff; background: rgba(255, 255, 255, .2); }

/* ============================================================
   2. STICKY HEADER
   ============================================================ */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--hp-surface);
  border-bottom: 1px solid var(--hp-border);
  transition: box-shadow .3s;
}
.hp-header.scrolled { box-shadow: var(--hp-shadow-md); }

.hp-header-inner {
  display: flex;
  align-items: center;
  height: 68px;
  gap: 24px;
}

/* Logo */
.hp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.hp-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--hp-primary);
  border-radius: var(--hp-r-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-logo-icon svg { color: #fff; }
.hp-logo-wordmark {
  font-size: 17px;
  font-weight: 800;
  color: var(--hp-heading);
  letter-spacing: -.025em;
}
.hp-logo-wordmark em {
  font-style: normal;
  color: var(--hp-primary);
}

/* Desktop Nav */
.hp-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}
.hp-nav-a {
  font-size: 14px;
  font-weight: 500;
  color: var(--hp-muted);
  padding: 7px 14px;
  border-radius: var(--hp-r-sm);
  transition: var(--hp-ease);
  white-space: nowrap;
}
.hp-nav-a:hover, .hp-nav-a.active {
  color: var(--hp-heading);
  background: var(--hp-border-subtle);
}

/* Header Right */
.hp-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Header Search Pill */
.hp-header-search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--hp-bg);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-full);
  padding: 7px 16px;
  cursor: pointer;
  transition: var(--hp-ease);
  color: var(--hp-subtle);
  font-size: 13px;
  font-weight: 500;
}
.hp-header-search-pill:hover { border-color: var(--hp-primary); color: var(--hp-muted); }

/* Theme Toggle */
.hp-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--hp-r-sm);
  background: var(--hp-bg);
  border: 1.5px solid var(--hp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: var(--hp-ease);
  flex-shrink: 0;
}
.hp-theme-btn:hover { background: var(--hp-border-subtle); border-color: var(--hp-primary); }

/* Language Selector */
.lang-selector {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 12px !important;
  border-radius: var(--hp-r-sm) !important;
  border: 1.5px solid var(--hp-border) !important;
  background: var(--hp-bg) !important;
  color: var(--hp-heading) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: var(--hp-ease) !important;
  white-space: nowrap !important;
  height: 36px !important;
}
.lang-btn:hover {
  background: var(--hp-border-subtle) !important;
  border-color: var(--hp-primary) !important;
  color: var(--hp-primary) !important;
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-md);
  padding: 6px;
  min-width: 170px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: var(--hp-shadow-lg);
  z-index: 2000;
  display: none;
  flex-direction: column;
  gap: 1px;
}
.lang-dropdown.open {
  display: flex;
}
.lang-option {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 9px 12px !important;
  border-radius: var(--hp-r-sm) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--hp-heading) !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: var(--hp-ease) !important;
  white-space: nowrap !important;
}
.lang-option:hover,
.lang-option.active {
  background: var(--hp-primary-light) !important;
  color: var(--hp-primary) !important;
  font-weight: 600 !important;
}

/* Hamburger */
.hp-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: var(--hp-r-sm);
  border: 1.5px solid var(--hp-border);
  background: var(--hp-bg);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  transition: var(--hp-ease);
}
.hp-hamburger:hover { background: var(--hp-border-subtle); }
.hp-hamburger span {
  display: block;
  height: 2px;
  background: var(--hp-heading);
  border-radius: 2px;
  width: 100%;
  transition: var(--hp-ease);
}

/* Mobile Nav Overlay */
.hp-mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--hp-surface);
  padding: 20px 24px 32px;
  flex-direction: column;
  overflow-y: auto;
}
.hp-mobile-nav.open { display: flex; }

.hp-mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hp-border);
  margin-bottom: 16px;
}
.hp-mobile-close {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--hp-r-sm);
  background: var(--hp-bg);
  border: 1.5px solid var(--hp-border);
  font-size: 20px;
  color: var(--hp-heading);
  transition: var(--hp-ease);
}
.hp-mobile-close:hover { background: var(--hp-primary-light); border-color: var(--hp-primary); }

.hp-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hp-mobile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--hp-heading);
  border-radius: var(--hp-r-md);
  border-bottom: 1px solid var(--hp-border-subtle);
  transition: var(--hp-ease);
}
.hp-mobile-link:hover { background: var(--hp-primary-light); color: var(--hp-primary); }
.hp-mobile-link-icon { font-size: 20px; width: 28px; }

.hp-mobile-search {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hp-border);
}
.hp-mobile-search-input {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-md);
  background: var(--hp-bg);
  color: var(--hp-heading);
  outline: none;
  transition: var(--hp-ease);
}
.hp-mobile-search-input:focus { border-color: var(--hp-primary); }
.hp-mobile-search-input::placeholder { color: var(--hp-subtle); }

/* ============================================================
   3. HERO SECTION
   ============================================================ */
.hp-hero {
  background:
    radial-gradient(ellipse 100% 70% at 50% -5%, rgba(37, 99, 235, .07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 60%, rgba(14, 165, 233, .05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 90% 40%, rgba(37, 99, 235, .05) 0%, transparent 50%),
    var(--hp-bg);
  padding: 104px 0 88px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hp-hero-inner { position: relative; }

.hp-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hp-primary);
  background: var(--hp-primary-light);
  border: 1px solid rgba(37, 99, 235, .18);
  padding: 6px 18px;
  border-radius: var(--hp-r-full);
  margin-bottom: 28px;
  animation: hp-fade-up .6s ease both;
}
.hp-hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hp-primary);
  animation: hp-pulse 2s infinite;
}

.hp-h1 {
  font-size: clamp(38px, 5.5vw, 66px);
  font-weight: 900;
  color: var(--hp-heading);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin-bottom: 22px;
  animation: hp-fade-up .6s .1s ease both;
}
.hp-h1 .hp-accent { color: var(--hp-primary); }

.hp-hero-sub {
  font-size: 20px;
  color: var(--hp-muted);
  max-width: 520px;
  margin: 0 auto 52px;
  line-height: 1.6;
  animation: hp-fade-up .6s .2s ease both;
}

/* Hero Search Bar */
.hp-hero-search-wrap {
  max-width: 720px;
  margin: 0 auto 30px;
  position: relative;
  animation: hp-fade-up .6s .3s ease both;
}

.hp-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--hp-surface);
  border: 2px solid var(--hp-border);
  border-radius: var(--hp-r-full);
  padding: 8px 8px 8px 26px;
  box-shadow: var(--hp-shadow-lg);
  transition: var(--hp-ease);
}
.hp-search-bar:focus-within {
  border-color: var(--hp-primary);
  box-shadow: var(--hp-shadow-lg), 0 0 0 4px rgba(37, 99, 235, .12);
}
.hp-search-bar-icon {
  color: var(--hp-muted);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}
.hp-search-input {
  flex: 1;
  font-size: 17px;
  font-weight: 400;
  color: var(--hp-heading);
  background: transparent;
  border: none;
  outline: none;
  padding: 8px 0;
  min-width: 0;
}
.hp-search-input::placeholder { color: var(--hp-subtle); }
.hp-search-submit {
  background: var(--hp-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 30px;
  border-radius: var(--hp-r-full);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--hp-ease);
}
.hp-search-submit:hover {
  background: var(--hp-primary-hover);
  box-shadow: var(--hp-shadow-pri);
}

/* Search Autocomplete Dropdown */
.hp-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  box-shadow: var(--hp-shadow-xl);
  overflow: hidden;
  z-index: 60;
  display: none;
}
.hp-search-dropdown.open { display: block; }

.hp-sd-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hp-subtle);
  padding: 14px 18px 6px;
}
.hp-sd-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: var(--hp-ease);
}
.hp-sd-item:hover, .hp-sd-item.hp-sd-active {
  background: var(--hp-primary-light);
}
.hp-sd-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--hp-r-sm);
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.hp-sd-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-heading);
}
.hp-sd-cat {
  font-size: 12px;
  color: var(--hp-muted);
}
.hp-sd-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--hp-r-full);
  background: var(--hp-primary-light);
  color: var(--hp-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.hp-sd-empty {
  padding: 24px 18px;
  text-align: center;
  color: var(--hp-muted);
  font-size: 14px;
}
.hp-sd-divider {
  height: 1px;
  background: var(--hp-border-subtle);
  margin: 4px 0;
}

/* Popular Search Chips */
.hp-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  animation: hp-fade-up .6s .4s ease both;
}
.hp-chips-label {
  font-size: 13px;
  color: var(--hp-subtle);
  font-weight: 500;
  margin-right: 4px;
}
.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hp-body);
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-full);
  padding: 7px 16px;
  cursor: pointer;
  transition: var(--hp-ease);
}
.hp-chip:hover {
  border-color: var(--hp-primary);
  color: var(--hp-primary);
  background: var(--hp-primary-light);
  transform: translateY(-2px);
  box-shadow: var(--hp-shadow-sm);
}

/* ============================================================
   4. CATEGORIES
   ============================================================ */
.hp-cats {
  background: var(--hp-surface);
  padding-block: var(--hp-section-py);
}

.hp-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.hp-cat-card {
  background: var(--hp-bg);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  padding: 28px 24px;
  transition: var(--hp-ease-slow);
  cursor: default;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hp-cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hp-shadow-lg);
  border-color: var(--cat-accent, var(--hp-primary));
  background: var(--cat-bg-soft, var(--hp-primary-light));
}

/* Per-category color palette */
.hp-cat-card[data-cat="time"]       { --cat-accent:#0EA5E9; --cat-bg:#F0F9FF; --cat-bg-soft:#E0F2FE; }
.hp-cat-card[data-cat="math"]       { --cat-accent:#7C3AED; --cat-bg:#F5F3FF; --cat-bg-soft:#EDE9FE; }
.hp-cat-card[data-cat="electrical"] { --cat-accent:#D97706; --cat-bg:#FFFBEB; --cat-bg-soft:#FEF3C7; }
.hp-cat-card[data-cat="wire"]       { --cat-accent:#DC2626; --cat-bg:#FEF2F2; --cat-bg-soft:#FEE2E2; }
.hp-cat-card[data-cat="lighting"]   { --cat-accent:#B45309; --cat-bg:#FFFBEB; --cat-bg-soft:#FEF3C7; }
.hp-cat-card[data-cat="grade"]      { --cat-accent:#059669; --cat-bg:#ECFDF5; --cat-bg-soft:#D1FAE5; }
.hp-cat-card[data-cat="financial"]  { --cat-accent:#16A34A; --cat-bg:#F0FDF4; --cat-bg-soft:#DCFCE7; }
.hp-cat-card[data-cat="paycheck"]   { --cat-accent:#2563EB; --cat-bg:#EFF6FF; --cat-bg-soft:#DBEAFE; }

/* Dark mode cat bg */
[data-theme="dark"] .hp-cat-card[data-cat="time"]       { --cat-bg:rgba(14,165,233,.12); --cat-bg-soft:rgba(14,165,233,.2); }
[data-theme="dark"] .hp-cat-card[data-cat="math"]       { --cat-bg:rgba(124,58,237,.12); --cat-bg-soft:rgba(124,58,237,.2); }
[data-theme="dark"] .hp-cat-card[data-cat="electrical"] { --cat-bg:rgba(217,119,6,.1);   --cat-bg-soft:rgba(217,119,6,.18); }
[data-theme="dark"] .hp-cat-card[data-cat="wire"]       { --cat-bg:rgba(220,38,38,.1);   --cat-bg-soft:rgba(220,38,38,.18); }
[data-theme="dark"] .hp-cat-card[data-cat="lighting"]   { --cat-bg:rgba(180,83,9,.1);    --cat-bg-soft:rgba(180,83,9,.18); }
[data-theme="dark"] .hp-cat-card[data-cat="grade"]      { --cat-bg:rgba(5,150,105,.1);   --cat-bg-soft:rgba(5,150,105,.18); }
[data-theme="dark"] .hp-cat-card[data-cat="financial"]  { --cat-bg:rgba(22,163,74,.1);   --cat-bg-soft:rgba(22,163,74,.18); }
[data-theme="dark"] .hp-cat-card[data-cat="paycheck"]   { --cat-bg:rgba(37,99,235,.12);  --cat-bg-soft:rgba(37,99,235,.2); }

.hp-cat-icon-box {
  width: 58px;
  height: 58px;
  border-radius: var(--hp-r-md);
  background: var(--cat-bg, var(--hp-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
  transition: var(--hp-ease-slow);
}
.hp-cat-card:hover .hp-cat-icon-box { transform: scale(1.08); }

.hp-cat-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--hp-heading);
  margin-bottom: 6px;
}
.hp-cat-count-badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--cat-accent, var(--hp-primary));
  background: var(--cat-bg, var(--hp-primary-light));
  padding: 2px 10px;
  border-radius: var(--hp-r-full);
  margin-bottom: 12px;
}
.hp-cat-desc {
  font-size: 13.5px;
  color: var(--hp-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 18px;
}
.hp-cat-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cat-accent, var(--hp-primary));
  transition: var(--hp-ease);
}
.hp-cat-card:hover .hp-cat-cta { gap: 10px; }
.hp-cat-cta-arrow { font-size: 16px; }

/* ============================================================
   5-6. CALCULATOR CARD SECTIONS (Featured, Popular)
   ============================================================ */
.hp-featured { background: var(--hp-bg); padding-block: var(--hp-section-py); }
.hp-popular  { background: var(--hp-surface); padding-block: var(--hp-section-py); }
.hp-trending { background: var(--hp-bg); padding-block: var(--hp-section-py); }
.hp-recent   { background: var(--hp-surface); padding-block: var(--hp-section-py); }

.hp-calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.hp-calc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.hp-calc-card {
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  padding: 22px;
  transition: var(--hp-ease-slow);
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}
.hp-calc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow-md);
  border-color: var(--hp-primary);
}

.hp-calc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.hp-calc-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--hp-r-md);
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: var(--hp-ease);
}
.hp-calc-card:hover .hp-calc-icon { background: var(--hp-primary); }

.hp-calc-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--hp-r-full);
  background: var(--hp-border-subtle);
  color: var(--hp-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.hp-calc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hp-heading);
  line-height: 1.35;
  margin-bottom: 8px;
}
.hp-calc-desc {
  font-size: 13px;
  color: var(--hp-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 14px;
}
.hp-calc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--hp-border-subtle);
  padding-top: 12px;
  margin-top: auto;
}
.hp-calc-open {
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--hp-ease);
}
.hp-calc-card:hover .hp-calc-open { gap: 8px; }

/* Trending Badge */
.hp-trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: var(--hp-r-full);
  background: var(--hp-warning-light);
  color: #92400E;
}
[data-theme="dark"] .hp-trending-badge { background: rgba(245,158,11,.18); color: #FCD34D; }

/* NEW badge */
.hp-new-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  padding: 3px 9px;
  border-radius: var(--hp-r-full);
  background: var(--hp-success-light);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, .25);
}
[data-theme="dark"] .hp-new-badge { background: rgba(16,185,129,.2); color: #6EE7B7; border-color: rgba(16,185,129,.3); }

.hp-calc-date {
  font-size: 12px;
  color: var(--hp-subtle);
}

/* ============================================================
   7. WHY CHOOSE SECTION
   ============================================================ */
.hp-why { background: var(--hp-bg); padding-block: var(--hp-section-py); }

.hp-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.hp-feature-card {
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  padding: 28px 22px;
  transition: var(--hp-ease-slow);
}
.hp-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hp-shadow-md);
  border-color: var(--hp-primary);
}
.hp-feature-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--hp-r-md);
  background: var(--hp-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  transition: var(--hp-ease);
}
.hp-feature-card:hover .hp-feature-icon { background: var(--hp-primary); }
.hp-feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-heading);
  margin-bottom: 8px;
}
.hp-feature-desc {
  font-size: 13.5px;
  color: var(--hp-muted);
  line-height: 1.65;
}

/* ============================================================
   8. STATISTICS
   ============================================================ */
.hp-stats {
  background: linear-gradient(135deg, #1E40AF 0%, var(--hp-primary) 45%, var(--hp-secondary) 100%);
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}
.hp-stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 40%, rgba(255,255,255,.07) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 80% 60%, rgba(255,255,255,.05) 0%, transparent 50%);
  pointer-events: none;
}
.hp-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}
.hp-stat-item { text-align: center; }
.hp-stat-num {
  font-size: 56px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.04em;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.hp-stat-label {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  letter-spacing: .01em;
}

/* ============================================================
   9. BLOG PREVIEW
   ============================================================ */
.hp-blog { background: var(--hp-surface); padding-block: var(--hp-section-py); }

.hp-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hp-blog-card {
  background: var(--hp-bg);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  overflow: hidden;
  transition: var(--hp-ease-slow);
  display: flex;
  flex-direction: column;
}
.hp-blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hp-shadow-lg);
}

.hp-blog-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.hp-blog-img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, var(--hp-primary-light), var(--hp-primary-50, #EFF6FF));
  transition: transform .4s ease;
}
.hp-blog-card:hover .hp-blog-img-ph { transform: scale(1.05); }

.hp-blog-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hp-blog-cat-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--hp-primary);
  margin-bottom: 10px;
}
.hp-blog-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-heading);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
  transition: var(--hp-ease);
}
.hp-blog-card:hover .hp-blog-title { color: var(--hp-primary); }
.hp-blog-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--hp-subtle);
  padding-top: 14px;
  border-top: 1px solid var(--hp-border-subtle);
  margin-top: auto;
}
.hp-blog-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--hp-border);
  flex-shrink: 0;
}

/* ============================================================
   10. FAQ
   ============================================================ */
.hp-faq { background: var(--hp-bg); padding-block: var(--hp-section-py); }

.hp-faq-list {
  max-width: 820px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hp-faq-item {
  background: var(--hp-surface);
  border: 1.5px solid var(--hp-border);
  border-radius: var(--hp-r-lg);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.hp-faq-item.open {
  border-color: var(--hp-primary);
  box-shadow: var(--hp-shadow-sm);
}
.hp-faq-q-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 21px 24px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--hp-heading);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
}
.hp-faq-q-btn:hover { color: var(--hp-primary); }
.hp-faq-chevron {
  width: 24px;
  height: 24px;
  border-radius: var(--hp-r-sm);
  background: var(--hp-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--hp-ease);
  color: var(--hp-muted);
  font-size: 14px;
}
.hp-faq-item.open .hp-faq-chevron {
  background: var(--hp-primary-light);
  color: var(--hp-primary);
  transform: rotate(180deg);
}
.hp-faq-ans {
  max-height: 0;
  overflow: hidden;
  transition: max-height .36s cubic-bezier(.4,0,.2,1);
}
.hp-faq-item.open .hp-faq-ans { max-height: 500px; }
.hp-faq-ans-inner {
  padding: 0 24px 22px;
  font-size: 14.5px;
  color: var(--hp-muted);
  line-height: 1.75;
}

/* ============================================================
   11. FOOTER
   ============================================================ */
.hp-footer {
  background: #0F172A;
  color: #94A3B8;
  padding-top: 80px;
}
[data-theme="dark"] .hp-footer { background: #020617; }

.hp-footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

/* Brand col */
.hp-footer-brand {}
.hp-footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.hp-footer-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--hp-r-md);
  background: var(--hp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hp-footer-wordmark {
  font-size: 16px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: -.02em;
}
.hp-footer-wordmark em { font-style: normal; color: var(--hp-secondary); }
.hp-footer-brand p {
  font-size: 14px;
  line-height: 1.75;
  color: #64748B;
  max-width: 240px;
  margin-bottom: 20px;
}
.hp-footer-socials {
  display: flex;
  gap: 10px;
}
.hp-footer-social {
  width: 36px;
  height: 36px;
  border-radius: var(--hp-r-sm);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 15px;
  transition: var(--hp-ease);
}
.hp-footer-social:hover { background: var(--hp-primary); border-color: var(--hp-primary); color: #fff; }

/* Footer Columns */
.hp-footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #E2E8F0;
  margin-bottom: 18px;
}
.hp-footer-links { display: flex; flex-direction: column; gap: 10px; }
.hp-footer-link {
  font-size: 14px;
  color: #64748B;
  transition: var(--hp-ease);
  display: inline-block;
}
.hp-footer-link:hover { color: #CBD5E1; padding-left: 4px; }

/* Newsletter */
.hp-newsletter p {
  font-size: 13.5px;
  color: #64748B;
  margin-bottom: 14px;
  line-height: 1.65;
}
.hp-newsletter-form { display: flex; gap: 8px; flex-direction: column; }
.hp-newsletter-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 13px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--hp-r-sm);
  color: #E2E8F0;
  outline: none;
  transition: var(--hp-ease);
}
.hp-newsletter-input::placeholder { color: #475569; }
.hp-newsletter-input:focus { border-color: var(--hp-primary); background: rgba(37,99,235,.08); }
.hp-newsletter-btn {
  width: 100%;
  padding: 11px;
  background: var(--hp-primary);
  color: #fff;
  border-radius: var(--hp-r-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--hp-ease);
}
.hp-newsletter-btn:hover { background: var(--hp-primary-hover); }

/* Footer Bottom Bar */
.hp-footer-bottom {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #475569;
}
.hp-footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
.hp-footer-bottom a { color: #475569; transition: color .2s; }
.hp-footer-bottom a:hover { color: #94A3B8; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes hp-fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes hp-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.85); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1200px) {
  .hp-calc-grid   { grid-template-columns: repeat(3, 1fr); }
  .hp-footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
  .hp-footer-grid > :nth-child(4),
  .hp-footer-grid > :nth-child(5) { grid-column: auto; }
}

@media (max-width: 1024px) {
  :root { --hp-section-py: 72px; }
  .hp-section-title { font-size: 34px; }
  .hp-section-sub   { font-size: 16px; }
  .hp-cat-grid       { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hp-calc-grid      { grid-template-columns: repeat(2, 1fr); }
  .hp-calc-grid-3    { grid-template-columns: repeat(2, 1fr); }
  .hp-features-grid  { grid-template-columns: repeat(2, 1fr); }
  .hp-blog-grid      { grid-template-columns: repeat(2, 1fr); }
  .hp-stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 36px; }
  .hp-stat-num       { font-size: 44px; }
  .hp-footer-grid    { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --hp-section-py: 60px; }
  .hp-section-title  { font-size: 28px; letter-spacing: -.02em; }
  .hp-section-head   { margin-bottom: 40px; }
  .hp-hero           { padding: 68px 0 60px; }
  .hp-h1             { font-size: clamp(30px, 8vw, 46px); }
  .hp-hero-sub       { font-size: 16px; margin-bottom: 36px; }
  .hp-search-bar     { padding: 8px; flex-wrap: nowrap; border-radius: var(--hp-r-xl); }
  .hp-search-submit  { padding: 12px 20px; font-size: 14px; }
  .hp-cat-grid       { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hp-calc-grid      { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hp-calc-grid-3    { grid-template-columns: 1fr; }
  .hp-features-grid  { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .hp-blog-grid      { grid-template-columns: 1fr; }
  .hp-footer-grid    { grid-template-columns: 1fr; gap: 32px; }
  .hp-footer-bottom  { flex-direction: column; text-align: center; }
  .hp-hero-chips     { gap: 8px; }
  .hp-chip           { font-size: 12px; padding: 6px 14px; }
  .hp-chips-label    { display: none; }
}

@media (max-width: 480px) {
  :root { --hp-section-py: 48px; }
  .hp-section-title  { font-size: 24px; }
  .hp-cat-card       { padding: 18px 16px; }
  .hp-cat-icon-box   { width: 48px; height: 48px; font-size: 22px; }
  .hp-cat-name       { font-size: 15px; }
  .hp-cat-desc       { display: none; }
  .hp-calc-grid      { grid-template-columns: 1fr; }
  .hp-features-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }
  .hp-stats-grid     { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .hp-stat-num       { font-size: 38px; }
  .hp-ann            { font-size: 13px; padding: 10px 40px; }
  .hp-search-input   { font-size: 15px; }
  .hp-footer-bottom-links { gap: 14px; }
}

/* ============================================================
   UNIFIED HAMBURGER HEADER — always-light, all screen sizes
   ============================================================ */

/* 1. Header always white — dark mode does not apply to header */
.hp-header,
html[data-theme="dark"] .hp-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e8ecf4 !important;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06) !important;
}

/* 2. Logo always dark */
.hp-logo-wordmark,
html[data-theme="dark"] .hp-logo-wordmark { color: #1e293b !important; }
.hp-logo-wordmark em,
html[data-theme="dark"] .hp-logo-wordmark em { color: #2563eb !important; }
.hp-logo-icon,
html[data-theme="dark"] .hp-logo-icon { background: #2563eb !important; }

/* 3. Responsive Desktop Nav & Hamburger Rules */
@media (min-width: 769px) {
  .hp-nav {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: 12px !important;
  }
  .hp-hamburger {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hp-nav { display: none !important; }
  .hp-hamburger {
    display: flex !important;
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
  }
}

.hp-hamburger:hover,
html[data-theme="dark"] .hp-hamburger:hover {
  background: #e2e8f0 !important;
  border-color: #2563eb !important;
}
.hp-hamburger span,
html[data-theme="dark"] .hp-hamburger span {
  background: #374151 !important;
}

/* 6. Theme button always light */
.hp-theme-btn,
html[data-theme="dark"] .hp-theme-btn {
  background: #f1f5f9 !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #374151 !important;
}
.hp-theme-btn:hover,
html[data-theme="dark"] .hp-theme-btn:hover {
  background: #e2e8f0 !important;
  border-color: #2563eb !important;
}

/* 7. Contact Us button in homepage header */
.hp-contact-btn {
  display: inline-flex !important;
  align-items: center !important;
  background: #2563eb !important;
  color: #ffffff !important;
  text-decoration: none !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: background 0.2s, transform 0.15s !important;
  border: none !important;
}
.hp-contact-btn:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px) !important;
}

/* Hide Contact Us on very small screens, keep icon-only layout */
@media (max-width: 480px) {
  .hp-contact-btn { display: none !important; }
}
