@import url("https://fonts.googleapis.com/css?family=Raleway:100,300,400,500,700,900");

body {
  font-family: "Raleway", sans-serif;
  font-size: 1.2em;
  color: #707070;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

a {
  transition: all 0.3s ease;
  color: #38B;
}

a:hover,
a:focus {
  text-decoration: none;
  color: #D40;
}

a:focus {
  outline: none;
}

.btn {
  padding: 8px 32px;
}

.btn:hover {
  background-color: #ced4da;
}

blockquote {
  font-size: 0.86em;
  line-height: 1.8em;
}

.tm-section-pad-top {
  padding-top: 80px;
  padding-bottom: 40px;
  flex: 1;
}

.tm-section-pad-top-1 {
  padding-top: 110px;
  padding-bottom: 40px;
  flex: 1;
}

.tm-section-pad-top-2 {
  padding-top: 40px;
  padding-bottom: 40px;
  flex: 1;
}

.tm-content-box {
  padding-top: 20px;
  padding-bottom: 40px;
}

.tm-text-primary {
  color: #1e3a5f !important;
  /* Deep navy blue similar to the Coventry site */
}

.tm-font-big {
  font-size: 1.25rem;
}

.tm-btn-primary {
  color: white;
  background-color: #369;
  padding: 14px 30px;
}

.tm-btn-primary:hover,
.tm-btn-primary:focus {
  color: white;
  background-color: #38B;
}

/* Navbar */
.tm-navbar {
  position: fixed;
  /* FIXED: This makes it stay at the top while scrolling */
  top: 0;
  /* <--- ADD THIS to force it to the very top */
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(30, 58, 95, 0.95);
  /* Deep Navy */
  transition: all 0.3s ease;
}

/* This triggers when you scroll down */
.tm-navbar.scroll {
  background-color: #1e3a5f;
  /* Solid Navy (No transparency) */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Keep brand white even when scrolling */
.tm-navbar.scroll .navbar-brand,
.navbar-brand:hover {
  color: white;
}

.nav-item {
  list-style: none;
}

.tm-nav-link {
  color: white;
  /* White text for better contrast on navy */
  font-weight: 500;
  padding: 12px 20px;
  margin-right: 15px;
}

/* Ensure links stay white on scroll background */
.tm-navbar.scroll .tm-nav-link {
  color: white;
}

.tm-navbar.scroll .tm-nav-link:hover,
.tm-navbar.scroll .tm-nav-link.current,
.tm-nav-link:hover {
  color: #FFF;
  background-color: #38B;
  /* Bright blue highlight on hover */
  border-radius: 5px;
}

/* Style for the active/current page link */
.tm-nav-link.active {
    color: #ffd700 !important; /* Gold color to match church theme */
    border-bottom: 2px solid #ffd700;
    font-weight: bold;
}

/* Mobile Toggler Styling */
.navbar-toggler {
  border: 1px solid white;
}

.navbar-toggler-icon {
  color: white;
}

/* Mobile Toggler stays white on scroll */
.tm-navbar.scroll .navbar-toggler {
  border: 1px solid white;
}

/* --- Navbar Logo Icon Styling --- */
.tm-navbar-logo {
  width: 40px;
  /* Adjust size as needed */
  height: auto;
  margin-right: 10px;
  /* Space between icon and MSJSOC text */
  vertical-align: middle;
  /* Keeps it centered with the text */
  margin-top: -5px;
  /* Fine-tuning the vertical alignment */
  transition: transform 0.3s ease;
}

/* Optional: Slight pop effect when hovering over the brand name */
.navbar-brand:hover .tm-navbar-logo {
  transform: scale(1.1);
}

/* Mobile Adjustment: Shrink the logo slightly on small phones */
@media (max-width: 768px) {
  .tm-navbar-logo {
    width: 30px;
    margin-right: 8px;
  }

  .navbar-brand {
    font-size: 1.2rem;
    /* Keeps the text and icon on one line */
  }

  /* Mobile Navbar Fix: This forces the mobile menu to stay Navy Blue */
  .navbar-collapse {
    background-color: #1e3a5f !important;
    padding: 20px;
    border-radius: 0;
  }

  .navbar-collapse .nav-link {
    color: white !important;
    text-align: left;
    padding: 10px 0;
  }

  /* Remove the default border and focus rectangle from the hamburger menu */
  .navbar-toggler {
    border: none !important;
    /* Removes the main rectangle border */
    outline: none !important;
    /* Removes the 'glow' when clicked */
    box-shadow: none !important;
    /* Removes the shadow/focus ring in Bootstrap 5 */
    align-self: center;
    /* Aligns the hamburger menu vertically with the navbar brand text */
  }

  /* Optional: If the icon inside is too small or off-center */
  .navbar-toggler-icon {
    font-size: 1.2rem;
    color: white;
    /* Ensures the 'three lines' are clearly visible */
  }

}

/* Hero */
#infinite {
  background-color: #010101;
  /* Darker gradient (0.5 instead of 0.3) for better text readability */
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(../img/church-front.webp);
  background-repeat: no-repeat;
  background-size: cover !important;
  background-position: center 5% !important;
  /* Centers the church perfectly */
  background-attachment: scroll !important;
  height: 95vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Mobile Optimization for Hero Section --- */
@media (max-width: 768px) {

  /* 1. Stop the 'Extreme Zoom' on the background image */
  #infinite {
    background-attachment: scroll !important;
    /* Disables parallax on mobile to fix zoom bug */
    background-position: center center !important;
    background-size: cover !important;
    height: auto !important;
    /* Allows section to grow with the text */
    min-height: 100vh;
    /* Ensures it still covers the full screen */
    padding-top: 100px;
    /* Space for the navbar */
    padding-bottom: 10px;
    display: flex;
    align-items: center;
  }

  /* 2. Shrink the main title so it doesn't take 5 lines */
  .tm-hero-title {
    font-size: 1.8rem !important;
    padding: 0 10px;
    line-height: 1.3;
  }

  /* 3. Adjust English Subtitle */
  .tm-hero-subtitle {
    font-size: 1rem !important;
    margin-bottom: 20px;
  }

  /* 4. Fix the Malayalam Verse */
  .tm-bible-verse-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    /* Transparent dark box to make text readable over the photo */
    border-radius: 8px;
  }

  .malayalam-verse {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    /* Critical for Malayalam glyphs */
    margin-bottom: 10px;
  }

  .verse-reference {
    font-size: 0.9rem !important;
    font-weight: bold;
    color: #ffd700;
    /* Gold color for the reference */
  }

  /* 5. Adjust the Cross Divider */
  .tm-hero-divider {
    margin: 15px 0;
  }

}

