/* ==========================================================================
   Global Variables
   ========================================================================== */
:root {
    --primary-bg-color: rgba(0, 128, 255, 0.2); /* Navbar blue tint */
    --blur-effect: blur(5px); /* Blur for index.html navbar */
    --text-color: #ffffff; /* White text for navbar and hero */
    --content-bg-color: #f8f9fa; /* Light gray for content sections */
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; /* Bootstrap default */
}

/* ==========================================================================
   Navbar Styles
   ========================================================================== */
.navbar {
    background-color: var(--primary-bg-color);
    padding: 10px 0;
    min-height: 80px;
}

.navbar-index {
    backdrop-filter: var(--blur-effect);
}

.navbar-brand img {
    max-height: 75px;
    width: auto;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ddd !important;
}

.navbar-toggler-icon {
    filter: invert(100%) brightness(100%); /* Makes icon white */
}

/* ==========================================================================
   Hero Section Styles
   ========================================================================== */
.hero-video {
    position: relative;
    height: 100vh; /* Full viewport height */
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none; /* Prevents iframe from interfering with clicks */
}

.video-background iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 50vh; /* Default for static images */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 100px; /* Offset for fixed navbar */
}

.hero-image.hero-video {
    height: 100vh; /* Video hero size for index.html */
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Dark overlay for text readability */
    z-index: 0;
}

.hero-image h1 {
    color: var(--text-color);
    font-size: 3rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin: 0;
}

/* Fade-out Text Animation for index.html hero */
#hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 3rem;
    text-align: center;
    z-index: 10; /* Above the video */
}

.fade-text {
    animation: fadeOut 5s forwards; /* Fade out over 5 seconds after class is added */
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================================================
   Content Section Styles
   ========================================================================== */
.content-section {
    padding: 50px 0;
    background-color: var(--content-bg-color);
    text-align: center;
}

.content-section h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.content-section p {
    font-size: 1.2rem;
    color: #666;
}

/* Page-specific logo (e.g., About, Donations, Contact, Index) */
.page-logo {
    max-width: 150px;
    margin: 20px auto;
    display: block;
}

/* Contact info boxes */
.contact-box {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s;
}

.contact-box:hover {
    transform: translateY(-5px);
}

.contact-box h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.contact-box p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */
footer.content-section {
    padding: 20px 0;
    background-color: var(--content-bg-color);
    text-align: center;
}

footer p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* ==========================================================================
   Donation Button Styles
   ========================================================================== */
.donation-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensures it stays above other content */
}

.donation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    color: white;
    border-radius: 50%; /* Circular button */
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: pulse 2s infinite; /* Subtle pulse effect */
}

.donation-icon:hover {
    background-color: #e6e6e6; /* Darker shade on hover */
    transform: scale(1.1); /* Slight zoom on hover */
}

/* Style the image specifically */
.donation-icon .icon {
    max-width: 100%; /* Ensure it doesn’t exceed the container */
    max-height: 100%; /* Ensure it doesn’t exceed the container */
    width: 100%; /* Explicitly set to fill the container */
    height: 100%; /* Explicitly set to fill the container */
    object-fit: contain; /* Maintain aspect ratio and fit within the container */
    max-width: 60px; /* Fallback max size */
    max-height: 60px; /* Fallback max size */
}

/* Tooltip styling */
.donation-icon .tooltip {
    visibility: hidden;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    right: 70px; /* Position to the left of the button */
    white-space: nowrap;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donation-icon:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Pulse animation for attention */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Static Button Styles
   ========================================================================== */
#checkout_button {
    display: inline-block;
    font-family: sans-serif;
    font-size: 20px;
    background-color: #0d00cd;
    color: white;
    border-radius: 4px;
    padding: 14px 28px;
}

#checkout_button:hover {
    cursor: pointer;
}

.custom-btn {
    background-color: #0d00cd;
    color: white;
    border-radius: 4px;
    padding: 14px 28px;
    font-size: 20px;
    text-decoration: none;
    display: inline-block;
}

.custom-btn:hover {
    background-color: #0a008a;
    color: white;
}

/* Custom styles for card backgrounds with blue tints */
.hub-com {
    background-color: rgba(0, 128, 255, 0.1); /* Lightest blue tint */
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .navbar-brand img {
        max-height: 50px;
    }
    .navbar {
        min-height: 60px;
    }
    .hero-image, .hero-image.hero-video {
        height: 50vh; /* Shorter on mobile */
    }
    .hero-image h1 {
        font-size: 2rem;
    }
    .donation-button {
        bottom: 10px;
        right: 10px;
    }
    .donation-icon {
        width: 50px;
        height: 50px;
    }
    .donation-icon .icon {
        font-size: 20px; /* Adjust if using text icons, but irrelevant for images */
        max-width: 50px; /* Adjusted for mobile */
        max-height: 50px; /* Adjusted for mobile */
    }
    .donation-icon .tooltip {
        font-size: 12px;
        right: 60px;
    }
}