:root {
    /* Premium Color Palette */
    --primary-dark: #0f172a;
    /* Deep Navy Backgrounds */
    --primary: #0ea5e9;
    /* Vibrant Sky Blue Highlights */
    --primary-light: #e0f2fe;
    /* Very Light Blue Backgrounds */
    --accent: #f59e0b;
    /* Amber/Gold for CTAs */
    --accent-hover: #d97706;

    --text-main: #1e293b;
    /* Dark Grey for body */
    --text-muted: #64748b;
    /* Muted text */
    --light: #ffffff;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: #f8fafc;
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 4rem;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    transition: var(--transition);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    gap: 1rem;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    text-decoration: none;
}

/* ── Nav Menu ── */
.nav-menu {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-main);
    padding: 0.45rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.nav-link.active {
    color: var(--primary);
}

/* Caret within nav-link — hidden on mobile, shown on desktop */
.nav-caret {
    font-size: 0.65rem;
    transition: transform 0.25s;
}

/* ── Hamburger button ── */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--primary-dark);
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--primary-light);
}

/* ── Separate chevron button (mobile-only, sits inside nav-item) ── */
.dropdown-toggle-btn {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem 0.6rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: color 0.2s;
    border-radius: 6px;
    flex-shrink: 0;
}

.dropdown-toggle-btn i {
    transition: transform 0.25s;
}

.dropdown-toggle-btn:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ── Desktop dropdown ── */
.nav-item {
    position: relative;
}

/* The dropdown sits just below the nav-item; use padding on nav-item to keep hover bridge */
.nav-item.has-dropdown {
    display: flex;
    align-items: center;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    min-width: 210px;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    padding: 0.5rem 0;
    padding-top: 12px;
    border-top: 3px solid var(--accent);
    z-index: 2000;
    pointer-events: none;
    list-style: none;
    margin: 0;
}

/* Show on hover (desktop) */
.nav-item.has-dropdown:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.dropdown li {
    display: block;
}

.dropdown li a {
    display: block;
    padding: 0.75rem 1.4rem;
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, padding-left 0.15s, color 0.15s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    text-decoration: none;
    white-space: nowrap;
}

.dropdown li:last-child a {
    border-bottom: none;
}

.dropdown li a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding-left: 1.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--light);
    color: var(--light);
}

.btn-outline:hover {
    background: var(--light);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-donate {
    padding: 0.5rem 1.75rem;
    font-size: 0.9rem;
    margin-left: 1rem;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-donate:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

@media (max-width: 768px) {
    .btn-donate {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }
}

/* Hero Section */
.hero {
    height: 90vh;
    /* immersive height */
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(14, 165, 233, 0.7)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* parallax */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light);
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-content {
    max-width: 900px;
    padding: 2rem;
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero h1 {
    color: var(--light);
    font-size: 4rem;
    /* Big impact */
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

/* Cards */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .card-grid.split-cards {
        grid-template-columns: 2fr 1fr;
    }
}


.card {
    background: var(--light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 240px;
    width: 100%;
    object-fit: cover;
    background: var(--primary-light);
}

.card-content {
    padding: 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    align-self: flex-start;
}

.card-link:hover {
    color: var(--accent);
}

/* Section Titles */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2.75rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding-top: 6rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer h3 {
    color: var(--light);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Top bar hide on mobile ── */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
}

/* ── Mobile nav ── */
@media (max-width: 900px) {

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* The chevron button shows beside the link text on mobile */
    .dropdown-toggle-btn {
        display: flex !important;
        align-items: center;
    }

    /* Hide inline caret inside the link itself on mobile (button has its own) */
    .nav-caret {
        display: none !important;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: min(320px, 100%);
        height: calc(100dvh - var(--header-height));
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 1rem;
        gap: 0;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Each item is a flex row: link + toggle btn */
    .nav-item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-item>.nav-link {
        flex: 1;
        padding: 0.9rem 0.5rem;
        border-radius: 0;
        font-size: 0.95rem;
    }

    .nav-item>.nav-link:hover {
        background: var(--primary-light);
        border-radius: 8px;
    }

    /* Force visibility and reset positioning for mobile dropdown */
    .nav-item.has-dropdown .dropdown {
        position: static !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        width: 100% !important;
        background: #f8fafc !important;
        border-top: none !important;
        border-left: 3px solid var(--accent) !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: all !important;
    }

    .nav-item.has-dropdown.open>.dropdown {
        display: block !important;
    }

    .dropdown li {
        display: block !important;
        width: 100% !important;
    }

    .dropdown li a {
        display: block !important;
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 0.92rem !important;
        color: var(--text-main) !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        text-decoration: none !important;
        transition: background 0.2s !important;
        white-space: normal !important;
    }

    .dropdown li a:hover {
        background: #fff !important;
        padding-left: 1.7rem !important;
        color: var(--primary) !important;
    }

    .dropdown li:last-child a {
        border-bottom: none;
    }
}

/* =====================
   Page Hero Banner
   ===================== */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1e3a5f 100%);
    color: var(--light);
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 {
    color: var(--light);
    font-size: 3rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    position: relative;
}

/* =====================
   Contact Layout
   ===================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

.contact-detail-list {
    list-style: none;
    margin-top: 1.5rem;
}

.contact-detail-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    color: var(--text-muted);
}

.contact-detail-list li:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
    font-size: 1rem;
}

.map-wrapper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 1.5rem;
}

.map-wrapper iframe {
    display: block;
}

/* =====================
   Form Styles
   ===================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: #f8fafc;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.form-control.is-invalid {
    border-color: #ef4444;
    background-color: #fff5f5;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.form-error {
    display: block;
    color: #ef4444;
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

/* Flash Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* =====================
   Admin Messages Table
   ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 0.15rem 0.6rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.btn-outline-dark {
    background: transparent;
    border: 2px solid var(--primary-dark);
    color: var(--primary-dark);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-outline-dark:hover {
    background: var(--primary-dark);
    color: var(--light);
}

.messages-table-wrapper {
    background: var(--light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.messages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.messages-table thead {
    background: var(--primary-dark);
    color: var(--light);
}

.messages-table thead th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.messages-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.messages-table tbody tr:last-child {
    border-bottom: none;
}

.messages-table tbody tr:hover {
    background: #f8fafc;
}

.messages-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    color: var(--text-main);
}

.sender-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sender-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.message-preview {
    color: var(--text-muted);
    max-width: 300px;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fef2f2;
    color: #ef4444;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state h3 {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* =====================
   Gallery Grid
   ===================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background: var(--light);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-info {
    padding: 1rem 1.25rem;
}

.gallery-info h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.gallery-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}