/* Fix for very small phones (iPhone SE) */
@media (max-width: 380px) {
  .tm-hero-title {
    font-size: 1.5rem !important;
  }

  .malayalam-verse {
    font-size: 1rem !important;
  }
}

.tm-hero-text-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Ensures everything stays centered */
  text-align: center;
}

.tm-hero-text-container-inner {
  margin-top: -50px;
  /* Reduced this so it doesn't hide behind the navbar */
}

.tm-hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  /* Stronger shadow for professional "Official" look */
  text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.9);
  color: white;
}

.tm-hero-subtitle {
  font-size: 1.5rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
  color: white;
}

/* Down Arrow Button Styling */
/* .tm-down-arrow:hover,
.tm-down-arrow:focus {
  color: #FFF;
  background: #1e3a5f; */
/* Matches your church navbar blue */
/* padding: 20px 50px;
  transition: all 0.3s ease;
} */

/* Index-Home */
.tm-section-desc {
  max-width: 850px;
  width: 100%;
  font-size: 1.3rem;
}

/* --- 11. Decorative Divider (The Cross & Lines) --- */
.tm-hero-divider {
  margin-top: 40px;
  margin-bottom: 60px;
  /* Adjusted slightly for better vertical balance */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  /* Slightly brighter for visibility */
}

/* Horizontal lines that fade out on either side of the icon */
.tm-hero-divider::before,
.tm-hero-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5), transparent);
  max-width: 120px;
  margin: 0 20px;
}

.tm-hero-divider i {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
}

/* --- 12. Malayalam Verse Styling --- */
.tm-bible-verse-container {
  padding: 0 20px;
  text-align: center;
}

.malayalam-verse {
  /* Comprehensive font stack for Malayalam across Windows, Mac, and Linux */
  font-family: "Meera", "Kartika", "Malayalam Sangam MN", "AnjaliOldLipi", sans-serif;
  font-size: 1.5rem;
  color: #ffffff;
  line-height: 1.8;
  /* Extra breathing room for complex Malayalam characters */
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
  max-width: 850px;
  margin: 0 auto;
  font-weight: 400;
}

