/*
Theme Name: CalculatorDekho
Theme URI: https://calculatordekho.com
Author: CalculatorDekho
Author URI: https://calculatordekho.com
Description: A premium micro-authority calculator theme for USA legal & financial calculators. Built for Google Top 5 rankings with auto schema, high CPC AdSense optimization, and full SEO structure.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: calculatordekho
Tags: calculator, finance, legal, seo, adsense, schema
*/

/* ================================================
   CSS VARIABLES
================================================ */
:root {
  --navy:       #0a1628;
  --navy-mid:   #112240;
  --gold:       #c9a84c;
  --gold-light: #e8c97a;
  --cream:      #f8f5ef;
  --cream-dark: #ede8df;
  --text-dark:  #1a1a2e;
  --text-mid:   #4a4a6a;
  --text-light: #8888aa;
  --white:      #ffffff;
  --success:    #2d6a4f;
  --success-bg: #d8f3dc;
  --shadow-sm:  0 2px 8px rgba(10,22,40,0.08);
  --shadow-md:  0 8px 32px rgba(10,22,40,0.12);
  --shadow-lg:  0 20px 60px rgba(10,22,40,0.18);
  --radius:     12px;
  --radius-lg:  20px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ================================================
   RESET & BASE
================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ================================================
   TYPOGRAPHY
================================================ */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p  { font-size: 1rem; color: var(--text-mid); line-height: 1.8; }

/* ================================================
   HEADER
================================================ */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
}
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.site-logo span { color: var(--gold); }
.main-nav ul {
  display: flex;
  gap: 2rem;
}
.main-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.main-nav a:hover,
.main-nav a.current-page { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: white;
  transition: var(--transition);
}

/* ================================================
   TRUST BAR
================================================ */
.trust-bar {
  background: var(--cream-dark);
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid rgba(10,22,40,0.08);
}
.trust-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-mid);
  font-weight: 500;
}
.trust-icon { color: var(--gold); }

