/*
 * ============================================================
 *  NIMADI LOKBHASHA — Shared Stylesheet
 *  File: assets/css/main.css
 *
 *  Sections:
 *    1. CSS Variables (colors, fonts)
 *    2. Reset & Base
 *    3. Site Header (title bar + author strip)
 *    4. Hero Banner
 *    5. Navigation (top-nav links)
 *    6. Page Content — common utilities
 *    7. Footer
 *    8. Responsive / Mobile
 * ============================================================
 */

/* ── 1. CSS VARIABLES ─────────────────────────────────────── */
:root {
  /* Colors */
  --maroon:        #8B1A1A;   /* main brand red-maroon */
  --maroon-dark:   #6B1212;
  --ochre:         #C8873A;   /* warm gold accent */
  --cream:         #F5EDE0;   /* unified site background — header, body, footer */
  --warm-white:    #F5EDE0;   /* same as cream — keeps all backgrounds consistent */
  --text-dark:     #1A120A;   /* headings */
  --text-body:     #3D2B1A;   /* body copy */
  --text-muted:    #7A5C3E;   /* captions, secondary */
  --border:        #DDC9B0;   /* card borders */
  --link:          #8B1A1A;   /* inline links */

  /* Typography */
  --font-devanagari-serif: 'Noto Serif Devanagari', serif;
  --font-devanagari-sans:  'Noto Sans Devanagari', sans-serif;
  --font-latin-serif:      'Crimson Pro', serif;
}

/* ── 2. RESET & BASE ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--warm-white);
  color: var(--text-body);
  font-family: var(--font-devanagari-sans);
  font-size: 16px;
  line-height: 1.85;
  margin: 0;
  padding: 0;
}

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

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--ochre);
}

/* ── 3. SITE HEADER ──────────────────────────────────────── */
/*
 * The site header appears at the top of EVERY page.
 * It has two rows:
 *   Row 1 — big site title (left) + nav links (right)
 *   Row 2 — author strip (name + dash + photo + divider + quote)
 */
.site-header {
  background: var(--cream);
  padding: 0;                        /* removed — handled by inner wrappers */
  margin-bottom: 0;
}

/* Row 1: Title + Nav */
.site-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 48px 8px;            /* side padding moved here */
}

.site-title {
  font-family: var(--font-devanagari-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--maroon);
  text-decoration: none;
  line-height: 1.1;
}
.site-title:hover {
  color: var(--maroon-dark);
}

/* Navigation links (inline, right side of header) */
.top-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.top-nav a {
  font-family: var(--font-latin-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  padding: 6px 16px;
  transition: color 0.2s;
}
.top-nav a:hover {
  color: var(--maroon);
}
/* Active page link — underlined */
.top-nav a.active {
  border-bottom: 2px solid var(--text-dark);
  padding-bottom: 4px;
}

/* Row 2: Author strip */
.author-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 48px 18px;            /* side padding moved here */
}

.author-strip .author-name {
  font-family: var(--font-devanagari-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--maroon);
  white-space: nowrap;
  flex-shrink: 0;
}

.author-strip .author-dash {
  width: 28px;
  height: 2px;
  background: var(--text-muted);
  flex-shrink: 0;
}

.author-strip .author-photo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ochre);
  flex-shrink: 0;
}

.author-strip .vline {
  width: 1.5px;
  height: 46px;
  background: var(--ochre);
  flex-shrink: 0;
  margin: 0 8px;
}

