/* --- CSS Variables: Theme Control --- */
:root {
    /* NATURE LIGHT MODE THEME */
    --top-bar-h: 40px;
    --bg-main: #F0F4EF; /* Soft pale green background */
    --bg-section-alt: #E4EBE4; /* Slightly darker shade for section contrast */
    --text-main: #2A3439; /* Deep grey-green for crisp readability */
    --text-muted: #4A5D23; /* Muted olive for paragraphs */
    --primary-color: #1A531C; /* Strong forest green for spiritual headings/buttons */
    --accent-color: #2E8B57; /* Sea green for accents, badges, and icons */
    --accent-text: #ffffff;
    --card-bg: #ffffff; /* Crisp white for cards to pop */
    --border-color: #DCE8DB; /* Very light green for elegant borders */
    --nav-bg: rgba(255, 255, 255, 0.95);
}

body.dark-mode {
    /* ORIGINAL DARK MODE (Preserved exactly as you had it) */
    --bg-main: #121212;
    --bg-section-alt: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --primary-color: #4da6ff; 
    --accent-color: #fdd835;  
    --accent-text: #121212;
    --card-bg: #2a2a2a;
    --border-color: #404040;
    --nav-bg: rgba(26, 26, 26, 0.95);
}
/* Fix for horizontal scrollbar */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.spiritual-heading { font-family: 'Libre Baskerville', serif; color: var(--primary-color); }
body.dark-mode .spiritual-heading { color: var(--accent-color); }
.text-main { color: var(--text-main) !important; }
.text-accent { color: var(--accent-color) !important; }
.text-primary-custom { color: var(--primary-color) !important; }
.bg-section-alt { background-color: var(--bg-section-alt); }
.bg-card-custom { background-color: var(--card-bg); }
.border-left-accent { border-left: 4px solid var(--accent-color) !important; }

