/* =========================================
   The Olive Branch — Global Styles
   Using fixed header image for hero banner
   ========================================= */

/* ===== Theme variables — master palette ===== */
:root{
  /* Brand olives & accent */
  --church-primary: #7B7A60;        /* muted olive */
  --church-primary-dark: #4F5A3A;   /* deep olive */
  --church-gold: #D4AF37;           /* accent */

  /* Backgrounds */
  --site-background: #F3EEDD;       /* warm parchment canvas */
  --navbar-background: #7B7A60;     /* olive band */
  --card-background: #FAF7ED;       /* soft parchment */

  /* Text */
  --text-primary: #3A3A2A;          /* body text */
  --text-secondary: #6E6B59;        /* muted */
  --text-heading: #4F5A3A;          /* headings */

  /* Borders & shadows */
  --border-color: #E4DDC9;          /* light border */
  --border-accent: #CFC7AF;         /* darker border */
  --shadow-light: rgba(0,0,0,0.05);
  --shadow-medium: rgba(0,0,0,0.14);
}

/* ===== Base ===== */
html { scroll-behavior: smooth; }
body{
  background: var(--site-background);
  color: var(--text-primary);
  font-family: "Georgia","Times New Roman",serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,h2,h3,h4,h5,h6{
  color: var(--text-heading);
  font-family: "Arial","Helvetica",sans-serif;
  font-weight: 700;
  line-height: 1.25;
  margin-top: 1.2rem;
  margin-bottom: .6rem;
}
.display-1,.display-2,.display-3,.display-4,.display-5,.display-6{
  font-family: "Arial","Helvetica",sans-serif;
  font-weight: 800;
}

/* TIGHTENED paragraph spacing & line-height */
p{
  margin-bottom: 0.2rem;          /* was 0.3rem */
  color: var(--text-primary);
  line-height: 1.45;              /* was body default ~1.6 */
}
small, .text-muted{ color: var(--text-secondary) !important; }

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

/* ===== Bible Verse & Quote Styling ===== */
/* TIGHTENED blockquote margins/padding/line-height */
blockquote, .quote-block {
  background: transparent;
  border: none;
  padding: 0.5rem 0.75rem;        /* was 1rem 1rem */
  margin: 0.5rem auto 0.2rem auto;/* was 1rem auto 0.3rem auto */
  font-style: italic;
  font-size: 1.15rem;             /* was 1.2rem */
  line-height: 1.45;              /* was 1.6 */
  text-align: center;
  max-width: 80%;
  position: relative;
  color: var(--text-heading);
}

blockquote p, .quote-block p {
  font-style: italic;
  font-size: 1.15rem;             /* was 1.2rem */
  line-height: 1.45;              /* was 1.6 */
  margin-bottom: 0.1rem;          /* was 0 */
  color: var(--text-heading);
  text-align: center;
}

/* Scripture references - immediately after verse */
/* TIGHTENED space between quote and reference */
.scripture-ref, .verse-reference {
  font-size: 0.9rem;              /* was 0.95rem */
  color: var(--text-secondary);
  font-style: normal;
  font-weight: 600;
  margin-top: 0.2rem;             /* was -1.5rem */
  margin-bottom: 0.8rem;          /* was 2rem */
  text-align: center;
  display: block;
}

/* Article content enhanced quote formatting */
/* TIGHTENED margins/padding/line-height inside articles */
.article-content blockquote {
  background: transparent;
  border: none;
  margin: 0.5rem auto 0.2rem auto;/* was 1rem auto 0.3rem auto */
  padding: 0.5rem 0.75rem;        /* was 1rem 1rem */
  text-align: center;
  max-width: 85%;
}

.article-content blockquote p {
  font-size: 1.15rem;             /* was 1.2rem */
  line-height: 1.45;              /* was 1.8 */
  color: var(--text-heading);
  margin-bottom: 0.1rem;          /* was 0 */
  font-style: italic;
  text-align: center;
}

/* Callout blocks from Notion */
.callout-block {
  background: var(--card-background);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.callout-block .callout-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ===== Navbar ===== */
.navbar{
  background: var(--navbar-background) !important;
  box-shadow: 0 2px 4px var(--shadow-light);
  border-bottom: 1px solid var(--border-accent);
}
.navbar .navbar-brand,
.navbar .nav-link{ color: #fff !important; }
.navbar .nav-link:hover{ color: #fff !important; opacity: .9; }
.navbar-toggler{
  border-color: rgba(255,255,255,.3);
}
.navbar-toggler-icon{
  filter: invert(100%);
}

/* ===== Hero banner (fixed image) ===== */
.hero-banner { margin: 0 0 1rem 0; }
.hero-banner .hero-img {
  display: block;
  width: 100%;
  height: auto;
  line-height: 0;
  border: 0;
}

/* Optional: light olive tint overlay if PNG looks slightly off */
.hero-banner.tinted { position: relative; }
.hero-banner.tinted::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(123,122,96,0.04);
  pointer-events: none;
}

/* ===== Section headings ===== */
.section-title{
  color: var(--text-heading);
  letter-spacing: .02em;
  margin: 1.5rem 0 .75rem;
}

/* ===== Cards / articles ===== */
.card{
  background: var(--card-background);
  border: 1px solid var(--border-color);
  box-shadow: 0 6px 16px var(--shadow-light);
  border-radius: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-medium);
}

.card img{ 
  border-top-left-radius: 12px; 
  border-top-right-radius: 12px; 
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body p {
  flex-grow: 1;
  margin-bottom: 0.3rem;
}

/* Enhanced article card image styling for smart cropping */
.card-img-top {
  width: 100% !important;
  height: 250px !important; /* Increased height for better aspect ratio */
  object-fit: cover !important;
  object-position: center !important; /* Center positioning shows more of the image */
  display: block !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  background-color: #f5f5f5; /* Fallback background while loading */
  transition: transform 0.3s ease;
}

/* Smart positioning for different image types */
.card:hover .card-img-top {
  transform: scale(1.05); /* Subtle zoom on hover */
}

/* Responsive adjustments for different screen sizes */
@media (min-width: 768px) {
  .card-img-top {
    height: 280px !important; /* Even taller on larger screens */
    object-position: center !important; /* Keep center positioning */
  }
}

@media (max-width: 767px) {
  .card-img-top {
    height: 220px !important; /* Slightly shorter on mobile but still good ratio */
  }
}

/* Article detail page image styling */
.article-content img, .img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-light);
  margin: 1.5rem 0;
}
/* Article detail page paragraph spacing */
.article-content p {
  margin-bottom: 1.2em; /* add space after each paragraph */
}


/* Ensure article header images look good */
.mb-4 .img-fluid.rounded.shadow {
  max-height: 400px;
  width: 100%;
  object-fit: cover;
  object-position: center 30%; /* Better positioning for article headers */
}

/* Ensure consistent card structure */
.card.h-100 {
  display: flex !important;
  flex-direction: column !important;
}

.card.h-100 .card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}
.card .card-title{ color: var(--text-heading); }
.card .card-text{ color: var(--text-primary); }

