/* Monifest UI Styles (Visual refresh)
   - dependency-free CSS
   - keeps existing class names so the PHP pages do not need edits
   - adds clearer hierarchy, better spacing, softer shadows, stronger focus states
*/

:root {
    /* Base colors */
    --bg: #f8fafc;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-solid: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: rgba(15, 23, 42, 0.12);

    /* Brand */
    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --accent: #0ea5e9;

    /* Status */
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.06);
    --shadow: 0 10px 30px rgba(2, 6, 23, 0.10);
    --shadow-lg: 0 18px 55px rgba(2, 6, 23, 0.14);

    /* Shape */
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 22px;

    /* Focus */
    --ring: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;

    /* Soft background depth without images */
    background:
        radial-gradient(1200px circle at 12% 0%, rgba(37, 99, 235, 0.14), transparent 55%),
        radial-gradient(900px circle at 92% 10%, rgba(14, 165, 233, 0.10), transparent 52%),
        radial-gradient(1100px circle at 50% 110%, rgba(99, 102, 241, 0.08), transparent 55%),
        var(--bg);
}

::selection {
    background: rgba(37, 99, 235, 0.18);
}

a {
    color: var(--primary-2);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p { margin: 0.6rem 0; }

/* Container */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1rem;
}

main.container {
    padding: 1.25rem 1rem 2.75rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;

    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);

    /* Gracefully ignored by older browsers */
    backdrop-filter: saturate(160%) blur(10px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
    font-weight: 800;
}

.logo-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-nav a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    color: rgba(15, 23, 42, 0.74);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    border: 1px solid transparent;
}

.main-nav a:hover {
    color: var(--text);
    background: rgba(15, 23, 42, 0.05);
    text-decoration: none;
}

.main-nav a.active {
    color: var(--text);
    background: rgba(37, 99, 235, 0.10);
    border-color: rgba(37, 99, 235, 0.25);
}

@media (max-width: 760px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-nav ul {
        justify-content: center;
        gap: 0.25rem;
    }
}

/* Panels / Sections */
.section {
    margin-top: 1.4rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.65rem;
    box-shadow: var(--shadow);
}

.section h2 {
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.03em;
    font-size: 1.55rem;
}

.section h3 {
    margin: 1.25rem 0 0.5rem 0;
    letter-spacing: -0.02em;
}

/* Hero */
.hero {
    margin-top: 0.75rem;
    padding: 2.35rem 2.1rem;
    border-radius: var(--radius-lg);
    color: #ffffff;
    box-shadow: var(--shadow-lg);

    background: linear-gradient(120deg, #1d4ed8, #2563eb, #0ea5e9);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -140px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.26), transparent 42%),
        radial-gradient(circle at 82% 30%, rgba(255, 255, 255, 0.16), transparent 45%),
        radial-gradient(circle at 60% 90%, rgba(255, 255, 255, 0.10), transparent 46%);
    pointer-events: none;
}

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

.hero h1 {
    margin: 0 0 0.7rem 0;
    font-size: clamp(2.05rem, 3.6vw, 3.1rem);
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 60ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
}

.hero .hero-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 620px) {
    .hero { padding: 1.85rem 1.35rem; }
}

/* Buttons (used as <a> and <button>) */
.btn-primary,
.btn-secondary,
.btn-danger,
button.btn-primary,
button.btn-secondary,
button.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;

    padding: 0.62rem 1.02rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.95rem;

    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;

    transition:
        transform 0.14s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        opacity 0.18s ease;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-2);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.98);
    text-decoration: none;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.26);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    text-decoration: none;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.10);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.22);
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    transform: translateY(-1px);
    background: rgba(220, 38, 38, 0.14);
    text-decoration: none;
}

.btn-inline {
    padding: 0.50rem 0.92rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.90rem;
}

