
/* --- REVISED: Center Event Text with Thumbnail --- */
#events .responsive-table tbody td:first-child b {
    display: flex;
    align-items: center;
    font-weight: bold; /* Ensures the text stays bold */
}

#events .responsive-table tbody td:first-child img {
    margin-right: 15px; /* Adds space between the image and text */
}

/* --- Mobile-First & Responsive Styles --- */

/* --- Mobile Menu Subheadings --- */
nav .dropdown-menu b {
    display: block; /* Make it a block element for spacing */
    padding: 12px 20px 8px 40px; /* Add padding (top, right, bottom, left) */
    font-size: 1.2em; /* Make the font a bit larger */
    font-weight: bold; /* Ensure it's bold */
    color: #a0c4ff; /* Use the light blue from your theme for good contrast */
    background-color: rgba(0, 0, 0, 0.2); /* Add a subtle background to separate it */
    text-transform: uppercase; /* Make it look like a proper heading */
    letter-spacing: 1.5px; /* Add a little space between letters */
    text-align: center; /* Align text to the left like the menu items */
}

html {
  scroll-behavior: smooth;
}

/* --- Header & Navigation --- */
/* --- Header & Navigation --- */
header {
    background: linear-gradient(60deg, var(--color-blue), #0056b3);
    color: var(--text-color);
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background 1s ease-in-out;
}

.header-rainbow {
    background: linear-gradient(90deg, var(--color-red), var(--color-orange), var(--color-yellow), var(--color-green), var(--color-cyan), var(--color-blue), var(--color-violet));
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}
.logo img {
    vertical-align: middle;
    margin-right: 8px;
}

/* --- Mobile Hamburger Menu --- */
.nav-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}
.hamburger-icon {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--light-text-color);
    position: relative;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background-color: var(--light-text-color);
    left: 0;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.hamburger-icon::before { top: -8px; }
.hamburger-icon::after { bottom: -8px; }

/* --- Mobile Navigation Panel (Overlay) --- */
nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 30, 30, 0.98);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 999;
    overflow-y: auto;
    padding-top: 80px;
    
    /* Animation: Starts hidden and off-screen */
    visibility: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

