/* ==========================================
   Still Rooted — Deep 3D Teal & Liquid Waving Hero
   Deep teal base, dark 3D depth, crisp whiter accents,
   and an organic fluid color-moving hero background.
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    scroll-behavior: smooth;
}

:root {
    --bg-dark: #004d50;            /* Deep dark teal base */
    --bg-dark-2: #003638;          /* Deeper 3D shadow floor */
    --bg-elevated: #006064;        /* Elevated dark teal surface */
    --bg-elevated-2: #007982;      /* Lighter 3D top-card gradient stop */
    --bg-card: #00565b;            /* Rich dark card base */
    --border-color: #159a9c;       /* Clean turquoise border */

    --teal-primary: #159a9c;       /* Vibrant turquoise accent */
    --teal-deep: #004d50;          /* Deep teal shade */
    --aqua-highlight: #2ab7bc;     /* Bright turquoise highlight */

    /* Whiter and brighter contrast accents */
    --peach-light: #ffffff;        /* Pure crisp white for primary elements */
    --peach-soft: #fff2e1;         /* Soft creamy ivory secondary text */

    --teal-glow: rgba(42, 183, 188, 0.25);
    --white-glow: rgba(255, 255, 255, 0.15);

    --text-primary: #ffffff;       /* Pure crisp white text */
    --text-muted: #d1f0f2;         /* Bright aqua-tinted muted text */

    --shadow-deep: rgba(0, 15, 18, 0.75);
    --highlight: rgba(255, 255, 255, 0.14);
}

body {
    background:
        radial-gradient(circle at 12% 8%, var(--teal-glow), transparent 42%),
        radial-gradient(circle at 88% 92%, var(--white-glow), transparent 48%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%) !important;
    background-size: 200% 200%;
    animation: dynamicBackgroundShift 15s ease infinite;
    background-attachment: fixed;
    color: var(--text-primary) !important;
    line-height: 1.6;
    padding-top: 70px;
}

/* --- Dynamic Background Animation Keyframes --- */
@keyframes dynamicBackgroundShift {
    0% {
        background-position: 0% 50%, 100% 50%, 0% 0%;
    }
    50% {
        background-position: 100% 50%, 0% 50%, 0% 0%;
    }
    100% {
        background-position: 0% 50%, 100% 50%, 0% 0%;
    }
}

/* --- Navigation Header --- */
header {
    background: linear-gradient(180deg, #006064 0%, #004d50 100%) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 18px var(--shadow-deep);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent !important;
}

.logo {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--peach-light), var(--aqua-highlight));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    background-color: transparent !important;
}

.nav-item {
    position: relative;
    background-color: transparent !important;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
    background-color: transparent !important;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--peach-light) !important;
}

/* --- Dropdown Engine --- */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg-card)) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 12px 28px var(--shadow-deep), inset 0 1px 0 var(--highlight);
    list-style: none;
    min-width: 180px;
    border-radius: 6px;
    padding: 5px 0;
}

.dropdown li {
    background-color: transparent !important;
}

.dropdown li a {
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    color: var(--text-primary) !important;
    background-color: transparent !important;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown li a:hover {
    background: linear-gradient(90deg, rgba(42,183,188,0.25), rgba(255,255,255,0.15)) !important;
    color: var(--peach-light) !important;
}

.nav-item:hover .dropdown {
    display: block;
}

/* --- Hero Section with Organic Liquid Color Movers --- */
.hero {
    position: relative;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-primary) !important;
    text-align: center;
    padding: 120px 20px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: inset 0 -40px 60px -40px rgba(0, 15, 18, 0.8);
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.65;
}

.hero::before {
    background:
        radial-gradient(circle at 30% 40%, rgba(21, 154, 156, 0.8) 0%, transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(0, 77, 80, 0.9) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(42, 183, 188, 0.6) 0%, transparent 40%);
    animation: liquidWaveA 18s ease infinite alternate;
}

.hero::after {
    background:
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 20% 70%, rgba(0, 121, 130, 0.7) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(0, 54, 56, 0.9) 0%, transparent 50%);
    animation: liquidWaveB 24s ease infinite alternate;
}

.hero > * {
    position: relative;
    z-index: 1;
}

@keyframes liquidWaveA {
    0% {
        transform: translate(0%, 0%) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(-5%, 8%) rotate(7deg) scale(1.08);
    }
    100% {
        transform: translate(6%, -6%) rotate(-5deg) scale(0.95);
    }
}

