/* ======= Parish Shared Styles (style-others.css) - FINAL FIX: White Space Eliminated ======= */
@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Montserrat:wght@400;600;700&display=swap");

:root {
  --maroon: #7c0d0d;
  --maroon-dark: #5f0a0a;
  --gold: #c8a96b;
  --cream: #fff9f4;
  --ink: #2b2b2b;
  --border: #ead9c0;
  
  /* NEW VARIABLE: Define exact heights for fixed elements for precise calculation */
  --navbar-height: 69px; /* 45px logo + 12px top padding + 12px bottom padding */
  --footer-height: 48px; /* Approx height of your fixed footer */
}

/* =====================================
   RESET + BASE (UNCHANGED)
===================================== */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Libre Baskerville", Georgia, serif;
  position: relative; /* CRITICAL for absolute positioning of articles-wrap */
}

main, .wrap { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* =====================================
   NAVBAR (UPDATED to use variable)
===================================== */
.navbar {
  width: 100%;
  background: var(--maroon);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  /* Use the defined variable for height consistency */
  height: var(--navbar-height); 
}
/* ... (Logo and other navbar styles remain unchanged) ... */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.logo img {
  height: 45px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.parish-name {
  font: 700 13px Montserrat, Arial, sans-serif;
  letter-spacing: 0.4px;
}

.logo-divider {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.6);
  margin: 3px 0;
}

.parish-location {
  font: 400 10px Montserrat, Arial, sans-serif;
  text-transform: uppercase;
  color: #f0e7e7;
  letter-spacing: 0.4px;
}

/* =====================================
   BACK BUTTON (UNCHANGED)
===================================== */
.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--maroon-dark);
  color: #fff;
  border: 1px solid var(--gold);
  font: 600 12px "Montserrat", sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  overflow: hidden;
}

.back-btn .arrow {
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.back-btn:hover {
  background: var(--maroon);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* =====================================
   FOOTER (UPDATED to use variable)
===================================== */
.footer {
  background: var(--maroon-dark);
  color: #fff;
  font: 500 14px "Montserrat", Arial, sans-serif;
  text-align: center;
  padding: 12px 10px;
  border-top: 3px solid var(--maroon);
  margin-top: auto;
  
  /* Setting the footer as fixed/absolute at the bottom for accurate spacing */
  position: absolute; 
  bottom: 0;
  width: 100%;
  z-index: 999;
  height: var(--footer-height); /* Use the defined variable */
}
.footer span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 4px;
}

/* =====================================
   ORGANIZATIONAL CHART STYLING (UNCHANGED)
===================================== */
.wrap {
  max-width: 1200px;
  margin: 100px auto 60px;
  padding: 0 20px;
}

h1 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 28px;
  text-transform: uppercase;
  color: var(--maroon-dark);
  border-bottom: 3px double var(--gold);
  padding-bottom: 10px;
  margin-bottom: 20px;
  text-align: center;
}

.group-title {
  font: 700 18px "Montserrat", sans-serif;
  color: var(--maroon-dark);
  margin: 40px 0 10px;
  border-left: 4px solid var(--gold);
  padding-left: 10px;
}

.grid-2, .grid-3 {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.node {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--maroon);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.node:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  border-left-color: var(--gold);
}

.role {
  font: 700 13px "Montserrat", Arial;
  color: var(--maroon-dark);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.name {
  font: 400 16px "Libre Baskerville", Georgia, serif;
  color: var(--ink);
}


/* =====================================
   HERO SLIDER (New styles for articles.php) - FINAL FIX: ABSOLUTE POSITIONING
===================================== */

/* ⚠️ CRITICAL WHITE SPACE FIX: Use absolute positioning to fit precisely 
   between the fixed navbar and the absolute footer. 
*/
.articles-wrap {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  
  /* Absolute Positioning to fit the gap */
  position: absolute;
  top: var(--navbar-height); /* Starts exactly where the navbar ends (69px) */
  bottom: var(--footer-height); /* Ends exactly where the footer begins (48px) */
  left: 0;
  right: 0;
  
  /* We don't need flex-grow or height: calc() anymore */
  flex-grow: unset;
  height: unset !important;
}

/* Slider takes full available height of its new absolute parent */
.hero-swiper {
  width: 100%;
  height: 100% !important; 
  background: #000;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 1. Full-screen Background Image */
.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1; 
}

/* 2. Darkening Overlay - Increased opacity for better text contrast */
.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45) !important; /* Forced darker overlay */
  z-index: 2;
}

