/*
  The Daily Disciple - style.css v2
  Clean Bootstrap-friendly stylesheet

  Load Bootstrap CSS before this file.
  This keeps existing class names used across the site and fixes button conflicts.
*/

/* =========================================================
   1. Design Tokens
   ========================================================= */

:root {
  --bg: #f8f4ec;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #667085;
  --accent: #b98b3f;
  --accent-dark: #9f7331;
  --accent-deep: #8b642b;
  --accent-soft: #f1e3c6;
  --navy: #16213e;
  --navy-soft: #1f3a5f;
  --border: #eadfce;
  --shadow-soft: 0 18px 40px rgba(22, 33, 62, 0.06);
  --shadow-card: 0 14px 32px rgba(22, 33, 62, 0.08);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --container-max: 1120px;
}

/* =========================================================
   2. Base Reset
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

p {
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

section {
  padding: 48px 0;
}

.container {
  width: min(100% - 32px, var(--container-max));
  max-width: var(--container-max);
  margin-inline: auto;
}

/* =========================================================
   3. Bootstrap Navbar
   ========================================================= */

header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(248, 244, 236, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.navbar {
  padding: 0.95rem 0;
  background: rgba(255, 255, 255, 0.96) !important;
}

.navbar-brand.logo,
.logo {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy) !important;
  letter-spacing: 0.4px;
  text-decoration: none;
}

.navbar-brand.logo span,
.logo span {
  color: var(--accent);
}

.navbar-nav {
  gap: 0.15rem;
}

.nav-link {
  color: var(--navy) !important;
  font-weight: 600;
  padding: 0.55rem 0.75rem !important;
  border-radius: var(--radius-pill);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--accent-dark) !important;
  background: rgba(185, 139, 63, 0.08);
}

.navbar-toggler {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(185, 139, 63, 0.25);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    box-shadow: var(--shadow-soft);
  }

  .navbar-nav {
    gap: 0.35rem;
  }

  .nav-item.ms-lg-3 {
    margin-top: 0.5rem;
  }

  .navbar .btn {
    width: 100%;
  }
}

/* Old custom menu classes retained harmlessly for backwards compatibility */
.nav,
.nav-links,
.menu-btn {
  /* Bootstrap navbar is now the source of truth. */
}

/* =========================================================
   4. Buttons - Bootstrap-safe
   ========================================================= */

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-primary:link,
.btn-primary:visited {
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: var(--accent-dark);
  --bs-btn-hover-border-color: var(--accent-dark);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-focus-shadow-rgb: 185, 139, 63;
  --bs-btn-active-bg: var(--accent-deep);
  --bs-btn-active-border-color: var(--accent-deep);
  --bs-btn-active-color: #ffffff;
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.show {
  background-color: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
  color: #ffffff !important;
}

.btn-secondary,
.btn-secondary:link,
.btn-secondary:visited {
  --bs-btn-bg: var(--card);
  --bs-btn-border-color: var(--border);
  --bs-btn-color: var(--navy);
  --bs-btn-hover-bg: var(--accent-soft);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-hover-color: var(--navy);
  --bs-btn-focus-shadow-rgb: 185, 139, 63;
  --bs-btn-active-bg: var(--accent-soft);
  --bs-btn-active-border-color: var(--accent);
  --bs-btn-active-color: var(--navy);
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--navy) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--navy) !important;
}

.resource-card .btn,
.sidebar-card .btn,
.newsletter .btn,
.hero .btn,
.devotional-card .btn,
.article-content .btn {
  text-decoration: none;
}

.resource-card .btn-primary,
.sidebar-card .btn-primary,
.newsletter .btn-primary,
.hero .btn-primary,
.devotional-card .btn-primary,
.article-content .btn-primary {
  color: #ffffff !important;
}

/* =========================================================
   5. Hero Sections
   ========================================================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(185, 139, 63, 0.13), transparent 28%),
    radial-gradient(circle at bottom left, rgba(22, 33, 62, 0.08), transparent 34%),
    linear-gradient(135deg, #f8fafc 0%, #f3efe7 50%, #fffdf8 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(241, 227, 198, 0.55), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(185, 139, 63, 0.08), transparent 26%);
  pointer-events: none;
}

.hero::after {
  content: "✝";
  position: absolute;
  right: 4%;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(7rem, 15vw, 14rem);
  color: rgba(22, 33, 62, 0.045);
  line-height: 1;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(185, 139, 63, 0.14);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--navy);
  font-size: clamp(2.35rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.08;
}

.hero p {
  max-width: 720px;
  margin: 0 auto 1.75rem;
  color: var(--muted);
  font-size: clamp(1.02rem, 2.3vw, 1.2rem);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 767.98px) {
  .hero {
    padding: 3.75rem 0 3rem;
  }

  .hero::after {
    right: -1rem;
    opacity: 0.8;
  }

  .hero-buttons {
    display: grid;
    max-width: 360px;
    margin-inline: auto;
  }
}

/* =========================================================
   6. Section Headings
   ========================================================= */

.section-heading {
  text-align: center;
  margin-bottom: 2rem;
}