/* ================================================
   HERO — HOMEPAGE
================================================ */
.hero-section {
  background: var(--navy);
  padding: 5rem 1.5rem 6rem;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold-light);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hero-badge::before {
  content: '●';
  font-size: 0.5rem;
  animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero-section h1 { color: var(--white); margin-bottom: 1.2rem; }
.hero-section h1 span { color: var(--gold); }
.hero-section .hero-sub {
  color: rgba(255,255,255,0.7);
  font-size: 1.15rem;
  max-width: 650px;
  margin: 0 auto 2rem;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ================================================
   SECTION BASE
================================================ */
.section { padding: 5rem 1.5rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}
.section-title { color: var(--navy); margin-bottom: 0.8rem; }
.section-subtitle { color: var(--text-mid); font-size: 1.1rem; max-width: 600px; }
.section-header { margin-bottom: 3rem; }
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ================================================
   CALCULATOR CARDS GRID — HOMEPAGE
================================================ */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
}
.calc-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.calc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.calc-card:hover::before { transform: scaleX(1); }
.calc-card:hover {
  border-color: rgba(201,168,76,0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.calc-card.featured {
  border-color: rgba(201,168,76,0.45);
  background: linear-gradient(135deg, #fffdf7 0%, var(--white) 100%);
}
.calc-card.featured::before { transform: scaleX(1); }
.featured-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.calc-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.icon-1 { background: #fff8e6; }
.icon-2 { background: #e8f4ff; }
.icon-3 { background: #e8fff0; }
.icon-4 { background: #fff0f5; }
.icon-5 { background: #f0f0ff; }
.calc-card h3 { color: var(--navy); margin-bottom: 0.6rem; font-size: 1.15rem; }
.calc-card p { font-size: 0.9rem; color: var(--text-mid); flex: 1; }
.cpc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 1rem 0 0.8rem;
}
.kw-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.kw-tag {
  background: var(--cream);
  color: var(--text-mid);
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--cream-dark);
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 1.2rem;
  transition: gap var(--transition);
}
.card-link:hover { gap: 10px; }

/* ================================================
   WHY US — HOMEPAGE
================================================ */
.why-section {
  background: var(--navy);
  padding: 5rem 1.5rem;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.2rem;
  margin-top: 3rem;
}
.why-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: var(--transition);
}
.why-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(201,168,76,0.3);
}
.why-icon { font-size: 1.6rem; margin-bottom: 0.8rem; }
.why-title { color: white; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.3rem; }
.why-desc { color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* ================================================
   CALCULATOR PAGE — FULL
================================================ */
.calc-page-header {
  background: var(--navy);
  padding: 3.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.calc-page-header::before {
  content: '';
  position: absolute;
  top: -40%; right: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,168,76,0.1) 0%, transparent 70%);
}
.calc-page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.breadcrumb a { color: rgba(255,255,255,0.5); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }
.calc-page-header h1 { color: white; margin-bottom: 0.8rem; }
.calc-page-header .page-meta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 500;
}
.pill-gold   { background: rgba(201,168,76,0.2); color: var(--gold-light); }
.pill-green  { background: rgba(45,106,79,0.3);  color: #74c69d; }
.pill-blue   { background: rgba(100,150,255,0.2); color: #90b8ff; }

/* Calculator Page Layout */
.calc-page-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3rem;
  align-items: start;
}
.calc-content { min-width: 0; }
.calc-sidebar { position: sticky; top: 80px; }

/* AdSense Slots */
.adsense-slot {
  background: var(--cream-dark);
  border: 1px dashed rgba(10,22,40,0.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
  font-size: 0.8rem;
  margin: 1.5rem 0;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Calculator Widget Box */
.calc-widget-box {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  color: rgba(255,255,255,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: white;
  padding: 0.7rem 1rem;
  font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif;
  transition: var(--transition);
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(255,255,255,0.1);
}
.form-control option { background: var(--navy); }
.calc-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  border: none;
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  display: block;
}
.calc-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}

/* Results Box */
.result-box {
  margin-top: 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: none;
}
.result-box.show { display: block; animation: fadeUp 0.4s ease; }
@keyframes fadeUp { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
.result-total {
  text-align: center;
  padding-bottom: 1.2rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.result-total-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.result-total-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  margin-top: 4px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.86rem;
}
.result-row:last-child { border-bottom: none; }
.r-label { color: rgba(255,255,255,0.55); }
.r-val { color: white; font-weight: 600; }
.r-val.gold { color: var(--gold); }
.r-val.red { color: #ff8a80; }
.result-note {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.35);
  margin-top: 1rem;
  line-height: 1.6;
  font-style: italic;
}

/* SEO Content Area */
.seo-block { margin-bottom: 2.5rem; }
.seo-block h2 { color: var(--navy); margin-bottom: 1rem; font-size: 1.5rem; }
.seo-block h3 { color: var(--navy-mid); margin: 1.5rem 0 0.7rem; font-size: 1.15rem; }
.seo-block p  { color: var(--text-mid); margin-bottom: 1rem; }
.seo-block ul,
.seo-block ol { color: var(--text-mid); padding-left: 1.5rem; margin-bottom: 1rem; }
.seo-block li { margin-bottom: 0.5rem; line-height: 1.7; }

/* Formula Box */
.formula-box {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  margin: 1.5rem 0;
  border-left: 4px solid var(--gold);
}
.formula-box h4 {
  color: var(--gold);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.8rem;
}
.formula-box code {
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--gold-light);
  line-height: 1.9;
}

/* Example Box */
.example-box {
  background: #eff8ff;
  border-radius: var(--radius);
  padding: 1.5rem 1.8rem;
  margin: 1.5rem 0;
  border-left: 4px solid #3b82f6;
}
.example-box h4 {
  color: #1e40af;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

/* FAQ */
.faq-item {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  margin-bottom: 0.7rem;
  overflow: hidden;
}
.faq-question {
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-size: 0.95rem;
}
.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--gold);
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 0 1.4rem 1.2rem;
}

/* Related Calculators */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.related-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}
.related-card:hover {
  border-color: rgba(201,168,76,0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.related-icon { font-size: 1.4rem; flex-shrink: 0; }
.related-name {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.9rem;
}
.related-cpc { font-size: 0.72rem; color: var(--success); margin-top: 2px; }

/* ================================================
   STANDARD PAGE / POST
================================================ */
.page-header {
  background: var(--navy);
  padding: 3rem 1.5rem;
}
.page-header h1 { color: white; }
.page-body {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.page-body h2 { color: var(--navy); margin: 2rem 0 0.8rem; }
.page-body h3 { color: var(--navy-mid); margin: 1.5rem 0 0.6rem; }
.page-body p  { color: var(--text-mid); margin-bottom: 1rem; }

/* ================================================
   FOOTER
================================================ */
.site-footer {
  background: var(--navy);
  padding: 4rem 1.5rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-disclaimer {
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.78rem;
  line-height: 1.6;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.85rem; margin-top: 1rem; line-height: 1.7; }
.footer-col h4 { color: white; font-size: 0.88rem; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col ul a { color: rgba(255,255,255,0.45); font-size: 0.83rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* ================================================
   ANIMATIONS
================================================ */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 960px) {
  .calc-page-body { grid-template-columns: 1fr; }
  .calc-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav ul { display: none; }
  .hamburger { display: flex; }
  .hero-stats { gap: 1.5rem; }
}
@media (max-width: 600px) {
  .section { padding: 3rem 1rem; }
  .calc-page-body { padding: 1.5rem 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { gap: 1rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .why-grid { grid-template-columns: 1fr 1fr; }
}
