/* =============================================
   Tax Calculator — Styles
   Matches EmpowerTech Innovations main site
   ============================================= */

:root {
  --primary: #0a2540;
  --primary-dark: #061828;
  --accent: #0066cc;
  --accent-light: #1a80e0;
  --orange: #e8531a;
  --orange-light: #ff6b35;
  --success: #00b894;
  --danger: #d63031;
  --white: #ffffff;
  --off-white: #f7f9fc;
  --grey-light: #eef1f6;
  --grey: #8a94a6;
  --text: #1a2236;
  --text-muted: #5a6478;
  --border: #dce3ed;
  --shadow-sm: 0 2px 8px rgba(10,37,64,0.08);
  --shadow-md: 0 8px 28px rgba(10,37,64,0.13);
  --shadow-lg: 0 16px 48px rgba(10,37,64,0.16);
  --radius: 14px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

.container {
  width: 92%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ── Top Bar ── */
.topbar {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  padding: 8px 0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.topbar-inner span { display: flex; align-items: center; gap: 6px; }
.topbar-inner i { color: #1a80e0; }
.topbar-inner a { color: rgba(255,255,255,0.75); text-decoration: none; }
.topbar-wa { color: #25d366 !important; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.topbar-wa:hover { opacity: 0.85; }

/* ── Navbar ── */
.navbar {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.navbar.scrolled { box-shadow: var(--shadow-md); border-color: var(--border); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 38px; }
.logo span { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.nav-links { list-style: none; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.88rem;
  padding: 6px 12px; border-radius: 6px; transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active { background: var(--grey-light); color: var(--accent); }
.nav-links a.nav-cta {
  background: var(--accent); color: #fff; padding: 8px 18px;
  border-radius: 8px; font-weight: 600;
}
.nav-links a.nav-cta:hover { background: var(--accent-light); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--primary); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: white; flex-direction: column; align-items: stretch;
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease, box-shadow 0.3s; gap: 0;
  }
  .nav-links.active { max-height: 500px; box-shadow: var(--shadow-md); padding: 10px 0 16px; }
  .nav-links li { padding: 0 20px; }
  .nav-links a { display: block; padding: 10px 0; border-radius: 0; }
  .nav-links a.nav-cta { margin-top: 6px; text-align: center; border-radius: 8px; }
}

/* ── Section Labels ── */
.section-label {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: rgba(0,102,204,0.08);
  padding: 5px 14px; border-radius: 50px; margin-bottom: 14px;
}

/* ── Calculator Hero ── */
.calc-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0a3a6e 100%);
  padding: 70px 0 60px;
  color: #fff;
  text-align: center;
}
.calc-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
  margin-bottom: 16px;
}
.calc-hero h1 em { color: #7ab8ff; font-style: italic; }
.calc-hero p { color: rgba(255,255,255,0.75); font-size: 1.05rem; max-width: 580px; margin: 0 auto; }

/* ── AdSense Wrappers ── */
.ad-wrap { margin: 28px auto; text-align: center; min-height: 90px; }
.ad-wrap-side { margin-bottom: 20px; min-height: 250px; }

/* ── Main Calculator Section ── */
.calc-section { padding: 48px 0 60px; }
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
}

/* ── Calculator Card ── */
.calc-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.calc-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.calc-icon {
  width: 52px; height: 52px;
  background: rgba(0,102,204,0.08);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--accent);
  flex-shrink: 0;
}
.calc-card-header h2 { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.calc-card-header p { font-size: 0.85rem; color: var(--text-muted); }

/* Form Elements */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.83rem; font-weight: 600; color: var(--text); margin-bottom: 7px;
}
.form-group label i { color: var(--accent); font-size: 0.8rem; }
.form-group select,
.form-group input {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit; color: var(--text);
  background: var(--white); outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.form-group select:focus,
.form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6478' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-prefix {
  position: absolute; left: 13px;
  font-size: 0.85rem; font-weight: 600; color: var(--grey);
  pointer-events: none;
}
.input-wrap input { padding-left: 40px; }
.hidden { display: none !important; }

/* Toggle Buttons */
.income-toggle {
  display: flex; gap: 0;
  background: var(--grey-light); border-radius: 10px; padding: 4px;
  margin-bottom: 22px;
}
.toggle-btn {
  flex: 1; padding: 9px 16px;
  border: none; border-radius: 7px; background: transparent;
  font-size: 0.87rem; font-weight: 600; font-family: inherit;
  color: var(--text-muted); cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.toggle-btn.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

/* Results */
.results-wrap {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 24px 0 20px;
  animation: fadeInUp 0.3s ease;
}
.result-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.result-row:last-of-type { border-bottom: none; }
.result-item {
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.result-item:first-child { border-right: 1px solid var(--border); }
.result-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.result-label i { font-size: 0.7rem; }
.result-value { font-size: 1.05rem; font-weight: 700; color: var(--primary); }
.result-row.tax .result-value { color: var(--danger); }
.result-row.net .result-value { color: var(--success); }

.eff-rate-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
}
.eff-bar-outer { flex: 1; height: 6px; background: var(--grey-light); border-radius: 50px; }
.eff-bar-inner { height: 6px; border-radius: 50px; background: linear-gradient(90deg, var(--accent), var(--orange)); transition: width 0.5s ease; width: 0%; }
.eff-pct { font-weight: 700; color: var(--primary); min-width: 36px; text-align: right; }

.zero-tax-msg {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,184,148,0.08);
  border: 1px solid rgba(0,184,148,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.9rem; color: var(--success); font-weight: 500;
}
.zero-tax-msg i { font-size: 1.2rem; }

.cta-strip { margin-top: 20px; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
  transition: background 0.25s, transform 0.2s;
}
.btn-cta:hover { background: var(--orange-light); transform: translateY(-2px); }

/* ── Slab Panel (Right) ── */
.slab-panel { display: flex; flex-direction: column; gap: 20px; }

.slab-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.slab-card h3 {
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.slab-card h3 i { color: var(--accent); }
.slab-table-wrap { overflow-x: auto; }
#slabTable { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
#slabTable thead th {
  background: var(--off-white); color: var(--text-muted);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border);
}
#slabTable tbody td {
  padding: 9px 10px; border-bottom: 1px solid var(--border);
  color: var(--text); vertical-align: middle;
}
#slabTable tbody tr:last-child td { border-bottom: none; }
#slabTable tbody tr:hover td { background: var(--off-white); }
.rate-badge {
  display: inline-block; background: rgba(0,102,204,0.08);
  color: var(--accent); font-weight: 700; font-size: 0.78rem;
  padding: 2px 8px; border-radius: 50px;
}

.info-box {
  background: rgba(0,102,204,0.04);
  border: 1px solid rgba(0,102,204,0.15);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.info-box h4 { font-size: 0.9rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.info-box h4 i { color: var(--accent); }
.info-box p { font-size: 0.83rem; color: var(--text-muted); line-height: 1.65; }
.info-box code { background: var(--grey-light); padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; color: var(--primary); }

/* ── SEO Section ── */
.seo-section {
  background: var(--white);
  padding: 60px 0;
  border-top: 1px solid var(--border);
}
.seo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.seo-block h2 { font-family: 'DM Serif Display', serif; font-size: 1.4rem; color: var(--primary); margin-bottom: 14px; }
.seo-block p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.75; }
.seo-block a { color: var(--accent); text-decoration: none; }
.seo-block a:hover { text-decoration: underline; }
@media (max-width: 768px) { .seo-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ── Footer ── */
.footer { background: var(--primary); color: rgba(255,255,255,0.65); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; color: #fff; font-weight: 700; font-size: 0.95rem; }
.footer-copy { font-size: 0.82rem; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 34px; height: 34px; background: rgba(255,255,255,0.1);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.85rem; transition: background 0.2s; text-decoration: none;
}
.social-links a:hover { background: var(--accent); }

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .calc-card { padding: 22px 16px; }
  .result-row { grid-template-columns: 1fr; }
  .result-item:first-child { border-right: none; border-bottom: 1px solid var(--border); }
  .topbar-inner { justify-content: center; }
}