.btn-primary-custom { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.btn-primary-custom:hover { opacity: 0.9; color: #fff; }

.btn-outline-primary-custom { color: var(--primary-color); border-color: var(--primary-color); }
.btn-outline-primary-custom:hover { background-color: var(--primary-color); color: #fff; }
body.dark-mode .btn-outline-primary-custom { color: var(--accent-color); border-color: var(--accent-color); }
body.dark-mode .btn-outline-primary-custom:hover { background-color: var(--accent-color); color: var(--accent-text); }

.top-bar { background-color: var(--primary-color); color: #ffffff; font-size: 0.85rem; padding: 5px 0; position: relative; z-index: 1040; }
body.dark-mode .top-bar { background-color: #0a192f; }

.btn-text { background: none; border: none; color: #ffffff; padding: 0; box-shadow: none !important; }
.btn-text:hover { color: var(--accent-color); }

.btn-donate { background-color: var(--accent-color); color: var(--accent-text); padding: 4px 12px; border-radius: 4px; font-size: 0.85rem; }
.btn-donate:hover { opacity: 0.9; color: var(--accent-text); }

.custom-dropdown .dropdown-toggle::after { display: none; }
.dropdown-menu { background-color: var(--card-bg); border-color: var(--border-color); }
.dropdown-item { color: var(--text-main); font-size: 0.9rem; }
.dropdown-item:hover { background-color: var(--bg-section-alt); color: var(--primary-color); }

.main-nav { background-color: var(--nav-bg); box-shadow: 0 2px 10px rgba(0,0,0,0.1); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 1030; }
.navbar-brand img { height: 50px; width: auto; }

.logo-dark { display: none; }
body.dark-mode .logo-light { display: none; }
body.dark-mode .logo-dark { display: block; }

.nav-link { color: var(--text-main) !important; font-weight: 600; margin-left: 15px; text-transform: uppercase; font-size: 0.9rem; }
.nav-link:hover { color: var(--accent-color) !important; }

.carousel-item img { height: 500px; object-fit: cover; }
@media (max-width: 768px) { .carousel-item img { height: 300px; } }

.custom-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.infomaniak-card { display: flex; align-items: center; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; text-decoration: none !important; color: var(--text-main); transition: transform 0.3s, box-shadow 0.3s; }
.infomaniak-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.card-icon { font-size: 2rem; color: var(--accent-color); margin-right: 20px; }
.card-content h4 { margin: 0; font-weight: 700; font-size: 1.1rem; }
.card-content p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.card-arrow { margin-left: auto; color: var(--text-muted); transition: transform 0.3s; }
.infomaniak-card:hover .card-arrow { transform: translateX(5px); color: var(--accent-color); }

@media (min-width: 992px) {
    .col-15 { flex: 0 0 20%; max-width: 20%; } 
    .col-35 { flex: 0 0 30%; max-width: 30%; }
    .col-50 { flex: 0 0 50%; max-width: 50%; }
}

.news-list li { border-bottom: 1px dashed var(--border-color); padding: 10px 0; }
.news-list a { color: var(--text-main); text-decoration: none; font-size: 0.9rem; }
.news-list a:hover { color: var(--primary-color); }

.thought-wrapper { position: relative; overflow: hidden; border-radius: 8px; }
.thought-overlay { position: absolute; bottom: 0; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,0.8)); }

.metrics-section { background-color: var(--primary-color); border-top: 5px solid var(--accent-color); }
body.dark-mode .metrics-section { background-color: #0a192f; }

.project-card { background-color: var(--card-bg); border: 1px solid var(--border-color) !important; border-radius: 8px; overflow: hidden; transition: transform 0.3s; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important; }
.project-card .card-img-top { height: 200px; object-fit: cover; }
.badge-accent { background-color: var(--accent-color); color: var(--accent-text); }

.icon-circle { width: 80px; height: 80px; border-radius: 50%; background-color: var(--card-bg); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); transition: transform 0.3s; }
.service-icon-box:hover .icon-circle { transform: scale(1.1); border-color: var(--accent-color); }

.custom-modal .modal-content { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; }
.elegant-input { background-color: var(--bg-main); border: 1px solid var(--border-color); color: var(--text-main); }
.elegant-input:focus { background-color: var(--bg-main); border-color: var(--accent-color); color: var(--text-main); box-shadow: none; }

/* --- FRESHCON STYLE FOOTER --- */
:root {
    --footer-bg: #111111; 
    --footer-text: #e0e0e0;
    --footer-muted: #888888;
    --footer-border: #333333;
    --footer-input-bg: #000000;
    --footer-input-border: #333333;
    --freshcon-green: #1a8c4b; 
}

body.light-mode {
    /* NATURE THEME FOOTER */
    --footer-bg: #0B2B0C; /* Deepest forest green */
    --footer-text: #ffffff;
    --footer-muted: #A3B8A4; /* Soft pale green for muted text */
    --footer-border: #144016; 
    --footer-input-bg: #061A07; /* Almost black-green for input box */
    --footer-input-border: #1A531C;
}


.freshcon-footer { background-color: var(--footer-bg); color: var(--footer-text); }
.footer-logo { max-width: 120px; border-radius: 12px; }
.footer-heading { color: #ffffff; font-weight: 600; font-size: 1.15rem; }
body.light-mode .footer-heading { color: #fdd835; }
.footer-text { color: var(--footer-text); font-size: 0.95rem; line-height: 1.6; }
.footer-link { color: var(--footer-text); text-decoration: none; transition: color 0.3s ease; }
.footer-link:hover { color: var(--accent-color); text-decoration: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--footer-text); text-decoration: none; font-size: 0.95rem; transition: color 0.3s ease, padding-left 0.3s ease; }
.footer-links a:hover { color: var(--accent-color); padding-left: 5px; }

.newsletter-form { width: 100%; max-width: 350px; }
.newsletter-input { background-color: var(--footer-input-bg); border: 1px solid var(--footer-input-border); color: #ffffff; border-radius: 4px; padding: 22px 15px; }
.newsletter-input:focus { background-color: var(--footer-input-bg); border-color: var(--freshcon-green); color: #ffffff; box-shadow: none; }
.newsletter-input::placeholder { color: var(--footer-muted); }
.newsletter-btn { background-color: var(--freshcon-green); border-color: var(--freshcon-green); color: white; padding: 10px 20px; border-radius: 4px; transition: opacity 0.3s; }
.newsletter-btn:hover { background-color: var(--freshcon-green); color: white; opacity: 0.8; }

.social-icons a { display: inline-block; width: 35px; height: 35px; background-color: var(--footer-input-bg); color: #ffffff; border-radius: 50%; text-align: center; line-height: 35px; margin-right: 10px; transition: background-color 0.3s; }
.social-icons a:hover { background-color: var(--accent-color); color: #000; }
.text-muted-footer { color: var(--footer-muted) !important; }

/* --- FLOATING ACTION BUTTONS --- */
.floating-actions { position: fixed; bottom: 25px; right: 25px; z-index: 1050; display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.fab-btn { border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: transform 0.3s ease, opacity 0.3s ease; }
.fab-btn:hover { transform: scale(1.1); }
.bg-whatsapp { background-color: #25D366 !important; width: 60px; height: 60px; border-radius: 50%; text-decoration: none; }
.bg-whatsapp:hover { color: white; opacity: 0.9; }

/* Fix Back-to-Top Button Visibility */
.bg-backtotop {
    background-color: var(--freshcon-green);
    width: 45px; height: 45px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none; /* allows clicking only when visible */
    transition: opacity 0.3s ease;
}
.bg-backtotop.visible {
    opacity: 1;
    pointer-events: auto;
}

.custom-dropdown .dropdown-menu { z-index: 1050; background-color: var(--card-bg); border-color: var(--border-color); }

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle { background: none; border: none; outline: none; font-size: 1.3rem; cursor: pointer; padding: 0; display: flex; align-items: center; color: var(--text-main); transition: color 0.3s; }
.theme-toggle:focus { outline: none; }
.theme-toggle .fa-sun { display: none; color: #fdd835; }
.theme-toggle .fa-moon { display: block; color: #333; } 
body.dark-mode .theme-toggle .fa-moon { display: none; }
body.dark-mode .theme-toggle .fa-sun { display: block; }

/* --- GOOGLE TRANSLATE UI HIDER FIX (Ensures functionality survives) --- */
iframe.goog-te-banner-frame { display: none !important; }
.goog-te-banner-frame { display: none !important; }
.VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0px !important; margin-top: 0px !important; position: static !important; }
html { height: auto !important; }
#goog-gt-tt, .goog-te-balloon-frame, .goog-tooltip { display: none !important; }
.goog-text-highlight { background-color: transparent !important; border: none !important; box-shadow: none !important; }

/* Hide structurally instead of display:none to prevent Google JS from crashing */
#google_translate_element {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .top-bar-inner { flex-direction: column !important; text-align: center; gap: 10px; padding: 10px 0; }
    .top-contact, .top-actions { justify-content: center !important; width: 100%; flex-wrap: wrap; }
    .top-contact span { display: block; margin: 5px 0 !important; }
    .navbar-brand img { height: 45px !important; }
    .navbar-collapse { background-color: var(--nav-bg); padding: 15px; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.2); margin-top: 10px; }
    .nav-item { text-align: center; margin-bottom: 10px; }
    .btn-donate { width: 100%; }
	#homeCarousel .carousel-item img { background-size: contain; background-position: top center; object-position: center top !important; height: 23vh; } 
    .thought-wrapper img, .img-fluid { width: 100% !important; height: auto !important; max-height: 450px; object-fit: cover !important; margin: 0 auto; display: block; }
    .split-section .col-15, .split-section .col-35, .split-section .col-50 { margin-bottom: 20px !important; text-align: center !important; flex: 0 0 100%; max-width: 100%; }
    .spiritual-heading { font-size: 1.5rem !important; }
    .custom-grid-3 { display: flex; flex-direction: column; gap: 20px; padding: 0 10px; }
    .infomaniak-card { margin-bottom: 15px; }
    .freshcon-footer { text-align: center; padding-top: 30px !important; }
    .footer-logo { margin: 0 auto 20px auto !important; display: block; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .social-icons { justify-content: center; margin-bottom: 10px; display: flex; }
}
.card-text.text-muted.small {
  text-align: justify;
}

/* --- ABOUT PAGE ADDITIONS--- */

/* ==========================================================================
   ABOUT US PAGE ENHANCEMENTS (Perfectly mapped to existing root variables)
   ========================================================================== */

/* Page Banner */
.page-header-banner {
    /* Uses a dark overlay to ensure white text is always readable, regardless of theme */
    background: linear-gradient(rgba(18, 18, 18, 0.75), rgba(18, 18, 18, 0.85)), url('../images/Aboutus.jpg') center/cover no-repeat;
    padding: 120px 0;
    color: #ffffff;
    border-bottom: 4px solid var(--accent-color); 
}

/* Core Values Icon Box */
.value-icon-box {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: var(--bg-main); /* Adapts text color for perfect contrast against the accent background */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-icon-box:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2); 
}

/* Board of Trustees Cards */
.trustee-card {
    margin-top: 60px; /* Creates the necessary space for the overlapping avatar */
    border-radius: 12px; /* Matches the radius of your custom-modal */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trustee-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.trustee-card .avatar img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    /* Uses your exact card-bg variable so the border matches the card perfectly in both light and dark modes */
    border: 6px solid var(--card-bg); 
    background-color: var(--card-bg);
    margin-top: -70px; /* Pulls the image up exactly 50% of its height */
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.trustee-card:hover .avatar img {
    transform: scale(1.05);
    border-color: var(--accent-color);
}

/* Objectives List Styling */
.objective-list li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 18px;
    line-height: 1.6;
    font-size: 1.05rem;
}

.objective-list li i {
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--accent-color);
    font-size: 1.2rem;
}

/* --- ABOUT US MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .page-header-banner {
        padding: 80px 0;
    }
    .trustee-card {
        margin-top: 50px;
    }
    .trustee-card .avatar img {
        width: 120px;
        height: 120px;
        margin-top: -60px;
    }
}


/* ========================================================================
   THE VETERAN FIX: Total Eradication of Google Translate Layout Shifts
   ======================================================================== */

/* 1. Stop Google from injecting phantom padding/margins that cause the gap */
html, body {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: static !important;
}

/* 2. Nuke every known variation of the Google Translate Iframe & UI */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-frame,
#goog-gt-tt, 
.goog-te-balloon-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aawV-OEVmcd {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* 3. Target the specific iframe wrapper that hangs at the bottom */
div.skiptranslate > iframe.goog-te-banner-frame,
iframe[name="goog_te_banner"] {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    border: none !important;
}

/* 4. Hide the native text highlight styling */
.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 5. Hide your native translation div properly */
#google_translate_element {
    position: absolute !important;
    z-index: -9999 !important;
    width: 0px !important;
    height: 0px !important;
    overflow: hidden !important;
    visibility: hidden !important;
}