/* ============================================================
   home.css — Calcuvo Homepage
   ============================================================ */

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

/* ════════════════════════════════════════
   1. HERO SECTION
   ════════════════════════════════════════ */
.hv-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0f2044 40%, #162d5c 70%, #1e3a73 100%) !important;
  padding-top: 80px !important;
  padding-bottom: 32px !important;
  position: relative;
  overflow: hidden;
  float: left;
  width: 100%;
}

.hv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 30%, rgba(100,140,255,0.11) 0%, transparent 50%),
    radial-gradient(circle at 85% 70%, rgba(60,100,220,0.09) 0%, transparent 50%);
  pointer-events: none;
}

.hv-hero > .container { position: relative; z-index: 2; }

/* ── Hero Left ── */
.hv-hero-left { padding-right: 18px; }

.hv-badge {
  display: inline-block;
  background: rgba(107, 158, 255, 0.15);
  border: 1px solid rgba(107, 158, 255, 0.30);
  color: #9ab8ff;
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.hv-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  margin-bottom: 14px;
  background: none !important;
}

.hv-hero-title span {
  background: linear-gradient(90deg, #6b9eff, #a78bfa) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  display: inline;
}

.hv-hero-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px !important;
  font-weight: 300 !important;
  line-height: 1.7 !important;
  color: #7a9ac0 !important;
  -webkit-text-fill-color: #7a9ac0 !important;
  margin-bottom: 22px;
  max-width: 400px;
}

/* ── Search ── */
.hv-search-wrap {
  position: relative;
  margin-bottom: 22px;
}

