/* ============================================================
   MarThomaAnswers.org — Shared Stylesheet
   ============================================================ */

:root {
  --maroon:    #7B1C2E;
  --maroon-dk: #55131F;
  --gold:      #C9963A;
  --gold-lt:   #F0D080;
  --navy:      #1A2744;
  --cream:     #FAF6F0;
  --text:      #2C2C2C;
  --muted:     #6B6B6B;
  --border:    #DDD5C8;
  --white:     #FFFFFF;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,0,0,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
}

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

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

/* ── Navigation ── */
nav {
  background: var(--maroon);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 62px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.nav-logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  filter: invert(1) brightness(2);
  flex-shrink: 0;
}
.nav-logo span {
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--gold-lt);
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.nav-logo:hover span { color: var(--white); }
.nav-logo:hover { text-decoration: none; }

/* Hero logo */
.hero-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  filter: invert(1) brightness(3);
  margin: 0 auto 1.25rem;
  display: block;
  opacity: 0.92;
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  font-family: sans-serif;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
  text-decoration: none;
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: 0.3s;
}

/* ── Page Wrapper ── */
.page { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--maroon-dk) 60%, var(--maroon) 100%);
  color: var(--white);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '✝';
  position: absolute;
  font-size: 22rem;
  opacity: 0.04;
  top: -4rem;
  right: -3rem;
  color: var(--white);
  line-height: 1;
}
.hero-inner { max-width: 760px; margin: 0 auto; position: relative; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; margin-bottom: 1rem; }
.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  font-family: sans-serif;
  font-weight: 300;
}
.hero-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--white);
  font-family: sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}

/* ── Search / Chat Box ── */
.search-box {
  display: flex;
  max-width: 620px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
}
.search-box input {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border: none;
  outline: none;
  font-family: sans-serif;
  color: var(--text);
}
.search-box button {
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-family: sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-box button:hover { background: var(--maroon); }

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--maroon); color: var(--white); }
.btn-primary:hover { background: var(--maroon-dk); color: var(--white); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #b07c25; color: var(--white); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--maroon);
  border: 2px solid var(--maroon);
}
.btn-outline:hover { background: var(--maroon); color: var(--white); text-decoration: none; }