.btn-primary:active,
.btn-secondary:active,
.btn-danger:active {
    transform: translateY(0);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.main-nav a:focus-visible,
.form-control:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

/* Hero button tuning (keeps contrast on the gradient) */
.hero .btn-secondary {
    background: rgba(15, 23, 42, 0.22);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 26px rgba(2, 6, 23, 0.16);
}

.hero .btn-secondary:hover {
    background: rgba(15, 23, 42, 0.30);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.05rem;
}

.card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem 1.15rem;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.08);
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.12);
    border-color: rgba(37, 99, 235, 0.20);
}

.card h3 {
    margin: 0 0 0.35rem 0;
    letter-spacing: -0.02em;
}

.card p {
    margin: 0.35rem 0 0.75rem 0;
    color: var(--muted);
}

.meta {
    margin-top: 0.55rem;
    font-size: 0.92rem;
    color: var(--muted);
}

/* Project image */
.project-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.12);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.80rem;
    font-weight: 900;
    padding: 0.25rem 0.62rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.04);
    color: rgba(15, 23, 42, 0.92);
    margin-right: 0.35rem;
}

.badge.approved { background: rgba(22, 163, 74, 0.10); color: #065f46; border-color: rgba(22, 163, 74, 0.20); }
.badge.pending  { background: rgba(245, 158, 11, 0.13); color: #92400e; border-color: rgba(245, 158, 11, 0.25); }
.badge.submitted { background: rgba(37, 99, 235, 0.10); color: #1e40af; border-color: rgba(37, 99, 235, 0.22); }
.badge.rejected { background: rgba(220, 38, 38, 0.10); color: #991b1b; border-color: rgba(220, 38, 38, 0.22); }

.badge.donation { background: rgba(37, 99, 235, 0.10); color: #1e40af; border-color: rgba(37, 99, 235, 0.22); }
.badge.investment { background: rgba(22, 163, 74, 0.10); color: #166534; border-color: rgba(22, 163, 74, 0.22); }

/* Forms */
.form { margin-top: 1rem; }

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-weight: 900;
    margin-bottom: 0.35rem;
    letter-spacing: -0.01em;
}

.form-control,
textarea.form-control,
select.form-control {
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    outline: none;
    background: rgba(255, 255, 255, 0.92);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.form-control::placeholder { color: rgba(100, 116, 139, 0.85); }

.form-control:focus,
textarea.form-control:focus,
select.form-control:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: var(--ring);
    background: #ffffff;
}

textarea.form-control {
    min-height: 115px;
    resize: vertical;
}

.form-hint {
    font-size: 0.92rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* Alerts */
.alert {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-sm);
}

.alert a {
    font-weight: 800;
    text-decoration: underline;
}

.alert-danger  { background: rgba(220, 38, 38, 0.08); border-color: rgba(220, 38, 38, 0.22); color: #991b1b; }
.alert-success { background: rgba(22, 163, 74, 0.08); border-color: rgba(22, 163, 74, 0.22); color: #065f46; }
.alert-warning { background: rgba(245, 158, 11, 0.10); border-color: rgba(245, 158, 11, 0.25); color: #92400e; }
.alert-info    { background: rgba(37, 99, 235, 0.08); border-color: rgba(37, 99, 235, 0.22); color: #1e40af; }

/* Progress */
.progress-wrap { margin-top: 0.85rem; }

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(2, 6, 23, 0.10);
}

.progress-bar > div {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-2), var(--accent));
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Split layout (used on some detail pages) */
.split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
    background: rgba(255, 255, 255, 0.86);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.90rem;
    color: rgba(100, 116, 139, 0.95);
}

/* Utilities */
.small { font-size: 0.93rem; color: var(--muted); }

.kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 900;
    font-size: 0.78rem;
    color: rgba(100, 116, 139, 0.95);
}

hr.soft {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.35rem 0;
}

.nowrap {
    white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    background: rgba(15, 23, 42, 0.06);
    padding: 0.10rem 0.35rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.95em;
    background: rgba(15, 23, 42, 0.06);
    padding: 0.10rem 0.35rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