.author-strip .author-quote {
  font-style: italic;
  color: var(--text-body);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ── 4. HERO BANNER ──────────────────────────────────────── */
.hero-banner {
  width: 100%;
  line-height: 0;
  background: var(--cream);   /* match surrounding background — no colour gap */
}
.hero-banner img {
  display: block;
  max-width: 1200px;   /* constrain image to match header content width */
  margin: 0 auto;      /* center the image */
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ── 5. PAGE CONTENT UTILITIES ───────────────────────────── */

/* Outer wrapper for all page content */
.page-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 28px 64px;
}

/* Page-level heading (centered, red) — e.g. "निमाड़ी लोकभाषा : एक परिचय" */
.page-title {
  font-family: var(--font-devanagari-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--maroon);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.4;
}

/* Section subheading — underlined, left-aligned */
.section-title {
  font-family: var(--font-devanagari-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin: 36px 0 12px;
}

/* Large section heading (not underlined) */
.section-heading {
  font-family: var(--font-devanagari-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--maroon);
  margin: 36px 0 14px;
}

/* Body paragraphs */
p {
  margin-bottom: 16px;
  line-height: 1.9;
}

/* Highlighted quote / intro text box */
.intro-quote {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  border-left: 4px solid var(--maroon);
  padding: 12px 20px;
  margin: 24px 0;
  background: var(--cream);
  border-radius: 0 6px 6px 0;
}

/* Lineage / language family box */
.lineage-box {
  background: linear-gradient(135deg, #FEF0DC 0%, #FDF6EC 100%);
  border-left: 4px solid var(--ochre);
  border-radius: 0 8px 8px 0;
  padding: 16px 22px;
  margin: 18px 0 24px;
  font-family: var(--font-devanagari-serif);
  font-size: 0.95rem;
  line-height: 2;
  color: var(--text-dark);
}

/* Numbered feature list (language characteristics) */
.feature-list {
  list-style: none;
  padding: 0;
  counter-reset: feat;
}
.feature-list li {
  counter-increment: feat;
  position: relative;
  padding: 16px 16px 16px 58px;
  margin-bottom: 12px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.feature-list li::before {
  content: counter(feat);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  background: var(--maroon);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}
.feature-list .example {
  display: block;
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 8px;
}
.feature-list .note {
  background: rgba(139,26,26,0.05);
  border-left: 3px solid var(--maroon);
  padding: 8px 14px;
  margin-top: 10px;
  font-size: 0.88rem;
  border-radius: 0 4px 4px 0;
  color: var(--text-muted);
}

/* Book / granth list */
.book-list {
  list-style: none;
  padding: 0;
}
.book-list li {
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  line-height: 1.8;
  font-size: 0.95rem;
}
.book-list li strong em {
  color: var(--maroon);
}

/* Book card grid (eBook page) */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 32px;
  margin: 32px 0;
}
.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.book-card img {
  width: 100%;
  max-width: 200px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  margin-bottom: 14px;
}
.book-card h3 {
  font-family: var(--font-devanagari-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.5;
}
.book-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.book-card .btn-ebook {
  display: inline-block;
  padding: 7px 20px;
  background: var(--maroon);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s;
}
.book-card .btn-ebook:hover {
  background: var(--maroon-dark);
  color: white;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);   /* fixed 2 columns */
  gap: 24px;
  margin: 32px 0;
}
.gallery-item {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.gallery-item img {
  width: 100%;
  height: auto;          /* natural aspect ratio — no cropping */
  display: block;
  transition: transform 0.3s;
}
.gallery-item:hover img {
  transform: scale(1.02);
}
.gallery-item .caption {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--cream);
  line-height: 1.5;
}

/* Note / info box */
.note-box {
  background: #FEF0DC;
  border: 1px solid var(--ochre);
  border-radius: 8px;
  padding: 14px 20px;
  margin: 24px 0;
  font-size: 0.9rem;
  line-height: 1.75;
}

/* About page — author bio card */
.bio-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin: 32px 0;
  padding: 28px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.bio-card img {
  width: 160px;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 3px solid var(--ochre);
  flex-shrink: 0;
}
.bio-card .bio-details h3 {
  font-family: var(--font-devanagari-serif);
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 10px;
}
.bio-card .bio-details p {
  font-size: 0.93rem;
  color: var(--text-body);
  margin-bottom: 8px;
}

/* Review stars */
.stars {
  color: var(--maroon);
  font-size: 1.1rem;
  letter-spacing: 2px;
}

/* Contact form */
.contact-form {
  max-width: 560px;
  margin: 28px 0;
}
.contact-form label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-devanagari-sans);
  font-size: 0.95rem;
  background: white;
  color: var(--text-dark);
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--maroon);
}
.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}
.btn-submit {
  padding: 11px 32px;
  background: var(--maroon);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover {
  background: var(--maroon-dark);
}

/* ── 6. FOOTER ───────────────────────────────────────────── */
/*
 * Light cream background, 3-column grid.
 * Matches original site: Explore | Connect | Learn
 */
.site-footer {
  background: var(--cream);
  border-top: 2px solid var(--maroon);
  padding: 44px 48px 28px;
}
.footer-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-family: var(--font-latin-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 12px;
}
.footer-col p,
.footer-col a {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.9;
  text-decoration: none;
  display: block;
}
.footer-col a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--maroon);
}
.footer-col a:hover {
  color: var(--ochre);
}
.footer-copy {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Newsletter inputs in footer */
.newsletter-label {
  font-size: 0.9rem;
  color: var(--text-body);
  margin-bottom: 8px;
}
.newsletter-input {
  width: 100%;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 0.88rem;
  background: white;
  color: var(--text-dark);
  margin-bottom: 10px;
  outline: none;
}
.newsletter-input:focus {
  border-color: var(--maroon);
}
.newsletter-btn {
  width: 100%;
  padding: 10px 16px;
  background: #4A4340;
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.newsletter-btn:hover {
  background: var(--maroon);
}

/* ── 7. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .site-title-bar, .author-strip { padding-left: 24px; padding-right: 24px; }
  .site-title { font-size: 1.8rem; }
  .top-nav a { padding: 6px 10px; font-size: 1rem; }
  .author-strip .author-quote { font-size: 0.85rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .bio-card { flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 600px) {
  .site-title-bar, .author-strip { padding-left: 16px; padding-right: 16px; }
  .site-title-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .top-nav { flex-wrap: wrap; gap: 0; }
  .top-nav a { padding: 4px 8px; font-size: 0.95rem; }
  .author-strip { flex-wrap: wrap; }
  .hero-banner img { height: 100px; }
  .page-content { padding: 28px 16px 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .book-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }   /* 1 column on mobile */
  .site-footer { padding: 32px 16px 20px; }
}