/* 3. Centered Text Content - Added Flexbox centering and full height */
.slide-content {
  position: relative;
  z-index: 5;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  
  /* FIX: Max-width is fine, but we need to ensure the container uses full width to center its content */
  width: 100%; 
  max-width: 900px;
  padding: 20px;
  
  /* Centering Fixes: */
  height: 100%; /* Take full height of slide */
  display: flex; 
  flex-direction: column;
  
  /* 👈 CHANGE: Align content back to the vertical center */
  justify-content: center; 
  
  align-items: center; /* Horizontal center */
  
  /* 👈 FIX: Push the vertically-centered content block further down by 15% of its size */
  transform: translateY(15%); 
  
  /* This margin ensures the max-width container is centered on the page */
  margin: 0 auto;
}

/* Subtitle/Tag */
.slide-subtitle {
  font: 600 14px "Montserrat", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  color: #eee;
  text-align: center !important; /* Force subtitle text alignment */
  
  /* NEW: Background effect for subtitle */
  background-color: rgba(0, 0, 0, 0.4);
  padding: 4px 10px;
  border-radius: 4px;
}

/* Main Title - Added !important to override global H1 styles and ensure centering */
.slide-title {
  font-family: "Libre Baskerville", Georgia, serif !important;
  font-size: 3.5vw !important; /* Responsive font size */
  font-weight: 700 !important;
  margin: 0 auto 15px auto !important; /* Center the title block horizontally */
  line-height: 1.1;
  
  /* 👈 FIX: Explicitly set color to white */
  color: #ffffff !important; 
  
  /* NEW FIX: Add a background box shadow to improve visibility over busy images */
  text-shadow: 0 0 20px rgba(0, 0, 0, 1), /* Increased blur for main text shadow */
               0 0 3px rgba(0, 0, 0, 1),
               0 0 6px rgba(0, 0, 0, 1) !important;
  
  /* 👈 ALTERNATIVE: Use a background color with padding for a clearer backdrop */
  /* background-color: rgba(0, 0, 0, 0.5); */
  /* padding: 8px 15px; */
  /* border-radius: 8px; */
  
  max-width: 90%; /* Prevent title from being too wide and breaking centering */
  text-align: center !important; /* Force title text alignment */
}

/* Summary Text */
.slide-summary {
  font: 400 16px/1.6 "Libre Baskerville", Georgia, serif;
  margin: 0 auto 30px;
  max-width: 60ch;
  color: #fff;
  text-align: center !important; /* Force summary text alignment */

  /* NEW: Background effect for summary */
  background-color: rgba(0, 0, 0, 0.4);
  padding: 6px 15px;
  border-radius: 4px;
}

/* Read More Button (Matches Hero Look) - ⚠️ REMOVED THIS BUTTON */
.btn-read-more {
  display: none !important; /* CRITICAL: Hides the button */
}

/* Swiper Controls Overrides */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
  color: #fff;
  --swiper-navigation-size: 34px;
  opacity: 0.7;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
  opacity: 1;
  color: var(--gold);
}

/* Pagination Overrides */
.swiper-pagination.hero-pagination {
  position: absolute; /* Place dots over the content */
  bottom: 20px;
  z-index: 10;
}

.swiper-pagination.hero-pagination .swiper-pagination-bullet {
  background: #fff;
  opacity: .5;
}

.swiper-pagination.hero-pagination .swiper-pagination-bullet-active {
  background: var(--gold);
  opacity: 1;
}

/* =====================================
   RESPONSIVE TWEAKS (UNCHANGED)
===================================== */
@media (max-width: 768px) {
  
  /* Hero Title Tweaks for mobile - Added !important for safety */
  .slide-title {
    font-size: 32px !important; 
  }

  .slide-summary {
    font-size: 14px;
    max-width: 90%;
  }

  /* =====================================
     NON-SCROLLABLE PAGE LAYOUT (UNCHANGED)
  ===================================== */
  .no-scroll-page {
    overflow: hidden;
    height: 100vh; /* ⚠️ CRITICAL FIX: Ensure the page itself is limited to viewport height */ 
  }

  .no-scroll-page .container {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .no-scroll-page .navbar-form,
  .no-scroll-page .footer-bottom-form {
    flex-shrink: 0; 
  }

  .no-scroll-page .articles-wrap {
    flex-grow: 1; 
    width: 100%;
    margin: 0;
    padding: 0;
  }
}