.verse-reference {
  display: block;
  font-size: 0.95rem;
  color: #9CF;
  /* Light Blue/Cyan */
  letter-spacing: 2px;
  font-weight: 600;
  margin-top: 15px;
  text-transform: uppercase;
}

/* Mobile Fix: Ensure the Malayalam text doesn't look giant on small screens */
@media (max-width: 767px) {
  .malayalam-verse {
    font-size: 1.3rem;
    line-height: 1.6;
  }

  .tm-hero-divider {
    margin-bottom: 40px;
  }

  .tm-hero-divider::before,
  .tm-hero-divider::after {
    max-width: 60px;
    /* Shorten lines on mobile */
  }
}

/* =============================================
   INTRO SECTION (Image & Text Columns)
   ============================================= */

/* 1. Base Styles (Applies to all devices) */
.tm-intro-text-container {
  background-color: #fff;
  transition: all 0.3s ease-in-out;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 2. Desktop Styles (Screens wider than 992px) */
@media (min-width: 992px) {

  /* The 80px "Breathing Room" Gap */
  .tm-intro-text-container {
    padding-left: 80px;
  }

  /* The "Lift" Hover Effect */
  .tm-intro-text-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  }

  /* Use this if you ever put an image on the RIGHT side */
  .padding-right-xl {
    padding-right: 80px;
    padding-left: 0;
  }
}

/* 3. Mobile & Tablet Styles (Screens smaller than 991px) */
@media (max-width: 991px) {
  .tm-intro-text-container {
    padding: 40px 20px !important;
    /* Removes the 80px gap */
    max-width: 100%;
    text-align: center;
    /* Centers the Sheffield paragraph */
    transform: none !important;
    /* Disables hover lift on touchscreens */
    box-shadow: none !important;
  }

  /* Keeps the church image centered above the text */
  .tm-intro-img {
    display: block;
    margin: 0 auto 30px auto;
    max-width: 100%;
    height: auto;
  }
}

/* --- Padding for About section --- */
/* Custom Wide Padding for Church Layout */
@media (min-width: 992px) {
  .px-custom-lg {
    padding-left: 10% !important;
    /* Adjust this % to get the exact width you want */
    padding-right: 10% !important;
  }
}

/* On smaller tablets/phones, we keep it tighter so the text doesn't get too thin */
@media (max-width: 991px) {
  .px-custom-lg {
    padding-left: 30px !important;
    padding-right: 30px !important;
  }
}

/* On Mobile, decrease padding between navbar and about section */
@media (max-width: 768px) {
  #whatwedo {
    padding-top: 0px !important;
  }
}

/* --- Contact Section --- */
#contact {
  color: white;
  background-color: #001828;
  background-image: linear-gradient(rgba(128, 128, 128, 0.55), rgba(128, 128, 128, 0.55)), url(../img/contact-bkgrnd.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  /* Added to ensure image doesn't look stretched */
  min-height: 800px;
  /* Reduced from 980px to avoid huge empty spaces */
  position: relative;
  padding-bottom: 50px;
  padding-top: 100px;
}

.contact-item {
  margin-left: 20px;
  margin-bottom: 50px;
}

.item-link {
  display: flex;
  align-items: center;
}

.item-link i,
.item-link span {
  color: white;
  transition: all 0.3s ease;
}

.item-link:hover i,
.item-link:hover span {
  color: #9CF;
  /* Matches your church theme light blue */
}

/* Form Inputs */
.tm-input {
  margin: 0 0 20px 0;
  width: 100%;
  /* Better for mobile than 90% */
  padding: 12px 20px;
  border-radius: 6px;
  border: 1px solid white;
  background: rgba(255, 255, 255, 0.1);
  /* Subtle background for better visibility */
  color: white;
}

.tm-btn-submit {
  font-size: 1rem;
  color: #fff;
  background-color: #1e3a5f;
  /* Matches Navbar Navy */
  width: 100%;
  /* Full width button looks better on modern contact forms */
  padding: 12px;
  border: none;
  transition: background 0.3s ease;
}

.tm-btn-submit:hover {
  background-color: #38B;
}

::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* --- Footer --- */
.tm-footer {
  position: absolute;
  bottom: 35px;
  left: 0;
  right: 0;
  padding: 0 15px;
  text-align: center;
}

.tm-footer a {
  color: #fff;
}

