/* ==========================================================================
   Geschichtsverein Bad Emstal - Optimized Custom Stylesheet
   ========================================================================== */

/* --- Custom Variables & Token System --- */
:root {
  --color-primary: #900c5c;
  --color-primary-hover: #b01072;
  --color-dark: #1a1a1a;
  --color-light: #ffffff;
  --color-gray-dark: #333333;
  --color-gray-light: #cccccc;
  --color-text-muted: #aaaaaa;
  --color-border: #eeeeee;
  --color-card-bg: #fafafa;
  --font-headings: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- Typography & Heading Styles --- */
#body-wrapper h2,
#body-wrapper h3 {
  color: var(--color-primary);
  text-align: left;
  font-family: var(--font-headings);
}

#body-wrapper h2 {
  border-bottom: 1.5px solid var(--color-primary);
  padding-bottom: 0.6rem;
  margin-top: 4.5rem;
  margin-bottom: 1.8rem;
  font-size: 1.85rem;
  font-weight: 700;
}

#body-wrapper h2:first-of-type {
  margin-top: 1rem;
}

#body-wrapper p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--color-gray-dark);
  margin-bottom: 1.6rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

#header {
  background-color: var(--color-light) !important;
  height: 100px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  padding: 0 !important;
  z-index: 1000 !important;
}

#header .container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 40px !important;
  margin: 0 !important;
}

#header .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

#header .navbar-brand {
  display: flex;
  align-items: center;
  height: 100%;
}

#header .navbar-brand img {
  height: 85px !important;
  width: auto !important;
  transition: var(--transition-smooth);
}

body.header-fixed.header-animated #header.scrolled {
  height: 60px !important;
  background-color: var(--color-light) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

body.header-fixed.header-animated #header.scrolled .navbar-brand img {
  height: 45px !important;
}


/* Menu links styling */
.desktop-menu .dropmenu {
  display: flex;
  align-items: center;
  height: 100%;
}

.desktop-menu .dropmenu > ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

.desktop-menu .dropmenu > ul > li {
  position: relative;
  margin: 0 15px;
  padding: 0;
  height: 100%;
  display: flex;
  align-items: center;
}

.desktop-menu .dropmenu > ul > li > a {
  color: var(--color-dark) !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 10px 0;
  display: block;
  position: relative;
  transition: color 0.2s ease;
}

/* Underline micro-animation on hover & active */
.desktop-menu .dropmenu > ul > li > a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform 0.25s ease-out;
}

.desktop-menu .dropmenu > ul > li > a:hover::after,
.desktop-menu .dropmenu > ul > li > a.active::after,
.desktop-menu .dropmenu > ul > li.active > a::after {
  transform: scaleX(1);
}

.desktop-menu .dropmenu > ul > li > a:hover,
.desktop-menu .dropmenu > ul > li > a.active {
  color: var(--color-primary) !important;
}

/* Submenu dropdown styling */
.desktop-menu .dropmenu ul li ul {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-light);
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  list-style: none;
  z-index: 1000;
  border: 1px solid #eaeaea;
}

.desktop-menu .dropmenu ul li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.desktop-menu .dropmenu ul li ul li {
  margin: 0;
  padding: 0;
  width: 100%;
  display: block;
}

.desktop-menu .dropmenu ul li ul li a {
  color: var(--color-gray-dark) !important;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: block;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}

.desktop-menu .dropmenu ul li ul li a:hover {
  background-color: #f7f7f7;
  color: var(--color-primary) !important;
  border-left-color: var(--color-primary);
}

body.header-fixed {
  padding-top: 100px !important;
}



.btn-cta {
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  font-weight: 600;
  font-size: 1.0rem;
  padding: 1.0rem;
  border-radius: 4px;
  text-decoration: none !important;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(144, 12, 92, 0.15);
  display: inline-block;
  min-width: 170px;
  text-align: center;
  border: 2px solid var(--color-primary);
  height: auto !important;
  line-height: 1.2 !important;
}

.btn-cta:hover {
  background-color: var(--color-light);
  color: var(--color-primary) !important;
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 6px 15px rgba(144, 12, 92, 0.25);
}



/* ==========================================================================
   Blogroll / Neuigkeiten
   ========================================================================== */