.section-heading h1,
.section-heading h2 {
  color: var(--navy);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-heading p {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
}

/* =========================================================
   7. Layout Utilities
   ========================================================= */

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2,
.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  section {
    padding: 64px 0;
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.article-layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .article-layout {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    align-items: start;
  }
}

/* =========================================================
   8. Cards
   ========================================================= */

.resource-card,
.devotional-card,
.article-content,
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.resource-card,
.sidebar-card {
  padding: 1.5rem;
}

.devotional-card,
.article-content {
  padding: 1.75rem;
}

@media (min-width: 768px) {
  .devotional-card,
  .article-content {
    padding: 2.5rem;
  }
}

.resource-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.resource-card h3,
.devotional-card h3,
.sidebar-card h3 {
  color: var(--navy);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.resource-card p,
.sidebar-card p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.resource-card a:not(.btn),
.sidebar-card a:not(.btn),
.article-content a:not(.btn),
.devotional-nav a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.resource-card a:not(.btn):hover,
.sidebar-card a:not(.btn):hover,
.article-content a:not(.btn):hover,
.devotional-nav a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.sidebar-card a:not(.btn) {
  display: block;
  margin-top: 0.65rem;
}

/* =========================================================
   9. Article / Devotional Pages
   ========================================================= */

.article-content h2 {
  color: var(--navy);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  margin: 1.75rem 0 0.75rem;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  color: var(--navy);
  font-weight: 700;
  margin: 1.4rem 0 0.55rem;
}

.article-content p,
.article-content li {
  color: var(--text);
  font-size: 1.03rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
}

.devotional-card small,
.devotional-day,
.devotional-category {
  display: inline-block;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.65px;
  text-transform: uppercase;
}

.devotional-day,
.devotional-category {
  margin: 0 0.5rem 0.5rem 0;
}

.verse,
.devotional-verse {
  color: var(--navy);
  font-weight: 700;
}

.verse {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin: 1.25rem 0;
  font-style: italic;
}

.devotional-nav {
  display: grid;
  gap: 0.85rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 640px) {
  .devotional-nav {
    grid-template-columns: 1fr 1fr;
  }

  .devotional-nav a:last-child {
    text-align: right;
  }
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--muted);
  --bs-breadcrumb-item-active-color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 700;
}

.reading-time,
.page-meta,
.article-meta {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

/* =========================================================
   10. Newsletter / CTA Blocks
   ========================================================= */

.newsletter {
  background:
    radial-gradient(circle at top right, rgba(185, 139, 63, 0.24), transparent 35%),
    linear-gradient(135deg, var(--navy) 0%, #1f2e55 100%);
  color: #ffffff;
  border-radius: 32px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.newsletter h2 {
  color: #ffffff;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 0.85rem;
}

.newsletter p {
  color: #d7dce8;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

.newsletter a:not(.btn) {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

.newsletter-mini .btn-primary,
.newsletter .btn-primary {
  color: #ffffff !important;
}

.newsletter-form {
  display: grid;
  gap: 0.75rem;
  max-width: 540px;
  margin: 0 auto;
}

.newsletter-form input {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 1rem;
}

.newsletter-form button {
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .newsletter {
    padding: 3rem 2rem;
  }

  .newsletter-form {
    grid-template-columns: 1fr auto;
  }
}

/* =========================================================
   11. Archive / Search / Filters
   ========================================================= */

.archive-tools {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 2rem;
}

.devotional-search,
.search-input,
.form-control {
  border: 1px solid var(--border);
}

.devotional-search {
  max-width: 640px;
  margin: 0 auto;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius-pill);
}

.devotional-search:focus,
.search-input:focus,
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(185, 139, 63, 0.18);
}

.category-filters,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.devotional-archive-grid {
  margin-top: 1.5rem;
}

/* =========================================================
   12. Support / Payment Page
   ========================================================= */

.support-option,
.payment-card {
  position: relative;
}

.support-note {
  color: var(--muted);
  font-size: 0.95rem;
}

.resource-card .btn {
  margin-top: 0.35rem;
}

/* =========================================================
   13. Footer
   ========================================================= */

footer {
  padding: 2.25rem 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.45);
}

footer p {
  margin-bottom: 0.65rem;
}

footer a {
  color: var(--navy);
  font-weight: 700;
  margin: 0 0.45rem;
}

footer a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* =========================================================
   14. Utility Classes
   ========================================================= */

.text-muted-custom {
  color: var(--muted) !important;
}

.text-navy {
  color: var(--navy) !important;
}

.text-accent {
  color: var(--accent-dark) !important;
}

.bg-card {
  background: var(--card) !important;
}

.rounded-large {
  border-radius: var(--radius-lg) !important;
}

.shadow-soft {
  box-shadow: var(--shadow-soft) !important;
}

.max-readable {
  max-width: 760px;
}

/* =========================================================
   15. Accessibility
   ========================================================= */

:focus-visible {
  outline: 3px solid rgba(185, 139, 63, 0.55);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  z-index: 2000;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: #ffffff;
  border-radius: 10px;
}

/* =========================================================
   16. Print
   ========================================================= */

@media print {
  header,
  footer,
  .sidebar,
  .newsletter,
  .btn,
  .category-filters,
  .archive-tools {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .article-layout {
    display: block;
  }

  .article-content {
    box-shadow: none;
    border: none;
    padding: 0;
  }
}

