/* Custom styles for RHAN branding */

/* Ensure the navbar is wide and stays at the top */
.navbar {
    z-index: 1030; /* Higher than other content */
}

/* Customizing the brand text color - optional if a logo is used */
.navbar-brand {
    letter-spacing: 1px;
}

/* Customizing the navigation links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75); /* Lighter white */
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #ffc107; /* Bootstrap's 'warning' yellow/gold */
}

/* 1. Define the Height of the Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    /* Adjust this height to your preferred visual size */
    min-height: 85vh; /* 85% of the viewport height */
    overflow: hidden;
}

/* 2. Ensure the Carousel Itself Fills the Section */
#heroCarousel,
.carousel-inner,
.carousel-item {
    height: 100%;
}

/* 2. Ensure Carousel Image Fills the Container */
.hero-carousel-img {
    height: 100%;
    width: 100;
    object-fit: cover; /* Important: Ensures the image covers the area without distortion */
    filter: brightness(50%); /* Darkens the image for better text readability */
}

/* 3. Add a Semi-Transparent Overlay for Readability */
.carousel-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark overlay (adjust alpha value '0.5' for darker/lighter) */
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1; /* Place below text */
}

/* 3. Add a Semi-Transparent Overlay for Readability */
.partner-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
}
/* Ensure the carousel itself fills the hero section */
#heroCarousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* 4. Ensure Caption Covers the Full Item Height for Centering */
.carousel-caption {
    /* If you kept the inline style from the previous step, this should be fine. */
    /* top: 0; bottom: 0; left: 0; right: 0; positioning is essential */
    height: 100%; /* Explicitly define height for d-flex to center against */
}


/* 4. Ensure Carousel Caption is Layered Correctly */
/* The default Bootstrap caption style is often inadequate for centering */
.carousel-caption {
    position: absolute; /* Already in Bootstrap, but crucial */
    z-index: 10;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

/* 5. Center the Content and apply Text Shadow for contrast */
.text-shadow {
    /* Custom CSS based on your HTML class */
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8); 
}

/* Customizing the main headline for better mobile readability */
.hero-section h1 {
    /* **CHANGE THIS VALUE** */
    font-size: 1.8rem; /* **Reduced the starting font size for extra small screens** */ 
    margin-top: 0 !important; 
}
/* Keep the media queries as they are to scale up for larger screens */

@media (min-width: 576px) { 
    .hero-section h1 {
        font-size: 2.5rem; /* Reduced from 3.5rem to 2.5rem for better scaling */
    }
}

@media (min-width: 768px) { 
    .hero-section h1 {
        font-size: 3.5rem; /* Reduced from 4.5rem to 3.5rem */
    }
}
/* ...and so on for larger screen sizes */

/* Pillars Section Specific Styles */

/* Ensure the card images maintain aspect ratio */
.card-img-top {
    height: 250px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures image covers the space without distortion */
}

/* Ensure all cards have the same height using flexbox */
.d-flex .card {
    display: flex;
    flex-direction: column;
}

/* Push the 'Read More' button to the bottom of the card */
.card-body {
    display: flex;
    flex-direction: column;
}
.card-body .mt-auto {
    margin-top: auto;
}

/* About Section Specific Styles */

/* Ensure the image fills its container nicely and looks professional */
.about-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Ensure the button stack maintains its vertical separation */
.buttons-stack a {
    /* Optional: Add a slight transition for a modern feel */
    transition: transform 0.2s ease;
}

.buttons-stack a:hover {
    transform: translateY(-1px);
}

/* About Section Specific Styles */

/* Ensure the image fills its container nicely and looks professional */
.about-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Ensure mobile text is centered, and desktop text aligns left */
.about-right {
    text-align: center;
}
@media (min-width: 992px) {
    .about-right {
        text-align: left; /* Align text left on desktop (lg) */
    }
}

/* Custom width for the buttons to control their length/width */
.about-btn-width {
    /* Maximum length for the button on wider screens */
    max-width: 180px; 
    /* Ensures the button still takes full width on narrow mobile screens (under 180px) */
    width: 100%; 
}

