/* ============================================================
   EPZA PAKISTAN — style.css
   Design: Teal Modern Cards | Design 5
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #0a7060;
  --primary-dark:  #07524a;
  --primary-light: #0d9c80;
  --accent:        #d4af37;
  --surface:       #f0faf8;
  --surface-2:     #e1f5ee;
  --white:         #ffffff;
  --text-primary:  #0f2a25;
  --text-secondary:#3a5f58;
  --text-muted:    #6b8f88;
  --border:        #c0e8df;
  --border-light:  #e1f5ee;
  --step-num-bg:   #0a7060;
  --step-num-text: #ffffff;
  --radius-sm:     4px;
  --radius-md:     8px;
  --radius-lg:     12px;
  --radius-xl:     20px;
  --shadow-sm:     0 1px 3px rgba(10,112,96,.08);
  --shadow-md:     0 4px 12px rgba(10,112,96,.12);
  --font-body:     'Noto Sans', 'Segoe UI', Arial, sans-serif;
  --font-display:  'Noto Sans', 'Segoe UI', Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; display: block; }

/* --- Skip link --- */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  background: var(--primary); color: var(--white);
  padding: 8px 16px; z-index: 9999; border-radius: var(--radius-md);
}
.skip-link:focus { left: 16px; top: 16px; }

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center;
  height: 64px; gap: 16px;
  overflow: visible;
}

.site-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
  max-width: 240px;
}
.logo-dot {
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
}
.logo-text {
  font-size: 18px; font-weight: 700;
  color: var(--primary); letter-spacing: -0.3px;
  line-height: 1;
}
.logo-text span { color: var(--text-muted); font-weight: 400; font-size: 13px; display: block; letter-spacing: 0; }

.site-nav {
  margin-left: auto;
  min-width: 0;
}

.site-nav > ul {
  display: flex; align-items: center; gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: nowrap;
}

.nav-item {
  position: relative;
  list-style: none;
  display: block;
}

.nav-link {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background .15s, color .15s;
  cursor: pointer; border: none; background: none; font-family: inherit;
}
.nav-link:hover, .nav-link:focus { background: var(--surface); color: var(--primary); text-decoration: none; }
.nav-link svg { width: 12px; height: 12px; transition: transform .2s; }
.nav-item:hover .nav-link svg, .nav-item:focus-within .nav-link svg { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 8px;
  min-width: 220px; z-index: 200;
  box-shadow: var(--shadow-md);
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block; padding: 8px 12px;
  font-size: 13px; color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: background .1s, color .1s;
}
.nav-dropdown a:hover { background: var(--surface); color: var(--primary); text-decoration: none; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none; border: none;
  padding: 8px; cursor: pointer;
  margin-left: auto;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); margin: 5px 0;
  transition: transform .2s, opacity .2s;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  padding: 10px 20px;
}
.breadcrumb {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 4px;
  font-size: 13px; color: var(--text-muted);
  list-style: none;
}
.breadcrumb li + li::before { content: '›'; margin-right: 4px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:last-child { color: var(--text-primary); font-weight: 500; }

/* ============================================================
   STEP BANNER — Content DNA element
   ============================================================ */
.step-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.step-count {
  font-size: 13px; font-weight: 700;
  background: rgba(255,255,255,.2);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  width: fit-content;
  letter-spacing: .3px;
}
.step-count::before { content: '✦'; font-size: 10px; }
.step-banner p {
  font-size: 15px; line-height: 1.5;
  color: rgba(255,255,255,.92);
  margin: 0;
}

/* ============================================================
   STEP SECTIONS — Article body structure
   ============================================================ */
.step-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
  position: relative;
}
.step-section::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 3px 0 0 3px;
}

.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--step-num-bg); color: var(--step-num-text);
  font-size: 12px; font-weight: 700;
  width: 80px; height: 26px;
  border-radius: var(--radius-xl);
  letter-spacing: .5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.step-section h2 {
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px; line-height: 1.3;
}

.step-detail { color: var(--text-secondary); }
.step-detail p { margin-bottom: 14px; }
.step-detail p:last-child { margin-bottom: 0; }

/* ============================================================
   TROUBLESHOOTING SECTION
   ============================================================ */
