/* Exact-style clone inspired by mytaxcalculator.pk */
:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;
  --navy: #0b1736;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--emerald-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* ========== HEADER ========== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
}
.brand:hover { text-decoration: none; }

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--emerald-600);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.8rem;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.brand-name span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-500);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-lang {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--emerald-800);
  background: var(--emerald-50);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--emerald-100);
}
.btn-lang:hover { background: var(--emerald-100); text-decoration: none; }

/* ========== HERO (dark emerald like MTC) ========== */
.hero-banner {
  background: linear-gradient(160deg, #064e3b 0%, #047857 45%, #059669 100%);
  padding: 48px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  color: #ecfdf5;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  position: relative;
}

.hero-banner h1 {
  margin-top: 20px;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  position: relative;
}

.hero-banner .hero-desc {
  margin: 16px auto 0;
  max-width: 640px;
  color: rgba(236, 253, 245, 0.8);
  font-size: 1.05rem;
  line-height: 1.6;
  position: relative;
}

/* Calculator card overlaps hero */
.calc-wrap {
  margin-top: -56px;
  position: relative;
  z-index: 10;
  padding-bottom: 32px;
}

.calc-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.12);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}

.calc-tabs {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 12px;
  display: flex;
  justify-content: center;
}

.calc-tabs-inner {
  display: flex;
  gap: 6px;
  background: var(--gray-100);
  padding: 5px;
  border-radius: 14px;
  max-width: 360px;
  width: 100%;
}

.calc-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--gray-600);
  transition: 0.15s;
}

.calc-tab.active {
  background: #fff;
  color: var(--emerald-700);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calc-body {
  padding: 24px 20px 28px;
}
@media (min-width: 640px) {
  .calc-body { padding: 32px 36px 36px; }
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.btn-calc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--emerald-600);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-calc:hover { background: var(--emerald-700); }
@media (min-width: 640px) {
  .btn-calc { width: auto; min-width: 200px; }
}

/* Results */
.result-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--emerald-50);
  border: 1px solid var(--emerald-100);
  border-radius: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .result-grid { grid-template-columns: repeat(3, 1fr); }
}

.result-item {
  background: #fff;
  border: 1px solid var(--emerald-100);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
}

.result-item .value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}
.result-item .label {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 2px;
}
.result-item.highlight .value { color: var(--emerald-700); }
.result-item.tax .value { color: #dc2626; }

.disclaimer {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #92400e;
  line-height: 1.5;
}

/* Trust strip */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 20px 0 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-600);
}
.trust-strip span { color: var(--emerald-600); margin-right: 4px; }

/* ========== SECTIONS ========== */
.section {
  padding: 48px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.section-head p {
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* Tool cards — exact MTC style */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

.tool-card {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.tool-card:hover {
  background: var(--emerald-50);
  border-color: var(--emerald-100);
  text-decoration: none;
}

.tool-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 2px;
}

.tool-card p {
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.tool-card .cta {
  display: none;
}

/* Slab table */
.slab-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.slab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.slab-table th,
.slab-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-100);
}

.slab-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.8rem;
}

.slab-table tr:last-child td { border-bottom: none; }
.slab-table tr:nth-child(even) td { background: rgba(249,250,251,0.6); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  padding: 32px 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner strong { color: var(--navy); }

/* Generic card for calculator pages */
.card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--emerald-600); color: #fff; }
.btn-primary:hover { background: var(--emerald-700); }
.btn-secondary { background: #fff; color: var(--navy); border: 1px solid var(--gray-200); }

.page-hero {
  background: linear-gradient(160deg, #064e3b, #059669);
  padding: 36px 0 40px;
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-hero p {
  margin-top: 8px;
  color: rgba(236,253,245,0.8);
  font-size: 0.95rem;
}

html[dir="rtl"] body {
  font-family: 'Noto Nastaliq Urdu', 'Inter', system-ui, sans-serif;
}
html[dir="rtl"] .hero-banner h1 { letter-spacing: 0; }
.hero.container, .hero { text-align:center; padding: 36px 0 24px; }
.hero h1 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); font-weight: 700; }
.hero p { color: var(--gray-500); margin-top: 8px; }

/* ========== MAIN NAV ========== */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  padding: 7px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.15s;
}

.main-nav a:hover {
  color: #047857;
  background: #ecfdf5;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #1a1a2e;
  border-radius: 1px;
  transition: 0.2s;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 14px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 60;
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    padding: 12px 14px;
    font-size: 0.95rem;
  }
}

/* ========== ALL CALCULATOR PAGES — form fix ========== */
.form-group {
  margin-bottom: 4px;
}

.form-group label,
label.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea,
.card input[type="text"],
.card input[type="number"],
.card input[type="email"],
.card select,
.card textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: #0b1736;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.form-group select,
.card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.card .btn,
.card button[type="submit"],
button.btn-primary,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 12px 24px;
  background: #059669;
  color: #fff !important;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.card .btn:hover,
.card button[type="submit"]:hover,
.btn-primary:hover {
  background: #047857;
}

.card {
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

/* Page hero for tool pages */
.page-hero {
  background: linear-gradient(160deg, #064e3b 0%, #047857 50%, #059669 100%);
  padding: 40px 0 36px;
  text-align: center;
  color: #fff;
  margin-bottom: 28px;
}

.page-hero h1 {
  font-size: clamp(1.4rem, 3.5vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.page-hero p {
  margin-top: 8px;
  color: rgba(236, 253, 245, 0.85);
  font-size: 0.95rem;
}

.page-hero .container {
  max-width: 920px;
}

/* Results on tool pages */
.result-box {
  margin-top: 22px;
  padding: 18px;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  border-radius: 14px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.result-item {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 10px;
  padding: 14px 10px;
  text-align: center;
}

.result-item .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b1736;
}

.result-item .label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 2px;
}

.result-item.highlight .value { color: #047857; }
.result-item.tax .value { color: #dc2626; }

.disclaimer {
  margin-top: 16px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #92400e;
  line-height: 1.5;
}