@keyframes liquidWaveB {
    0% {
        transform: translate(0%, 0%) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(7%, -5%) rotate(-8deg) scale(1.1);
    }
    100% {
        transform: translate(-6%, 6%) rotate(6deg) scale(1.02);
    }
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 15px;
    color: var(--peach-light) !important;
    text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 25px;
    color: var(--text-muted) !important;
}

/* --- Layout Elements & Containers --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: transparent !important;
}

.bg-white {
    background: linear-gradient(165deg, var(--bg-elevated-2), var(--bg-elevated)) !important;
    max-width: 100%;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary) !important;
}

.section-title {
    text-align: center;
    color: var(--text-primary) !important;
    margin-bottom: 40px;
}

.center-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-muted) !important;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    background-color: transparent !important;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    background-color: transparent !important;
}

/* Cards — Rich Dark 3D Depth with Whiter Borders/Highlights */
.card {
    background: linear-gradient(155deg, var(--bg-elevated-2) 0%, var(--bg-card) 100%) !important;
    color: var(--text-primary) !important;
    padding: 25px;
    border-radius: 8px;
    border-top: 4px solid var(--peach-soft) !important;
    border-left: 1px solid var(--highlight) !important;
    border-right: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: inset 0 1px 0 var(--highlight), 0 14px 30px var(--shadow-deep);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 1px 0 var(--highlight), 0 20px 40px var(--shadow-deep), 0 0 25px var(--teal-glow), 0 0 15px var(--white-glow);
}

.card *,
.card p,
.card ol,
.card ul,
.card li,
.card div,
.card span {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}

.card strong {
    color: var(--peach-light) !important;
}

.card-alt {
    background: linear-gradient(160deg, var(--bg-elevated), var(--bg-card)) !important;
    color: var(--text-primary) !important;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color) !important;
    box-shadow: inset 0 1px 0 var(--highlight), 0 8px 20px var(--shadow-deep);
}

.card-alt * {
    background-color: transparent !important;
    color: var(--text-primary) !important;
}

/* --- Buttons & Inputs --- */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-deep) 100%) !important;
    color: var(--peach-light) !important;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 15, 18, 0.55), inset 0 1px 0 rgba(255,255,255,0.3);
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    background: linear-gradient(135deg, var(--peach-light) 0%, var(--aqua-highlight) 100%) !important;
    color: var(--bg-dark-2) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 15, 18, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    background-color: transparent !important;
}

input, textarea, select {
    padding: 12px;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px;
    width: 100%;
    background: linear-gradient(160deg, #00565b, var(--bg-dark)) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select option {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--peach-light) !important;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.6), 0 0 10px var(--teal-glow);
}

footer {
    background: linear-gradient(180deg, var(--bg-dark), var(--bg-dark-2)) !important;
    color: var(--text-muted) !important;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    border-top: 1px solid var(--border-color) !important;
}

/* --- Logged-In Account Panel --- */
.status-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(21,154,156,0.3), rgba(255,255,255,0.15)) !important;
    color: var(--peach-light) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
    box-shadow: inset 0 1px 0 var(--highlight);
}

.account-box {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(155deg, var(--bg-elevated-2), var(--bg-elevated)) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    padding: 20px;
    box-shadow: inset 0 1px 0 var(--highlight), 0 8px 20px var(--shadow-deep);
}

.account-avatar {
    width: 55px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-primary), var(--peach-light)) !important;
    color: var(--bg-dark-2) !important;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 6px 14px rgba(0, 15, 18, 0.5);
}

.account-name {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary) !important;
    background-color: transparent !important;
}

.account-email {
    font-size: 14px;
    color: var(--text-muted) !important;
    word-break: break-all;
    background-color: transparent !important;
}

