:root {
    --brand-blue: #1565c0;
    --brand-blue-dark: #0d47a1;
    --brand-blue-light: #42a5f5;
    --brand-green: #7cb342;
    --brand-green-dark: #558b2f;
    --brand-green-light: #9ccc65;

    --primary-color: var(--brand-blue);
    --primary-dark: var(--brand-blue-dark);
    --secondary-color: var(--brand-green);
    --accent-color: var(--brand-green);
    --accent-hover: var(--brand-green-dark);
    --text-dark: #1a1a2e;
    --text-muted: #5c6b7a;
    --bg-light: #f4f7fb;
    --navbar-height: 88px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
}

.bg-primary {
    background-color: var(--brand-blue) !important;
}

.btn-primary {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brand-blue-dark);
    border-color: var(--brand-blue-dark);
}

.btn-accent,
.btn-warning {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
    color: #fff;
}

.btn-accent:hover,
.btn-warning:hover,
.btn-accent:focus,
.btn-warning:focus {
    background-color: var(--brand-green-dark);
    border-color: var(--brand-green-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.btn-outline-primary:hover {
    background-color: var(--brand-blue);
    border-color: var(--brand-blue);
}

.text-primary {
    color: var(--brand-blue) !important;
}

.text-warning,
.text-accent {
    color: var(--brand-green) !important;
}

.badge.bg-primary {
    background-color: var(--brand-blue) !important;
}

.badge.bg-warning {
    background-color: var(--brand-green) !important;
    color: #fff !important;
}

.progress-bar.bg-success {
    background-color: var(--brand-green) !important;
}

/* Navbar & logo */
.site-navbar {
    background: #fff !important;
    box-shadow: 0 2px 16px rgba(21, 101, 192, 0.1);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    min-height: var(--navbar-height);
}

.site-navbar .navbar-brand {
    padding: 0;
    margin-right: 1.5rem;
    line-height: 1;
}

.site-logo {
    height: 72px;
    width: auto;
    max-width: 220px;
    display: block;
    object-fit: contain;
}

.site-logo-sm {
    height: 58px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.site-navbar .nav-link {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.site-navbar .nav-link:hover {
    color: var(--brand-blue);
    background: rgba(21, 101, 192, 0.06);
}

.site-navbar .nav-link.active {
    color: var(--brand-blue);
    font-weight: 600;
    background: rgba(21, 101, 192, 0.08);
}

.site-navbar .navbar-toggler {
    border-color: rgba(21, 101, 192, 0.3);
}

.site-navbar .navbar-toggler-icon {
    filter: invert(28%) sepia(90%) saturate(1200%) hue-rotate(196deg);
}

.navbar-donate-btn {
    background: var(--brand-green);
    color: #fff !important;
    border-radius: 6px;
    padding: 0.45rem 1rem !important;
    margin-left: 0.25rem;
}

.navbar-donate-btn:hover {
    background: var(--brand-green-dark) !important;
    color: #fff !important;
}

.lang-switcher {
    list-style: none;
}

.lang-flags {
    padding: 0.25rem 0.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid rgba(21, 101, 192, 0.12);
}

.lang-flag {
    display: inline-flex;
    padding: 2px;
    border-radius: 4px;
    opacity: 0.65;
    transition: opacity 0.2s, box-shadow 0.2s;
    line-height: 0;
}

.lang-flag img {
    width: 28px;
    height: 21px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.lang-flag:hover,
.lang-flag.active {
    opacity: 1;
}

.lang-flag.active {
    box-shadow: 0 0 0 2px var(--brand-blue);
}

.footer-credit {
    color: var(--brand-green-light) !important;
    opacity: 0.9 !important;
}

.section-title {
    font-weight: 700;
    color: var(--brand-blue-dark);
    margin-bottom: 1rem;
}

.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--brand-blue-dark) 0%, var(--brand-blue) 55%, var(--brand-green-dark) 100%);
    background-image: url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.82) 0%, rgba(21, 101, 192, 0.78) 50%, rgba(85, 139, 47, 0.75) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.min-vh-75 {
    min-height: 75vh;
}

.page-hero {
    background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue));
}

.impact-section {
    background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue));
}

.newsletter-section {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-green-dark));
}

.program-card img,
.project-card img,
.news-card img,
.story-card img {
    height: 200px;
    object-fit: cover;
}

.program-card-lg img {
    min-height: 100%;
    object-fit: cover;
}

.program-card:hover,
.project-card:hover,
.news-card:hover,
.story-card:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.12) !important;
}

.testimonial-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.team-photo {
    height: 250px;
    object-fit: cover;
}

.object-fit-cover {
    object-fit: cover;
}

.content-body {
    line-height: 1.8;
    font-size: 1.05rem;
}

.site-footer {
    background: linear-gradient(180deg, #0d2137 0%, #0a1628 100%) !important;
}

.site-footer .footer-logo {
    height: 88px;
    width: auto;
    max-width: 260px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.site-footer h5 {
    color: var(--brand-green-light) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--brand-green);
}

.site-footer a:hover {
    color: var(--brand-green-light) !important;
}

.breadcrumb-item a:hover {
    opacity: 1 !important;
}

/* Photo gallery */
.gallery-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.gallery-item:hover .gallery-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(21, 101, 192, 0.18);
}

.gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 71, 161, 0.85), rgba(13, 71, 161, 0.2));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.gallery-title {
    font-size: 0.9rem;
    font-weight: 600;
}

#galleryModalImage {
    max-height: 70vh;
    object-fit: contain;
    background: #000;
}

/* Admin styles */
.admin-body {
    background: var(--bg-light);
}

.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--brand-blue-dark) 0%, #0a1628 100%) !important;
}

.admin-sidebar .sidebar-logo {
    height: 64px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.admin-sidebar .nav-link {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin-bottom: 2px;
    opacity: 0.85;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    opacity: 1;
}

.admin-sidebar .nav-link.active {
    background: var(--brand-green);
}

.admin-content {
    min-height: 100vh;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-thumb-lg {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.stat-card {
    transition: transform 0.2s;
    border-left: 4px solid var(--brand-blue) !important;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.login-page {
    background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-green-dark));
    min-height: 100vh;
}

.login-logo {
    height: 110px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .admin-body .d-flex {
        flex-direction: column;
    }

    .hero-section {
        min-height: 70vh;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .site-logo {
        height: 58px;
        max-width: 170px;
    }
}