.home-blogroll {
  max-width: 1000px;
  margin: 0 auto 6rem;
  padding: 0 1.5rem;
}

.home-blogroll .section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.blogroll-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.blogroll-card {
  background: var(--color-light);
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.blogroll-card:hover {
  transform: translate3d(0, -5px, 0);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.blogroll-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  background-color: #fafafa;
}

.blogroll-card-image p {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

.blogroll-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.blogroll-card:hover .blogroll-card-image img {
  transform: scale(1.05);
}

.blogroll-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blogroll-card-date {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.blogroll-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.8rem 0;
  line-height: 1.4;
}

.blogroll-card-title a {
  color: var(--color-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

.blogroll-card-title a:hover {
  color: var(--color-primary);
}

.blogroll-card-summary {
  color: #666666;
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blogroll-card-link {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  align-self: flex-start;
  transition: color 0.2s ease;
}

.blogroll-card-link:hover {
  color: var(--color-primary-hover);
}

/* ==========================================================================
   Werbepartner / Sponsors
   ========================================================================== */

.home-partners {
  max-width: 1000px;
  margin: 0 auto 6rem;
  padding: 0 1.5rem;
}

.home-partners .section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.partners-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.partner-card {
  flex: 1 1 200px;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: var(--color-light);
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
  height: 130px;
  box-sizing: border-box;
}

.partner-card.wide-partner {
  flex: 1 1 350px;
  max-width: 380px;
}

.partner-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: var(--transition-smooth);
  filter: grayscale(10%) contrast(95%);
}

.partner-card:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.partner-card:hover img {
  filter: none;
  transform: scale(1.04);
}

/* ==========================================================================
   Two-Column Page Layout Utility
   ========================================================================== */

.two-column-layout {
  display: flex;
  gap: 3.5rem;
  align-items: flex-start;
  margin: 2.5rem 0 4rem 0;
  box-sizing: border-box;
}

.two-column-layout .column-left {
  flex: 1.6;
  min-width: 0;
}

.two-column-layout .column-right {
  flex: 1;
  min-width: 0;
}

/* Sidebar Info Card Styles */
.info-link-card {
  padding: 1.25rem 1.5rem;
  background-color: var(--color-card-bg);
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
}

.info-link-card:hover {
  transform: translate3d(4px, 0, 0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-link-card h4 a {
  transition: color 0.2s ease;
}

.info-link-card h4 a:hover {
  color: var(--color-primary) !important;
}

/* ==========================================================================
   Page Title Header (Ribbon/Image Banner)
   ========================================================================== */

.page-title-header {
  position: relative;
  width: 100%;
  padding: 4.5rem 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--color-light);
  overflow: hidden;
}

.page-title-header.has-ribbon {
  background-color: var(--color-primary);
}

.page-title-header.has-image {
  background-color: var(--color-dark);
}

.page-title-header .header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

.page-title-header.has-ribbon .header-overlay {
  display: none;
}

.page-title-header .container {
  position: relative;
  z-index: 2;
  width: 100% !important;
  max-width: 1000px !important;
  padding: 0 1.5rem !important;
  margin: 0 auto !important;
}

.page-title-text {
  color: var(--color-light) !important;
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  font-family: var(--font-headings);
}

.page-title-header.has-image .page-title-text {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

body:not(.home) #body-wrapper h1:first-of-type {
  display: none;
}

/* ==========================================================================
   Hero Slider (Splide.js)
   ========================================================================== */

.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 10;
  background-color: var(--color-dark);
}

.splide__slide {
  position: relative;
  overflow: hidden;
}

.slide-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 6s ease-out;
}

.splide__slide.is-active .slide-bg {
  transform: scale(1.05);
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}

.slide-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0 4rem 5rem 4rem;
  z-index: 2;
  box-sizing: border-box;
}

.slide-text-container {
  max-width: 700px;
  padding: 2.2rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border-left: 5px solid var(--color-primary);
  border-radius: 4px;
  color: var(--color-light);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.splide__slide.is-active .slide-text-container {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.2s;
}

.slide-title {
  color: var(--color-light) !important;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.6rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  font-family: var(--font-headings);
}

.slide-subtitle {
  color: #dddddd;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero-slider .splide__arrow {
  background: rgba(144, 12, 92, 0.65) !important;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  transition: var(--transition-smooth);
  z-index: 12;
}

.hero-slider .splide__arrow svg {
  fill: var(--color-light) !important;
  width: 1.2rem;
  height: 1.2rem;
}

.hero-slider .splide__arrow:hover {
  background: var(--color-primary) !important;
  transform: scale(1.08);
}

.hero-slider .splide__pagination {
  bottom: 20px !important;
  z-index: 12;
}

.hero-slider .splide__pagination__page {
  background: rgba(255, 255, 255, 0.45) !important;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  transition: var(--transition-smooth);
}

.hero-slider .splide__pagination__page.is-active {
  background: var(--color-primary) !important;
  transform: scale(1.25);
}

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

.site-footer {
  background-color: var(--color-dark);
  color: var(--color-gray-light);
  padding: 4rem 1.5rem 2rem;
  font-family: var(--font-headings);
  font-size: 0.8rem;
  line-height: 1.6;
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-column h4 {
  color: var(--color-light);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1.2rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gray-dark);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.6rem;
}

.footer-column ul li a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-column ul li a:hover {
  color: var(--color-light);
  padding-left: 4px;
}

.footer-text {
  color: var(--color-text-muted);
}

.footer-text p {
  margin: 0 0 0.8rem 0;
}

.footer-text strong {
  color: var(--color-light);
  font-weight: 600;
}

.footer-text code {
  background-color: #262626;
  color: #e5e5e5;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85em;
  font-family: Consolas, Monaco, monospace;
}

.footer-text ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.footer-text ul li {
  margin-bottom: 0.8rem;
}

.logo-column {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.logo-column img {
  height: 95px !important;
  width: auto !important;
  filter: brightness(0) invert(1);
  transition: var(--transition-smooth);
}

.logo-column svg {
  max-width: 160px;
  fill: currentColor;
}

.footer-section.margin-top-section {
  margin-top: 2.2rem;
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-dark);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #666666;
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   CONSOLIDATED RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */

/* --- Tablet / Large Viewports (900px) --- */
@media (max-width: 900px) {
  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .blogroll-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .slide-content {
    padding: 0 3rem 4rem 3rem;
  }
  .slide-text-container {
    padding: 1.8rem;
    max-width: 550px;
  }
  .slide-title {
    font-size: 1.8rem;
  }
  .slide-subtitle {
    font-size: 1rem;
  }
}

/* --- Medium Viewports / Portrait (768px) --- */
@media (max-width: 768px) {
  .welcome-container-wrapper {
    flex-direction: column;
    gap: 3rem;
    margin: 3rem auto;
    text-align: center;
  }
  
  .welcome-logos {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
  }

  .welcome-logo-item {
    max-width: 180px;
  }


  
  .btn-cta {
    width: 100%;
    max-width: 280px;
  }



  .two-column-layout {
    flex-direction: column;
    gap: 2.5rem;
    margin: 2rem 0 3rem 0;
  }

  .two-column-layout .column-left,
  .two-column-layout .column-right {
    width: 100%;
    flex: none;
  }

  .page-title-header {
    padding: 3rem 0;
  }
  .page-title-text {
    font-size: 2rem;
    text-align: center;
  }
  .page-title-header .container {
    text-align: center;
  }

  .home-partners {
    margin-bottom: 4rem;
  }
  .home-partners .section-title {
    font-size: 1.8rem;
    margin-bottom: 2.2rem;
  }
  .partners-grid {
    gap: 1.5rem;
  }
  .partner-card {
    flex: 1 1 140px;
    height: 100px;
    padding: 0.8rem;
  }
  .partner-card.wide-partner {
    flex: 1 1 280px;
    max-width: 320px;
  }
}

/* --- Mobile / Small Viewports (600px) --- */
@media (max-width: 600px) {
  #header {
    height: 80px;
  }
  
  #header .container {
    padding: 0 20px !important;
  }
  
  #header .navbar-brand img {
    height: 65px !important;
  }
  
  body.header-fixed {
    padding-top: 80px !important;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .logo-column {
    justify-content: center;
  }

  .blogroll-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .slide-content {
    padding: 0 20px 40px 20px;
    align-items: center;
    justify-content: center;
  }
  
  .slide-text-container {
    padding: 1.2rem;
    text-align: center;
    border-left: none;
    border-top: 4px solid var(--color-primary);
    max-width: 100%;
    background: rgba(0, 0, 0, 0.7);
  }
  
  .slide-title {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
  }
  
  .slide-subtitle {
    font-size: 0.9rem;
  }
  
  .hero-slider .splide__arrow {
    width: 2.2rem;
    height: 2.2rem;
  }
  
  .hero-slider .splide__arrow svg {
    width: 0.8rem;
    height: 0.8rem;
  }
}

/* ==========================================================================
   Antigravity Readability & Layout Optimizations
   ========================================================================== */

/* Lead text style for introduction paragraphs */
.lead-text {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-gray-dark);
  margin-bottom: 1.5rem;
}

/* Secondary Button (Outline Style) */
.btn-secondary {
  background-color: transparent;
  color: var(--color-primary) !important;
  font-weight: 600;
  font-size: 1.0rem;
  padding: 1.0rem;
  border-radius: 4px;
  text-decoration: none !important;
  transition: var(--transition-smooth);
  display: inline-block;
  min-width: 170px;
  text-align: center;
  border: 2px solid var(--color-primary);
  box-sizing: border-box;
  height: auto !important;
  line-height: 1.2 !important;
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 6px 15px rgba(144, 12, 92, 0.15);
}

@media (max-width: 768px) {
  .btn-secondary {
    width: 100%;
    max-width: 280px;
    margin-top: 0.5rem;
  }
}

/* Featured Image Container with Caption */
.featured-image-container {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.featured-image-container img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.featured-image-container:hover img {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.image-caption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.6rem;
  line-height: 1.4;
  text-align: center;
  font-style: italic;
}

/* Timeline Container */
.timeline {
  position: relative;
  max-width: 850px;
  margin: 3rem auto;
  padding: 1rem 0;
}

/* Vertical Line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 120px;
  width: 2px;
  background: var(--color-border);
}

/* Timeline Item */
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  align-items: flex-start;
}

/* Timeline Year (Left of line) */
.timeline-year {
  width: 100px;
  text-align: right;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-primary);
  padding-right: 20px;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Timeline Badge (Dot on the line) */
.timeline-badge {
  position: absolute;
  left: 116px;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-light);
  z-index: 2;
  box-shadow: 0 0 0 3px rgba(144, 12, 92, 0.1);
  transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-badge {
  transform: scale(1.3);
  background: var(--color-primary-hover);
  box-shadow: 0 0 0 5px rgba(144, 12, 92, 0.2);
}

/* Timeline Content Card (Right of line) */
.timeline-content {
  margin-left: 40px;
  flex-grow: 1;
  background: var(--color-light);
  border-radius: 6px;
  border: 1px solid var(--color-border);
  padding: 1.8rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: var(--transition-smooth);
}

.timeline-content:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
  border-color: rgba(144, 12, 92, 0.2);
}

