/* css/styles.css
Purpose: Global stylesheet for Traditional Lutheran Church site.
Implements typography, colors, hero/parallax behavior, separators,
header/footer styles, and accessibility utilities.
*/

/* =========================
   VARIABLES
   ========================= */
:root {
  --primary: #7A0019;
  --accent: #FFCC33;
  --white: #ffffff;
  --content-max-width: 72ch;
}

/* =========================
   RESET & BASE TYPOGRAPHY
   ========================= */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #111;
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin-top: 0;
}

/* =========================
   ACCESSIBILITY
   ========================= */

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 1000;
  background: var(--accent);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
}

/* Visually hidden utility */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus outlines */
a:focus,
button:focus,
.btn:focus,
.navbar-toggler:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  .hero {
    background-attachment: scroll !important;
  }
}

/* =========================
   HEADER & NAV
   ========================= */

.header-banner {
  background-color: var(--primary);
  color: var(--white);
}

.church-name {
  color: var(--accent);
  font-weight: 700;
  margin: 0;
}

.custom-nav {
  background: transparent;
}

.custom-nav .nav-link {
  color: var(--white);
  padding: 0.75rem 0;
}

.custom-nav .nav-link:hover,
.custom-nav .nav-link:focus {
  color: var(--accent);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .custom-nav .navbar-nav .nav-item {
    flex: 1 1 auto;
    text-align: center;
  }

  .custom-nav .navbar-nav .nav-link {
    display: inline-block;
    width: 100%;
  }
}

@media (max-width: 767px) {
  .custom-nav .navbar-nav {
    width: auto;
  }
}


/* =========================
   HERO / PARALLAX
   ========================= */

.hero {
  width: 100%;
  height: 60vh;
  min-height: 320px;
  margin: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

@media (max-width: 991px) {
  .hero {
    height: 40vh;
    background-attachment: scroll;
  }
}

/* Remove gaps around heroes */
.hero + *,
section.hero {
  margin: 0 !important;
}

.hero {
  background-color: #000; /* or var(--primary) */
}

.hero + * {
  margin-top: -1px;
}


.no-bottom-gap {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* =========================
   CONTENT LAYOUT
   ========================= */

.content-column {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  text-align: left;
}


.content-section {
  background-color: var(--white);
}

.content-section ul {
  margin: 1rem 0 1.5rem;
  padding-left: 1.25rem;
}

.content-section li {
  margin-bottom: 0.75rem;
}

/* Optional two-column divider */
@media (min-width: 768px) {
  .content-section article:first-child {
    border-right: 2px solid var(--accent);
    padding-right: 2rem;
  }

  .content-section article:last-child {
    padding-left: 2rem;
  }
}

/* =========================
   SEPARATORS
   ========================= */

.section-separator,
.section-divider-bar {
  width: 100%;
  height: 6px;
  background-color: var(--accent);
}

.section-separator {
  margin: 2.5rem 0;
  opacity: 0.95;
}

.section-divider {
  border-top: 4px solid var(--accent);
  padding-top: 3rem;
  margin-top: 3rem;
}

/* =========================
   BUTTONS
   ========================= */
.btn-primary {
  background-color: #0066ff;
  border: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #FFCC33;
}


.btn-red {
  background-color: #7A0019;
  color: #ffffff;
  border: none;
}

.btn-red:hover,
.btn-red:focus {
  background-color: #FFCC33;
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--primary);
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
}

.site-footer .container {
  padding: 3rem 0;
}

.site-footer a {
  color: var(--white);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--accent);
  text-decoration: underline;
}

.footer-heading,
.footer-church-name {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--accent);
}

.footer-heading {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-church-name {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.footer-nav {
  list-style: none;
  padding-left: 0;
}

.footer-nav li {
  margin-bottom: 0.25rem;
}

.footer-cross {
  display: inline-block;
  border: 2px solid var(--accent);
  padding: 0.25rem;
  background-color: var(--white);
}

.facebook-icon {
  width: 32px;
  height: auto;
}

.facebook2-icon {
  width: 301px;
  height: auto;
}

.issues-icon {
  width: 301px;
  height: auto;
  border: 3px solid var(--accent);
}

.lcms-icon {
  width: auto;
  height: 301px;
}

/* =========================
   FOOTER RESPONSIVE FIXES
   ========================= */

/* Make footer images responsive */
.footer-logo {
  max-width: 100%;
  height: auto;
}

/* Improve spacing and alignment on mobile */
@media (max-width: 767px) {

  .site-footer {
    text-align: center;
  }

  /* Stack sections cleanly */
  .site-footer nav,
  .site-footer .col-md-4 {
    text-align: center !important;
  }

  /* Navigation: turn into two columns */
  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 1rem;
    margin-top: 1rem;
  }

  .footer-nav li {
    margin-bottom: 0;
  }

  /* Add breathing room between sections */
  .site-footer .row > * {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 204, 51, 0.35);
  }

  .site-footer .row > *:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  /* Scale down the cross/logo */
  .footer-cross {
    max-width: 220px;
  }

  /* Make contact info easier to scan */
  .site-footer p {
    margin-bottom: 0.5rem;
  }

  /* Center Facebook icon */
  .facebook-icon {
    margin-top: 0.5rem;
  }
}