.hr-soft{
  height: 1px; border: 0;
  background: linear-gradient(to right, transparent, var(--border-color), transparent);
  margin: .75rem 0;
}

/* ===== Buttons ===== */
.btn-olive{
  --btn-bg: var(--church-primary);
  --btn-bg-hover: var(--church-primary-dark);
  background: var(--btn-bg);
  color: #fff;
  border: 1px solid var(--church-primary-dark);
}
.btn-olive:hover{ background: var(--btn-bg-hover); color:#fff; }
.btn-gold{
  background: var(--church-gold); color:#1f1f1f;
  border: 1px solid #b6932d;
}
.btn-gold:hover{ filter: brightness(.95); color:#1f1f1f; }

/* ===== Lists / links ===== */
.list-unstyled li+li{ margin-top: .35rem; }
.link-muted{ color: var(--text-secondary); }
.link-muted:hover{ color: var(--church-primary-dark); }

/* ===== Utilities ===== */
.bg-olive{ background: var(--church-primary) !important; color:#fff !important; }
.text-olive{ color: var(--church-primary) !important; }
.text-deep-olive{ color: var(--church-primary-dark) !important; }
.bg-parchment{ background: var(--site-background) !important; }
.border-parchment{ border-color: var(--border-color) !important; }

.rounded-12{ border-radius: 12px !important; }
.shadow-soft{ box-shadow: 0 6px 16px var(--shadow-light) !important; }
.hero-tight { margin-bottom: .5rem !important; }

/* ===== Footer ===== */
.site-footer{
  background: var(--navbar-background);
  color: #fff;
  border-top: 1px solid var(--border-accent);
  box-shadow: 0 -2px 4px var(--shadow-light);
}
.site-footer a{ color:#fff; opacity:.9; }
.site-footer a:hover{ opacity:1; }

/* ===== Accessibility: hide skip link unless focused ===== */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto; padding: .5rem .75rem;
  background: #fff; border: 1px solid #CFC7AF; border-radius: 6px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 992px){
  .navbar .nav-link{ padding: .6rem 1rem; }
}
@media (max-width: 576px){
  h1{ font-size: 1.9rem; }
  .section-title{ font-size: 1.75rem; }
  .card{ border-radius: 10px; }
}

/* Enhanced article card image styling for smart cropping */
.card-img-top {
  width: 100% !important;
  height: 250px !important; /* Increased height for better aspect ratio */
  object-fit: cover !important;
  object-position: center !important; /* Center positioning shows more of the image */
  display: block !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
}

/* Desktop gets even taller cards for more content visibility */
@media (min-width: 992px) {
  .card-img-top {
    height: 280px !important;
  }
}

/* === Dove logo in navbar === */
.dove-logo {
  height: 38px;   /* balanced size for desktop */
  width: auto;
  display: inline-block;
}

/* Shrink slightly on mobile so it doesn’t crowd */
@media (max-width: 576px) {
  .dove-logo {
    height: 32px;
  }
}

/* Ensure italics and bold stay inline */
.article-content em,
.article-content i,
.article-content strong,
.article-content b {
  display: inline;
  font-style: italic;   /* slant for em/i */
  font-weight: inherit; /* strong/bold still bolds properly */
}

/* Prevent strange line breaks around emphasis */
.article-content p em,
.article-content p i,
.article-content p strong,
.article-content p b {
  white-space: normal;
}
/* Make the article normal by default */
.article-content { font-style: normal; }

/* Only make quotes italic */
.article-content blockquote,
.article-content blockquote p { font-style: italic; }

/* Ensure strong/b tags are never forced italic */
.article-content strong, .article-content b { font-style: normal; }

/* Keep emphasis italic where intended */
.article-content em, .article-content i { font-style: italic; }
/* tailwind.css or globals.css (after @tailwind directives) */
.prose {
  @apply not-italic;
}

.prose p {
  @apply not-italic;
}

.prose strong {
  @apply not-italic font-semibold;
}

.prose em {
  @apply italic;
}

.prose blockquote p {
  @apply italic;
}
.article-content strong,
.article-content b {
  font-style: normal;   /* cancel italics */
  font-weight: bold;    /* force bold */
}
.article-content p:empty,
.article-content p:has(em:empty) { display: none; }