/* ================================================
   Finance Tools India — styles.css
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&display=swap');

:root {
  --primary:       #1a5cff;
  --primary-dark:  #1246cc;
  --primary-light: #e8eeff;
  --accent:        #00b48a;
  --text-dark:     #0d1b2a;
  --text-mid:      #4a5568;
  --text-light:    #718096;
  --border:        #e2e8f0;
  --bg:            #ffffff;
  --bg-alt:        #f7f9fc;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.09);
  --shadow-lg:     0 8px 24px rgba(0,0,0,.10);
  --radius:        10px;
  --radius-lg:     16px;
  --max-w:         900px;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-display:  'DM Serif Display', Georgia, serif;
  --transition:    0.18s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

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

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
}

.site-logo span.logo-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  margin-bottom: 2px;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.site-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-mid);
  transition: color var(--transition);
}

.site-nav a:hover,
.site-nav a.active { color: var(--primary); text-decoration: none; }

/* ================================================
   HERO / PAGE HERO
   ================================================ */
.hero {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3a6e 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner { max-width: var(--max-w); margin: 0 auto; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  margin: 0 auto;
}
.trust-line {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

/* Tool page smaller hero */
.page-hero {
  background: var(--primary-light);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.page-hero-inner { max-width: var(--max-w); margin: 0 auto; }

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--text-dark);
  margin-bottom: .4rem;
}

.page-hero p {
  font-size: .975rem;
  color: var(--text-mid);
  max-width: 580px;
}

.breadcrumb {
  font-size: .8rem;
  color: var(--text-light);
  margin-bottom: .75rem;
}

.breadcrumb a { color: var(--primary); }

/* ================================================
   MAIN CONTENT WRAPPER
   ================================================ */
.content-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ================================================
   CARDS — HOMEPAGE TOOLS GRID
   ================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--primary);
  border-radius: 4px;
  margin-bottom: 1rem;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.tool-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .35rem;
}

.tool-card p {
  font-size: .875rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
}

.tool-card .card-link {
  font-size: .875rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.tool-card .card-link::after { content: '→'; }
.tool-card .card-link:hover { text-decoration: none; color: var(--primary-dark); }

/* ================================================
   CALCULATOR FORM
   ================================================ */
.calc-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: .4rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,255,.13);
}

.form-hint {
  font-size: .78rem;
  color: var(--text-light);
  margin-top: .3rem;
}

/* Two-column form layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
  display: inline-block;
  padding: .7rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(26,92,255,.35);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}

.btn-primary:active { transform: translateY(0); }

.btn-reset {
  background: transparent;
  color: var(--text-mid);
  border: 1.5px solid var(--border);
  margin-left: .75rem;
}

.btn-reset:hover {
  background: var(--bg-alt);
  border-color: var(--text-light);
  text-decoration: none;
}

.btn-group { margin-top: 1.5rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }

/* ================================================
   RESULT BOX
   ================================================ */
.result-box {
  background: var(--primary-light);
  border: 1.5px solid rgba(26,92,255,.2);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  display: none;
}

.result-box.visible { display: block; }

.result-box h3 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.result-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  border: 1px solid rgba(26,92,255,.12);
}

.result-item .label {
  font-size: .78rem;
  color: var(--text-light);
  margin-bottom: .25rem;
}

.result-item .value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
}

.result-item .value.accent { color: var(--primary); }

/* ================================================
   INTERNAL LINKS SECTION
   ================================================ */
.also-try {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.also-try h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: .85rem;
}

.also-try-links {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.also-try-links a {
  display: inline-block;
  padding: .4rem .9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dark);
  transition: background var(--transition), border-color var(--transition);
}

.also-try-links a:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* ================================================
   INFO SECTION (intro text)
   ================================================ */
.info-section {
  background: var(--bg-alt);
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
}

.info-section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.info-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: .75rem;
}

.info-section p {
  color: var(--text-mid);
  max-width: 700px;
  font-size: .95rem;
}

/* ================================================
   FOOTER
   ================================================ */
.site-footer {
  background: var(--text-dark);
  color: rgba(255,255,255,.65);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: .85rem;
}

.site-footer a {
  color: rgba(255,255,255,.85);
  margin: 0 .5rem;
}

.site-footer a:hover { color: #fff; }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-links { margin-top: .75rem; }

/* ================================================
   UTILITY
   ================================================ */
.tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: .2rem .6rem;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  margin-bottom: .5rem;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }

  .header-inner { gap: 1rem; }
  .site-nav { gap: 1rem; }
  .site-nav a { font-size: .8rem; }

  .result-grid { grid-template-columns: 1fr 1fr; }

  .hero { padding: 3.5rem 1rem 3rem; }
  .calc-card { padding: 1.25rem; }

  .btn-group { flex-direction: column; align-items: flex-start; }
  .btn-reset { margin-left: 0; }
}

@media (max-width: 400px) {
  .result-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
}