/* Styles for the button stacking container */
.buttons-stack {
    /* Ensures buttons are centered horizontally on mobile due to d-flex and align-items-center */
    align-items: center;
}
@media (min-width: 992px) {
    .buttons-stack {
        /* Align buttons to the left on desktop to match the text (overrides align-items-center) */
        align-items: flex-start;
    }
}

/* Optional: Slight hover effect for all buttons */
.buttons-stack button {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.buttons-stack button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Optional CSS: Make buttons pop against the dark background */
.buttons-stack button:hover {
    transform: translateY(-1px);
    /* Change: Use a light shadow for dark backgrounds */
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2); 
}

/* Volunteer Profiles Section Specific Styles */

/* Ensure the volunteer images maintain the 400x400 aspect ratio and are responsive */
.volunteer-profile-img {
    width: 100%; /* Important: Takes up full width of the column */
    height: auto; /* Allow height to adjust naturally based on aspect ratio */
    
    /* However, to enforce a specific square look for 400x400 source images: */
    aspect-ratio: 1 / 1; /* Forces the height to match the width for a square look */
    object-fit: cover; /* Ensures image covers the space without distortion */
}

/* Ensure the cards themselves still look uniform */
.d-flex .card {
    display: flex;
    flex-direction: column;
}
.card-body .mt-auto {
    margin-top: auto; /* Pushes button to the bottom */
}

/* Visual Overview Section Specific Styles */

/* Ensure the images maintain the 400x400 aspect ratio and are responsive */
.visual-overview-img {
    width: 100%; 
    height: auto; 
    aspect-ratio: 1 / 1; /* Forces the height to match the width for a square look */
    object-fit: cover; /* Ensures image covers the space without distortion */
}

/* Ensure the cards themselves still look uniform */
.d-flex .card {
    display: flex;
    flex-direction: column;
}

/* No need for .mt-auto or specific button styling here */
/* .card-body can simply center its single heading now */
.card-body.justify-content-center {
    justify-content: center; /* Ensures the title is vertically centered within the card body */
}

/* Footer Section Specific Styles */

/* Ensure social icons don't have default underline */
.footer-section .social-links a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Hover effect for social icons */
.footer-section .social-links a:hover {
    color: var(--bs-warning) !important; /* Change to warning color on hover */
}

/* Hover effect for list links */
.footer-section .list-unstyled a:hover {
    color: var(--bs-white) !important; /* Make links fully white on hover */
}

/* Executive Officers Section Specific Styles (Ensure this is in your style.css) */

/* Style for the individual officer photos */
.officer-photo {
    width: 100px;       /* Reduced size for 5-column layout */
    height: 100px;      /* Ensure it's a perfect circle */
    object-fit: cover;  
    margin-bottom: 0.5rem; /* Reduced space below photo */
    border: 3px solid var(--bs-light); 
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.075); 
}

/* Ensure cards in the row have equal height */
.executive-officers-section .d-flex .card {
    /* Ensures card stretches to match the tallest card in its row */
    display: flex;
    flex-direction: column;
}

/* Link and Social Icon Styles from earlier (keep these for hover effects) */
.executive-card .card-title a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.executive-card .card-title a:hover {
    text-decoration: underline;
}

.executive-card .social-links a:hover {
    transform: translateY(-1px);
    color: var(--bs-warning) !important;
}

/* Executive Officers Link Styling */
.executive-card .card-title a {
    /* Remove the default underline */
    text-decoration: none;
    /* Smooth transition for hover effect */
    transition: color 0.2s ease;
}

.executive-card .card-title a:hover {
    /* Add a subtle underline on hover */
    text-decoration: underline;
}

/* Social icons hover effect (optional, but recommended) */
.executive-card .social-links a {
    transition: transform 0.2s ease, color 0.2s ease;
}

.executive-card .social-links a:hover {
    /* Make the icon stand out slightly on hover */
    transform: translateY(-1px);
    color: var(--bs-warning) !important; /* Use a highlight color like yellow/warning */
}

/* Executive Officers Section Specific Styles */

/* Style for the individual officer photos */
.officer-photo {
    width: 150px;       /* Set a fixed size for the circular image */
    height: 150px;      /* Ensure it's a perfect circle */
    object-fit: cover;  /* Crop to fit while maintaining aspect ratio */
    margin-bottom: 1rem; /* Space between photo and name */
    border: 3px solid var(--bs-light); /* Optional: subtle border around photo */
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.075); /* Soft shadow */
}

