/* ========== RESET & GLOBAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --dark: #0a2e1f;
  --accent: #0a5c3e;
  --green-light: #e8f0ea;
  --green-mid: #b8d8c0;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e2e8e4;
  --border2: #eef2f0;
  --text: #1a1f2e;
  --text2: #2d3a3a;
  --muted: #4a5a5a;
  --pale: #6b7a7a;
  --faint: #8b9a9a;
  --red: #dc2626;
  --red-light: #fef2f2;
  --red-mid: #fecaca;
  --amber: #d97706;
  --amber-light: #fef8e7;
  --r: 24px;
  --r-sm: 16px;
  --r-xs: 12px;
  --sh: 0 4px 24px -4px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
  --sh-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.10);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ========== NAVIGATION (all pages) ========== */
.nav {
  background: var(--dark);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.nav-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.nav-logo span {
  color: #4ade80;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-badge {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.72rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* ========== SITE HEADER (used in legal.html, contact.html) ========== */
.site-header {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.tax-badge {
  background: #e8f0ea;
  color: #0a2e1f;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 1rem;
}

.site-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #0a2e1f;
}

.site-header h1 span {
  color: #0a5c3e;
}

.back-link {
  display: inline-block;
  color: #0a5c3e;
  text-decoration: none;
  font-size: 0.85rem;
  margin-top: 1rem;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid #e2e8e4;
  background: white;
  transition: background 0.15s;
}

.back-link:hover {
  background: #e8f0ea;
}

/* ========== HERO (index.html) ========== */
.hero {
  background: var(--dark);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

/* ========== MAIN CONTAINER & CARDS ========== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--sh);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.card-header {
  background: #f8fafc;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  border-radius: 28px 28px 0 0;
}

.card-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
}

.card-body {
  padding: 1.5rem;
}

/* ========== POLICY CARDS (legal.html, contact.html) ========== */
.policy-card {
  background: white;
  border-radius: 32px;
  padding: 2rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8e4;
}

.card-badge {
  display: inline-block;
  background: #e8f0ea;
  color: #0a2e1f;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.25rem 0.8rem;
  border-radius: 40px;
  margin-bottom: 1.25rem;
}

.card-badge.amber {
  background: #fef8e7;
  color: #92400e;
}

.card-badge.blue {
  background: #eff6ff;
  color: #1e40af;
}

.highlight-row {
  background: #fafcfb;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border: 1px solid #e2e8e4;
}

/* ========== JUMP NAV (legal.html) ========== */
.jump-nav {
  background: white;
  border-radius: 32px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  border: 1px solid #e2e8e4;
}

.jump-nav a {
  color: #0a5c3e;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  transition: background 0.15s;
}

.jump-nav a:hover {
  background: #e8f0ea;
}

/* ========== CONTACT FORM ========== */
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2d3a3a;
  margin-bottom: 0.45rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1.5px solid #e2e8e4;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #fafcfb;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-btn {
  background: #0a2e1f;
  color: white;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: #0a5c3e;
}

.status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  display: none;
}

.status.success {
  display: block;
  background: #e8f0ea;
  color: #064e3b;
}

.status.error {
  display: block;
  background: #fef2f2;
  color: #991b1b;
}

/* ========== ADMIN PAGE ========== */
.admin-card {
  background: white;
  border-radius: 28px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
}

.admin-card h1 {
  color: #0a2e1f;
  margin-bottom: 1rem;
}

.admin-card input,
.admin-card button {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1.5px solid #e2e8e4;
  border-radius: 16px;
  font-family: inherit;
}

.admin-card button {
  background: #0a2e1f;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.admin-card button:hover {
  background: #0a5c3e;
}

/* ========== COUNTRY GRID (index.html) ========== */
.country-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.country-btn {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  background: white;
  border-radius: 40px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.country-btn.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

/* ========== FORMS (index.html freelance & extras) ========== */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}

input,
select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 0.9rem;
  font-family: inherit;
  background: #fafcfb;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 92, 62, 0.1);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-transform: none;
  font-weight: 500;
}

.calc-btn {
  background: var(--dark);
  color: #fff;
  border: none;
  width: 100%;
  padding: 0.9rem;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.calc-btn:hover {
  background: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(10, 46, 31, 0.35);
}

/* ========== RESULTS (index.html) ========== */
.result-box {
  background: #f9fbfd;
  border-radius: 20px;
  padding: 1.2rem;
  margin-top: 1.5rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eef2f0;
}

.result-row:last-child {
  border-bottom: none;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 0.5rem;
  padding-top: 0.8rem;
}

.result-breakdown {
  font-size: 0.85rem;
  color: var(--pale);
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  border-left: 2px solid var(--accent);
}

.breakdown-group {
  margin-top: 0.8rem;
  margin-bottom: 0.8rem;
}

.breakdown-group strong {
  font-size: 0.9rem;
  color: var(--dark);
  display: block;
  margin-bottom: 0.3rem;
}

/* ========== TABS (Pakistan extras) ========== */
.extra-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--pale);
  cursor: pointer;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ========== EXCHANGE RATE BAR (Pakistan) ========== */
.exchange-rate-bar {
  background: var(--green-light);
  border-radius: 20px;
  padding: 0.6rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  flex-wrap: wrap;
}

.refresh-rate-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
}

/* ========== TOOLTIP & MODAL ========== */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted #999;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.7rem;
  font-weight: normal;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.info-link {
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.75rem;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 0.5rem;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 400px;
  margin: 1rem;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== UPSELL (index.html) ========== */
.upsell {
  background: var(--dark);
  border-radius: 28px;
  padding: 2rem;
  margin-top: 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.upsell-badge {
  display: inline-block;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #4ade80;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}

.upsell h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.upsell p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1.25rem;
  line-height: 1.65;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}

.upsell-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1.5rem;
  max-width: 380px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.upsell-feat {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.65);
}

.upsell-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 40px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.upsell-btn:hover {
  background: #0d7a50;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(10, 92, 62, 0.4);
}

.upsell-price {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 0.75rem;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
  margin: 0 auto;
}

.waitlist-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
  text-align: center;
}

.waitlist-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.waitlist-message {
  font-size: 0.75rem;
  color: #4ade80;
  display: none;
  margin-top: 0.5rem;
}

/* ========== FOOTER (all pages) ========== */
.footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--pale);
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 0.4rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .country-grid {
    justify-content: center;
  }
  .exchange-rate-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .policy-card {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .nav-links .nav-badge {
    display: none;
  }
  .container {
    padding: 1rem;
  }
  .card-body {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .upsell-feats {
    grid-template-columns: 1fr;
  }
}