/* ============================================================
   Base reset & typography
   ============================================================ */

*, html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-size: medium;
  font-weight: 500;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}

/* ============================================================
   Navbar font
   ============================================================ */

.navbar {
  font-family: 'Nunito', sans-serif;
}

/* ============================================================
   Layout utilities
   ============================================================ */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}


/* ============================================================
   Header
   ============================================================ */

.header {
  background-color: #8B0000;
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 28px;
  margin-bottom: 5px;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

.link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background-color 0.3s;
}

.link:hover {
  background-color: rgba(0, 0, 0, 0.3);
}


/* ============================================================
   Footer
   ============================================================ */

.footer {
  text-align: center;
  padding: 20px;
  background-color: white;
  color: #666;
  font-size: 14px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}


/* ============================================================
   PDF viewer
   ============================================================ */

#pdfViewer {
  flex: 1;
  width: 100%;
  border: none;
}

.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
}

.error {
  text-align: center;
  padding: 40px;
  color: #c00;
}


/* ============================================================
   Scrolling ticker
   ============================================================ */

.ticker-section {
  display: none;
}

.scroll-container {
  background: var(--spelch-maroon);
  border-bottom: 2px solid var(--spelch-maroon-dark);
  height: 44px;
  overflow: hidden;
}

.ticker-wrapper {
  display: flex;
  align-items: center;
  height: 44px;
}

.ticker-label {
  flex-shrink: 0;
  background: #C49A35;
  color: #3D0C14;
  font-family: 'Quicksand', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 0 20px 20px 0;
  margin-right: 16px;
  white-space: nowrap;
  border: 1px solid rgba(61, 12, 20, .2);
}

.ticker-label a {
  color: #3D0C14;
}

.ticker-overflow {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  will-change: transform;
}

.tick-item {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  padding: 0 20px 0 0;
}

.tick-sep {
  color: rgba(196, 154, 53, 0.6);
  font-size: 10px;
  padding: 0 20px 0 0;
}


/* ============================================================
   Site-wide colour theme  —  maroon + gold
   ============================================================ */

:root {
  --spelch-maroon:      #54121B;
  --spelch-maroon-dark: #3D0C14;
  --spelch-gold:        #C49A35;
}

/* ============================================================
   Church name banner (index.html top header)
   ============================================================ */

.spelch-site-header {
  background: var(--spelch-maroon);
  border-bottom: 3px solid var(--spelch-maroon-dark);
  text-align: center;
  padding: 0.85rem 1rem;
}

.spelch-site-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 3.2vw, 2.1rem);
  font-weight: 700;
  color: var(--spelch-gold);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  margin: 0;
}

/* Navbar */
.spelch-nav {
  background-color: var(--spelch-maroon) !important;
}

/* Override Bootstrap primary */
.btn-primary {
  background-color: var(--spelch-maroon);
  border-color:     var(--spelch-maroon);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
              border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out,
              transform 0.2s ease;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
  background-color: var(--spelch-maroon-dark) !important;
  border-color:     var(--spelch-maroon-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18) !important;
}
.btn-outline-primary {
  color:        var(--spelch-maroon);
  border-color: var(--spelch-maroon);
}
.btn-outline-primary:hover {
  background-color: var(--spelch-maroon);
  border-color:     var(--spelch-maroon);
  color: #fff;
}

/* ============================================================
   Homepage — hero
   ============================================================ */

.spelch-hero {
  display: flex;
  min-height: 480px;
  background-color: #e8ecf3;
  overflow: hidden;
}

.spelch-hero-text {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem 3rem 4rem;
}

.spelch-hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.2rem;
}

.spelch-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 900;
  color: var(--spelch-gold);
  line-height: 1.1;
  margin-bottom: 0;
}

.spelch-hero-cta {
  display: inline-block;
  align-self: flex-start;
  margin-top: 1.75rem;
  padding: 0.55rem 1.75rem;
  background-color: var(--spelch-maroon);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.spelch-hero-cta:hover {
  background-color: var(--spelch-maroon-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.spelch-hero-image {
  flex: 0 0 62%;
  overflow: hidden;
  position: relative;
}
.spelch-hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #e8ecf3 0%, transparent 14%);
  pointer-events: none;
}
.spelch-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
  display: block;
}

/* ============================================================
   Homepage — info strip
   ============================================================ */

.spelch-info-strip {
  display: flex;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  border-bottom: 4px solid var(--spelch-maroon);
}

.spelch-info-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
}

.spelch-info-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--spelch-maroon);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.spelch-info-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #111;
  margin-bottom: 0.1rem;
}

.spelch-info-text {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.45;
}
.spelch-info-text a {
  color: var(--spelch-maroon);
  text-decoration: none;
}
.spelch-info-text a:hover {
  text-decoration: underline;
}

.spelch-info-divider {
  width: 1px;
  background-color: #ddd;
  margin: 0.75rem 0;
}

/* ============================================================
   Shared section heading accent
   ============================================================ */

.spelch-section-heading {
  font-family: 'Nunito', sans-serif;
  color: var(--spelch-maroon);
  font-weight: 700;
  margin-bottom: 1rem;
}

/* ============================================================
   Homepage — maroon footer
   ============================================================ */

.spelch-footer {
  background-color: var(--spelch-maroon);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 2rem 1.5rem 1.25rem;
  margin-top: auto;
}

.spelch-footer-desc {
  font-size: 0.875rem;
  max-width: 680px;
  margin: 0 auto 1.25rem;
  line-height: 1.65;
}

.spelch-footer-tagline {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  color: var(--spelch-gold);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.spelch-footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 0;
}

/* ============================================================
   PDF viewer toolbar (sermon-viewer, newsletter-viewer)
   ============================================================ */

.hidden {
  display: none;
}

.pdf-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0.75rem;
  border-bottom: 1px solid #dee2e6;
  gap: 1rem;
  font-size: 0.78rem;
  color: #666;
}

.pdf-toolbar.show {
  display: flex;
}

.pdf-toolbar-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-toolbar-link {
  color: #666;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.pdf-toolbar-link:hover {
  color: #333;
  text-decoration: underline;
}

/* ============================================================
   About page
   ============================================================ */

.about-tagline {
  font-family: 'Lobster', cursive;
  font-size: 28pt;
}

.spelch-stained-glass {
  width: 25%;
  min-width: 80px;
  max-width: 160px;
}

/* ============================================================
   Animations
   ============================================================ */

/* Hero text entrance delays (used with Animate.css animate__animated) */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* Scroll-triggered fade-up */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fade-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .animate-delay-1,
  .animate-delay-3,
  .animate-delay-6 {
    animation: none !important;
    opacity: 1 !important;
  }
}

/* Visually hidden honeypot field — keeps bots from detecting the trap */
.honeypot-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .spelch-hero {
    flex-direction: column;
    min-height: unset;
  }
  .spelch-hero-text {
    flex: unset;
    padding: 2rem 1.5rem;
  }
  .spelch-hero-image {
    flex: unset;
    height: 300px;
  }
  .spelch-info-strip {
    flex-direction: column;
  }
  .spelch-info-divider {
    width: auto;
    height: 1px;
    margin: 0 1.25rem;
  }
  .spelch-info-item {
    padding: 1rem 1.5rem;
  }
}