nav.active {
    /* Animation: Becomes visible and slides on-screen */
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

nav ul {
    list-style: none;
    width: 100%;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

nav ul li {
    width: 100%;
}

nav ul li a.dropdown-toggle {
    display: block;
    padding: 18px 25px; 
    color: #77a2e6;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 2em;
    font-weight: 700;
    text-transform: uppercase;
}

/* Mobile Accordion Sub-menu styles */
nav .dropdown-menu {
    position: static;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

nav .dropdown.open .dropdown-menu {
    max-height: 1000px;
}

nav .dropdown-menu li a {
    display: block;
    padding: 14px 20px 14px 40px;
    font-size: 1.5em;
    font-weight: 400;
    color: white;
    text-align: center;
    text-transform: none;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
}

nav .dropdown-menu li:last-child a {
    border-bottom: none;
}

nav .dropdown-menu li a:hover {
	display: block;
    background-color: rgba(160, 196, 255, 0.3);
}

/* --- Desktop Navigation Styles --- */
@media (min-width: 992px) {
    
    .nav-toggle {
        display: none;
    }

    nav {
        display: flex !important;
        position: static;
        height: auto;
        width: auto;
        flex-direction: row;
        align-items: center;
        background-color: transparent;
        padding-top: 0;
        overflow: visible;
        margin-left: auto;
        
        /* Overrides for mobile animations */
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    nav ul {
        flex-direction: row;
        width: auto;
		display: flex;
		justify-content: flex-end;
    }

   nav ul li {
        position: relative;
        display: flex;
        align-items: center;
    }
    nav ul li a img {
        vertical-align: middle;
    }
    
    nav > ul > li > a {
		display: block; 
        color: var(--text-color);
        font-weight: 700;
        font-size: 1em;
        padding: 5px 10px;
        transition: background-color 0.3s;
        border-radius: 5px;
        text-transform: none;
        background-color: transparent;
        border-bottom: none;
    }
    
    nav > ul > li > a:hover {
        background-color: #f1f1f1;
        color: var(--text-color);
    }
    
    nav > ul > li.dropdown > a.dropdown-toggle {
        background-color: rgba(255, 255, 255, 0.5);
        color: #0056b3;
        font-size: 0.9em;
        padding: 5px 10px;
        font-weight: 700;
        white-space: nowrap;
        border-radius: 5px;
        margin: 0 4px;
    }
    
    nav ul li.dropdown > a.dropdown-toggle:hover {
        background-color: #f1f1f1;
        color: var(--text-color);
    }
    
    nav .dropdown-menu {
        display: none;
        position: absolute;
        left: 0;
        top: 100%;
        background-color: white;
        min-width: 220px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        border-radius: 0 0 5px 5px;
        border-top: 3px solid var(--color-blue);
        z-index: 1100;
        
        /* Overrides for mobile accordion animation */
        max-height: none;
        overflow: visible;
    }

/* --- Desktop Dropdown Subheadings --- */
nav .dropdown-menu b {
    font-size: 0.9em;                  /* Smaller font for the desktop menu */
    color: #4a4a4a;                   /* Dark text to be readable on the white background */
    background-color: #f1f1f1;        /* A light grey background to act as a separator */
    text-align: left;                 /* Align the text to the left like other desktop links */
    padding: 8px 10px;                /* Adjust padding for the smaller size */
    letter-spacing: 1px;              /* Adjust letter spacing */
}

    nav .dropdown.open .dropdown-menu {
        display: none;
    }

    nav .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    nav .dropdown-menu li {
        transition: background-color 0.2s ease;
    }
    
    nav .dropdown-menu li a {
		display: block; 
        font-weight: 400;
        font-size: 1em;
        color: var(--text-color);
        text-align: left;
        padding: 10px 10px;
        background-color: transparent;
    }

    nav .dropdown-menu li:hover {
        background-color: #f1f1f1;
    }
    
    nav .dropdown-menu li:hover a {
        color: var(--text-color);
        background-color: transparent;
    }

    nav > ul > li:last-child > a img {
        height: 25px; 
        width: auto;
    }
    
    nav > ul > li:last-child > a {
        padding: 5px;
        background-color: transparent;
    }
}
        
/* --- Responsive Content Styles --- */
@media (max-width: 768px) {
    .hero td {
        display: block;
        width: 100% !important;
        text-align: center !important;
        white-space: normal !important;
        padding: 10px 0;
    }

    #church-info-main, #events {
        overflow-x: auto;
    }
}

/* --- Universal Tooltip Styling --- */
.universal-tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    text-align: center;
    max-width: 250px;
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -110%);
    display: none;
    opacity: 0;
    transition: opacity 0.2s;
}

/* --- Global Link Styling --- */
a { color: rgb(113, 97, 161);
    text-decoration: underline;
    transition: color 0.3s;
}

a:hover {
    color: rgb(157, 144, 196);
    text-decoration: underline;
}

/* --- General Styling & Variables --- */
:root {
    --color-red: #ffadad;
    --color-orange: #ffd6a5;
    --color-yellow: #fdffb6;
    --color-green: #caffbf;
    --color-cyan: #9bf6ff;
    --color-blue: #a0c4ff;
    --color-violet: #bdb2ff;
    --text-color: #4a4a4a;
    --light-text-color: #ffffff;
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* --- Basic Body Styling --- */
body {
    font-family: var(--font-body);
    color: var(--text-color);
    margin: 0;
    background-color: #f8f9fa;
    line-height: 1.7;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 0l16 12.279-6.951 1.185-4.211 6.536z" fill="yellow" stroke="black" stroke-width="1"/></svg>'), auto;
}

a, button, input[type="submit"], .cta-button, .cta-button-secondary {
    cursor: pointer;
}

/* --- Sparkle Canvas --- */
#sparkle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
	display: none; /* Hide the mouse sparkles */
}

/* --- Fading Background Container --- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

#bg1 { opacity: 1; }

/* --- Main Content Wrapper --- */
.content-wrapper {
    background-color: rgba(255, 255, 255, 0.9);
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 25px rgba(0,0,0,0.1);
}

/* --- Content Sections --- */
.content-section { padding: 40px 50px; border-bottom: 1px solid #eee; }
.content-section p, .content-section ul { margin-bottom: 1rem; }
.content-section ul { list-style-position: outside; padding-left: 20px; }
.content-section ul li { margin-bottom: 0.5rem; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

h1 { font-size: 2.2em; }
h2 { font-size: 1.8em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }

.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('bg.jpg') no-repeat center center/cover;
    padding: 80px 40px;
    text-align: center;
}

.hero h5 { 
    color: white;
    font-size: 2.8em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero p {
    color: white;
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* --- Carousel Styling --- */
.carousel-container {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    height: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.carousel-slider { display: flex; height: 100%; transition: transform 0.5s ease-in-out; }
.carousel-slide { min-width: 100%; height: 100%; position: relative;flex-shrink: 0; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-text {
    position: absolute; bottom: 0; left: 20; width: 90%;
    background: rgba(0,0,0,0.6); color: white; text-align: center;
    padding: 15px; font-size: 1.1em;
}

.carousel-button {
    position: absolute; top: 50%; transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7); color: #333;
    border: none; cursor: pointer; padding: 10px 15px; border-radius: 50%;
    font-size: 24px; z-index: 10;
}

.carousel-button.prev { left: 15px; }
.carousel-button.next { right: 15px; }
.carousel-button:hover { background-color: white; }


table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    font-size: 0.95em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

thead tr {
    background-color: var(--color-blue);
    color: #333;
    text-align: left;
    font-weight: bold;
}

thead th {
    font-size: 1em;
    text-transform: uppercase;
}

tbody tr {
    border-bottom: 1px solid #dddddd;
    transition: background-color: 0.3s;
}

tbody tr:nth-of-type(even) {
    background-color: #f8f8f8;
}

tbody tr:last-of-type {
    border-bottom: 2px solid var(--color-blue);
}

.rainbow-hover-table tbody tr:nth-child(6n + 1):hover { background-color: rgba(255, 173, 173, 0.6); }
.rainbow-hover-table tbody tr:nth-child(6n + 2):hover { background-color: rgba(255, 214, 165, 0.6); }
.rainbow-hover-table tbody tr:nth-child(6n + 3):hover { background-color: rgba(253, 255, 182, 0.6); }
.rainbow-hover-table tbody tr:nth-child(6n + 4):hover { background-color: rgba(202, 255, 191, 0.6); }
.rainbow-hover-table tbody tr:nth-child(6n + 5):hover { background-color: rgba(155, 246, 255, 0.6); }
.rainbow-hover-table tbody tr:nth-child(6n + 6):hover { background-color: rgba(160, 196, 255, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 1):hover { background-color: rgba(255, 173, 173, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 3):hover { background-color: rgba(255, 214, 165, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 5):hover { background-color: rgba(253, 255, 182, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 7):hover { background-color: rgba(202, 255, 191, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 9):hover { background-color: rgba(155, 246, 255, 0.6); }
.rental-table tbody tr.expandable-row:nth-child(12n + 11):hover { background-color: rgba(160, 196, 255, 0.6); }

/* --- Main Email Form Container --- */
.form-container {
    max-width: 500px;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}
.form-header p {
    margin: 0 0 30px 0;
    font-size: 0.95em;
    color: #7f8c8d;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- Footer --- */
footer {
    background: #4a4a4a;
    color: var(--light-text-color);
    text-align: center;
    padding: 30px;
}

footer a { 
    color: var(--color-cyan); 
}

/* --- Wrapper for Horizontally Scrolling Tables --- */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1em;
}

/* --- MOBILE RESPONSIVE STYLES --- */
@media (max-width: 990px) {
    
    .content-section {
        padding-left: 0;
        padding-right: 0;
    }
    
    .logo {
        font-size: 1.2em;
    }

    .content-section h1,
    .content-section h2,
    .content-section h3,
    .content-section h4,
    .content-section h5,
    .content-section p {
        padding-left: 15px;
        padding-right: 15px;
    }

    .content-section ul {
        padding-left: 35px;
        padding-right: 15px;
        list-style-position: inside;
    }
    
    .hero {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* --- Card Style for Each Section --- */
.content2-section {
    background-color: #ffffff;
    border-radius: 12px;
    margin: 50px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border-left: 5px solid #6d8a9f;
    transition: transform 1s ease, box-shadow 0.3s ease;
	text-align: justify;
}
.contactus-section {
    background-color: #ffffff;
    border-radius: 12px;
    margin: 0px;
    padding: 2rem 2.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    border-left: 5px solid #6d8a9f;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contactus-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.content2-section:hover {
    transform: translateY(-5px);
    box-shadow: 10px 12px 30px rgba(0, 0, 0, 0.1);
}

.content2-section h2 {
    font-family: var(--font-heading);
    color: #2c3e50;
    font-size: 2rem;
    margin-top: 0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.content2-section h3 {
    font-family: var(--font-heading);
    color: #34495e;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content2-section p {
    margin-bottom: 1rem;
    color: #555;
}

.content2-section ul {
    list-style: none;
    padding-left: 0;
}

.content2-section ul li {
    padding-left: 1.8rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.content2-section ul li::before {
    content: '🕊️';
    position: absolute;
    left: 0;
    top: 0px;
    color: #6d8a9f;
    font-size: 1rem;
}

/* --- Special Styling for the Affirmation of Faith --- */
.affirmation {
    background-color: #fdfdfd;
    border-left: 4px solid #8e44ad;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 8px;
}

.affirmation h2 {
    border-bottom: none;
    font-size: 1.6rem;
    color: #8e44ad;
    margin: 0 0 1rem 0;
    padding: 0;
}

.affirmation p {
    font-style: italic;
    color: #444;
    margin: 0;
}
/* --- Main Image Gallery Styles --- */

.main-image-gallery {
    margin-top: 2rem;
}

.gallery-viewer {
    margin-bottom: 20px;
    text-align: center;
}

#main-gallery-image {
    max-width: 100%;
    width: 800px;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease-in-out;
}

/* Style for the description text box */
.image-description {
    max-height: 0; /* Starts hidden */
    opacity: 0;
    overflow: hidden;
    color: #4a4a4a;
    font-style: italic;
    background-color: rgba(241, 241, 241, 0.7);
    padding: 0 20px;
    margin: 0 auto;
    max-width: 80%;
    border-radius: 8px;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out, margin 0.4s ease-out, padding 0.4s ease-out;
}

/* Style for when the description is visible */
.image-description.visible {
    max-height: 100px; /* Animate to this height */
    opacity: 1;
    margin-top: 20px; /* Add space when it appears */
    padding: 15px 20px; /* Add padding when it appears */
}

/* This is the scrollable container for the thumbnails */
.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    
    /* Create the scroll box */
    max-height: 150px; /* (Thumbnail Height + Gap) * 3 Rows */
    overflow-y: auto; /* Adds a scrollbar when content exceeds the height */
    
    /* Styling for the scroll box */
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 15px;
}

.gallery-thumbnails img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.gallery-thumbnails img:hover {
    transform: scale(1.05);
    border-color: #ccc;
}

.gallery-thumbnails img.active {
    border-color: var(--color-blue);
    box-shadow: 0 0 10px rgba(160, 196, 255, 0.7);
    transform: scale(1.05);
}


/* --- Styles for Expandable Table Rows --- */

.rental-table .expandable-row {
    cursor: pointer;
}

/* By default, the content inside the cell is collapsed */
.rental-table .details-row .details-content {
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, margin 0.4s ease-out;
}

/* When the parent row is .open, expand the content inside the cell */
.rental-table .details-row.open .details-content {
    max-height: 500px;
    padding: 0px;
    margin: 0px 0;
}

/* --- Lightbox Gallery Styles --- */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lightbox-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
}

#lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    cursor: pointer;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    position: absolute;
    user-select: none;
    transition: color 0.2s ease;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    color: #ccc;
}

.lightbox-close {
    top: 20px;
    right: 35px;
    font-size: 4rem;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 1.2rem;
}

/* Make thumbnails in the rental table clickable */
.rental-table .details-gallery img {
    cursor: pointer;
}

/* --- Clickable Thumbnail Indicator --- */

.details-gallery img {
    border-radius: 4px; /* Ensures the images have slightly rounded corners */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Adds a smooth animation */
}

.details-gallery img:hover {
    transform: scale(1.05); /* Slightly enlarges the image on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* Adds a subtle shadow for a "lifted" effect */
}

/* --- Clickable Thumbnail Indicator --- */



.details-gallery img:not(.full-size-image) {
    width: 150px;
    height: 112px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 3px solid var(--color-blue);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


.details-gallery img {
    cursor: pointer;
    border-radius: 4px;
    /* Set the default border color to the header's blue */
    border: 3px solid var(--color-blue);
    /* Animate changes smoothly */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.details-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Change to the darker blue from your header gradient on hover */
    border-color: #0056b3;
}

/* --- Gallery Container Styling --- */
/* This adds padding to prevent images from being cut off on hover */
.details-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Spacing between images */
    justify-content: center; /* Center the images */
    padding: 10px; /* This provides the crucial space for the hover effect */
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    margin-top: 15px;
	max-height: 400px; /* Constrains the height */
    overflow-y: auto;  /* Adds a scrollbar when content overflows */
	align-items: flex-start;
}
/* --- Styles for the Director's Photo --- */

.director-photo {
    /* Base styles */
    width: 200px; /* Keep the original width */
    height: 200px; /* Use a fixed height to ensure a perfect circle */
    object-fit: cover; /* Ensures the image fills the circular space without distortion */
    float: right; /* Aligns the image to the right */
    margin: 0 0 15px 25px; /* Adds space around the image (top, right, bottom, left) */
    border-radius: 50%; /* This is the key to making it a perfect circle! */
    border: 5px solid #6d8a9f; /* Added border with the new color */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 5px rgba(109, 138, 159, 0.5); /* Creates a shadow effect with a shade of the new color */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; /* Smooth transition for hover effect */
}

/* Optional: Add a subtle hover effect */
.director-photo:hover {
    transform: scale(1.05); /* Slightly enlarge the image on hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 0 5px rgba(91, 123, 144, 0.7);
}

/* Optional: To make the image a rounded square instead of a circle */
/* Just use a smaller border-radius like this: */
/*
.director-photo-rounded-square {
    width: 200px;
    height: 200px;
    object-fit: cover;
    float: right;
    margin: 0 0 15px 25px;
    border-radius: 15px;
    border: 5px solid var(--color-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
}
.director-photo-rounded-square:hover {
    transform: scale(1.05);
}
*/

/* Optional: A more complex style with a border and gradient shadow */
/*
.director-photo-fancy {
    width: 200px;
    height: 200px;
    object-fit: cover;
    float: right;
    margin: 0 0 15px 25px;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 0 0 5px var(--color-blue), 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.director-photo-fancy:hover {
    transform: scale(1.05) rotate(3deg);
    box-shadow: 0 0 0 5px #0056b3, 0 6px 20px rgba(0, 0, 0, 0.3);
}
*/
.tender-image {
    transition: transform 0.3s ease-in-out;
    z-index: 1; /* Sets a default z-index */
    border: 5px solid #6d8a9f; /* Adds a solid border with the specified color */
    border-radius: 4px;
}

.tender-image:hover {
    transform: scale(3);
    z-index: 1000; /* Brings the image to the front on hover */
}

.header-rainbow {
    transition: background 1s ease-in-out;
    background: linear-gradient(90deg, var(--color-red), var(--color-orange), var(--color-yellow), var(--color-green), var(--color-cyan), var(--color-blue), var(--color-violet));
}

.full-size-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border: none !important;
}

.details-gallery img:not(.full-size-image) {
    width: 150px;
    height: 112px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 3px solid var(--color-blue);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.full-size-image {
    width: 95%;
    height: auto;
    object-fit: contain;
    border: none;
    margin-bottom: 20px;
    cursor: default;
}

        /* Custom styles to match the church's color palette */
        :root {
            --color-blue: #a0c4ff;
            --color-red: #ffadad;
            --color-green: #caffbf;
            --text-color: #4a4a4a;
        }

        .gradient-bg {
            background: linear-gradient(60deg, var(--color-blue), #0056b3);
        }

        .btn-primary {
            background-color: var(--color-blue);
            color: white;
            transition: all 0.2s ease-in-out;
        }
        .btn-primary:hover {
            background-color: #77a2e6;
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
		
		css
/* --- Collapsible Gallery Styles --- */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem; /* Adds some space below the header */
}

.gallery-toggle {
    background-color: #f1f1f1;
    color: var(--text-color);
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    border: 1px solid #ddd;
    transition: background-color 0.2s;
}

.gallery-toggle:hover {
    background-color: #e0e0e0;
    color: var(--text-color);
}
.collapsible-gallery {
    max-height: 0; /* Hidden by default */
    overflow: hidden;
    padding-top: 0; /* Remove padding when closed */
    padding-bottom: 0; /* Remove padding when closed */
    /* Animate the padding along with the height for a smoother effect */
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.collapsible-gallery.open {
    max-height: 500px; /* The expanded height */
    /* Restore the original padding when open */
    padding-top: 10px;
    padding-bottom: 10px;
}