/* ============================================
   AIBE Hindu Family Law — styles.css
   Digital E-Filing Coach | Amanuddin Education
   ============================================ */

/* === GOOGLE FONTS IMPORT (fallback if offline) === */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@300;400;600;700&display=swap');

/* === CSS VARIABLES === */
:root {
  --navy:      #1a3a5c;
  --navy-dark: #0f2540;
  --blue:      #2471a3;
  --blue-lt:   #7fb3d3;
  --green:     #1e8449;
  --green-lt:  #a9dfbf;
  --saffron:   #ca6f1e;
  --saffron-lt:#fdebd0;
  --violet:    #6c3483;
  --violet-lt: #d7bde2;
  --red:       #c0392b;
  --red-lt:    #fadbd8;
  --teal:      #1a8a8a;
  --gold:      #b7950b;
  --gold-lt:   #fef9e7;
  --white:     #ffffff;
  --off-white: #f8f9fa;
  --gray-lt:   #eef2f7;
  --gray:      #7f8c8d;
  --text:      #1c2833;
  --text-muted:#566573;
  --border:    #d5e8f5;
  --shadow:    rgba(26,58,92,0.12);

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Sans 3', 'Segoe UI', Arial, sans-serif;

  --radius:    10px;
  --radius-lg: 16px;
  --transition: 0.25s ease;
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* === CONTAINERS === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--navy-dark);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 15px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  font-size: 2rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: #f0c060;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.72rem;
  color: #aabfd4;
  font-weight: 400;
}

.print-btn {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: white;
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(192,57,43,0.4);
}

.print-btn:hover {
  background: linear-gradient(135deg, #a93226, #c0392b);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(192,57,43,0.5);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, #1a3a5c 50%, #0d4f6e 100%);
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: rgba(255,200,60,0.05);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(100,200,255,0.05);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,200,60,0.15);
  border: 1px solid rgba(255,200,60,0.35);
  color: #f0c060;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: #b8d4ea;
  max-width: 750px;
  margin: 0 auto 1.8rem;
  font-weight: 400;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #d6eaf8;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc-section {
  background: var(--white);
  padding: 2.5rem 0;
  border-bottom: 3px solid var(--border);
}

.toc-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.toc-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.toc-btn {
  background: var(--gray-lt);
  border: 2px solid var(--border);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.toc-btn:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--shadow);
}

.toc-btn--highlight {
  background: linear-gradient(135deg, #f0c060, #e6a817);
  border-color: #d4a010;
  color: var(--navy-dark);
}

.toc-btn--highlight:hover {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}

/* ============================================
   SECTION HEADINGS
   ============================================ */
.content-section {
  padding: 3.5rem 0;
}

.content-section.alt-bg {
  background: var(--gray-lt);
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 0.4rem;
  background: rgba(36,113,163,0.08);
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 4px;
  border-left: 3px solid var(--blue);
}

.section-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.sub-heading {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--saffron);
  padding-left: 0.75rem;
}

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  box-shadow: 0 4px 20px var(--shadow);
}

.card p {
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.75;
  font-weight: 400;
}

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.col-box {
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  border: 1.5px solid;
}

.col-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.col-box ul {
  padding-left: 1.2rem;
  font-size: 0.9rem;
  line-height: 1.7;
}

.col-box li { margin-bottom: 0.35rem; }

