
:root {
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-light: #eff6ff;
  --secondary: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --accent-gold: #d97706;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  text-decoration: underline;
}

img, svg, video, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navbar */
header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0.75rem 0;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
  text-decoration: none;
  flex-shrink: 0;
}
.logo span {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 900;
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(29,78,216,0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--primary);
  text-decoration: none;
}
.btn-nav {
  background: var(--primary);
  color: white !important;
  padding: 0.5rem 1.15rem;
  border-radius: 0.5rem;
  font-weight: 700;
  display: inline-block;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 2px 4px rgba(29,78,216,0.2);
}
.btn-nav:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: white;
  padding: 4rem 0 3.5rem;
  text-align: center;
  width: 100%;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 780px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}
.badge-hero {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Interactive Calculator */
.calc-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.06);
  padding: 2.25rem;
  margin: -2.5rem auto 3.5rem;
  max-width: 920px;
  width: 100%;
  position: relative;
  z-index: 10;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--secondary);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.calc-results {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e2e8f0;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.result-item:last-child {
  border-bottom: none;
}
.result-item span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
}
.result-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
}

/* Articles Grid */
.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  text-align: center;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
  width: 100%;
}
.article-card {
  background: var(--card-bg);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px -5px rgba(0,0,0,0.08);
}
.card-cat {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.article-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--secondary);
}
.article-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-read {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Article Page Layout */
.article-wrapper {
  max-width: 880px;
  width: 100%;
  margin: 2.5rem auto;
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 3rem 2.25rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
}
.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.article-header h1, .article-content h1 {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--secondary);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  overflow-wrap: break-word;
}
.article-content p { margin-bottom: 1.5rem; }
.article-content p.lead { font-size: 1.18rem; color: var(--secondary); font-weight: 500; }
.article-content h2 { font-size: 1.6rem; font-weight: 800; color: var(--secondary); margin: 2.5rem 0 1rem; }
.article-content h3 { font-size: 1.25rem; font-weight: 700; color: var(--secondary); margin: 1.75rem 0 0.75rem; }
.article-content ul, .article-content ol { margin: 0 0 1.5rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }

/* Table safe scroll */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: white;
}
table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}
table th, table td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  vertical-align: top;
}
table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--secondary);
}
table tr:nth-child(even) { background: #fafafa; }

/* FAQ Block */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}
.faq-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.faq-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}
.faq-answer {
  font-size: 0.95rem;
  color: #334155;
}

.ad-slot, .adsense-box {
  display: none !important;
}

/* Sidebar & Buttons */
.sidebar { width: 100%; }
.widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.widget h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--secondary); }
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: white !important;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
  transition: background 0.15s, transform 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2.5rem 0 4rem;
  flex-wrap: wrap;
}
.btn-page {
  background: white;
  border: 1px solid var(--border);
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.5rem 0.95rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 2.5rem;
  text-align: center;
}
.btn-page:hover:not(.btn-disabled):not(.btn-page-active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
}
.btn-page-active {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  box-shadow: 0 2px 4px rgba(29,78,216,0.25);
  cursor: default;
}
.btn-disabled { opacity: 0.45; cursor: not-allowed; background: #f8fafc; }

/* Footer */
footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3.5rem 0 2rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 { color: white; font-size: 1.05rem; font-weight: 700; margin-bottom: 1.25rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a { color: #94a3b8; font-size: 0.92rem; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: white;
  padding: 1.25rem 1.5rem;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
#cookie-banner p { font-size: 0.88rem; margin: 0; max-width: 900px; line-height: 1.5; color: #cbd5e1; }
.cookie-btns { display: flex; gap: 0.75rem; flex-shrink: 0; flex-wrap: wrap; }
.btn-cookie { padding: 0.5rem 1.15rem; border-radius: 0.375rem; font-size: 0.85rem; font-weight: 700; cursor: pointer; border: none; }
.btn-cookie-accept { background: var(--primary); color: white; }
.btn-cookie-reject { background: transparent; color: white; border: 1px solid #475569; }

/* Responsive Media Queries */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .navbar { flex-direction: column; align-items: center; padding: 0.75rem 0; min-height: auto; gap: 0.75rem; }
  .nav-links { justify-content: center; gap: 0.6rem 0.9rem; font-size: 0.88rem; }
  .hero { padding: 2.75rem 0 2.25rem; }
  .hero h1 { font-size: 1.85rem; }
  .calc-card { padding: 1.25rem; margin: -1.75rem auto 2.5rem; }
  .calc-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .grid-cards { grid-template-columns: 1fr; gap: 1.25rem; }
  .article-wrapper { padding: 1.5rem 1rem; margin: 1.5rem auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  #cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem; gap: 1rem; }
  .cookie-btns button { flex: 1; }
}

/* =====================================================================
   E-E-A-T & TRUST SIGNALS (AUTHOR CARD, FINANCIAL DISCLAIMER, TOC, FAQS)
   ===================================================================== */
.financial-disclaimer {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--accent-gold);
  border-radius: 0.5rem;
  padding: 1.15rem 1.35rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #475569;
  margin: 2rem 0;
}
.financial-disclaimer strong {
  color: var(--secondary);
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.author-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.author-avatar {
  font-size: 2.2rem;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #bfdbfe;
}
.author-info { flex: 1; }
.author-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--secondary);
  margin-bottom: 0.25rem;
}
.author-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}
.author-meta {
  font-size: 0.82rem;
  color: #2563eb;
  font-weight: 600;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2rem;
}
.toc-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toc-box ul {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.toc-box a {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.toc-box a:hover { text-decoration: underline; }

.faq-section { margin: 2.5rem 0 2rem; }
.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}
.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--secondary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer {
  padding: 0 1.25rem 1.15rem;
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.65;
  border-top: 1px solid #f1f5f9;
}

.calc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}
.calc-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: all 0.15s ease;
}
.calc-tab-btn:hover { color: var(--primary); background: #f1f5f9; }
.calc-tab-btn.active {
  color: var(--primary);
  border-bottom: 3px solid var(--primary);
  background: var(--primary-light);
}
