/* --- MINISTRY SECTION --- */
#ministry .scroll-item {
    /* Large Screens: 4 items per visible area (25% width) */
    flex-shrink: 0; 
    width: 25%;
    padding: 16px; /* Add some internal padding */
    box-sizing: border-box; /* Include padding in the width calculation */
    text-align: center; /* Center the text and images */
}

/* Tablet / Medium Screens: 2 items per visible area (50% width) */
@media (max-width: 992px) {
    #ministry .scroll-item {
        width: 50%;
    }
}

/* Contact Us */
/* Target the image inside the m5 column for general scaling */
.w3-col.m5 .removePic {
    /* 1. Positioning for Centering */
    position: absolute; 
    top: 85%;
    left: 50%;
    transform: translate(-50%, -50%); 
    
    /* 2. Responsive Sizing */
    max-width: 85%; /* Image will occupy up to 85% of the m5 column's width */
    height: auto;
    object-fit: contain; /* Ensures the whole image is visible without cropping */
    
    /* Keep it visible by default for medium/large screens */
    display: block; 
}

/* Mobile / Small Screens: 1 item per visible area (100% width) */
@media (max-width: 600px) {
    #ministry .scroll-item {
        width: 100%;
    }
}

@media (max-width: 300px) {
    .removePic {
        display: none !important;
    }
}

/* --- PODCAST SECTION  --- */
.podcast-grid {
    display: grid;
    background-color: #333; /*#f1f1f1;*/ 
    padding: 64px 16px; 
    gap: 32px; /* Space between grid items */
}

/* Default for small screens: 1 column */
.podcast-grid {
    grid-template-columns: 1fr;
}

.podcast-item {
	color: white;
}

/* Medium screens (601px+): 2 columns */
@media (min-width: 601px) {
    .podcast-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* Large screens (993px+): 4 columns */
@media (min-width: 993px) {
    .podcast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- CORE IMAGE FIX  --- */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Specific fix for images inside the Ministry cards */
.scroll-item img {
    /* You can define a specific max size here if you want them smaller than 100% */
    max-width: 50%; 
    display: block;
    margin: 0 auto 10px auto; /* Centers the image */
}						 

/* --- Responsiveness Utilities --- */
/* Note: You must manually check the w3.css source for the exact media queries if you need them to perfectly match */
@media (max-width: 600px) { /* Small screen breakpoint */
    .w3-hide-small {
        display: none !important;
    }
}
@media (min-width: 601px) and (max-width: 992px) { /* Medium screen breakpoint */
    .w3-hide-medium {
        display: none !important;
    }
}
@media (min-width: 993px) { /* Large screen breakpoint */
    .w3-hide-large {
        display: none !important;
    }
}

/* --- Donate button --- */
.donate-button {
    background-color: var(--accent-color) !important; /* Uses the color defined in :root */
}
.donate-button:hover {
    background-color: #a30000 !important; /* Slightly darker red on hover */
}

/* --- FLEXBOX FOR 3 COLUMNS --- */
.footer-columns-wrapper {
    display: flex;
    justify-content: space-between; /* Spreads columns evenly */
    gap: 20px; /* Space between columns */
    margin-bottom: 20px; /* Space above the copyright/separator line */
    /* Allows content to wrap to a single column on small screens */
    flex-wrap: wrap; 
}

.footer-col {
    /* Each column takes up an equal amount of space */
    flex: 1; 
    min-width: 200px; /* Prevents columns from getting too narrow before wrapping */
}

/* Style for column headings */
.footer-col h4 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Subtle separator */
    padding-bottom: 5px;
    margin-bottom: 10px;
    color: white; /* Match W3.CSS theme text */
}

.footer-col a {
    color: #ccc; /* Lighter link color */
    text-decoration: none;
    display: block; /* Makes links stack vertically */
    padding: 2px 0;
}

/* Ensure the form fills the full width of its parent */
.footer-col-3 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 10px;  /* Adjust padding-top if necessary */
    width: 100%;  /* Ensure it takes full width of the footer column */
}

.footer-col-3 form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between email input and button */
    width: 100%; /* Ensure form spans full width of the column */
    margin: 0;  /* Remove margin to prevent width issue */
}

/* Ensure inputs are full-width */
.footer-col-3 input[type="email"],
.footer-col-3 input[type="submit"] {
    width: 100%;
    box-sizing: border-box; /* Includes padding and border in total width */
    padding: 8px 20px; 
    margin: 0; /* Remove margins to avoid shrinking */
}
	
/* --- COPYRIGHT AND GO-TO-TOP LAYOUT --- */
.copyright-area {
    display: flex;
    justify-content: space-between; /* Puts copyright on the left, button on the right */
    align-items: center;
    width: 100%;
    color: #ccc;
    font-size: 14px;
}