/* --- Auth Status Messages --- */
.auth-status {
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.auth-status.success {
    background: linear-gradient(135deg, rgba(21,154,156,0.3), rgba(255,255,255,0.12)) !important;
    color: #ffffff !important;
    border: 1px solid rgba(42, 183, 188, 0.45) !important;
    box-shadow: inset 0 1px 0 var(--highlight);
}

.auth-status.error {
    background: linear-gradient(135deg, rgba(198, 40, 40, 0.3), rgba(198, 40, 40, 0.1)) !important;
    color: #ffcccc !important;
    border: 1px solid rgba(229, 115, 115, 0.45) !important;
    box-shadow: inset 0 1px 0 var(--highlight);
}

/* Navigation Profile Badge */
#navAuthLink span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-primary), var(--peach-light)) !important;
    color: var(--bg-dark-2) !important;
    font-weight: bold;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 4px 10px rgba(0, 15, 18, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#navAuthLink span:hover {
    transform: scale(1.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 14px var(--teal-glow);
}

/* Force override any inline white background elements */
div[style*="background: white"], div[style*="background:white"] {
    background: linear-gradient(155deg, var(--bg-elevated-2), var(--bg-card)) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: inset 0 1px 0 var(--highlight), 0 10px 26px var(--shadow-deep);
}

div[style*="background: white"] p,
div[style*="background:white"] p {
    color: var(--text-primary) !important;
}

div[style*="background: white"] strong,
div[style*="background:white"] strong {
    color: var(--peach-light) !important;
}

/* ==========================================
   MOBILE & TABLET RESPONSIVE ADAPTATIONS
   ========================================== */

@media (max-width: 900px) {
    .nav-container {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 110px;
    }

    .hero {
        padding: 50px 15px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .container {
        padding: 30px 15px;
    }

    .account-box {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    form {
        max-width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================
   MOBILE COLLAPSIBLE NAVIGATION (TOGGLE/DROPDOWN)
   ========================================== */

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--peach-light);
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    z-index: 9999;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    body {
        padding-top: 80px;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg-card)) !important;
        border-top: 1px solid var(--border-color);
        margin-top: 15px;
        padding: 10px 0;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 10px 24px var(--shadow-deep);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        text-align: left;
    }

    .nav-link {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(42, 183, 188, 0.3);
    }

    .dropdown {
        position: static;
        box-shadow: none;
        background: rgba(0, 77, 80, 0.6) !important;
        border: none !important;
        padding-left: 15px;
    }

    .nav-item:hover .dropdown {
        display: none;
    }

    .nav-item.dropdown-open .dropdown {
        display: block;
    }
}

/* ==========================================
   STILL ROOTED CHATBOT MODULE STYLING
   ========================================== */

#ngo-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

#chatbot-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--peach-light) 100%);
    color: var(--bg-dark-2);
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 15, 18, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#chatbot-toggle-btn:hover {
    background: linear-gradient(135deg, var(--peach-light) 0%, var(--aqua-highlight) 100%);
    color: var(--bg-dark-2);
    transform: scale(1.03);
    box-shadow: 0 10px 24px var(--shadow-deep), 0 0 20px var(--teal-glow);
}

#chatbot-window {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 340px;
    height: 460px;
    background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg-card)) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    box-shadow: inset 0 1px 0 var(--highlight), 0 16px 36px var(--shadow-deep);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chatbot-window.chatbot-hidden {
    display: none !important;
}

.chatbot-header {
    background: linear-gradient(180deg, #006064 0%, #004d50 100%) !important;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color) !important;
}

.chatbot-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--peach-light) !important;
    margin: 0;
}

#chatbot-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s ease;
}

#chatbot-close-btn:hover {
    color: var(--peach-light);
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
    background: rgba(0, 60, 64, 0.5) !important;
}

.bot-message {
    background: linear-gradient(155deg, var(--bg-elevated), var(--bg-card)) !important;
    color: var(--text-primary) !important;
    align-self: flex-start;
    border: 1px solid var(--border-color) !important;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 15, 18, 0.4);
}

.user-message {
    background: linear-gradient(135deg, var(--teal-primary), var(--teal-deep)) !important;
    color: var(--peach-light) !important;
    align-self: flex-end;
    padding: 10px 14px;
    border-radius: 10px;
    max-width: 85%;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 15, 18, 0.4);
}

.chatbot-input-area {
    padding: 12px;
    display: flex;
    gap: 8px;
    background: var(--bg-dark-2) !important;
    border-top: 1px solid var(--border-color) !important;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--border-color) !important;
    background: linear-gradient(160deg, #00565b, var(--bg-dark)) !important;
    color: var(--text-primary) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-input-area input:focus {
    border-color: var(--peach-light) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6), 0 0 8px var(--teal-glow);
}

.chatbot-input-area button {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-deep) 100%) !important;
    color: var(--peach-light) !important;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
    box-shadow: 0 4px 10px rgba(0, 15, 18, 0.45);
    transition: background 0.2s ease, transform 0.2s ease;
}

.chatbot-input-area button:hover {
    background: linear-gradient(135deg, var(--peach-light) 0%, var(--aqua-highlight) 100%) !important;
    color: var(--bg-dark-2) !important;
    transform: translateY(-1px);
}

/* Aesthetic Delete Button Style */
.btn-delete {
    background-color: rgba(230, 57, 70, 0.18);
    color: #ff9999;
    border: 1px solid rgba(230, 57, 70, 0.5);
    padding: 8px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 15px;
}

.btn-delete:hover {
    background-color: #e63946;
    color: #ffffff;
    border-color: #e63946;
}