/* --- Google Fonts & Basic Setup --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

:root {
    --primary-color: #8B0000; /* A deep red, similar to the site's theme */
    --secondary-color: #333333;
    --light-gray: #f4f4f4;
    --white-color: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--secondary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

/* --- 1. Top Bar --- */
.top-bar {
    background-color: var(--secondary-color);
    color: var(--white-color);
    padding: 0.5rem 0;
}
.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.social-links a {
    color: var(--white-color);
    margin-right: 1rem;
    font-size: 0.9rem;
}
.top-bar-button {
    background-color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* --- 2. Main Header --- */
.main-header {
    background-color: var(--white-color);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky; /* Makes header stick to top */
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo img {
    height: 150px;
}
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}
.main-nav ul li {
    margin-left: 2rem;
}
.main-nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
}
.main-nav .fa-chevron-down {
    font-size: 0.7rem;
    margin-left: 0.3rem;
}
.header-right .fa-search {
    font-size: 1.2rem;
}


/* --- 3. Hero Section Slider --- */
.hero-section-slider {
    position: relative;
    height: 90vh;
    color: var(--white-color);
    overflow: hidden; /* Hides the other slides */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 2;
}

.hero-slide.active {
    opacity: 1; /* Makes the active slide visible */
    z-index: 3;
}

.hero-content {
    position: relative;
    max-width: 800px;
    z-index: 4; /* Ensures content is above the overlay */
}
.hero-content {
    max-width: 1500px;
}
.hero-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}
.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}
.cta-button {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.cta-button:hover {
    background-color: #6d0000; /* Darker red on hover */
}

/* --- 4. Welcome Section --- */
.welcome-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}
.welcome-section p {
    max-width: 700px;
    margin: 1rem auto 0;
}

/* --- 5. Card Grid Section --- */
.card-grid-section {
    padding: 4rem 0;
}
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.card {
    background: var(--white-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
}
.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.card h3 {
    padding: 1rem 1rem 0.5rem;
}
.card p {
    padding: 0 1rem 1.5rem;
}

/* --- 6. News Section --- */
.news-section {
    padding: 4rem 0;
    background-color: var(--light-gray);
}
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}
.news-article {
    background: var(--white-color);
}
.news-article img {
    width: 100%;
}
.news-article h4, .news-article p, .news-article a {
    padding: 0 1.5rem;
}
.news-article a {
    display: inline-block;
    margin-bottom: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color);
}

/* --- 7. CTA Section --- */
.cta-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/cta-background.jpg') no-repeat center center/cover;
    padding: 5rem 0;
    color: var(--white-color);
}

/* --- 8. Footer --- */
.main-footer {
    background-color: #252525;
    color: #ccc;
    padding: 4rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.footer-logo {
    height: 150px;
    margin-bottom: 1rem;
}
.footer-column h4 {
    color: var(--white-color);
}
.footer-column ul {
    list-style: none;
    padding: 0;
}
.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    line-height: 2;
}
.social-links-footer a {
    color: var(--white-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* --- 9. Copyright Bar --- */
.copyright-bar {
    background-color: #1a1a1a;
    color: #aaa;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* --- Dropdown Menu Styling --- */
.main-nav .has-dropdown {
    position: relative; /* This is crucial for positioning the dropdown */
}

.main-nav .dropdown-menu {
    display: none; /* Hide the dropdown by default */
    position: absolute; /* Position it relative to its parent */
    top: 100%; /* Start it right below the parent link */
    left: 0;
    background-color: var(--white-color);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 250px; /* Give it a good width */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 100; /* Ensure it appears above other content */
}

.main-nav .dropdown-menu li {
    margin-left: 0; /* Reset margin for dropdown items */
}

.main-nav .dropdown-menu li a {
    padding: 0.75rem 1.5rem;
    display: block; /* Make the entire area clickable */
    white-space: nowrap; /* Prevent text from wrapping */
    font-weight: 400; /* Lighter font weight for dropdown links */
}

.main-nav .dropdown-menu li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* --- Show the dropdown on hover --- */
.main-nav .has-dropdown:hover .dropdown-menu {
    display: block; /* Show the dropdown when hovering over the parent */
}

/* ===================================
   RESPONSIVE & MOBILE MENU STYLES
====================================== */

/* --- Hiding the mobile toggle on larger screens --- */
.mobile-nav-toggle {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.sr-only { /* For accessibility, hides text visually but not from screen readers */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* --- Media Query for Tablet and Mobile screens --- */
@media (max-width: 992px) {
    /* Show the hamburger button */
    .mobile-nav-toggle {
        display: block;
        z-index: 2000; /* Ensure it's on top */
        color: var(--secondary-color);
    }
    
    /* Hide the original search icon on mobile for more space */
    .header-right {
        display: none;
    }

    /* Style the main navigation container for mobile */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Start off-screen */
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white-color);
        box-shadow: -5px 0 15px rgba(0,0,0,0.15);
        padding-top: 5rem; /* Space for close button */
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    /* When menu is open, bring it into view */
    .main-nav.nav-open {
        right: 0;
    }

    /* Style the navigation links for vertical layout */
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .main-nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }

    .main-nav ul li a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    /* Mobile Dropdown Styles */
    .main-nav .dropdown-menu {
        position: static; /* Override desktop absolute positioning */
        display: none; /* Hide by default */
        box-shadow: none;
        border-radius: 0;
        min-width: 100%;
        padding-left: 1rem; /* Indent submenu items */
        background-color: var(--light-gray);
    }

    /* When a dropdown is opened via JS */
    .main-nav li.submenu-open > .dropdown-menu {
        display: block;
    }

    /* Make the dropdown chevron rotate when open */
    .main-nav li.submenu-open > a > .fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* ===================================
   INTERNAL PAGE CONTENT STYLES
====================================== */

/* --- Style for the banner at the top of content pages --- */
.page-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1507692049603-63fad80c8069?q=80&w=2070&auto=format&fit=crop') no-repeat center top/cover;
    padding: 4rem 0;
    text-align: center;
    color: var(--white-color);
}

.page-banner h1 {
    font-size: 2.5rem;
}

/* --- General styling for the main content area --- */
.page-content {
    padding: 4rem 0;
}

.content-container {
    max-width: 800px; /* Optimal width for reading text */
    margin: 0 auto;
}

.content-container .content-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-container h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.content-container p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

/* --- Styles for the logo showcase section --- */
.logo-showcase {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap; /* Allows logos to stack on smaller screens */
}

.logo-item {
    text-align: center;
}

.logo-item img {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 250px; /* Adjust size as needed */
}

.logo-item .caption {
    margin-top: 0.5rem;
    font-style: italic;
    color: #666;
}

/* --- Style to show the active page in the navigation --- */
.main-nav a.active-page {
    color: var(--primary-color);
}
/* ===================================
   HOMEPAGE VISION & MISSION SECTION
====================================== */

.vision-mission-section-home {
    padding: 4rem 0;
    background-color: #ffffff; /* Or #f4f4f4 if you prefer a light gray background */
}

.vm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.vm-card-home {
    text-align: center;
    padding: 2rem;
}

.vm-card-home .vm-icon {
    font-size: 3rem;
    color: #8B0000; /* This uses your primary red color variable */
    margin-bottom: 1.5rem;
}

.vm-card-home h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #333333; /* This uses your secondary color variable */
}

.vm-card-home p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 0;
}

/* Responsive adjustment for the section */
@media (max-width: 768px) {
    .vm-grid {
        grid-template-columns: 1fr; /* Stacks the cards on smaller screens */
    }
}
/* ===================================
   DIOCESAN STRUCTURE PAGE STYLES
====================================== */

.structure-list {
    margin-top: 3rem;
}

.structure-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.structure-item:last-child {
    border-bottom: none;
}

.structure-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    width: 50px; /* Give a fixed width for alignment */
    text-align: center;
}