/* Style for the horizontal rule */
.footer-separator {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* --- Adjust Copyright Area Layout --- */
.copyright-area {
    /* Set the footer's bottom section as the positioning context */
    position: relative; 
    /* Use display: block (or flex-direction: column) to allow the content to center */
    display: flex;
    justify-content: center; /* This centers the primary content horizontally */
    align-items: center; 
    width: 100%;
    color: #ccc;
    font-size: 14px;
    padding-bottom: 5px; /* Add some padding at the bottom for clearance */
}

/* --- Style for the Centered Text Block --- */
.copyright-center-content {
    /* Ensures this block is what gets centered by the parent's justify-content: center */
    display: inline-block; 
}

.privacy-link {
    color: inherit; /* Inherit the light gray color from the parent */
    text-decoration: none;
    padding-left: 5px; /* Small gap between the bullet and the link */
}

.link-separator {
    padding: 0 5px; /* Padding around the bullet for spacing */
}

/* --- Position the Go To Top Button --- */
.go-to-top-button {
    /* Overrides the flow and places the button on the right */
    position: absolute;
    right: 0; /* Align to the right edge of the .copyright-area */
    top: 50%; /* Center vertically within the .copyright-area */
    transform: translateY(-50%); 
}		

/* sroller for ministry section*/
/* WRAPPER (Outer container for scroll area and fixed overlays) */
.scroll-wrapper {
    position: relative;
    z-index: 0;
}

/* SCROLL AREA (#ministry holds the actual content and scrolls) */
#ministry {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    justify-content: flex-start;
    padding: 2rem 0;
    position: relative;
    z-index: 1; 
}

/* INDIVIDUAL CARD OVERRIDES */
#ministry .w3-quarter {
    flex: 0 0 auto;
    width: 280px;
    float: none !important;
    margin: 0 20px;
    box-sizing: border-box;
}

/* SCROLLBAR HIDE (optional) */
#ministry::-webkit-scrollbar { display: none; }
#ministry { scrollbar-width: none; }

/* ----------------------------------------------------------------- */
/* ARROW OVERLAY & BUTTON STYLES (Cleaned up) */
/* ----------------------------------------------------------------- */

/* OVERLAY BOXES (The "thin vertical rectangles") */
.scroll-overlay {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60px; /* Width of the rectangle */
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), transparent); /* Suggestion: use a gradient for a smooth transition */
    pointer-events: none; /* Crucial: Allows clicks to pass through by default */
    z-index: 100;
}

.scroll-overlay.right {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent); /* Reverse gradient for right side */
}

/* The actual arrow button */
.scroll-overlay .scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #333;
    z-index: 101;
    pointer-events: auto; /* Re-enable clicks ONLY on the button */
    transition: opacity 0.3s;
}

/* Button Positioning within their overlays */
.scroll-overlay.left .scroll-btn {
    right: 10px; /* Positions the button 10px from the inner edge */
}
.scroll-overlay.right .scroll-btn {
    left: 10px; /* Positions the button 10px from the inner edge */
}

/* ENABLED STATE */
.scroll-overlay .scroll-btn:hover:not(.disabled) {
    color: #007bff; 
    opacity: 1;    
}
	
/* DISABLED STATE */
.scroll-overlay .scroll-btn.disabled {
    opacity: 0.3;
    cursor: default;
}

/* --- COLOR/THEME DEFINITIONS --- */
:root {
    --primary-color: #1d44b8; /* Used for w3-theme-d2 */
    --accent-color: #cc0000; /* Used for Donate button */
    --lightest-theme-color: #f2f9ff; /* Guess at w3-theme-l5 (Contact Form background) */
    --lighter-theme-color: #f1f1f1; /* Guess at w3-theme-l1 (Podcast background) */
    --darker-theme-color: #4a4a4a; /* Guess at w3-theme-d1 (Footer) */
}

/* Replicate Theme Classes */
.w3-theme-d2 { /* Navbar background */
    /*background-color: var(--primary-color) !important;
    color: white; */
    color: #fff !important;
    background-color: #000000 !important;
}
.w3-theme-l1 { /* Podcast background */
    background-color: var(--lighter-theme-color) !important;
}
.w3-theme-l5 { /* Contact container background */
    background-color: var(--lightest-theme-color) !important;
}
.w3-theme-d1 { /* Footer background */
    background-color: var(--darker-theme-color) !important;
    color: white;
}
.w3-theme { /* Buttons */
    background-color: var(--primary-color) !important;
    color: white;
}
.w3-theme:hover {
    /* Add a hover effect for buttons */
    background-color: #15338a !important; 
}