.hv-search-inner {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 10px 18px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.hv-search-inner:focus-within {
  border-color: rgba(74,144,217,0.65);
  background: rgba(255,255,255,0.11);
}

.hv-search-icon { color: #6b9eff; font-size: 14px; margin-right: 10px; flex-shrink: 0; }

.hv-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
}
.hv-search-input::placeholder { color: rgba(255,255,255,0.38); }

.hv-search-clear {
  border: none; background: none; color: rgba(255,255,255,0.38);
  cursor: pointer; padding: 0 0 0 8px; font-size: 12px; display: none;
  transition: color 0.15s;
}
.hv-search-clear:hover { color: #6b9eff; }

.hv-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.20); padding: 8px 0;
  max-height: 300px; overflow-y: auto; z-index: 999;
}
.hv-search-results a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; color: #1a1a2e; text-decoration: none;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500;
  transition: background 0.15s; border-radius: 8px; margin: 0 5px;
}
.hv-search-results a:hover { background: #f0f4ff; color: #166AC5; }
.hv-search-results a .sr-icon { color: #6b9eff; width: 16px; text-align: center; flex-shrink: 0; }
.hv-search-results a .sr-cat { font-size: 11px; color: #aaa; margin-left: auto; }

.hv-no-results {
  background: #fff; border-radius: 14px; text-align: center;
  color: #555; font-size: 13px; padding: 14px; margin-top: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.hv-no-results a { color: #166AC5; }

/* ── CTA ── */
.hv-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #166AC5, #4a90d9);
  color: #fff; font-family: 'Poppins', sans-serif;
  font-size: 13.5px; font-weight: 600;
  padding: 12px 26px; border-radius: 50px; text-decoration: none;
  box-shadow: 0 6px 22px rgba(22,106,197,0.42);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hv-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(22,106,197,0.52);
  color: #fff;
}

/* ════════════════════════════════════════
   2. CALCULATOR WIDGET
   ════════════════════════════════════════ */
.hv-hero-right { position: relative; z-index: 2; }

.hv-calc-wrapper {
  background: #ffffff;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(74,144,217,0.25),   /* subtle blue outline to separate from dark bg */
    0 24px 64px rgba(0,0,0,0.45),
    0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* ── Display ── */
.hv-calc-display {
  background: #111827;           /* noticeably darker/cooler than hero bg */
  border-bottom: 3px solid #6b9eff;   /* bright accent line separating display from buttons */
  padding: 14px 22px 12px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
}

.hv-calc-expr {
  font-size: 11px; color: #4a5f88; min-height: 16px;
  text-align: right; font-family: 'Poppins', monospace; word-break: break-all;
}

.hv-calc-num {
  font-size: 2.4rem; font-weight: 700; color: #f0f6ff;
  letter-spacing: -1px; text-align: right;
  word-break: break-all; line-height: 1.15;
  font-family: 'Poppins', sans-serif; transition: font-size 0.1s;
}

/* ── Two-panel layout ── */
.hv-calc-panels {
  display: flex;
  gap: 0;
  padding: 12px 12px 12px;
  background: #f4f6fb;
  align-items: stretch;   /* both panels fill same height */
}

.hv-sci-panel {
  flex: 3;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
}

.hv-divider {
  width: 1px; background: #dde6f4;
  margin: 2px 10px 2px 0; border-radius: 2px; flex-shrink: 0;
}

.hv-std-panel { flex: 4; }

/* ── Sci grid: 4 cols × 3 rows — pushed to BOTTOM ── */
.hv-sci-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  flex: 1;             /* fill panel height */
  align-content: end;  /* push 3 rows to bottom → aligns with std last rows */
}

/* ── Std grid: 4 cols × 5 rows ── */
.hv-std-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

/* ── Buttons ── */
.hv-btn {
  border: none; border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  padding: 10px 0;
  cursor: pointer; transition: all 0.12s ease;
  background: #eaecf5; color: #1a1f3c;
  user-select: none; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}
.hv-btn:hover  { filter: brightness(0.90); transform: scale(0.96); }
.hv-btn:active { transform: scale(0.91); }

.hv-sci { background: #e4eaf7; color: #166AC5; font-size: 0.72rem; font-weight: 700; }
.hv-fn  { background: #d9e2f5; color: #166AC5; }
.hv-op  { background: #6b9eff; color: #fff; box-shadow: 0 2px 8px rgba(74,144,217,0.28); }
.hv-op:hover { background: #4f80e8; }
.hv-eq  { background: linear-gradient(135deg, #166AC5, #4a90d9); color: #fff; box-shadow: 0 2px 12px rgba(22,106,197,0.32); }
.hv-eq:hover { background: linear-gradient(135deg, #28407a, #4a6cd0); }
.hv-zero { grid-column: span 2; }

/* ── History strip ── */
.hv-calc-history {
  max-height: 38px; overflow-y: auto;
  background: #edf0f8; border-top: 1px solid #dde6f4;
  padding: 4px 16px;
  font-size: 11px; color: #8a96b8; text-align: right;
  font-family: 'Poppins', monospace;
}
.hv-calc-history div { padding: 1px 0; }


/* ════════════════════════════════════════
   3. CATEGORIES SECTION
   ════════════════════════════════════════ */
.hv-categories {
  background: #eef2f8 !important;
  padding: 60px 0 70px !important;
  float: left;
  width: 100%;
}

.hv-section-header { text-align: center; margin-bottom: 40px; }

.hv-section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.85rem; font-weight: 800;
  color: #0d1b3e; margin-bottom: 10px; letter-spacing: -0.4px;
}

.hv-section-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 14px; color: #5a6880;
  max-width: 480px; margin: 0 auto; line-height: 1.7;
}

/* ── Card ── */
.hv-cat-card {
  background: #ffffff; border-radius: 16px; overflow: hidden;
  height: 100%; display: flex; flex-direction: column;
  box-shadow: 0 3px 16px rgba(13,27,62,0.07);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s;
  border: 1px solid rgba(74,144,217,0.10);
}
.hv-cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 40px rgba(13,27,62,0.13);
}

/* ── Card image area ── */
.hv-cat-image {
  height: 118px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.hv-cat-image svg {
  width: 100%; height: 100%; position: absolute; inset: 0;
}

.hv-cat-financial { background: linear-gradient(135deg, #166AC5 0%, #1976d2 50%, #42a5f5 100%); }
.hv-cat-health    { background: linear-gradient(135deg, #b71c1c 0%, #c62828 50%, #ef5350 100%); }
.hv-cat-math      { background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 50%, #ab47bc 100%); }
.hv-cat-other     { background: linear-gradient(135deg, #004d40 0%, #00695c 50%, #26a69a 100%); }

/* ── Card body ── */
.hv-cat-body { padding: 18px 17px 16px; flex: 1; display: flex; flex-direction: column; }

.hv-cat-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.98rem; font-weight: 700;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 2px solid #eef2f8;
}
.hv-cat-title a { color: #0d1b3e; text-decoration: none; transition: color 0.15s; }
.hv-cat-title a:hover { color: #166AC5; }

/* ── Calc list ── */
.hv-calc-list { list-style: none; padding: 0; margin: 0 0 14px; flex: 1; }
.hv-calc-list li { border-bottom: 1px solid #f2f5fb; }
.hv-calc-list li:last-child { border-bottom: none; }

.hv-calc-list li a {
  display: block; padding: 6px 0 6px 13px;
  color: #3a4a6b; font-family: 'Poppins', sans-serif;
  font-size: 12.5px; text-decoration: none; position: relative;
  transition: color 0.14s, padding-left 0.14s;
}
.hv-calc-list li a::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: #c4d2ec;
  transition: background 0.14s;
}
.hv-calc-list li a:hover { color: #166AC5; padding-left: 17px; }
.hv-calc-list li a:hover::before { background: #166AC5; }

/* ── View all ── */
.hv-view-all {
  display: inline-flex; align-items: center; gap: 5px;
  color: #166AC5; font-family: 'Poppins', sans-serif;
  font-size: 12px; font-weight: 600; text-decoration: none;
  padding: 7px 13px; border: 1.5px solid rgba(22,106,197,0.22);
  border-radius: 50px; align-self: flex-start; margin-top: auto;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.hv-view-all:hover { background: #166AC5; color: #fff; border-color: #166AC5; }
.hv-view-all i { font-size: 10px; }


/* ════════════════════════════════════════
   4. RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 991px) {
  .hv-hero {
    padding-top: 90px;
    padding-bottom: 32px;
  }
  .hv-hero-title { font-size: 1.9rem; }
  .hv-hero-left { padding-right: 0; margin-bottom: 28px; }
  .hv-hero-desc { max-width: 100%; }
  .hv-sci-panel { display: none; }
  .hv-divider   { display: none; }
  .hv-std-panel { flex: 1; }
  .hv-categories { padding: 44px 0 54px; }
  .hv-section-title { font-size: 1.55rem; }
}

@media (max-width: 767px) {
  .hv-hero-title { font-size: 1.7rem; }
  .hv-calc-num   { font-size: 1.8rem; }
  .hv-cat-image  { height: 100px; }
  .hv-section-title { font-size: 1.4rem; }
}

@media (max-width: 575px) {
  .hv-hero { padding-top: 82px; }
  .hv-hero-title { font-size: 1.5rem; }
  .hv-categories { padding: 36px 0 44px; }
}