.col-green { background: #eafaf1; border-color: #1e8449; color: var(--text); }
.col-green h3 { color: #1e8449; }

.col-red { background: #fdedec; border-color: #c0392b; color: var(--text); }
.col-red h3 { color: #c0392b; }

.col-blue { background: #eaf4fb; border-color: #2471a3; color: var(--text); }
.col-blue h3 { color: #2471a3; }

.col-violet { background: #f4ecf7; border-color: #6c3483; color: var(--text); }
.col-violet h3 { color: #6c3483; }

.col-saffron { background: #fef5e7; border-color: #ca6f1e; color: var(--text); }
.col-saffron h3 { color: #ca6f1e; }

/* ============================================
   HIGHLIGHT BOX
   ============================================ */
.highlight-box {
  background: linear-gradient(135deg, #f0f7ff, #e8f4f8);
  border: 1.5px solid var(--blue-lt);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-top: 1rem;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed #c5dff0;
  font-size: 0.92rem;
  line-height: 1.65;
}

.highlight-item:last-child { border-bottom: none; }

.hi-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.highlight-item ul {
  padding-left: 1.2rem;
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

/* ============================================
   TABLES
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(26,58,92,0.08);
}

.data-table thead tr {
  background: linear-gradient(135deg, var(--navy), #2d6a9f);
}

.data-table thead th {
  color: white;
  padding: 0.9rem 1rem;
  text-align: left;
  font-size: 0.87rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.data-table tbody tr {
  border-bottom: 1px solid #dde9f5;
  transition: background var(--transition);
}

.data-table tbody tr:nth-child(even) {
  background: #f3f8fd;
}

.data-table tbody tr:hover {
  background: #e3f0fb;
}

.data-table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: top;
  color: var(--text);
  line-height: 1.65;
}

.data-table tbody td ul {
  padding-left: 1.1rem;
  margin: 0;
}

.data-table tbody td li {
  margin-bottom: 0.2rem;
  font-size: 0.87rem;
}

/* ============================================
   BULLET LISTS
   ============================================ */
.bullet-list {
  padding-left: 1.4rem;
  list-style: none;
  margin: 0.5rem 0;
}

.bullet-list li {
  position: relative;
  padding-left: 0.3rem;
  font-size: 0.93rem;
  line-height: 1.7;
  margin-bottom: 0.45rem;
  color: var(--text);
}

.bullet-list li::before {
  content: '▸';
  position: absolute;
  left: -1.1rem;
  color: var(--blue);
  font-size: 0.85rem;
  top: 0.05rem;
}

/* ============================================
   NUMBERED LIST
   ============================================ */
.numbered-list {
  margin: 0.75rem 0;
}

.nl-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.93rem;
  line-height: 1.7;
}

.nl-item:last-child { border-bottom: none; }

.nl-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

/* ============================================
   EXAM NOTE
   ============================================ */
.exam-note {
  background: #fffde7;
  border-left: 4px solid #f0c060;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.85rem 1.1rem;
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: #5d4e00;
  line-height: 1.7;
}

.mini-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 0.5rem 0.8rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ============================================
   DIVORCE GROUNDS GRID
   ============================================ */
.grounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.ground-card {
  background: #fdfdfd;
  border: 1.5px solid #dde9f5;
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  transition: var(--transition);
}

.ground-card:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 12px var(--shadow);
  transform: translateY(-2px);
}

.gc-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.4rem;
}

.ground-card strong {
  font-size: 0.88rem;
  color: var(--navy);
  display: block;
  margin-bottom: 0.4rem;
}

.ground-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   SVG / DIAGRAM CONTAINERS
   ============================================ */
.svg-container {
  background: #f8fbff;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  overflow-x: auto;
  text-align: center;
}

.diagram-svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ============================================
   STUDY ROADMAP
   ============================================ */
.roadmap-container {
  position: relative;
}

.roadmap-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.6rem;
  margin-bottom: 0;
  transition: var(--transition);
  position: relative;
}

.roadmap-step:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 20px var(--shadow);
  transform: translateX(6px);
}

/* Step-specific colors */
.roadmap-step[data-step="1"] { border-left: 5px solid #2471a3; }
.roadmap-step[data-step="2"] { border-left: 5px solid #1e8449; }
.roadmap-step[data-step="3"] { border-left: 5px solid #884ea0; }
.roadmap-step[data-step="4"] { border-left: 5px solid #ca6f1e; }
.roadmap-step[data-step="5"] { border-left: 5px solid #c0392b; }
.roadmap-step[data-step="6"] { border-left: 5px solid #1a8a8a; }
.roadmap-step[data-step="7"] { border-left: 5px solid #b7950b; }
.roadmap-step[data-step="8"] { border-left: 5px solid #1a3a5c; }

.rm-step-num {
  flex-shrink: 0;
  background: var(--navy);
  color: #f0c060;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  min-width: 60px;
  text-align: center;
  margin-top: 0.2rem;
}

.rm-step-content h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.rm-step-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

.roadmap-arrow {
  text-align: center;
  font-size: 1.4rem;
  color: var(--blue);
  line-height: 1;
  padding: 0.3rem 0;
}

/* ============================================
   QUICK REVISION GRID
   ============================================ */
.revision-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.rev-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  text-align: center;
  transition: var(--transition);
}

.rev-card:hover {
  border-color: var(--navy);
  box-shadow: 0 5px 15px var(--shadow);
  transform: translateY(-3px);
}

.rev-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.rev-card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.rev-card p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   CASE LIST
   ============================================ */
.case-list {
  margin-top: 0.75rem;
}

.case-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.case-item:last-child { border-bottom: none; }

.case-name {
  font-weight: 700;
  color: var(--navy);
  font-style: italic;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

/* ============================================
   KEY TAKEAWAYS
   ============================================ */
.takeaway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, #f0f7ff, #e8f4f8);
  border: 1.5px solid #c5dff0;
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.ta-num {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: rgba(36,113,163,0.25);
  line-height: 1;
  margin-top: 0.1rem;
}

.takeaway-item p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer-section {
  background: var(--navy-dark);
  padding: 2.5rem 0 2rem;
}

.disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255,200,60,0.08);
  border: 1px solid rgba(255,200,60,0.25);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  font-size: 0.87rem;
  color: #c9d6e3;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.disclaimer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.disclaimer-box strong {
  color: #f0c060;
}

.footer-credit {
  text-align: center;
  font-size: 0.8rem;
  color: #6e8fa8;
  line-height: 1.8;
  font-weight: 400;
}

.footer-credit strong {
  color: #aabfd4;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--navy);
  color: #f0c060;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--blue);
  transform: translateY(-2px);
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .site-header, .print-btn, .toc-section, .back-to-top, .hero-tags {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: white;
  }

  .hero {
    background: #1a3a5c !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 1.5rem 0;
  }

  .hero-title { color: white !important; font-size: 1.6rem; }
  .hero-desc { color: #ccc !important; }

  .content-section, .content-section.alt-bg {
    padding: 1.5rem 0;
    background: white !important;
  }

  .card {
    border: 1px solid #ccc;
    box-shadow: none;
    padding: 1rem;
    page-break-inside: avoid;
  }

  .data-table thead tr {
    background: #1a3a5c !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .diagram-svg {
    max-width: 100%;
    page-break-inside: avoid;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .grounds-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .revision-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .takeaway-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .roadmap-step {
    page-break-inside: avoid;
    margin-bottom: 0.5rem;
  }

  h2, h3 {
    page-break-after: avoid;
  }

  .disclaimer-section {
    background: #1a3a5c !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .grounds-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .revision-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .takeaway-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.3rem 1.2rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .roadmap-step {
    flex-direction: column;
    gap: 0.8rem;
  }

  .rm-step-num {
    align-self: flex-start;
  }

  .toc-grid {
    gap: 0.5rem;
  }

  .toc-btn {
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .grounds-grid {
    grid-template-columns: 1fr;
  }

  .revision-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .section-heading {
    font-size: 1.3rem;
  }

  .data-table {
    font-size: 0.8rem;
  }

  .data-table th, .data-table td {
    padding: 0.6rem 0.7rem;
  }
}