/* Ensure cards in the row have equal height */
.executive-officers-section .d-flex .card {
    display: flex;
    flex-direction: column;
}

/* Push the description/bio to the bottom if content length varies */
.executive-card .card-body .mt-auto {
    margin-top: auto;
}

/* Custom sizing for the 5-column team layout */
.soldier-photo {
    /* Adjust size for the tight 5-column layout */
    width: 80px; 
    height: 80px;
    object-fit: cover;
    /* Optional: add a slight border/shadow if desired */
    border: 3px solid var(--bs-primary);
}

/* Ensure equal height for all cards in the grid */
.team-item {
    display: flex;
    flex-direction: column;
}

/* Ensure links blend in unless hovered */
.social-links a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: var(--bs-secondary) !important; /* or another highlight color */
}

/* Hero Image Overlay Section */
.hero-image-overlay {
    /* Set your background image */
    background: url('img/about-hero-bg.jpg') center center no-repeat;
    background-size: cover; /* Cover the entire section */
    position: relative;     /* Needed for positioning the overlay */
    height: 400px;          /* Minimum height for the hero section */
    /* Use flexbox for perfect vertical and horizontal centering of content */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Create the overlay effect */
.hero-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark semi-transparent overlay */
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 1; /* Place overlay below content but above background */
}

/* Ensure content is above the overlay */
.hero-image-overlay .container-xxl {
    position: relative;
    z-index: 2; /* Content must have a higher z-index than the overlay */
}

/* Optional: Adjust heading for better contrast if needed */
.hero-image-overlay h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Subtle text shadow for pop */
}

.double-space-p {
    /* Sets the line height to twice the normal line height (2.0) */
    line-height: 2.0; 
}

/*** Team ***/
.team-item img {
    position: relative;
    top: 0;
    transition: .5s;
}

.team-item:hover img {
    top: -30px;
}

.team-item .team-text {
    position: relative;
    height: 100px;
    transition: .5s;
}

.team-item:hover .team-text {
    margin-top: -60px;
    height: 160px;
}

.team-item .team-text .team-social {
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text .team-social {
    opacity: 1;
}

.team-item .team-social .btn {
    display: inline-flex;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
}

.team-item .team-social .btn:hover {
    color: #e7d803;
    background: var(--primary);
}

/* Hero Image Overlay Section */
.hero-image-overlay {
    /* Set your background image using the correct path */
    background: url('/img/about-1.JPG') center center no-repeat; 


    /* These properties ensure the image fills the space and the text is readable */
    background-size: cover; 
    position: relative;     
    height: 400px; /* Or whatever height you prefer */
}

/* Ensure the overlay is created for readability (if you haven't already) */
.hero-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Semi-transparent dark overlay */
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 1; 
}

/* Hero Image Overlay Section */
.prog-image-overlay {
    /* Set your background image using the correct path */
    background: url('/img/about-3.jpg') center center no-repeat; 


    /* These properties ensure the image fills the space and the text is readable */
    background-size: cover; 
    position: relative;     
    height: 400px; /* Or whatever height you prefer */
}

/* Ensure the overlay is created for readability (if you haven't already) */
.prog-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Semi-transparent dark overlay */
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 1; 
}

/* Hero Image Overlay Section */
.impact-image-overlay {
    /* Set your background image using the correct path */
    background: url('/img/about-2.jpg') center center no-repeat; 


    /* These properties ensure the image fills the space and the text is readable */
    background-size: cover; 
    position: relative;     
    height: 400px; /* Or whatever height you prefer */
}

/* Ensure the overlay is created for readability (if you haven't already) */
.impact-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Semi-transparent dark overlay */
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 1; 
}

/* Hero Image Overlay Section */
.contact-image-overlay {
    /* Set your background image using the correct path */
    background: url('/img/about-4.jpg') center center no-repeat; 


    /* These properties ensure the image fills the space and the text is readable */
    background-size: cover; 
    position: relative;     
    height: 400px; /* Or whatever height you prefer */
}

/* Ensure the overlay is created for readability (if you haven't already) */
.contact-image-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Semi-transparent dark overlay */
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 1; 
}




