:root {
    --bg: #f8f6f3;
    --card: #ffffff;
    --text: #1a1f2e;
    --muted: #64748b;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --accent: #d97706;
    --accent-soft: #fef3c7;
    --gold: #fbbf24;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --error: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "DM Sans", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("../images/flags-brazil-netherlands.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: min(1040px, calc(100% - 2rem));
    margin: 0 auto;
}

/* Hero header with flag background */
.site-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.08) 0%,
        rgba(15, 23, 42, 0.18) 50%,
        rgba(15, 23, 42, 0.45) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 0 2.5rem;
    color: #fff;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    max-width: 18ch;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.subtitle {
    margin: 0.85rem 0 0;
    color: #fff;
    font-size: 1.05rem;
    max-width: 52ch;
    line-height: 1.55;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.main-content {
    margin-top: -2rem;
    position: relative;
    z-index: 2;
    padding-bottom: 2rem;
}

/* Cards */
.hero-card,
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
}

.hero-card {
    margin-bottom: 1.25rem;
    backdrop-filter: blur(8px);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.stat {
    padding: 0.25rem 0;
}

.label {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.amount-large {
    margin: 0.35rem 0 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.amount-large.accent {
    color: var(--primary);
}

.progress-wrap {
    margin-top: 1.75rem;
    height: 10px;
    background: #eef2f6;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #2dd4bf);
    border-radius: 999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 2%;
}

.progress-glow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.8);
}

.progress-caption {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.progress-caption strong {
    color: var(--text);
}

/* Story section */
.story-card {
    margin-bottom: 1.25rem;
}

.story-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.story-image {
    margin: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.story-image img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.story-image figcaption {
    padding: 0.6rem 0.85rem;
    font-size: 0.78rem;
    color: var(--muted);
    background: #fafafa;
    text-align: center;
}

.story-text h2 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.story-text p {
    margin: 0;
    color: #334155;
    font-size: 1.02rem;
}

.meta-chips {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.meta-chips li {
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #92400e;
}

.meta-chips li span {
    font-weight: 500;
    color: #b45309;
    margin-right: 0.35rem;
}

/* Grid layout */
.grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
}

.card h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card-intro {
    margin: 0.4rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Donation form */
.donate-form label {
    display: block;
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.optional {
    font-weight: 400;
    color: var(--muted);
}

.donate-form input,
.donate-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.donate-form input:focus,
.donate-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.preset {
    border: 1.5px solid var(--border);
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text);
}

.preset:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preset.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.checkbox {
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500 !important;
    cursor: pointer;
    margin-top: 1.25rem !important;
}

.checkbox input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.95rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #21468b, #1e3a6e);
    box-shadow: 0 4px 14px rgba(33, 70, 139, 0.35);
}

.checkout-steps {
    text-align: left;
    margin: 1.5rem 0 0;
    padding-left: 1.25rem;
}

.checkout-steps li {
    margin-bottom: 1.5rem;
}

.checkout-steps p {
    margin: 0 0 0.75rem;
}

.rabobank-checkout {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.rabobank-checkout h2 {
    margin-top: 0;
}

.thanks-check {
    margin: 0 auto 1.25rem;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.redirect-countdown {
    margin: 1.5rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.rabobank-checkout .btn-primary {
    width: auto;
    display: inline-flex;
}

/* Donation list */
.donation-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
}

.donation-list li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.donation-list li:last-child {
    border-bottom: none;
}

.donor-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-soft), #fde68a);
    color: #92400e;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donor-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.donor-info strong {
    font-size: 0.95rem;
}

.donor-info small {
    color: var(--muted);
    font-size: 0.78rem;
}

.donor-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}

.empty-state {
    color: var(--muted);
    margin: 1.25rem 0 0;
    font-size: 0.95rem;
}

/* Flash messages */
.flash-list {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.flash-error {
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
}

.flash-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.admin-settings {
    margin-bottom: 1.25rem;
}

.admin-form label {
    display: block;
    margin: 1rem 0 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="number"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fafbfc;
}

.payment-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
}

.toggle-option:has(input:checked) {
    border-color: var(--primary);
    background: #f0fdfa;
    color: var(--primary-dark);
}

.admin-hint {
    margin: 0.75rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.admin-form-wide {
    grid-column: 1 / -1;
}

@media (max-width: 700px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

.pending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.pending-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fafbfc;
}

.pending-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
}

.pending-info span {
    color: var(--muted);
    font-size: 0.9rem;
}

.pending-info small {
    color: var(--muted);
    font-size: 0.85rem;
}

.pending-confirm-form,
.pending-confirm-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pending-confirm-form input,
.pending-confirm-inline input {
    width: 110px;
    padding: 0.5rem 0.65rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
}

.btn-confirm {
    width: auto;
    margin-top: 0;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}

.btn-confirm-small {
    border: none;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.btn-delete-small {
    border: none;
    background: #b91c1c;
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-delete-small:hover {
    background: #991b1b;
}

.thanks-card {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

.thanks-card .btn-primary {
    width: auto;
    min-width: 220px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-top: 1rem;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.site-footer {
    padding: 1.5rem 0 2.5rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 800px) {
    .site-hero {
        min-height: 280px;
    }

    .hero-content h1 {
        max-width: none;
    }

    .grid,
    .stats-row,
    .story-layout {
        grid-template-columns: 1fr;
    }

    .story-image img {
        height: 200px;
    }

    .main-content {
        margin-top: -1.5rem;
    }
}