.tm-footer a:hover {
  color: #9CF;
}

/* --- Media Queries (The Spacing Fixes) --- */

@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }

  .tm-container-contact {
    max-width: 1000px;
  }
}

/* Custom Image Hover & Border Styling */
.img-hover-effect {
  border: 5px solid #fff;
  /* White border */
  transition: all 0.3s ease-in-out;
  /* Makes the movement smooth */
  cursor: pointer;
}

.img-hover-effect:hover {
  transform: scale(1.03);
  /* Slightly zooms in */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  /* Deeper shadow on hover */
  border-color: #369;
  /* Changes border color (matches template blue) */
}

/* Special style for sub-pages to override the hero image */
#infinite.sub-page-header {
  background-image: none !important;
  /* Removes the church-front.webp */
  background-color: #ffffff !important;
  /* Forces white background */
  height: auto;
  /* Shrinks the height so it's not a full screen */
  min-height: 150px;
  border-bottom: 1px solid #eee;
}

/* Ensure the text inside the sub-page header is dark so it's readable on white */
.sub-page-header .tm-hero-title,
.sub-page-header .tm-hero-subtitle {
  color: #333 !important;
}

/* --- SUB-PAGE FOOTER FIX --- */

/* 1. Prepare the body to handle a sticky footer */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 0;
  /* Ensures no weird white gaps at the edges */
}

/* 2. Fix the Footer for sub-pages */
.sub-page-footer {
  position: relative !important;
  bottom: 0 !important;
  margin-top: auto;
  /* The "Magic": pushes footer to bottom of short pages */
  padding: 40px 0;
  background-color: #f8f9fa;
  border-top: 1px solid #eee;
  /* Adds a clean line to separate content */
  color: #333 !important;
  width: 100%;
}

/* Ensure text and links in the sub-page footer are visible */
.sub-page-footer p {
  margin-bottom: 0;
  color: #555 !important;
  font-size: 0.9rem;
}

.sub-page-footer a {
  color: #1e3a5f !important;
  /* Uses your Church Navy for links */
  font-weight: 600;
  transition: color 0.3s ease;
}

.sub-page-footer a:hover {
  color: #38B !important;
  /* Bright blue on hover */
  text-decoration: underline;
}

/* Responsive Map Styling */
.map-responsive {
  overflow: hidden;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  position: relative;
  height: 0;
  margin-bottom: 40px;
  border-radius: 8px;
}

.map-responsive iframe {
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  position: absolute;
  border: 0;
}

.bg-light {
  background-color: #f9f9f9 !important;
  /* Soft grey background to separate sections */
}

/* Adjusts the fluid container to give just a little breathing room from the screen edge */
.container-fluid.px-lg-5 {
  padding-left: 40px !important;
  padding-right: 40px !important;
}

/* Styling for the split tables */
.card {
  overflow: hidden;
  /* Ensures the table corners don't poke out of the rounded card */
  border-radius: 8px;
}

.card-header h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

/* Background for the first table header (Navy Blue) */
.bg-primary {
  background-color: #1e3a5f !important;
}

/* Background for the second table header (Darker/Formal) */
.bg-dark {
  background-color: #343a40 !important;
}