.timeline-content h3 {
  margin-top: 0 !important;
  margin-bottom: 0.8rem !important;
  font-size: 1.3rem !important;
  color: var(--color-dark) !important;
  font-weight: 750;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.timeline-content p {
  margin: 0 0 1rem 0;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--color-gray-dark);
}

.timeline-content p:last-child {
  margin-bottom: 0;
}

/* Timeline Callout Intro */
.timeline-intro {
  margin-bottom: 3rem;
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  font-size: 1.1rem;
  font-style: italic;
  color: #555;
  line-height: 1.8;
}

/* Responsive Timeline */
@media (max-width: 768px) {
  .timeline::before {
    left: 16px;
  }
  .timeline-item {
    flex-direction: column;
    padding-left: 35px;
    margin-bottom: 2.5rem;
  }
  .timeline-year {
    width: auto;
    text-align: left;
    padding-right: 0;
    margin-bottom: 0.6rem;
    font-size: 1.3rem;
  }
  .timeline-badge {
    left: 12px;
    top: 10px;
  }
  .timeline-content {
    margin-left: 0;
    width: 100%;
    padding: 1.25rem;
  }
}

/* Board Table Styling */
.board-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.board-table tr {
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.board-table tr:hover {
  background-color: rgba(144, 12, 92, 0.015);
}

.board-table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.board-table td:first-child {
  font-weight: 600;
  color: var(--color-dark);
  width: 35%;
  padding-left: 0;
}

.board-table td:last-child {
  color: var(--color-gray-dark);
}

/* ==========================================================================
   Layout Shortcodes CSS
   ========================================================================== */
.custom-columns {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: start;
}

.custom-column {
  flex: 1 1 250px;
}

.custom-card {
  background-color: var(--color-card-bg);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.custom-card.no-border {
  border-left: none !important;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
  border-radius: 8px;
}

.card-meta {
  display: flex;
  gap: 2rem;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  flex-wrap: wrap;
}

.card-meta.between {
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   Custom Horizontal Blog List Cards
   ========================================================================== */
.custom-blog-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
  width: 100%;
}

.blog-card-horizontal {
  display: flex;
  background: #fff;
  border: 1px solid var(--color-border, #eaeaea);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 480px; /* Tall row layout */
  width: 100%;
}

.blog-card-horizontal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.blog-card-image {
  flex: 0 0 480px;
  width: 480px;
  height: 100%;
  position: relative;
  background: #f8f8f8;
  overflow: hidden;
}

.blog-card-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.blog-card-image img:not(.placeholder-logo) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.blog-card-horizontal:hover .blog-card-image img:not(.placeholder-logo) {
  transform: scale(1.03);
}

/* Placeholder logo styling: centered, no scaling/stretching */
.blog-card-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fdfdfd;
  border-right: 1px solid #f0f0f0;
}

.blog-card-image.no-image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.blog-card-image.no-image img.placeholder-logo {
  width: auto !important;
  height: auto !important;
  max-width: 280px !important;
  max-height: 200px !important;
  object-fit: contain !important;
  transform: none !important;
}

.blog-card-content {
  flex: 1;
  padding: 2.2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.blog-card-meta {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.4rem;
}

.blog-card-title {
  margin: 0 0 0.8rem 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.35;
}

.blog-card-title a {
  color: var(--color-dark, #222);
  text-decoration: none;
  transition: color 0.15s ease;
}

.blog-card-title a:hover {
  color: var(--color-primary, #900c5c);
}

.blog-card-summary {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 1rem;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 10; /* Allow much larger summary excerpt text */
  -webkit-box-orient: vertical;
}

.blog-card-summary p {
  margin-bottom: 0;
}

.blog-card-footer {
  border-top: 1px solid #f5f5f5;
  padding-top: 0.8rem;
  font-size: 0.85rem;
}

/* Responsive adjustment for mobile viewports */
@media (max-width: 767px) {
  .blog-card-horizontal {
    flex-direction: column;
    height: auto; /* Remove fixed height on mobile */
  }
  .blog-card-image {
    flex: 0 0 280px;
    width: 100%;
    height: 280px;
  }
  .blog-card-image.no-image {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
  .blog-card-content {
    padding: 1.5rem;
  }
  .blog-card-title {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   Paginator CTA Button Styling
   ========================================================================== */
#listing-footer .pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 3rem 0;
}

#listing-footer .pagination .page-item {
  margin: 0;
}

#listing-footer .pagination .page-item a,
#listing-footer .pagination .page-item span {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-sizing: border-box;
  line-height: 1.2;
}

/* Inactive page link (looks like outline button) */
#listing-footer .pagination .page-item a {
  background-color: transparent;
  color: var(--color-primary) !important;
  border: 2px solid var(--color-primary);
}

/* Hover state for inactive links (transforms to solid CTA button) */
#listing-footer .pagination .page-item a:hover {
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(144, 12, 92, 0.2);
}

/* Active page (looks like solid CTA button) */
#listing-footer .pagination .page-item.active span {
  background-color: var(--color-primary);
  color: var(--color-light) !important;
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 10px rgba(144, 12, 92, 0.15);
  cursor: default;
}

/* Disabled pages (prev/next on bounds) */
#listing-footer .pagination .page-item.disabled span {
  background-color: #f5f5f5;
  color: #cccccc !important;
  border: 2px solid #e5e5e5;
  cursor: not-allowed;
  opacity: 0.8;
}

@media (max-width: 576px) {
  #listing-footer .pagination .page-item a,
  #listing-footer .pagination .page-item span {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   Custom Tags Purple Color Scheme
   ========================================================================== */
.tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.4rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.tags a.label {
  background-color: rgba(144, 12, 92, 0.05) !important;
  color: var(--color-primary) !important;
  border: 1px solid rgba(144, 12, 92, 0.2) !important;
  padding: 0.1rem 0.35rem !important;
  font-size: 0.5rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  display: inline-block !important;
  margin: 0 !important;
  line-height: 1.3 !important;
  height: auto !important;
  border-radius: 4px !important;
}

.tags a.label:hover {
  background-color: var(--color-primary) !important;
  color: var(--color-light) !important;
  border-color: var(--color-primary) !important;
  text-shadow: none !important;
  transform: translateY(-1px) !important;
}

/* ==========================================================================
   Responsive YouTube Video Embedding (16:9 Aspect Ratio)
   ========================================================================== */
.video-container {
  position: relative;
  padding-bottom: 56.25% !important; /* 16:9 Aspect Ratio */
  padding-top: 0 !important;
  height: 0 !important;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}

/* ==========================================================================
   Mobile Hamburger Menu & Overlay Custom Styling
   ========================================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000 !important; /* Stand above header and logos */
}

@media (max-width: 840px) {
  .mobile-menu {
    display: block !important;
  }
}

.mobile-menu .button_container {
  position: absolute;
  top: 25px !important; /* Centered in the 80px mobile header height */
  right: 20px !important;
  height: 24px;
  width: 28px;
  cursor: pointer;
  z-index: 1001 !important;
  transition: opacity 0.25s ease, top 0.5s ease;
}

/* Color spans to match branding */
.mobile-menu .button_container span {
  background: var(--color-primary, #900c5c) !important;
  border: none;
  height: 3px !important;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.35s ease;
  cursor: pointer;
  border-radius: 2px;
}

.mobile-menu .button_container span:nth-of-type(2) {
  top: 8px !important;
}

.mobile-menu .button_container span:nth-of-type(3) {
  top: 16px !important;
}

/* Morph to white cross when active */
.mobile-menu .button_container.active .top {
  transform: translateY(8px) rotate(45deg) !important;
  background: #ffffff !important;
}

.mobile-menu .button_container.active .middle {
  opacity: 0 !important;
}

.mobile-menu .button_container.active .bottom {
  transform: translateY(-8px) rotate(-45deg) !important;
  background: #ffffff !important;
}

/* Full screen menu overlay custom styling */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  visibility: hidden;
  width: 100%;
  height: 0;
  transition: opacity .35s, visibility .35s, height .35s;
  opacity: 0;
  background: rgba(144, 12, 92, 0.98) !important; /* Solid purple overlay */
  z-index: 999 !important;
}

.overlay.open {
  visibility: visible;
  height: 100%;
  opacity: 1;
}

.overlay-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 80px;
}

.overlay-menu ul.tree {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  text-align: center;
}

.overlay-menu ul.tree li {
  list-style-type: none !important;
  background: transparent !important;
  margin: 0.5rem 0 !important;
  padding: 0 !important;
}

.overlay-menu ul.tree li a {
  color: #ffffff !important; /* White links */
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  padding: 10px 20px !important;
  display: inline-block !important;
  transition: color 0.2s ease, transform 0.2s ease;
  margin-left: 0 !important;
}

.overlay-menu ul.tree li a:hover,
.overlay-menu ul.tree li a.active {
  color: #dddddd !important;
  transform: scale(1.05);
}

/* ==========================================================================
   Responsive Welcome CTA Buttons
   ========================================================================== */
.welcome-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 576px) {
  .welcome-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .welcome-buttons a {
    width: 100% !important;
    max-width: 280px !important;
    text-align: center;
    margin: 0 !important;
  }
}

/* ==========================================================================
   Responsive Grid & Columns Overrides
   ========================================================================== */
@media (max-width: 992px) {
  .blogroll-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 576px) {
  .blogroll-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .custom-columns {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .custom-column {
    width: 100% !important;
    flex: none !important;
  }
}

/* ==========================================================================
   Responsive Cards Grid
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  width: 100%;
}



