/* =========================================================
   Apna Future Safe — Main Stylesheet
   Brand colors: Deep Trust Blue #003B73 | Premium Gold #D4A017
                 Soft Orange #F28C28 | Pure White #FFFFFF | Dark Grey #333333
   ========================================================= */

:root {
  --blue: #003B73;
  --blue-dark: #00284f;
  --blue-light: #e8f0f8;
  --gold: #D4A017;
  --gold-light: #f6e6bd;
  --orange: #F28C28;
  --white: #FFFFFF;
  --grey: #333333;
  --grey-soft: #6b7280;
  --bg-soft: #f7f9fc;
  --border: #e3e8ef;
  --success: #1e8e5a;
  --danger: #c0392b;

  --font-heading: 'Poppins', 'Montserrat', sans-serif;
  --font-body: 'Open Sans', 'Lato', sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(0, 59, 115, 0.10);
  --shadow-lg: 0 16px 48px rgba(0, 59, 115, 0.16);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--grey);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--blue);
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 16px; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 20px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.bg-soft { background: var(--bg-soft); }
.bg-blue { background: var(--blue); color: var(--white); }
.bg-blue h2, .bg-blue h3, .bg-blue p { color: var(--white); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  background: #fff1e2;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head p { color: var(--grey-soft); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--blue-dark); box-shadow: var(--shadow); }
.btn-primary:hover { background: #c4930f; }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--blue); }
.btn-outline-blue { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline-blue:hover { background: var(--blue); color: var(--white); }
.btn-block { width: 100%; justify-content: center; }
.btn-whatsapp { background: #25D366; color: #fff; }
.btn-whatsapp:hover { background: #1ebc59; color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  color: var(--grey);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.94rem;
  padding: 10px 14px;
  border-radius: 8px;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); background: var(--blue-light); }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn { padding: 11px 20px; font-size: 0.9rem; }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--blue);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 960px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 85vw);
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 90px 20px 30px; gap: 4px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { padding: 14px 12px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-toggle { display: block; }
  .header-cta .btn-outline-blue { display: none; }
  .nav-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 400; }
  .nav-scrim.open { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,160,23,0.25), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero .eyebrow { background: rgba(212,160,23,0.18); color: var(--gold); }
.hero h1 { color: var(--white); }
.hero .tagline-hi { color: var(--gold); font-family: var(--font-heading); font-weight: 600; font-size: 1.15rem; margin-bottom: 10px; display: block; }
.hero p.lead { color: #d9e6f2; font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-media { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); padding: 24px; }
.hero-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 36px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; color: var(--gold); }
.hero-stats span { font-size: 0.85rem; color: #c9d9ea; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--grey-soft); margin-bottom: 0; }
.card ul { margin: 0; padding-left: 18px; color: var(--grey-soft); }
.card ul li { margin-bottom: 6px; }

.pillar-card { border-top: 4px solid var(--gold); }
.pillar-card:nth-child(2) { border-top-color: var(--blue); }
.pillar-card:nth-child(3) { border-top-color: var(--orange); }
.pillar-card:nth-child(4) { border-top-color: var(--success); }

/* ---------- Story / About split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
.quote-block {
  border-left: 4px solid var(--gold);
  background: var(--blue-light);
  padding: 22px 26px; border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-heading); font-style: italic; color: var(--blue);
  font-size: 1.15rem; margin: 24px 0;
}

/* ---------- Timeline (about page) ---------- */
.timeline { position: relative; padding-left: 30px; border-left: 3px solid var(--gold); }
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item::before {
  content: ""; position: absolute; left: -39px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%; background: var(--blue); border: 3px solid var(--gold);
}
.timeline-item h4 { margin-bottom: 6px; color: var(--blue); font-family: var(--font-heading); }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--white); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.testimonial p { font-style: italic; color: var(--grey); }
.testimonial .who { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.testimonial .avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--gold-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700;
}
.testimonial .who strong { display: block; color: var(--blue); font-family: var(--font-heading); font-size: 0.95rem; }
.testimonial .who span { font-size: 0.82rem; color: var(--grey-soft); }
.stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 10px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; color: var(--blue); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.96rem; color: var(--grey); background: var(--white);
  transition: border-color 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--grey-soft); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 0.85rem; color: var(--grey-soft); }