.structure-text h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.structure-text p {
    margin-bottom: 0;
}

/* Responsive adjustment for the structure list */
@media (max-width: 576px) {
    .structure-item {
        flex-direction: column; /* Stack icon on top of text */
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}
/* ===================================
   CIRCUITS PAGE TABLE STYLES
====================================== */

.circuit-wrapper {
    margin-bottom: 3rem;
}

.circuit-title {
    font-size: 1.75rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.circuit-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.circuit-table thead {
    background-color: var(--secondary-color);
    color: var(--white-color);
}

.circuit-table th, .circuit-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.circuit-table tbody tr:nth-child(even) {
    background-color: var(--light-gray);
}

.circuit-table tbody tr:hover {
    background-color: #e9e9e9;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--white-color);
    white-space: nowrap;
}

.status-badge.status-church {
    background-color: #28a745; /* Green */
}

.status-badge.status-station {
    background-color: #ffc107; /* Yellow */
    color: #333;
}

.status-badge.status-fellowship {
    background-color: #17a2b8; /* Teal */
}

/* ===================================
   CONTACT PAGE STYLES
====================================== */

.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.contact-title {
    font-size: 1.75rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-info-list i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.contact-info-list strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contact-info-list p {
    margin: 0;
    line-height: 1.6;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

/* Responsive adjustment for the contact page */
@media (max-width: 992px) {
    .contact-page-grid {
        grid-template-columns: 1fr;
    }
}

.section {
  padding: 60px 20px;
  background-color: #f9f9f9;
}

.section-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #005baa;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
}

.section ul {
  margin-top: 10px;
  padding-left: 20px;
}

.section ul li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* General Layout */
body {
  font-family: Arial, sans-serif;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  color: #333;
  background: #f9f9f9;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

/* Header */
header {
  background: #600000;
  color: #fff;
  padding: 15px 0;
}

header h1 {
  margin: 0;
  font-size: 22px;
  text-align: center;
}

nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

nav a.active,
nav a:hover {
  text-decoration: underline;
}

/* Headings */
h2 {
  font-size: 28px;
  margin-top: 30px;
  color: #600000;
}

h3 {
  font-size: 22px;
  margin-top: 25px;
  color: #444;
}

h4 {
  font-size: 18px;
  margin-top: 20px;
  color: #666;
}

/* Paragraphs */
p {
  margin-bottom: 15px;
  text-align: justify;
}

/* Table Styling */
.table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

table th, table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

table th {
  background: #600000;
  color: #fff;
}

table tr:nth-child(even) {
  background: #f2f2f2;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 15px 0;
  margin-top: 40px;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.image-box {
  text-align: center;
  background: #fff;
  padding: 10px;
  border-radius: 8px;
}

.image-box img {
  width: 100%;
  max-width: 280px;
  border-radius: 5px;
  height: auto;
  margin: 0 auto;
  display: block;
}

.image-box p {
  font-weight: bold;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}