/* ── Quick Links / Card Grid ── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 4px solid var(--gold);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 24px rgba(0,0,0,0.13); }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--maroon); }
.card p { font-size: 0.875rem; color: var(--muted); font-family: sans-serif; line-height: 1.5; }
.card a { display: block; }
.card a:hover { text-decoration: none; }

/* ── Section headings ── */
.section-heading {
  text-align: center;
  margin: 3.5rem 0 2.5rem;
}
.section-heading h2 { font-size: 1.85rem; color: var(--navy); }
.section-heading p { color: var(--muted); font-family: sans-serif; margin-top: 0.5rem; }
.divider {
  width: 60px;
  height: 4px;
  background: var(--gold);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* ── Page Title Banner ── */
.page-banner {
  background: linear-gradient(135deg, var(--navy), var(--maroon-dk));
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.page-banner h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 0.5rem; }
.page-banner p { opacity: 0.8; font-family: sans-serif; max-width: 640px; margin: 0 auto; }

/* ── Timeline (History) ── */
.timeline { position: relative; padding-left: 2.5rem; margin-top: 2rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(var(--gold), var(--maroon));
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 3rem; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.08rem;
  top: 0.45rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item h3 {
  font-size: 1.2rem;
  color: var(--maroon);
  margin-bottom: 0.25rem;
}
.timeline-item .era {
  font-family: sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.timeline-item p { font-size: 0.95rem; color: var(--text); }

/* ── Accordion (FAQ) ── */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.accordion-header {
  width: 100%;
  background: var(--white);
  border: none;
  text-align: left;
  padding: 1.1rem 1.5rem;
  font-family: 'Georgia', serif;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.accordion-header:hover { background: var(--cream); }
.accordion-header.open { background: var(--maroon); color: var(--white); }
.accordion-icon { font-size: 1.2rem; transition: transform 0.3s; flex-shrink: 0; }
.accordion-header.open .accordion-icon { transform: rotate(45deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--white);
}
.accordion-body.open { max-height: 600px; }
.accordion-body-inner { padding: 1rem 1.5rem 1.25rem; font-size: 0.95rem; color: var(--text); border-top: 1px solid var(--border); }

/* ── Chat Interface ── */
.chat-container {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px;
}
.chat-header {
  background: var(--maroon);
  color: var(--white);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: sans-serif;
  font-weight: 600;
}
.chat-status { width: 10px; height: 10px; border-radius: 50%; background: #4CAF50; flex-shrink: 0; }
.context-toggle {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
.toggle-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.2s;
}
.toggle-btn.active, .toggle-btn:hover { background: rgba(255,255,255,0.35); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #F9F5F0;
}
.msg {
  max-width: 80%;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  font-family: sans-serif;
}
.msg-bot { background: var(--white); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 3px; }
.msg-user { background: var(--maroon); color: var(--white); align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-input-row {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.chat-input-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-family: sans-serif;
  color: var(--text);
}
.chat-input-row button {
  background: var(--maroon);
  color: var(--white);
  border: none;
  padding: 0 1.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-input-row button:hover { background: var(--maroon-dk); }
.suggested-questions { margin-top: 1.5rem; }
.suggested-questions p { font-family: sans-serif; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.sq-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sq-chip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-family: sans-serif;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  color: var(--maroon);
}
.sq-chip:hover { background: var(--maroon); color: var(--white); border-color: var(--maroon); }

/* ── Belief / Doctrine Cards ── */
.belief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.belief-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  border-left: 5px solid var(--maroon);
}
.belief-card h3 { color: var(--maroon); font-size: 1.1rem; margin-bottom: 0.5rem; }
.belief-card p { font-size: 0.9rem; color: var(--text); font-family: sans-serif; line-height: 1.6; }

/* ── Two-column layout ── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; margin-top: 2rem; }

/* ── Info Table ── */
.info-table { width: 100%; border-collapse: collapse; font-family: sans-serif; font-size: 0.9rem; }
.info-table th { background: var(--maroon); color: var(--white); padding: 0.75rem 1rem; text-align: left; }
.info-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); }
.info-table tr:nth-child(even) td { background: #F5EFE8; }

/* ── Map placeholder ── */
.map-placeholder {
  background: linear-gradient(135deg, #E8E0D5, #D5CCC0);
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted);
  font-family: sans-serif;
  border: 2px dashed var(--border);
  margin-top: 2rem;
}
.map-placeholder .map-icon { font-size: 3rem; opacity: 0.5; }

/* ── Region Cards (Global) ── */
.region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.region-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.region-flag { font-size: 2rem; flex-shrink: 0; }
.region-card h3 { font-size: 1rem; color: var(--navy); margin-bottom: 0.25rem; }
.region-card p { font-size: 0.85rem; color: var(--muted); font-family: sans-serif; line-height: 1.5; }

/* ── Resource List ── */
.resource-list { list-style: none; margin-top: 1.5rem; }
.resource-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-family: sans-serif;
  font-size: 0.95rem;
}
.resource-list li:last-child { border-bottom: none; }
.resource-icon { font-size: 1.4rem; flex-shrink: 0; }

/* ── Contact Form ── */
.contact-form { max-width: 640px; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: sans-serif;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--maroon); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ── Callout Box ── */
.callout {
  background: linear-gradient(135deg, var(--maroon), var(--navy));
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}
.callout h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.callout p { opacity: 0.85; font-family: sans-serif; margin-bottom: 1.5rem; }

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-family: sans-serif;
  font-size: 0.85rem;
}
footer a { color: var(--gold-lt); }
footer a:hover { color: var(--white); }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-bottom: 1.25rem; }

/* ── Utilities ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.gold { color: var(--gold); }
.muted { color: var(--muted); font-family: sans-serif; font-size: 0.9rem; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 62px; left: 0; right: 0; background: var(--maroon-dk); padding: 1rem; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; border-radius: 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .nav-toggle { display: flex; }
  nav { position: relative; }
  .two-col { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1rem 3rem; }
  .hero::before { font-size: 12rem; }
  .chat-container { height: 480px; }
}