.troubleshoot {
  background: #fff8f3;
  border: 1px solid #f0c8a0;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
}
.troubleshoot h2 {
  font-size: 20px; font-weight: 700;
  color: #8b4000; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.troubleshoot h2::before { content: '⚠'; font-size: 18px; }
.troubleshoot-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0c8a0; }
.troubleshoot-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.troubleshoot-item strong { color: var(--text-primary); display: block; margin-bottom: 4px; }
.troubleshoot-item p { color: var(--text-secondary); font-size: 15px; }

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-section {
  margin: 32px 0;
}
.faq-section h2 {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  width: 100%; text-align: left;
  background: none; border: none;
  padding: 16px 20px;
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font-body);
  transition: background .15s;
}
.faq-q:hover { background: var(--surface); }
.faq-q .faq-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--primary); font-weight: 700;
  transition: transform .25s, background .15s;
}
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); background: var(--primary); color: var(--white); }
.faq-a {
  padding: 0 20px;
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
}
.faq-a.open { max-height: 400px; padding: 0 20px 16px; }

/* ============================================================
   PACKAGE / COMPARISON TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
.pkg-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; min-width: 540px;
}
.pkg-table th {
  background: var(--primary); color: var(--white);
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: 13px;
  white-space: nowrap;
}
.pkg-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.pkg-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.pkg-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  color: var(--text-secondary);
}
.pkg-table tr:hover td { background: var(--surface); }
.pkg-table td:first-child { font-weight: 600; color: var(--text-primary); }
.pkg-table .badge-pop {
  background: var(--accent); color: #5a3a00;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--radius-xl);
  white-space: nowrap;
}

/* ============================================================
   CALCULATOR WRAPPER
   ============================================================ */
.calc-tool {
  background: var(--surface);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 24px 0;
}
.calc-tool h3 {
  font-size: 18px; font-weight: 700;
  color: var(--primary); margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px;
}
.calc-tool h3::before { content: '⊕'; font-size: 16px; }

.calc-group { margin-bottom: 16px; }
.calc-group label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.calc-group input[type="number"],
.calc-group select {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px; font-family: var(--font-body);
  color: var(--text-primary); background: var(--white);
  transition: border-color .2s;
}
.calc-group input:focus, .calc-group select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10,112,96,.12);
}

.calc-btn {
  background: var(--primary); color: var(--white);
  border: none; border-radius: var(--radius-md);
  padding: 12px 28px; font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body);
  transition: background .2s, transform .1s;
}
.calc-btn:hover { background: var(--primary-dark); }
.calc-btn:active { transform: scale(.98); }

.calc-result {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 20px;
  display: none;
}
.calc-result.visible { display: block; }
.calc-result .result-label {
  font-size: 13px; color: var(--text-muted); margin-bottom: 4px;
}
.calc-result .result-value {
  font-size: 28px; font-weight: 700;
  color: var(--primary); line-height: 1.2;
}
.calc-result .result-breakdown {
  margin-top: 12px; font-size: 14px; color: var(--text-secondary);
}
.calc-result .result-breakdown table { width: 100%; }
.calc-result .result-breakdown td { padding: 4px 0; }
.calc-result .result-breakdown td:last-child { text-align: right; font-weight: 500; }

/* ============================================================
   INFO CARDS (inline)
   ============================================================ */
.info-card {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 15px; color: var(--text-secondary);
}
.info-card strong { color: var(--text-primary); }

.tip-card {
  background: #fffbf0;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 15px; color: var(--text-secondary);
}
.tip-card::before { content: '💡 '; }

/* ============================================================
   CATEGORY GRID (homepage)
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none; color: inherit;
  border-top: 3px solid var(--primary);
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.cat-card .cat-icon {
  font-size: 28px; line-height: 1;
}
.cat-card .cat-name {
  font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.cat-card .cat-count {
  font-size: 12px; color: var(--primary);
  background: var(--surface); padding: 2px 8px;
  border-radius: var(--radius-xl); width: fit-content;
}

/* ============================================================
   HERO (homepage)
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 56px 20px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 800; line-height: 1.2;
  margin-bottom: 16px; letter-spacing: -.5px;
}
.hero p {
  font-size: 18px; color: rgba(255,255,255,.88);
  max-width: 580px; margin: 0 auto 28px;
  line-height: 1.6;
}
.hero-pills {
  display: flex; flex-wrap: wrap;
  gap: 8px; justify-content: center;
  margin-bottom: 0;
}
.hero-pill {
  background: rgba(255,255,255,.18);
  color: var(--white);
  font-size: 13px; font-weight: 500;
  padding: 6px 16px; border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,.25);
}

/* ============================================================
   ARTICLE LAYOUT
   ============================================================ */
.article-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}

.article-main { min-width: 0; }