.vision-hero-image-overlay {
  background: url('../img/vision-img.jpg') center center no-repeat;
  background-size: cover;
  position: relative;
  min-height: 70vh; /* taller and more dynamic than fixed 400px */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.vision-hero-image-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.vision-hero-image-overlay > * {
  position: relative;
  z-index: 2;
}


/* Custom Social Icon Sizing */
.social-icon-lg {
    font-size: 2.5rem; /* Large size for the icons */
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

/* YouTube Specific Styling (Red Color) */
.social-icon-youtube {
    color: #CD201F; /* Official YouTube Red */
}

/* Hover Effects */
.social-icon-lg:hover {
    color: var(--bs-secondary) !important; /* Change color on hover (using Bootstrap secondary) */
    transform: translateY(-3px); /* Slight lift effect */
    text-decoration: none;
}

/* Special hover for YouTube: keep it red but change the effect */
.social-icon-youtube:hover {
    color: #FF0000 !important;
    transform: scale(1.1); /* Slight scaling effect */
}

.partner-logo {
    max-width: 150px; /* Max width for individual logos */
    height: auto;     /* Maintain aspect ratio */
    filter: grayscale(100%); /* Optional: Make logos grayscale */
    opacity: 0.7;             /* Optional: Reduce opacity */
    transition: filter 0.3s ease, opacity 0.3s ease; /* Smooth transition */
    margin: 0 auto; /* Center logos if they don't fill the column */
    display: block; /* Ensure margin auto works */
}

.partner-logo:hover {
    filter: grayscale(0%); /* Optional: Colorize on hover */
    opacity: 1;             /* Optional: Full opacity on hover */
}

/* Adjust carousel controls for better visibility against various logos */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for icons */
    border-radius: 50%; /* Make them circular */
    padding: 15px;
}

/* Ensure controls are visible in lighter themes */
.carousel-control-prev,
.carousel-control-next {
    width: 5%; /* Make controls less wide */
}

/* For smaller screens, logos might appear larger, adjust if needed */
@media (max-width: 767.98px) {
    .partner-logo {
        max-width: 100px; /* Smaller max-width on mobile */
    }
}

/* Aspect Ratio Fix for Video Gallery */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive-16by9 {
    padding-top: 56.25%; /* 9/16 = 0.5625 */
}

.embed-responsive-item {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Define the primary color to match the common color usage, if not defined by default Bootstrap */
        .bg-primary {
            background-color: #0d6efd !important; /* Standard Bootstrap Primary */
        }
        
        /* Custom CSS for the thumbnail card structure (replacing .embed-responsive) */
        
        /* Ensures the card takes up the full height in a d-flex container */
        .card.h-100 {
            height: 100% !important;
            display: flex;
            flex-direction: column;
        }

        /* --- Aspect Ratio Fix (Crucial) --- */
        /* Replaces Bootstrap's old .embed-responsive-16by9 classes */
        .media-container {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%; /* 9 / 16 = 0.5625 for 16:9 ratio */
            overflow: hidden;
            border-top-left-radius: calc(0.25rem - 1px); /* Match card corners */
            border-top-right-radius: calc(0.25rem - 1px);
        }

        /* Target the image and iframe within the media container */
        .media-container img,
        .media-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover; /* Ensures image/video covers area without stretching */
            display: block;
        }

        .card-body {
            flex-grow: 1; /* Allows the body to take up remaining vertical space */
        }

        /*
        --- Custom 5-Column Layout Fix ---
        
        By targeting the 'lg' breakpoint (992px) and forcing each 'col' to be 20% width, 
        we override the Bootstrap 33.333% (col-lg-4) rule, achieving 5 columns (20% x 5 = 100%).
        This is applied to the row that contains the video cards.
        */
        @media (min-width: 992px) {
            .video-gallery-section .row > .col-12.col-md-6.col-lg-4 {
                width: 20%; /* 100% / 5 = 20% */
                /* Optional: Adjust gutter/padding if needed, but g-4 should manage it */
            }
        }
        
        /* Remove the problematic classes used in the fragment which were conflicting */
        .responsive-container, .col-responsive {
            all: unset; /* Remove all custom styling from these elements */
            display: contents; /* Ensure they don't interfere with the Bootstrap row/col structure */
        }
