/* ============================================================
   MPANGALA FOUNDATION — PREMIUM CSS
   Complete Dark/Light Mode Theme System
   ============================================================ */

/* ----------------------------------------------------------
   1. DESIGN TOKENS (CSS Variables)
   ---------------------------------------------------------- */
:root {
    --primary-color: #FDBE33;
    --primary-hover: #e5ac2e;
    --secondary-color: #4a4c70;

    /* Dark mode defaults */
    --bg-main:        #0f0f12;
    --bg-secondary:   #08080a;
    --bg-card:        rgba(255, 255, 255, 0.03);
    --bg-glass:       rgba(15, 15, 18, 0.90);
    --bg-input:       rgba(255, 255, 255, 0.05);

    --text-primary:   #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.60);
    --text-muted:     rgba(255, 255, 255, 0.35);

    --border-gold:    rgba(253, 190, 51, 0.30);
    --border-subtle:  rgba(255, 255, 255, 0.06);
    --border-input:   rgba(255, 255, 255, 0.15);

    --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.40);
    --shadow-hover:   0 20px 60px rgba(0, 0, 0, 0.50);

    /* Summernote */
    --snote-bg:       #1a1a22;
    --snote-toolbar:  #111116;
    --snote-text:     #ffffff;
    --snote-border:   rgba(253, 190, 51, 0.30);
}

/* ----------------------------------------------------------
   2. LIGHT MODE OVERRIDES
   ---------------------------------------------------------- */
html.light-mode,
body.light-mode {
    --bg-main:        #f4f5f7;
    --bg-secondary:   #e8eaed;
    --bg-card:        #ffffff;
    --bg-glass:       rgba(248, 249, 250, 0.96);
    --bg-input:       #ffffff;

    --text-primary:   #1a1a1a;
    --text-secondary: rgba(0, 0, 0, 0.65);
    --text-muted:     rgba(0, 0, 0, 0.40);

    --border-gold:    rgba(253, 190, 51, 0.70);
    --border-subtle:  rgba(0, 0, 0, 0.10);
    --border-input:   rgba(0, 0, 0, 0.20);

    --shadow-card:    0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-hover:   0 12px 40px rgba(0, 0, 0, 0.18);

    /* Summernote */
    --snote-bg:       #ffffff;
    --snote-toolbar:  #f0f0f0;
    --snote-text:     #1a1a1a;
    --snote-border:   rgba(0, 0, 0, 0.20);
}

/* ----------------------------------------------------------
   3. BASE ELEMENTS
   ---------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* All headings adapt to theme */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

/* Paragraphs */
p {
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--primary-color);
    transition: color 0.2s;
}
a:hover { color: var(--primary-hover); }

/* ----------------------------------------------------------
   4. TYPOGRAPHY UTILITIES (theme-aware replacements)
   ---------------------------------------------------------- */
.text-theme-primary   { color: var(--text-primary)   !important; }
.text-theme-secondary { color: var(--text-secondary) !important; }
.text-theme-muted     { color: var(--text-muted)     !important; }

/* Override Bootstrap's .text-white / .text-white-50 in light mode */
body.light-mode .text-white {
    color: var(--text-primary) !important;
}
body.light-mode .text-white-50 {
    color: var(--text-secondary) !important;
}
body.light-mode small {
    color: var(--text-secondary) !important;
}

/* ----------------------------------------------------------
   5. NAVBAR
   ---------------------------------------------------------- */
.navbar-premium {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    transition: all 0.35s ease;
    padding: 15px 0;
}