/* =========================
   TIMELINE (HISTORY PAGE)
   ========================= */

.timeline-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.timeline-wrapper::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 4px;
  background-color: var(--accent);
  transform: translateX(-50%);
}

.timeline-row {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  column-gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.timeline-side {
  padding: 0 1rem;
}

.timeline-side.left {
  text-align: right;
}

.timeline-side.right {
  text-align: left;
}

.timeline-year {
  display: block;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.timeline-side p {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .timeline-wrapper::before {
    left: 1rem;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    padding-left: 2rem;
  }

  .timeline-side {
    text-align: left;
    padding-left: 1rem;
  }

  .timeline-side.left {
    margin-bottom: 1rem;
  }
}

/* =========================
   OUR PASTOR PAGE
   ========================= */

.pastor-portrait {
  border: 3px solid var(--accent);
}

.contact-card {
  border: 2px solid var(--accent);
  padding: 1.25rem;
  max-width: 400px;
  background-color: var(--white);
}

.contact-card a {
  color: var(--primary);
  text-decoration: underline;
}

.contact-card a:hover,
.contact-card a:focus {
  color: #a30000;
}

/* =========================
   EMBEDS
   ========================= */

iframe {
  border: 0;
}

img,
iframe {
  max-width: 100%;
  height: auto;
}

/* =========================
   GALLERY PAGE EXTENSIONS
   ========================= */

/* Page title */
.page-title {
  font-family: "Playfair Display", Georgia, serif;
  color: #800020;
}

/* Carousel styling */
.carousel {
  border: 4px solid #FFCC33;
}

.carousel img {
  object-fit: cover;
}


/* =========================
   GALLERY CAROUSEL FRAME
   ========================= */

.gallery-frame {
  max-width: 960px;               /* comfortable desktop width */
  padding: 1rem;
  border: 4px solid #FFCC33;
  background-color: #ffffff;
}

/* Slight rounding feels traditional, not modern */
.gallery-frame .carousel {
  border: none;
}

/* Mobile: allow full width */
@media (max-width: 767px) {
  .gallery-frame {
    max-width: 100%;
    padding: 0.5rem;
    border-width: 3px;
  }
}
/* ==============================
   GALLERY PAGE ADDITIONS
   ============================== */

/* Typography */
body {
    font-family: Georgia, "Times New Roman", serif;
}

.site-title,
h1, h2, h3 {
    font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

/* Color adjustments to match design system */
.bg-primary {
    background-color: #cc0000 !important;
}

.text-warning {
    color: #FFD700 !important;
}

/* Gallery thumbnail button reset */
.gallery-thumb {
    border: none;
    padding: 0;
    background: none;
    width: 100%;
    display: block;
    cursor: pointer;
}

.gallery-thumb img {
    border: 2px solid #FFD700;
    transition: transform 0.2s ease;
}

.gallery-thumb:hover img,
.gallery-thumb:focus img {
    transform: scale(1.03);
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

/* Modal image max height for large screens */
#modalImage {
    max-height: 80vh;
    object-fit: contain;
}


/* =========================
   LINKS PAGE IMAGE NORMALIZATION
   ========================= */

.links-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.link-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* Image container */
.link-image {
  flex: 0 0 120px;            /* consistent visual column */
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  background-color: var(--white);
}

/* Image container */
.link-image-lcms {
  flex: 0 0 320px;            /* consistent visual column */
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
}

/* Normalize all images */
.link-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Text block */
.link-item > div {
  flex: 1;
}

/* Mobile stacking */
@media (max-width: 767px) {
  .link-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .link-image {
    margin-bottom: 1rem;
  }
}

/* ==========================
   Gallery Grid Enhancements
   ========================== */

.gallery-item {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 250px; /* consistent thumbnail height */
  object-fit: cover; /* handles mixed image sizes cleanly */
  border-radius: 6px;
  transition: transform 0.2s ease;
}

/* Subtle hover effect — restrained, not flashy */
.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.02);
  outline: 2px solid #FFCC33;
}

/* Modal background */
.modal-content {
  background-color: #000;
}

.gallery-item img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


/* ==========================
   Email Wrap
   ========================== */

.email-wrap {
  word-break: break-all;
}