/* ============================================
   KALKIL GUIDES — Shared Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --bg:        #f7f8fc;
  --bg-white:  #ffffff;
  --navy:      #0f172a;
  --navy-mid:  #1e293b;
  --accent:    #22c55e;
  --accent-dk: #16a34a;
  --accent2:   #3b82f6;
  --text:      #111827;
  --muted:     #6b7280;
  --border:    #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'DM Sans', Arial, sans-serif;
  --max-w: 860px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

/* ─── HEADER ─── */
header {
  background: var(--navy);
  padding: 18px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: auto;
}
.nav-brand {
  font-family: var(--serif);
  font-size: 22px;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  margin-left: 28px;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: white; }

/* ─── HERO ─── */
.hero {
  background: var(--navy);
  padding: 70px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(34,197,94,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 30px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 48px);
  color: white;
  line-height: 1.2;
  max-width: 760px;
  margin: 0 auto 18px;
  letter-spacing: -1px;
}
.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 24px auto 0;
  padding: 0 20px;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* ─── MAIN CONTAINER ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* ─── TYPOGRAPHY ─── */
.container h2 {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--text);
  margin: 48px 0 16px;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
.container h2:first-child { margin-top: 0; }
.container h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
}
.container p { margin-bottom: 16px; color: var(--muted); line-height: 1.8; }
.container p strong { color: var(--text); }
.container ul, .container ol {
  margin: 16px 0 16px 24px;
  color: var(--muted);
}
.container li { margin-bottom: 8px; }
.container a { color: var(--accent-dk); text-decoration: underline; }

/* ─── TABLE ─── */
.table-wrap {
  overflow-x: auto;
  margin: 32px 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-size: 14px;
}
thead th {
  background: var(--navy);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}
thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-md) 0 0; }
tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f9fafb; }
tbody td:first-child { font-weight: 500; }

/* ─── HIGHLIGHT BOX ─── */
.highlight {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 28px 0;
}
.highlight p { color: var(--text); margin: 0; }

/* ─── CALCULATOR BOX ─── */
.calc-box {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 36px;
  margin: 40px 0;
  border-top: 4px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.calc-box::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, rgba(34,197,94,0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.calc-box h3 {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text);
  margin: 0 0 8px;
}
.calc-box p { color: var(--muted); margin-bottom: 20px; }
.calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(34,197,94,0.35);
}
.calc-btn:hover {
  background: var(--accent-dk);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,197,94,0.4);
  color: white;
  text-decoration: none;
}
.calc-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 0;
}

/* ─── QUICK EXAMPLES ─── */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}
.ex-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}
.ex-card .num { font-size: 18px; font-weight: 600; color: var(--accent-dk); display: block; }
.ex-card .lbl { font-size: 11px; color: var(--muted); }

/* ─── STEP LIST ─── */
.step-list { list-style: none; margin: 16px 0; padding: 0; }
.step-list li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.step-list li:last-child { border-bottom: none; }
.step-num {
  min-width: 28px; height: 28px;
  background: var(--navy);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  margin-top: 2px;
}
.step-list .step-text { color: var(--muted); }

/* ─── FAQ ─── */
.faq-section { margin-top: 40px; }
.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background .15s;
}
.faq-q:hover { background: #f9fafb; }
.faq-icon { font-size: 20px; color: var(--accent); min-width: 20px; transition: transform .25s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 20px; }

/* ─── TOOL LINKS ─── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.tool-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  transition: all .2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.tool-card .tc-icon { font-size: 22px; }
.tool-card .tc-name { font-size: 14px; font-weight: 600; color: var(--text); }
.tool-card .tc-desc { font-size: 12px; color: var(--muted); }

/* ─── CONCLUSION ─── */
.conclusion {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 50px;
  color: white;
  position: relative;
  overflow: hidden;
}
.conclusion::before {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(34,197,94,0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.conclusion h2 {
  font-family: var(--serif);
  color: white;
  margin-top: 0;
  font-size: 24px;
}
.conclusion p { color: rgba(255,255,255,0.7); }
.conclusion .calc-btn { margin-top: 12px; }

/* ─── FOOTER ─── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 32px 20px;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
footer a { color: rgba(255,255,255,0.5); text-decoration: none; }
footer a:hover { color: white; }

/* ─── RESPONSIVE ─── */
@media (max-width: 600px) {
  .hero { padding: 50px 20px 40px; }
  .calc-box { padding: 24px 20px; }
  .conclusion { padding: 28px 20px; }
  .container h2 { font-size: 22px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
}