.checkbox-row input { width: auto; margin-top: 3px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.95rem; }
.alert-success { background: #e6f6ee; color: var(--success); border: 1px solid #b8e6cd; }
.alert-error { background: #fdecea; color: var(--danger); border: 1px solid #f5c2bb; }

/* ---------- Consultation modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,20,40,0.55); z-index: 900;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white); border-radius: var(--radius); max-width: 520px; width: 100%;
  padding: 34px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); position: relative;
}
.modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--grey-soft); }
.modal-box h3 { margin-bottom: 6px; }
.modal-box .form-note { margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-dark); color: #cfe0ef; padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: #cfe0ef; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-logo img { height: 42px; margin-bottom: 14px; filter: brightness(0) invert(1); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.82rem; color: #9db6cf; }
.social-row { display: flex; gap: 10px; margin-top: 6px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; }
.social-row a:hover { background: var(--gold); color: var(--blue-dark); }
.disclosure { font-size: 0.78rem; color: #93aec8; margin-top: 18px; line-height: 1.6; }

/* WhatsApp floating button */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Page header (interior pages) ---------- */
.page-header { background: var(--blue); color: var(--white); padding: 56px 0; text-align: center; }
.page-header h1 { color: var(--white); margin-bottom: 8px; }
.page-header .crumbs { color: var(--gold); font-family: var(--font-heading); font-size: 0.85rem; letter-spacing: 0.5px; }
.page-header .crumbs a { color: #cfe0ef; }

/* ---------- Services detail ---------- */
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; padding: 50px 0; border-bottom: 1px solid var(--border); }
.service-detail:last-child { border-bottom: none; }
.service-detail.reverse .service-copy { order: 2; }
@media (max-width: 860px) { .service-detail, .service-detail.reverse .service-copy { grid-template-columns: 1fr; order: initial; } }
.service-copy .tag { display: inline-block; background: var(--gold-light); color: var(--blue); font-family: var(--font-heading); font-weight: 700; font-size: 0.78rem; padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }
.service-list { list-style: none; padding: 0; margin: 18px 0; }
.service-list li { padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--grey-soft); }
.service-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.service-visual { background: var(--blue-light); border-radius: var(--radius); padding: 40px; text-align: center; font-size: 4rem; }

/* ---------- Calculators ---------- */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.calc-tab-btn {
  font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem;
  padding: 11px 18px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--white); color: var(--grey); cursor: pointer;
}
.calc-tab-btn.active { background: var(--blue); border-color: var(--blue); color: var(--white); }
.calc-panel { display: none; }
.calc-panel.active { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .calc-panel.active { grid-template-columns: 1fr; } }
.calc-result { background: var(--blue); color: var(--white); border-radius: var(--radius); padding: 30px; }
.calc-result h4 { color: #cfe0ef; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.calc-result .big-number { font-family: var(--font-heading); font-size: 2.4rem; color: var(--gold); font-weight: 700; margin-bottom: 18px; }
.calc-breakdown { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 16px; }
.calc-breakdown div { display: flex; justify-content: space-between; font-size: 0.92rem; }
.calc-breakdown span:first-child { color: #cfe0ef; }
.range-value { font-family: var(--font-heading); color: var(--blue); font-weight: 700; float: right; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.calc-disclaimer { font-size: 0.8rem; color: var(--grey-soft); margin-top: 16px; }

/* ---------- Blog ---------- */
.blog-card img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 16/10; object-fit: cover; }
.blog-card { padding: 0; overflow: hidden; }
.blog-card .blog-card-body { padding: 24px; }
.blog-meta { font-size: 0.8rem; color: var(--grey-soft); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font-heading); }
.blog-meta span { color: var(--orange); }
.blog-post-body { max-width: 780px; margin: 0 auto; font-size: 1.05rem; }
.blog-post-body h2, .blog-post-body h3 { margin-top: 32px; }
.blog-post-body img { border-radius: var(--radius); margin: 20px 0; }
.blog-cover { max-width: 900px; margin: 0 auto 30px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }

/* ---------- Legal pages ---------- */
.legal-body { max-width: 820px; margin: 0 auto; }
.legal-body h2 { margin-top: 36px; }
.legal-body ul { color: var(--grey-soft); }

/* ---------- Pricing/CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--gold) 0%, var(--orange) 100%); color: var(--blue-dark); text-align: center; padding: 60px 0; border-radius: var(--radius); }
.cta-band h2 { color: var(--blue-dark); }
.cta-band .btn-primary { background: var(--blue); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--blue-dark); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.85rem; color: var(--grey-soft); }
.badge { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 0.75rem; font-family: var(--font-heading); font-weight: 700; padding: 4px 10px; border-radius: 999px; }

/* Reveal-on-scroll (progressive enhancement, JS adds .in) */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