.article-header { margin-bottom: 24px; }
.article-header h1 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800; line-height: 1.25;
  color: var(--text-primary); margin-bottom: 10px;
}
.article-meta {
  font-size: 13px; color: var(--text-muted);
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
}
.meta-tag {
  background: var(--surface-2);
  color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-xl);
  letter-spacing: .3px; text-transform: uppercase;
}

/* Article body typography */
.article-body h2 {
  font-size: 22px; font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-top: 8px;
}
.article-body h3 {
  font-size: 18px; font-weight: 600;
  color: var(--text-primary); margin: 20px 0 10px;
}
.article-body p { margin-bottom: 16px; font-size: 16px; }
.article-body ul, .article-body ol {
  padding-left: 24px; margin-bottom: 16px;
}
.article-body li { margin-bottom: 8px; font-size: 16px; }
.article-body strong { color: var(--text-primary); }
.article-body code {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 6px; font-size: 14px;
  color: var(--primary-dark); font-family: monospace;
}

/* Sidebar */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-card h3 {
  font-size: 14px; font-weight: 700;
  color: var(--primary); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .5px;
}
.sidebar-links { list-style: none; }
.sidebar-links li { margin-bottom: 8px; }
.sidebar-links a { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.sidebar-links a:hover { color: var(--primary); }
.sidebar-links li::before { content: '→ '; color: var(--primary); font-size: 12px; }

/* ============================================================
   PAGE LAYOUT (full width) 
   ============================================================ */
.page-wrap {
  max-width: 820px; margin: 0 auto;
  padding: 32px 20px;
}

/* ============================================================
   LATEST ARTICLES GRID
   ============================================================ */
.section-wrap {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.section-title {
  font-size: 24px; font-weight: 800;
  color: var(--text-primary); margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.article-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--white);
  transition: box-shadow .2s, transform .15s;
}
.article-card:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.article-card .tag {
  font-size: 11px; font-weight: 700;
  color: var(--primary); background: var(--surface);
  padding: 3px 10px; border-radius: var(--radius-xl);
  display: inline-block; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .4px;
}
.article-card h3 {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary); line-height: 1.4; margin-bottom: 8px;
}
.article-card h3 a { color: inherit; }
.article-card h3 a:hover { color: var(--primary); text-decoration: none; }
.article-card .read-more {
  font-size: 13px; color: var(--primary); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  padding: 48px 20px 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo-text { color: var(--white); font-size: 20px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.65); }

.footer-col h4 {
  font-size: 13px; font-weight: 700;
  color: var(--white); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: .5px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,.65); transition: color .15s; }
.footer-col a:hover { color: var(--white); text-decoration: none; }

.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  padding-top: 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,.45);
}
.footer-bottom a { color: rgba(255,255,255,.55); }

/* ============================================================
   UTILITY
   ============================================================ */
.teal-badge {
  background: var(--surface-2); color: var(--primary);
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: var(--radius-xl);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }

/* Step numbering flow for long-form articles */
.step-flow { counter-reset: step-counter; }
.step-flow .step-section { counter-increment: step-counter; }
.step-flow .step-section .step-number::before {
  content: 'Step ' counter(step-counter);
}
.step-flow .step-section .step-number { visibility: hidden; position: absolute; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .article-wrap {
    grid-template-columns: 1fr;
  }
  .article-sidebar { display: none; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .header-inner { gap: 8px; }
  .site-nav > ul { gap: 2px; }
  .nav-link { font-size: 13px; padding: 7px 8px; }
  .logo-text span { display: none; }
}

@media (max-width: 780px) {
  .site-nav > ul { gap: 0; }
  .nav-link { font-size: 12px; padding: 6px 7px; }
}

@media (max-width: 680px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
  .site-nav.open {
    display: block;
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: var(--white);
    overflow-y: auto; padding: 20px;
    z-index: 99;
  }
  .site-nav.open > ul {
    display: flex; flex-direction: column;
    gap: 4px;
    list-style: none; margin: 0; padding: 0;
  }
  .site-nav.open .nav-dropdown { display: block; position: static; box-shadow: none; border: none; padding: 4px 0 4px 16px; }
  .header-inner { height: 56px; }
  .hero { padding: 40px 16px; }
  .hero p { font-size: 16px; }
  .article-wrap { padding: 20px 16px; }
  .step-section { padding: 18px 16px; }
  .step-banner { padding: 16px 18px; }
  .calc-tool { padding: 20px 16px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .cat-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
}
