/*---------------------------------------
     GENERAL & TYPOGRAPHY             
-----------------------------------------*/
@import url('https://fonts.googleapis.com/css?family=Muli:300,700|Nunito');

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    background: #ffffff;
    font-family: 'Kantumruy Pro', sans-serif;
    overflow-x: hidden;
    padding-top: 70px; /* Matches your navbar height to prevent overlap */
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Muli', sans-serif;
    font-weight: bold;
    line-height: inherit;
}

h1 { color: #252525; font-size: 3em; }
h2 { color: #353535; font-size: 2em; padding-bottom: 10px; }
p { color: #757575; font-size: 14px; line-height: 24px; }

a {
    color: #252525;
    text-decoration: none !important;
    transition: 0.5s;
}

a:hover { color: #147bd7; }

/*---------------------------------------
     MENU & NAVIGATION              
-----------------------------------------*/

.custom-navbar {
    background: #ffffff;
    border-top: 5px solid #147bd7; /* Your signature blue */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    padding: 0;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.custom-navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    width: 100%;
}

/* Logo and Text Styling */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Muli', sans-serif;
    font-size: 24px;
    letter-spacing: -0.5px;
    font-weight: bold;
    color: #147bd7 ;
}
.navbar-brand h1{
    font-size: 24px;
    color: #147bd7;
}

.brand-logo-img {
    height: 100px; /* Smaller logo looks more professional in a fixed nav */
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-logo-img {
    transform: scale(1.1); /* Logo pops slightly on hover */
}

/* Navigation Links */
.custom-navbar .nav li a {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1px;
    color: #575757 !important;
    padding: 15px 18px;
    position: relative;
    background: transparent !important; /* Removes default Bootstrap gray background */
}

/* The "Hover Line" Effect */
.custom-navbar .nav li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: #147bd7;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.custom-navbar .nav li a:hover::after,
.custom-navbar .nav li.active a::after {
    width: 60%; /* Line grows from middle */
}

.custom-navbar .nav li a:hover {
    color: #147bd7 !important;
}

.custom-navbar .nav li.active a {
    color: #147bd7 !important;
}

/* Mobile Toggle Menu Fix */
.navbar-toggle {
    border: none;
    background-color: transparent;
    margin-top: 15px;
}

.navbar-toggle .icon-bar {
    background: #147bd7;
    width: 22px;
    height: 2px;
}

.user-profile .dropdown-menu {
    border-top: 3px solid #147bd7;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.user-profile .dropdown-header {
    font-size: 13px;
    white-space: normal; /* Allows long NGO names to wrap */
    line-height: 1.4;
    padding: 10px 20px;
}

.user-profile .caret {
    margin-left: 5px;
    color: #147bd7;
}
/* This makes the menu appear on hover as a backup plan */
.navbar-nav li.dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0; 
}

/* Makes the Donate link look like a button */
.nav-donate a {
    border: 1px solid #147bd7;
    border-radius: 20px;
    margin-top: 10px; /* Adjust based on your nav height */
    padding: 8px 20px !important;
    transition: all 0.3s ease;
}

.nav-donate a:hover {
    background-color: #147bd7;
    color: #fff !important;
}

/*---------------------------------------
      HERO SECTION (THE ONLY FIX)            
-----------------------------------------*/
/*---------------------------------------
      NEW HERO SECTION STYLES            
-----------------------------------------*/
.main-hero {
    /* Background Image with Overlay */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
                url('../Image/ncnsr.jpg') no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    
    /* Layout */
    min-height: 700px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative;
    width: 100% !important;
    margin-top: 0 !important; /* Managed by body padding */
}

.hero-inner {
    text-align: center;
    position: relative;
    z-index: 10;
    /* This moves the text up slightly to look more balanced */
    transform: translateY(-30px); 
}

.welcome-text {
    color: white !important; /* Your signature blue */
    font-size: 55px !important;
    font-weight: 800 !important;
    margin-bottom: 25px !important;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.khmer-title {
    font-size: 36px !important;
    color: #ffffff !important;
    margin-bottom: 20px !important;
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.english-title {
    font-size: 22px !important;
    color: #ffffff !important;
    font-weight: 300 !important;
    letter-spacing: 1px;
    margin-bottom: 40px !important;
}

/* Button styling using your theme color */
.hero-btns .section-btn {
    background: #147bd7 !important;
    border: 2px solid #147bd7 !important;
    color: #ffffff !important;
    padding: 15px 40px !important;
    border-radius: 50px !important;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hero-btns .section-btn:hover {
    background: transparent !important;
    color: #147bd7 !important;
}

/*---------------------------------------
      MOBILE RESPONSIVE FIXES
-----------------------------------------*/
@media (max-width: 767px) {
    .main-hero {
        min-height: 500px !important;
    }
    
    .welcome-text { font-size: 32px !important; }
    .khmer-title { font-size: 22px !important; }
    .english-title { font-size: 16px !important; }
}
    
/*---------------------------------------
     HISTORY SECTION STYLES
-----------------------------------------*/
.history-section {
    padding: 40px 0;
    background-color: #f9f9f9; /* Light gray background to separate from Hero */
}

.history-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-left: 5px solid #147bd7; /* Branding blue line */
}

.history-section .section-title h2 {
    margin-bottom: 10px;
    font-size: 28px;
    color: #252525;
}

.history-section .section-title h2 span {
    color: #147bd7;
}

.history-section .line {
    width: 60px;
    height: 3px;
    background: #147bd7;
    margin-bottom: 30px;
}

.history-text p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.lead-text {
    font-style: italic;
    border-left: 3px solid #eee;
    padding-left: 20px;
    margin-bottom: 30px !important;
}

.expectations-box {
    background: #c4def5; /* Very light blue */
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.expectations-box h4 {
    color: #147bd7;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
}

.expectations-box p {
    margin-bottom: 0;
    font-weight: 600;
    color: #333;
}



/*---------------------------------------
     VISION, MISSION, VALUES
-----------------------------------------*/
.vmv-section {
    padding: 80px 0;
    background: #ffffff;
    margin: 10px 0;
    
}

.vmv-item {
    background: #f9f9f9;
    padding: 40px 30px;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    height: 100%; /* Ensures all cards match height */
    border-bottom: 4px solid #eee;
    margin-bottom: 30px;
}

/* Make the middle one stand out (Active) */
.active-vmv {
    background: #ffffff;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-bottom: 4px solid #147bd7;
    transform: translateY(-10px);
}

.vmv-icon {
    background: #147bd7;
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 30px;
    margin: 0 auto 20px auto;
}

.vmv-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #252525;
}

.vmv-item p {
    font-size: 15px;
    line-height: 26px;
    color: #666;
}

/* Core Values List Style */
.values-list {
    padding: 0;
    list-style: none;
    text-align: left;
    display: inline-block;
}

.values-list li {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.values-list li::before {
    content: '\f00c'; /* FontAwesome Checkmark */
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #147bd7;
    font-weight: bold;
}

/* Hover Effect */
.vmv-item:hover {
    border-bottom: 4px solid #147bd7;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}


/*---------------------------------------
     COMMITTEE LEADERS STYLE
-----------------------------------------*/
.committee-section {
    padding: 100px 0;
    background: #f9f9f9;
}

.committee-thumb {
    background: #ffffff;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    transition: 0.3s;
}

.committee-thumb:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.committee-image {
    position: relative;
    overflow: hidden;
}

.committee-image img {
    width: 100%;
    height: 350px; /* Uniform height for photos */
    object-fit: cover; /* Prevents image stretching */
}

/* Hover Overlay */
.committee-overlay {
    background: rgba(20, 123, 215, 0.9); /* Your blue theme */
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.5s;
}

.committee-thumb:hover .committee-overlay {
    opacity: 1;
}

.committee-info {
    padding: 25px 20px;
}

.committee-info h3 {
    margin: 0;
    font-size: 20px;
    color: #252525;
}

.committee-info small {
    display: block;
    color: #147bd7;
    font-weight: 700;
    margin: 10px 0;
    letter-spacing: 1px;
}

.committee-info p {
    font-size: 14px;
    line-height: 22px;
}

/* Section Title Utility */
.center-line {
    margin: 0 auto 40px auto;
}

.text-center {
    text-align: center;
}
/* Container for the text and toggle */
.expand-container {
    position: relative;
}

/* Clamping logic to hide extra text */
.expand-content {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Shows exactly 2 lines of text */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    margin-bottom: 0 !important;
    transition: all 0.3s ease;
}

/* Hide the technical checkbox */
.expand-check {
    display: none;
}

/* Styling the 'more...' link */
.expand-label {
    display: block;
    cursor: pointer;
    color: #147bd7; /* Your branding blue */
    font-weight: bold;
    font-size: 13px;
    margin-top: 5px;
    text-align: left;
}

.expand-label::before {
    content: 'more...';
}

/* Logic: When checkbox is clicked, show full text and change 'more' to 'less' */
.expand-check:checked ~ .expand-content {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

.expand-check:checked ~ .expand-label::before {
    content: 'less';
}

/*---------------------------------------
     SEE MORE BUTTON STYLE
-----------------------------------------*/
.button-wrapper {
    margin-top: 40px;
    padding-bottom: 20px;
}

.section-btn.btn-primary {
    background: #147bd7; /* Your brand blue */
    border: 2px solid #147bd7;
    color: #ffffff;
    padding: 15px 40px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
    border-radius: 50px; /* Rounded pill style */
    transition: all 0.3s ease-in-out;
    display: inline-block;
}

.section-btn.btn-primary:hover {
    background: transparent;
    color: #147bd7;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(20, 123, 215, 0.2);
}

.section-btn.btn-primary:active {
    transform: translateY(-1px);
}


/*---------------------------------------
     ACTIVITIES GALLERY STYLE
-----------------------------------------*/
.gallery-section {
    padding: 100px 0;
    background: #ffffff;
}

.gallery-thumb {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-thumb img {
    width: 100%;
    height: 250px; /* Fixed height for a neat grid */
    object-fit: cover;
    transition: all 0.5s ease;
}

/* Hover Zoom Effect */
.gallery-thumb:hover img {
    transform: scale(1.1);
}

/* Green Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 123, 215, 0.85); /* Your Blue color */
    opacity: 0;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.gallery-thumb:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: #ffffff;
    padding: 20px;
}

.gallery-info i {
    font-size: 24px;
    margin-bottom: 10px;
}

.gallery-info h3 {
    color: #ffffff;
    font-size: 18px;
    margin: 5px 0;
    font-weight: bold;
    text-transform: uppercase;
}

.gallery-info small {
    display: block;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
/*---------------------------------------
     GALLERY SHOW MORE BUTTON
-----------------------------------------*/
.gallery-button-wrapper {
    margin-top: 50px;
}

.gallery-btn {
    background: transparent;
    border: 2px solid #147bd7; /* Your brand blue */
    color: #147bd7;
    padding: 14px 35px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    border-radius: 5px; /* Square with slight curve to match gallery style */
    transition: all 0.4s ease;
    display: inline-block;
    text-decoration: none !important;
}

.gallery-btn:hover {
    background: #147bd7;
    color: #ffffff;
    box-shadow: 0 8px 15px rgba(20, 123, 215, 0.3);
    transform: translateY(-2px);
}

.gallery-btn:active {
    transform: translateY(0);
}

/*---------------------------------------
     FOOTER SECTION
-----------------------------------------*/
footer {
    background: #1a1a1a; /* Darker professional background */
    padding: 80px 0;
    color: #999;
    justify-content: center;
    
}

footer h2 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

footer p {
    color: #bbb;
    font-size: 15px;
    line-height: 26px;
}

footer address {
    font-style: normal;
    margin-bottom: 20px;
}

footer a {
    color: #147bd7; /* Your blue theme color */
    transition: 0.3s;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline !important;
}

/* Footer Menu / Quick Links */
.footer_menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer_menu ul li {
    margin-bottom: 10px;
}

.footer_menu ul li a {
    color: #bbb;
    text-decoration: none;
}

.footer_menu ul li a:hover {
    color: #147bd7;
    padding-left: 5px; /* Subtle slide effect on hover */
}

/* Social Icons */
.social-icon {
    padding: 0;
    margin: 20px 0;
    list-style: none;
}

.social-icon li {
    display: inline-block;
    margin-right: 15px;
}

.social-icon li a {
    color: #ffffff;
    background: #333;
    width: 40px;
    height: 40px;
    line-height: 40px;
    display: block;
    text-align: center;
    border-radius: 50%;
    font-size: 18px;
    transition: 0.3s;
}

.social-icon li a:hover {
    background: #147bd7;
    color: #ffffff;
    transform: translateY(-3px);
}

/* Copyright Section */
.copyright-text {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.copyright-text p {
    font-size: 13px;
}
/* This ensures the modal is always on top of everything else */
.modal {
    z-index: 9999 !important;
}
.modal-backdrop {
    z-index: 9998 !important;
}
/* --- Optimized Mobile Styles (max-width: 767px) --- */
.page-header { margin-top: 80px; } /* Ensures header isn't hidden by nav */

.committee-image img {
    width: 100%;
    height: 380px; /* Fixed height for uniformity */
    object-fit: cover; /* Centers and crops the photo professionally */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.mt-30 { margin-top: 30px; }

/* Committee Bio Styling */
.bio-wrapper {
    margin-top: 10px;
    padding: 0 15px 15px;
}

.bio-text {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Shows only 3 lines initially */
    line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.bio-text.expanded {
    display: block; /* Shows full text */
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.read-more-btn {
    display: inline-block;
    margin-top: 5px;
    color: #147bd7;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none !important;
}

.read-more-btn:hover {
    color: #147bd7;
}

.committee-info h3 {
    margin-bottom: 5px;
    padding-top: 15px;
}

.committee-info .designation {
    display: block;
    color: #147bd7;
    font-style: italic;
    margin-bottom: 10px;
}

/*---------------------------------------
     DESKTOP / MOBILE VISIBILITY TOGGLES
-----------------------------------------*/
/* By default, hide desktop elements on mobile */
.desktop-only { display: none !important; }
.mobile-only { display: block !important; } 

/* Reset for Desktop View */
@media (min-width: 768px) {
    .mobile-only { display: none !important; }
    .desktop-only { display: block !important; }
    
    /* Reset header flex on desktop so standard Bootstrap takes over */
    .mobile-header-flex { display: block; width: auto; }
}

/*---------------------------------------
     MOBILE RESPONSIVE FIXES (Max 767px)
-----------------------------------------*/
@media (max-width: 767px) {
    
    /* 1. Mobile Header Flexbox (Logo Left, Controls Right) */
    .mobile-header-flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* 2. Container for Profile and Burger Menu */
    .mobile-controls {
        display: flex !important; /* Force flex so they sit side-by-side */
        align-items: center;
        gap: 15px;
        position: relative;
        z-index: 999; /* Prevent logo overlap */
    }

    .mobile-signin {
        color: #147bd7;
        font-weight: bold;
        text-decoration: none;
        font-size: 14px;
        text-transform: uppercase;
    }

    /* 3. Force the Burger Menu lines to show up correctly in flexbox */
    .mobile-controls .navbar-toggle {
        display: block !important;
        margin: 0 !important;
        padding: 5px 10px;
        float: none;
        background: transparent;
    }

    .mobile-controls .navbar-toggle .icon-bar {
        display: block;
        margin: 4px 0;
        background-color: #147bd7; /* Your branding blue */
    }

    /* 4. Compact Main Dropdown Menu */
    .navbar-collapse {
        position: absolute;
        top: 75px;        /* Distance from top of navbar */
        right: 15px;      /* Distance from right edge */
        left: auto;       /* Disable left alignment */
        width: 220px;     /* Smaller, fixed width */
        height: auto;
        
        background: #ffffff;
        border: 1px solid #eee;
        border-radius: 12px; /* Professional rounded corners */
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        z-index: 1000;
        
        display: none;    /* Managed by JS */
        padding: 0 0 !important; /* Internal spacing */
        margin: 0 !important;
    }

    /* Remove the standard Bootstrap full-width 'in' behavior */
    .collapse.in {
        display: block !important;
    }

    .custom-navbar .nav {
        margin: 0 !important;
        float: none !important;
        margin-bottom: 10px !important;
    }

    .custom-navbar .nav li {
        width: 100%;
    }

    .custom-navbar .nav li a {
        padding: 10px 20px !important; /* Thinner padding */
        text-align: center;
        border-bottom: none; 
        font-size: 13px;    
        font-weight: 600;
        color: #444 !important;
        transition: 0.3s;
    }

    /* Hover effect inside the small menu */
    .custom-navbar .nav li a:hover {
        background-color: #f7fffb;
        color: #147bd7 !important;
        padding-left: 25px !important; /* Subtle slide effect */
    }

    /* Support for the Donate button inside the small menu */
    .nav-donate a {
        border: 1px solid #147bd7 !important;
        border-radius: 8px !important;
        margin: 10px 15px !important;
        background: #f0f8ff !important;
        text-align: center !important;
    }
}

/*---------------------------------------
     NUCLEAR FIX: MOBILE PROFILE MENU
-----------------------------------------*/
/* Hide by default, force show on click */
#mob-prof-menu {
    display: none !important; 
}

#mob-prof-menu.force-show {
    display: block !important; 
}