.navbar-premium.nav-sticky {
    padding: 8px 0;
    background: var(--bg-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.navbar-premium .nav-link {
    color: var(--text-primary) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    padding: 10px 15px !important;
    transition: color 0.3s;
}

.navbar-premium .nav-link:hover,
.navbar-premium .nav-link.active {
    color: var(--primary-color) !important;
}

/* Dropdown */
.dropdown-menu-premium {
    background: var(--bg-main);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 10px 0;
    box-shadow: var(--shadow-card);
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

.dropdown-menu-premium.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-premium .dropdown-item {
    color: var(--text-primary);
    padding: 10px 25px;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-menu-premium .dropdown-item:hover {
    background: var(--primary-color);
    color: #000;
}

/* ----------------------------------------------------------
   6. HERO & PAGE HEADER
   ---------------------------------------------------------- */
.hero-premium {
    position: relative;
    padding: 200px 0 120px;
    background: linear-gradient(rgba(15,15,18,0.5), rgba(15,15,18,0.95)),
                url('../img/page-header.jpg') center/cover no-repeat fixed;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

body.light-mode .hero-premium {
    background: linear-gradient(rgba(248,249,250,0.75), rgba(248,249,250,0.97)),
                url('../img/page-header.jpg') center/cover no-repeat fixed;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    background: linear-gradient(45deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Page header used in sub-pages */
.page-header-premium {
    background: linear-gradient(rgba(15,15,18,0.6), rgba(15,15,18,0.98)),
                url('../img/page-header.jpg') center/cover no-repeat fixed;
    padding: 130px 0 80px;
    text-align: center;
}

body.light-mode .page-header-premium {
    background: linear-gradient(rgba(248,249,250,0.80), rgba(248,249,250,0.98)),
                url('../img/page-header.jpg') center/cover no-repeat fixed;
}

.page-header-premium h1 {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 800;
}

.page-header-premium p {
    color: var(--primary-color) !important;
}

/* ----------------------------------------------------------
   7. BENTO CARDS
   ---------------------------------------------------------- */
.bento-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 40px;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-hover);
}

/* Text inside bento-cards inherits theme */
.bento-card,
.bento-card p,
.bento-card span,
.bento-card li,
.bento-card div {
    color: var(--text-primary);
}

.bento-card .text-white-50 {
    color: var(--text-secondary) !important;
}

/* ----------------------------------------------------------
   8. SECTION HEADERS
   ---------------------------------------------------------- */
.section-header-premium {
    text-align: center;
    margin-bottom: 80px;
}

.section-header-premium > p {
    color: var(--primary-color) !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 4px;
    font-size: 14px;
}

.section-header-premium > h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-top: 10px;
    color: var(--text-primary);
}

/* ----------------------------------------------------------
   9. BUTTONS
   ---------------------------------------------------------- */
.btn-premium {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-premium:hover {
    background: var(--primary-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(253, 190, 51, 0.4);
}

.btn-premium-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 34px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-premium-outline:hover {
    background: var(--primary-color);
    color: #000;
    transform: translateY(-2px);
}

/* ----------------------------------------------------------
   10. FORMS & INPUTS
   ---------------------------------------------------------- */
.form-control-premium {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-input) !important;
    border-radius: 12px;
    padding: 14px 18px;
    width: 100%;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control-premium:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(253, 190, 51, 0.15);
}

.form-control-premium::placeholder {
    color: var(--text-muted) !important;
}

/* Bootstrap form-control in dark/light mode */
.form-control {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-input);
}

.form-control:focus {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(253, 190, 51, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* ----------------------------------------------------------
   11. FOOTER
   ---------------------------------------------------------- */
.footer-premium {
    background: var(--bg-secondary);
    padding: 80px 0 40px;
    border-top: 1px solid var(--border-gold);
}

.footer-premium h2,
.footer-premium h3 {
    color: var(--primary-color);
}

.footer-premium p,
.footer-premium small,
.footer-premium li,
.footer-premium a {
    color: var(--text-secondary);
}

.footer-premium a:hover {
    color: var(--primary-color);
}

body.light-mode .footer-premium {
    background: var(--bg-secondary);
}

/* ----------------------------------------------------------
   12. HISTORICAL IMAGE
   ---------------------------------------------------------- */
.historical-img {
    border-radius: 16px;
    width: 100%;
    object-fit: cover;
    filter: grayscale(100%) sepia(20%);
    transition: all 0.8s ease;
}

.bento-card:hover .historical-img {
    filter: grayscale(0%) sepia(0%);
    transform: scale(1.02);
}

/* ----------------------------------------------------------
   13. SPONSOR LOGOS — Full colour by default
   ---------------------------------------------------------- */
/* Logos are full colour in both modes.
   Remove the line below if you ever want greyscale back in light mode. */
/* body.light-mode .sponsors-carousel img { filter: grayscale(100%) brightness(0.25) !important; } */

/* ----------------------------------------------------------
   13b. CAUSES SECTION BACKGROUND
   ---------------------------------------------------------- */
.section-causes-bg {
    background: var(--bg-secondary);
}

body.light-mode .section-causes-bg {
    background: #ffffff;
}


/* ----------------------------------------------------------
   14. SUMMERNOTE EDITOR — Full Theme Support
   ---------------------------------------------------------- */

/* Editor container */
.note-editor.note-frame,
.note-editor.note-airframe {
    background: var(--snote-bg) !important;
    border: 1px solid var(--snote-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

/* Toolbar */
.note-editor .note-toolbar {
    background: var(--snote-toolbar) !important;
    border-bottom: 1px solid var(--snote-border) !important;
    padding: 8px 12px !important;
}

/* Toolbar buttons */
.note-editor .note-btn {
    background: transparent !important;
    border: 1px solid var(--snote-border) !important;
    color: var(--snote-text) !important;
    border-radius: 6px !important;
    margin: 2px !important;
}

.note-editor .note-btn:hover {
    background: var(--primary-color) !important;
    color: #000 !important;
    border-color: var(--primary-color) !important;
}

.note-editor .note-btn.active {
    background: var(--primary-color) !important;
    color: #000 !important;
}

/* Dropdown menus inside toolbar */
.note-editor .dropdown-menu {
    background: var(--bg-main) !important;
    border: 1px solid var(--snote-border) !important;
    border-radius: 8px !important;
}

.note-editor .dropdown-menu .dropdown-item {
    color: var(--text-primary) !important;
}

.note-editor .dropdown-menu .dropdown-item:hover {
    background: var(--primary-color) !important;
    color: #000 !important;
}

/* Editable area (iframe body) */
.note-editor .note-editable {
    background: var(--snote-bg) !important;
    color: var(--snote-text) !important;
    min-height: 200px;
    padding: 16px !important;
    caret-color: var(--primary-color);
}

/* Status bar */
.note-editor .note-statusbar {
    background: var(--snote-toolbar) !important;
    border-top: 1px solid var(--snote-border) !important;
}

.note-editor .note-statusbar .note-resizebar {
    border-top: 1px solid var(--snote-border) !important;
}

/* Codepen / codeview mode */
.note-editor .note-codable {
    background: #000 !important;
    color: #addb67 !important;
}

/* Light mode: Summernote specific overrides */
body.light-mode .note-editor.note-frame {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.15) !important;
}

body.light-mode .note-editor .note-toolbar {
    background: #f0f0f0 !important;
    border-bottom-color: rgba(0,0,0,0.12) !important;
}

body.light-mode .note-editor .note-btn {
    color: #333 !important;
    border-color: rgba(0,0,0,0.15) !important;
}

body.light-mode .note-editor .note-editable {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

body.light-mode .note-editor .note-statusbar {
    background: #f0f0f0 !important;
}

/* ----------------------------------------------------------
   15. MODALS (Dark/Light aware)
   ---------------------------------------------------------- */
.modal-content {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
}

body.light-mode .modal-content {
    background: #ffffff;
    border-color: var(--border-gold);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

body.light-mode .modal-content.bg-dark {
    background: #ffffff !important;
}

body.light-mode .modal-content .text-white-50 {
    color: var(--text-secondary) !important;
}

/* ----------------------------------------------------------
   16. TABLE (Dark/Light)
   ---------------------------------------------------------- */
body.light-mode .table-dark {
    --bs-table-bg: #f8f9fa;
    --bs-table-color: #1a1a1a;
    --bs-table-striped-bg: #f0f0f0;
    --bs-table-hover-bg: #e8e8e8;
    --bs-table-border-color: rgba(0,0,0,0.10);
}

body.light-mode .table-dark th {
    color: #1a1a1a !important;
}

/* ----------------------------------------------------------
   17. BADGE & ALERTS (Light mode)
   ---------------------------------------------------------- */
body.light-mode .border-secondary {
    border-color: rgba(0,0,0,0.12) !important;
}

body.light-mode .bg-secondary {
    background-color: #e8e8e8 !important;
}

body.light-mode .bg-dark {
    background-color: #f0f0f0 !important;
    color: #1a1a1a !important;
}

/* ----------------------------------------------------------
   18. ADMIN DASHBOARD (Light mode)
   ---------------------------------------------------------- */
body.light-mode .admin-sidebar {
    background: #ffffff;
    border-color: var(--border-gold);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

body.light-mode .admin-content-area {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

body.light-mode .admin-nav-item {
    color: rgba(0,0,0,0.55);
}

body.light-mode .admin-nav-item:hover,
body.light-mode .admin-nav-item.active {
    background: rgba(253, 190, 51, 0.12);
    color: #c49000;
}

body.light-mode .admin-card-stat {
    background: #f8f9fa;
}

/* ----------------------------------------------------------
   19. LETTER SPACING UTILITY
   ---------------------------------------------------------- */
.letter-spacing-5 { letter-spacing: 5px; }
.letter-spacing-3 { letter-spacing: 3px; }

/* ----------------------------------------------------------
   20. SMOOTH TRANSITIONS ON THEME SWITCH
   ---------------------------------------------------------- */
body,
body *,
body *::before,
body *::after {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease;
}

/* But NOT transform, filter or opacity (interferes with animations) */
.bento-card,
.historical-img,
.hero-premium,
.page-header-premium {
    transition: transform 0.45s cubic-bezier(0.165, 0.84, 0.44, 1),
                background 0.35s ease,
                border-color 0.25s ease,
                box-shadow 0.3s ease;
}

/* ----------------------------------------------------------
   21. CUSTOM GTRANSLATE OVERRIDES
   ---------------------------------------------------------- */
/* Hide the Google Translate toolbar */
.goog-te-banner-frame.skiptranslate, 
.skiptranslate > iframe {
    display: none !important;
}

/* Prevent Google Translate from adding margin to body */
body {
    top: 0px !important;
}

/* Hide the Google Translate original text tooltips */
#goog-gt-tt, .goog-te-balloon-frame {
    display: none !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}