/* Clean up table borders inside the card */
.tm-calendar-table thead th {
  border-top: none !important;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* 2. Events Page: Location Links & GPS Buttons */
.location-link {
  color: #1e3a5f;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px dashed #1e3a5f;
  transition: all 0.3s ease;
}

.location-link:hover {
  color: #38B;
  border-bottom: 1px solid #38B;
}

.btn-outline-primary {
  color: #1e3a5f;
  border-color: #1e3a5f;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.btn-outline-primary:hover {
  background-color: #1e3a5f;
  color: #fff;
}


/* --- Administration: Full-width committee photo --- */
.committee-photo-container {
  width: 100%;
  text-align: center;
}

.committee-photo {
  width: 60%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .committee-photo {
    border-radius: 4px;
  }
}

/* --- 5. Hero Text Shadow (Final Polish) --- */
.tm-hero-title,
.tm-hero-subtitle {
  /* Using a slightly larger blur (15px) to make text "float" over the church photo */
  text-shadow: 2px 4px 15px rgba(0, 0, 0, 0.9) !important;
}

/* --- 6. Table & List Alignment --- */
.table-responsive {
  border: none !important;
}

td {
  vertical-align: middle !important;
}

/* --- 7. Modern Social Media Cards --- */
.social-card {
  display: block;
  padding: 30px 20px;
  /* Slightly tighter padding */
  background: white;
  border-radius: 12px;
  text-decoration: none !important;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  text-align: center;
  height: 100%;
  /* Ensures all cards are the same height in a row */
}

.social-card i {
  font-size: 2.5rem;
  /* Large icons for easy tapping */
  margin-bottom: 15px;
  display: block;
}

.social-card h5 {
  color: #1e3a5f;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* Specific Hover Styles */
.social-card.facebook:hover {
  border-color: #3b5998;
  background-color: #f0f2f5;
}

.social-card.facebook i {
  color: #3b5998;
}

.social-card.instagram:hover {
  border-color: #e1306c;
  background-color: #fff5f8;
}

.social-card.instagram i {
  color: #e1306c;
}

.social-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

/* --- 8. WhatsApp Floating Button --- */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: white !important;
  padding: 12px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  text-decoration: none !important;
}

.whatsapp-float i {
  font-size: 24px;
  margin-right: 10px;
}

/* Hide the "Chat with us" text on very small phones to keep it as just an icon */
@media (max-width: 400px) {
  .whatsapp-float span {
    display: none;
  }

  .whatsapp-float {
    padding: 12px;
    right: 15px;
    bottom: 15px;
  }

  .whatsapp-float i {
    margin-right: 0;
  }
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
}

/* --- 9. Announcement Board Card Logic --- */

/* Force all cards in the row to be equal height */
.announcement-card {
  display: flex;
  flex-direction: column;
  height: auto !important;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.announcement-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

/* Image Handling (Prevents stretching) */
.announcement-img-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background-color: #f8f9fa;
  /* Placeholder color while image loads */
}

/* Ensure the full announcement image is visible */
.tm-announcement-img-container img,
.modal-body img,
.read-more-content img {
  width: 100% !important;
  height: auto !important;
  /* Allows the height to grow with the image */
  max-height: none !important;
  /* Removes any height limits */
  object-fit: contain !important;
  /* Ensures the whole image fits in the box */
  display: block;
}

.announcement-img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

/* Text Truncation (The 3-line limit) */
.announcement-body {
  flex-grow: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.announcement-text-wrap {
  position: relative;
  margin-bottom: 15px;
}

.announcement-text-wrap p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  color: #555;
  line-height: 1.6;
}

/* This specifically fixes the "Read More" popup/modal area */
.modal-dialog {
  max-width: 600px;
  /* Makes the popup wider for better reading */
}

/* Modern 'Read More' Link Style */
.btn-read-more {
  color: #1e3a5f;
  /* Updated to Church Navy */
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  margin-top: auto;
  /* Pushes button to the very bottom of the card */
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-read-more:hover {
  color: #38B;
}

.btn-read-more i {
  transition: transform 0.3s ease;
  margin-left: 5px;
}

.btn-read-more:hover i {
  transform: translateX(5px);
}

/* --- 10. Modal/Popup Improvements --- */
.modal-content {
  border-radius: 15px;
  border: none;
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#modalMessage {
  display: block !important;
  max-height: 60vh;
  /* Allow a bit more space for reading */
  overflow-y: auto;
  white-space: pre-wrap;
  /* Preserves line breaks from Google Sheets */
  padding-right: 10px;
  color: #333;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* Scrollbar styling for the popup */
#modalMessage::-webkit-scrollbar {
  width: 6px;
}

#modalMessage::-webkit-scrollbar-thumb {
  background: #eee;
  border-radius: 10px;
}

/* Badge Fix (The Date Badge) */
.badge-primary {
  background-color: #1e3a5f !important;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
}

/* --- About Section: Leadership Images & Card Polish --- */
.leadership-card {
  background: #fff;
  border-radius: 15px;
  height: 100%;
  border-top: 5px solid #1e3a5f;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  padding: 0;
  /* Changed to 0 to let image reach edges if desired */
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.leadership-img-container {
  width: 100%;
  height: 750px;
  /* Fixed height for a dignified, tall portrait look */
  overflow: hidden;
  background-color: #f0f0f0;
}

.leadership-img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* This crops the photo to fit the 750px height perfectly */
  object-position: top;
  /* Ensures the focus is on the face */
}

.leadership-header,
.leadership-body {
  padding: 0 30px;
  /* Moves padding inside for the text only */
}

.leadership-header {
  margin-top: 25px;
}

.leadership-body {
  padding-bottom: 30px;
  flex-grow: 1;
}

.current-leader {
  color: #b8860b;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Mobile Fix */
@media (max-width: 767px) {
  .leadership-img-container {
    height: 300px;
  }

  .leadership-header,
  .leadership-body {
    padding: 0 20px;
  }
}

/* --- High-Readability Wide Timeline --- */
.tm-timeline {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 0;
  /* This ensures the container stays as tall as all the cards inside */
  display: block;
  overflow: hidden;
}

/* Thicker vertical line for better visual anchor */
.tm-timeline::after {
  content: '';
  position: absolute;
  width: 3px;
  background: #1e3a5f;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1.5px;
  z-index: 0;
  /* Keeps it behind the icons */
}

.tm-timeline-item {
  position: relative;
  width: 50% !important;
  padding: 20px 40px;
  box-sizing: border-box;
  display: block;
  clear: both;
  /* Forces the next card to start below the previous one */
}

.tm-timeline-icon {
  position: absolute;
  width: 54px;
  height: 54px;
  background-color: #fff;
  border: 4px solid #1e3a5f;
  top: 30px;
  border-radius: 50%;
  z-index: 10;
  /* Ensures it sits on top of the line */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center Odd Icons */
.tm-timeline-item:nth-child(odd) .tm-timeline-icon {
  right: -27px;
}

/* Center Even Icons */
.tm-timeline-item:nth-child(even) .tm-timeline-icon {
  left: -27px;
}

/* LEFT SIDE */
.tm-timeline-item:nth-child(odd) {
  float: left;
  text-align: right;
  left: 0;
}

/* RIGHT SIDE */
.tm-timeline-item:nth-child(even) {
  float: right;
  text-align: left;
  left: 0;
  /* Reset left since we are using float: right */
}

/* Card Styling for better readability */
.tm-timeline-content {
  padding: 40px 50px;
  /* More room inside the cards */
  background-color: white;
  position: relative;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
}

.tm-timeline-content h3 {
  color: #1e3a5f;
  font-size: 1.5rem;
  /* Noticeably larger heading */
  font-weight: 700;
  margin-bottom: 15px;
}

.tm-timeline-content p {
  font-size: 1.15rem;
  /* Increased readability font size */
  line-height: 1.8;
  /* Extra line spacing for reading comfort */
  color: #333;
  /* Darker text for higher contrast */
}

/* --- Mobile Responsive Fixes --- */
@media (max-width: 768px) {

  /* 1. Move the main vertical line to the left */
  .tm-timeline::after {
    left: 30px !important;
    /* Positions line behind the icons */
    margin: 0 !important;
    transform: none !important;
  }

  /* 2. Fix the items to stack on the right of the line */
  .tm-timeline-item {
    width: 100% !important;
    left: 0 !important;
    padding-left: 70px !important;
    /* Space for the line and icon */
    padding-right: 15px !important;
    text-align: left !important;
    margin-bottom: 40px !important;
    float: none !important;
  }

  /* 3. Reset the 'even' items so they aren't pushed to the right */
  .tm-timeline-item:nth-child(even) {
    left: 0 !important;
    padding-left: 10px !important;
  }

  /* 4. Position the icons exactly on top of the line */
  .tm-timeline-icon {
    left: 10px !important;
    /* Centered on the 30px line */
    right: auto !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 10;
  }

  /* 5. Adjust the 'Inner' box arrow if your template has one */
  .tm-timeline-item-inner::before {
    display: none !important;
    /* Hide the desktop arrows that point the wrong way */
  }
}

/* --- About Section : Anniversary Image Hover & Border --- */
/* --- Anniversary Section Styling --- */
.anniversary-list {
  list-style: none;
  padding: 0;
}

.anniversary-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.anniversary-list i {
  color: #1e3a5f;
  font-size: 1.4rem;
  margin-right: 20px;
  margin-top: 5px;
  width: 30px;
  text-align: center;
}

.anniversary-feature-card {
  background: linear-gradient(135deg, #1e3a5f 0%, #2a5298 100%);
  color: white;
  padding: 50px 30px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(30, 58, 95, 0.2);
}

.anniversary-feature-card i {
  color: #ffd700;
  /* Gold icon for the anniversary */
}

.anniversary-feature-card h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.anniversary-number {
  font-size: 1.6em;
  /* Large and bold */
  font-weight: 500;
  color: #1e3a5f;
  display: inline-block;
  /* Allows us to control the alignment */
  vertical-align: baseline;
  /* Forces it to sit on the same 'floor' as the text */
  line-height: 1;
  /* Prevents the large font from adding extra space below */
  margin-right: 2px;
  /* Tiny gap before the 'st' */
}

/* This ensures the 'st' stays high but doesn't pull the '1' up with it */
h2.tm-section-title sup {
  font-size: 0.5em;
  vertical-align: super;
  top: -0.5em;
  /* Adjusts the height of the 'st' specifically */
}

/* Responsive adjustment */
@media (max-width: 991px) {
  .anniversary-list li {
    font-size: 1rem;
  }
}

/* --- Patron Saint History Section Styling --- */

/* Ensures the wide padding consistency */
#saint-history {
  background-color: #f8f9fa;
  /* Standard Bootstrap 'light' */
  border-top: 1px solid #dee2e6;
  padding-bottom: 120px;
}

/* Image Container with Elegant Framing */
.saint-image-container {
  background: #ffffff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border: 3px solid #1e3a5f;
  /* Elegant blue border matching the theme */
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.saint-image-container:hover {
  transform: translateY(-5px);
  /* Subtle float effect on hover */
}

.saint-image-container img {
  width: 100%;
  height: 150px;
  /* Standard portrait height */
  object-fit: contain;
  /* CRUCIAL: Shows the full icon without cropping */
  background-color: #fafafa;
  border-radius: 12px;
}

/* Caption styling below the image */
.image-caption {
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  font-style: italic;
  color: #1e3a5f;
}

.saint-quote {
  background-color: #1e3a5f;
  color: white;
  padding: 25px;
  border-left: 8px solid #ffd700;
  /* Gold accent for the 'Crown of Martyrdom' */
  font-style: italic;
  font-size: 1.2rem;
  border-radius: 0 15px 15px 0;
  margin: 30px 0;
  box-shadow: 0 5px 15px rgba(30, 58, 95, 0.15);
}

.saint-desc p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  text-align: justify;
  /* Makes the long text look like a formal book/annal */
}

.font-italic {
  border-top: 1px solid #ddd;
  padding-top: 20px;
  color: #555;
}

/* For Mobile: adjustments */
/* --- Global Mobile Fixes --- */
@media (max-width: 768px) {

  /* Ensure the container doesn't have horizontal scroll */
  .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow-x: hidden;
  }

  /* Force all timeline and announcement cards to 100% width */
  .tm-timeline-item,
  .tm-announcement-card,
  .saint-image-container {
    width: 100% !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 10px !important;
  }

  /* Make text sizes readable on small screens */
  .tm-section-title {
    font-size: 1.8rem !important;
  }

  .anniversary-number {
    font-size: 1.2em !important;
    /* Scale down the large '1' slightly for small screens */
  }

  /* Ensure images (like the Holy Week flyer) stay inside the screen */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* --- Contact Page: Gallery Carousel sizing --- */
#churchCarousel .carousel-item {
  height: 650px;
  /* <-- controls the carousel's height; adjust to taste */
}

#churchCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  #churchCarousel .carousel-item {
    height: 280px;
  }
}

@media (max-width: 480px) {
  #churchCarousel .carousel-item {
    height: 220px;
  }
}

/* --- About Dropdown Styling --- */
.tm-dropdown-menu {
  background-color: #1e3a5f;
  /* Matches navbar navy */
  border: none;
  border-radius: 5px;
  margin-top: 5px;
  padding: 8px 0;
}

.tm-dropdown-item {
  color: white;
  padding: 10px 20px;
  font-weight: 500;
  font-size: 0.95rem;
}

.tm-dropdown-item:hover,
.tm-dropdown-item:focus {
  background-color: #38B;
  /* Bright blue hover, matches your other nav hovers */
  color: #fff;
}

/* Remove the default caret-only-on-hover quirk and keep it visible */
.dropdown-toggle::after {
  vertical-align: middle;
  margin-left: 6px;
}

/* Mobile: dropdown opens inline within the collapsed menu */
@media (max-width: 768px) {
  .tm-dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    margin-top: 0;
    padding-left: 15px;
  }

  .tm-dropdown-item {
    color: white !important;
  }

  .tm-dropdown-item:hover {
    background-color: #38B;
  }
}