/* CTA Buttons */
.cta-btn {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.cta-btn-secondary:hover {
    background: rgba(107, 70, 193, 0.1);
}

/* About Grid & Stats */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-num {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        flex-direction: row;
    }

    .stat-card {
        flex: 1;
    }
}

/* Policy Grid */
.policy-requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.policy-box {
    padding: 1.5rem;
    background: var(--color-cream);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.policy-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
}

.policy-box p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* Requirements List */
.requirements-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.requirements-list li {
    padding: 1rem 1.5rem;
    background: var(--color-warm-white);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--shadow-sm);
}

.requirements-list strong {
    color: var(--color-text);
    display: block;
    margin-bottom: 0.25rem;
}

/* Scripture Callout */
.scripture-callout {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    border-left: 6px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.scripture-callout p {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-style: italic;
}

.scripture-callout cite {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-style: normal;
}

/* How It Works Steps */
.how-it-works {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.step {
    text-align: center;
    padding: 1rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.step h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.step p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

@media (max-width: 600px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* Gallery & Cards */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 1.25rem;
}

.card-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
}

.card-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 0.5rem;
}

.card-tagline {
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Funding Meter */
.funding-meter {
    margin: 0.5rem 0 0.75rem;
}

.funding-meter.compact .funding-meta {
    font-size: 0.75rem;
}

.funding-bar {
    height: 6px;
    background: var(--color-border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.funding-fill {
    height: 100%;
    background: var(--color-accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.funding-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.funding-sponsors {
    display: block;
    margin-top: 0.15rem;
}

/* Badges */
.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.need-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.need-badge.bills {
    background: #fed7d7;
    color: var(--color-bills);
}

.need-badge.equipment {
    background: #bee3f8;
    color: var(--color-equipment);
}

.need-badge.kids {
    background: #c6f6d5;
    color: var(--color-kids);
}

.need-badge.medical {
    background: #feebc8;
    color: #b7791f;
}

.need-badge.other {
    background: #e2e8f0;
    color: var(--color-other);
}

.need-badge.monthly {
    background: #e9d8fd;
    color: var(--color-primary);
}

.need-badge.short-term {
    background: #e0fbff;
    color: #007c89;
}

.need-badge.long-term {
    background: #e0e7ff;
    color: #4338ca;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin: 1rem auto 0;
    max-width: 600px;
    border-bottom: 2px solid var(--color-border);
}

.tab-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--color-primary);
    background: rgba(107, 70, 193, 0.05);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

@media (max-width: 600px) {
    .tabs {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }

    .tab-btn {
        border-bottom: 1px solid var(--color-border);
        border-left: 3px solid transparent;
        margin-bottom: 0;
        text-align: left;
    }

    .tab-btn.active {
        border-bottom-color: var(--color-border);
        border-left-color: var(--color-primary);
        background: rgba(107, 70, 193, 0.05);
    }
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.form-section {
    margin-top: 1.5rem;
    padding: 1rem 1rem;
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.sponsor-form {
    max-width: 600px;
    margin: 1rem auto 0;
}

.form-grid {
    display: block;
}

@media (min-width: 640px) {
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1.5rem;
    }
}

.form-row {
    margin-bottom: 1rem;
}

.form-row label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--color-accent-light);
}

.form-fallback {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.form-fallback a {
    color: var(--color-primary);
    text-decoration: none;
}

.donate-disclaimer {
    max-width: 560px;
    margin: 0 auto 1rem;
    padding: 1rem 1.25rem;
    background: #edf2f7;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(45, 55, 72, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--color-warm-white);
    border-radius: var(--radius-lg);
    max-width: 580px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.is-open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: white;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f7fafc;
    transform: rotate(90deg);
}

#modal-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#modal-body .modal-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

#modal-body .modal-name {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--color-primary);
}

#modal-body .modal-meta {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin: 0 0 1rem;
}

#modal-body .modal-bio {
    margin: 0 0 1rem;
    line-height: 1.7;
    max-width: 480px;
}

#modal-body .modal-needs-title {
    font-weight: 600;
    margin: 0 0 1rem;
    font-size: 1.1rem;
    align-self: flex-start;
    width: 100%;
    text-align: left;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
}

#modal-body .modal-needs {
    width: 100%;
    margin-bottom: 1rem;
}

#modal-body .need-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
    text-align: left;
}

#modal-body .need-item:last-child {
    border-bottom: none;
}

#modal-body .need-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: #edf2f7;
    margin-right: 0.75rem;
}

#modal-body .need-cat.bills {
    color: var(--color-bills);
    background: #fed7d7;
}

#modal-body .need-cat.equipment {
    color: var(--color-equipment);
    background: #bee3f8;
}

#modal-body .need-cat.kids {
    color: var(--color-kids);
    background: #c6f6d5;
}

#modal-body .need-cat.medical {
    color: #b7791f;
    background: #feebc8;
}

#modal-body .need-cat.other {
    color: var(--color-other);
    background: #e2e8f0;
}

#modal-body .help-cta {
    display: inline-block;
    margin-top: 1rem;
    padding: 1rem 2rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s;
    width: 100%;
}

#modal-body .help-cta:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#modal-body .modal-monthly {
    margin: 0 0 1.5rem;
    padding: 0.875rem 1.25rem;
    background: #e9d8fd;
    border-radius: var(--radius);
    font-size: 0.95rem;
    color: var(--color-primary);
    width: 100%;
}

/* Modal Goals */
.modal-goals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.goal-box {
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: left;
}

.goal-box.short-term {
    background: #e0fbff;
    border: 1px solid #b2ebf2;
}

.goal-box.long-term {
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
}

.goal-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.goal-box.short-term .goal-label {
    color: #007c89;
}

.goal-box.long-term .goal-label {
    color: #4338ca;
}

.goal-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

@media (max-width: 480px) {
    .modal-goals-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility / Feedback */
.error-msg {
    text-align: center;
    padding: 2rem;
    color: var(--color-bills);
    background: #fed7d7;
    border-radius: var(--radius);
}

.success-msg {
    text-align: center;
    padding: 2rem;
    color: var(--color-kids);
    background: #c6f6d5;
    border-radius: var(--radius);
    margin-top: 1rem;
}

/* Back Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
}

.nav a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.nav a:hover {
    opacity: 0.7;
}