/* Donation Page Styles - Matching Reference Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --teal: #20a39e;
    --teal-hover: #1a8a86;
    --dark: #2c1a0e;
    --accent-warm: #c4792a;
    --accent-warm-dark: #a06220;
    --card-bg: #faf8f5;
    --text-dark: #3b2a1a;
    --text-light: rgba(255, 255, 255, 0.9);
    --border-light: #e8ddd0;
}

body {
    font-family: 'Inter', 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* #4 - Visible focus ring for keyboard users */
:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}
/* Remove outline only for mouse clicks, keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* Page Wrapper with Background */
.page-wrapper {
    min-height: 100vh;
    background-color: var(--dark);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    flex-direction: column;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

/* Navigation */
.navbar {
    position: relative;
    z-index: 10;
    padding: 20px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-campaign-title,
.nav-campaign-title:hover,
.nav-campaign-title:visited,
.nav-campaign-title:active {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #fcfcfc;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--teal);
}

.nav-donate {
    background: var(--teal);
    padding: 10px 24px;
    border-radius: 4px;
}

.nav-donate:hover {
    background: var(--teal-hover);
    color: white !important;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    z-index: 10;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-text h1 {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tagline {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.9;
}

/* Donation Card */
.donation-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.card-step {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #a09080;
    margin-bottom: 24px;
    text-transform: uppercase;
}

/* Frequency Toggle */
.frequency-toggle {
    display: flex;
    background: #ede6dc;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}

.freq-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    color: #8a7a6a;
}

.freq-btn.active {
    background: var(--teal);
    color: white;
}

.monthly-options {
    margin: -10px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.installment-label {
    font-size: 13px;
    font-weight: 600;
    color: #8a7a6a;
    white-space: nowrap;
}

.installment-select {
    padding: 8px 12px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.installment-select:focus {
    border-color: var(--teal);
}

/* Amount Grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.amount-btn {
    padding: 16px;
    border: 2px solid var(--border-light);
    background: #fff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

.amount-btn:hover {
    border-color: var(--teal);
}

.amount-btn.active {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

/* Custom Amount */
.custom-amount {
    position: relative;
    margin-bottom: 24px;
}

.custom-amount .currency {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #a09080;
}

.custom-amount input {
    width: 100%;
    padding: 16px 16px 16px 40px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.3s;
}

.custom-amount input:focus {
    border-color: var(--teal);
}

.custom-amount input::placeholder {
    font-weight: 400;
    color: #b5a898;
}

/* Payment Buttons */
.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 16px;
}

.pay-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pay-stripe {
    background: var(--teal);
    color: white;
}

.pay-stripe:hover {
    background: var(--teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 163, 158, 0.3);
}

.pay-stripe:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#paypal-button-container {
    min-height: 45px;
}

/* Secure Badge */
.secure-badge {
    text-align: center;
    font-size: 12px;
    color: #a09080;
    margin-top: 16px;
}

/* Footer */
.footer {
    position: relative;
    z-index: 10;
    padding: 24px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 900px) {
    .page-wrapper {
        background-attachment: scroll;
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .donation-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .campaign-nav .nav-container {
        padding: 0 16px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-campaign-title {
        font-size: 11px;
        letter-spacing: 1px;
        text-align: center;
    }

    .nav-donate-btn {
        padding: 8px 18px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .amount-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-bottom: 10px;
    }

    .amount-btn {
        padding: 12px 4px;
        font-size: 14px;
    }

    .custom-amount {
        margin-bottom: 14px;
    }

    .raffle-nudge {
        padding: 10px 14px;
        margin-top: 8px;
    }

    .raffle-nudge .nudge-text {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .raffle-ticket-summary {
        padding: 10px 14px;
    }

    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Payment Step Form */
.payment-step.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-step .form-group {
    margin-bottom: 20px;
}

.payment-step label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.payment-step input[type="text"],
.payment-step input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.payment-step input:focus {
    border-color: var(--teal);
}

#payment-element {
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: white;
    overflow: hidden;
    min-width: 0;
}

/* Payment Message */
.payment-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.payment-message.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

.payment-message.success {
    background: #d1fae5;
    color: #059669;
    border: 1px solid #6ee7b7;
}

/* Back Button */
.back-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #8a7a6a;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

#submit-payment {
    position: relative;
}

#submit-payment:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Embed Mode - for iframe usage */
/* Common embed styles */
body.embed-mode .page-wrapper {
    min-height: auto;
}

body.embed-mode .hero {
    padding: 20px 0;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.embed-mode .hero-content {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    gap: 0;
}

body.embed-mode .hero-text {
    display: none;
    /* Hide hero text in embed mode */
}

body.embed-mode .donation-card {
    margin: 0 auto !important;
    /* Force centering in all embeds */
    width: 100%;
    max-width: 480px;
    display: block;
}

body.embed-mode .secure-badge {
    text-align: center;
    margin-top: 16px;
}

/* Embed Minimal (embed=1) - Clean white background */
body.embed-minimal {
    background: #fff;
}

body.embed-minimal .page-wrapper {
    background: transparent !important;
    padding: 0;
}

body.embed-minimal .donation-card {
    box-shadow: none;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

/* Embed Styled (embed=2) - Keeps background */
body.embed-styled .page-wrapper {
    padding: 20px;
}

body.embed-styled .donation-card {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}


/* ========================================
   CAMPAIGN PAGE STYLES
   ======================================== */

/* Campaign Page Body */
body.campaign-page {
    background: #f7f3ee;
}

/* Campaign Error */
.campaign-error {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #2c1a0e 0%, #3d2415 100%);
}

.campaign-error .error-content {
    text-align: center;
    color: white;
}

.campaign-error h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.campaign-error p {
    opacity: 0.8;
    margin-bottom: 32px;
}

.campaign-error .btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--teal);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s;
}

.campaign-error .btn-primary:hover {
    background: var(--teal-hover);
    transform: translateY(-2px);
}

/* Campaign Hero */
.campaign-hero {
    min-height: 500px;
    background: linear-gradient(135deg, #8b3a12 0%, #a04a1a 50%, #c46a20 100%);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.campaign-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

/* Campaign Navigation */
.campaign-nav {
    position: relative;
    z-index: 10;
    padding: 20px 0;
}

.campaign-nav .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 60px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-donate-btn {
    background: var(--teal);
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.nav-donate-btn:hover {
    background: var(--teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 163, 158, 0.4);
}

/* Campaign Hero Content */
.campaign-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 24px 60px;
    position: relative;
    z-index: 10;
    color: white;
}

.campaign-title-section {
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 40px;
    border-radius: 24px;
    max-width: 800px;
}

/* Two-column hero text layout */
.hero-two-col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(40px, 6vw, 100px);
    width: 100%;
    max-width: 1400px;
    padding: 60px clamp(24px, 4vw, 60px);
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 24px;
}
.hero-two-col-left {
    flex: 0 0 auto;
    text-align: right;
    align-self: flex-start;
}
.hero-two-col-left h1 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(7.5rem, 10vw, 13rem);
    color: #fcfcfc;
    line-height: 1;
    letter-spacing: -0.03em;
    margin: -0.3em 0 0 0;
    text-shadow: none;
}
.hero-two-col-right {
    flex: 0 0 auto;
    text-align: right;
}
.hero-two-col-line {
    font-family: 'Merriweather', serif;
    font-weight: 300;
    font-size: clamp(1.3rem, 1.7vw, 1.55rem);
    color: #fcfcfc;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.1;
    white-space: nowrap;
    padding: 0.15em 0;
}
.hero-two-col-line strong {
    font-weight: 900;
    color: #fcfcfc;
    letter-spacing: 0.1em;
}

@media (max-width: 1024px) {
    .hero-two-col {
        flex-direction: column;
        text-align: center;
        gap: 28px;
        padding: 50px 5vw;
    }
    .hero-two-col-left {
        align-self: center;
        text-align: center;
    }
    .hero-two-col-left h1 {
        font-size: clamp(4rem, 13vw, 6rem);
        margin: 0;
    }
    .hero-two-col-right {
        text-align: center;
        padding-top: 0;
    }
    .hero-two-col-line {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        letter-spacing: 0.1em;
        line-height: 1.1;
        padding: 0.2em 0;
    }
}
@media (max-width: 480px) {
    .hero-two-col-left h1 {
        font-size: clamp(2.6rem, 12vw, 3.8rem);
    }
    .hero-two-col-line {
        font-size: clamp(0.75rem, 3vw, 1rem);
        letter-spacing: 0.12em;
        line-height: 1.9;
    }
}

.campaign-status-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.campaign-match-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-warm) 0%, #d4652a 100%);
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.campaign-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.campaign-match-message {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #fff;
    margin-top: 10px;
    opacity: 1;
}

.campaign-match-message .currency-symbol {
    font-weight: 800;
    color: #fff;
}

/* Matchers Section */
.matchers-section {
    width: fit-content;
    margin: 0 auto;
    max-width: 95%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px 30px 30px;
    border-radius: 20px;
}

.matchers-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.matchers-slider {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
}

.matcher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.matcher-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--accent-warm));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s;
}

.matcher-avatar:hover {
    transform: scale(1.1);
}

.matcher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.matcher-initials {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.matcher-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
}

.matcher-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Campaign Content Layout */
.campaign-content {
    max-width: 1200px;
    margin: -60px auto 60px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    position: relative;
    z-index: 20;
}

/* Progress Card */
.campaign-progress-card {
    grid-column: 1;
    align-self: start;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(44, 26, 14, 0.08);
}

/* Campaign Main Content */
.campaign-main {
    grid-column: 1;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
}

.progress-raised {
    display: flex;
    flex-direction: column;
}

.progress-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--teal);
    line-height: 1;
}

.progress-label {
    font-size: 14px;
    color: #8a7a6a;
    margin-top: 4px;
}

.progress-donors {
    text-align: right;
}

.donor-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.donor-label {
    font-size: 14px;
    color: #8a7a6a;
    display: block;
}

.progress-bar-container {
    position: relative;
    height: 24px;
    background: #e8e0d6;
    border-radius: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--accent-warm));
    border-radius: 12px;
    transition: width 1s ease-out;
    min-width: 40px;
}

.progress-percent {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 700;
    color: #8a7a6a;
}

/* Campaign Description */
.campaign-description {
    background: transparent;
    border-radius: 0;
    padding: 32px 8px;
    box-shadow: none;
    border-top: 2px solid var(--border-light);
}

.campaign-description h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--text-dark);
}

/* Override Google Docs inline styles */
.description-content,
.description-content * {
    font-family: 'Merriweather', serif !important;
    color: #5a4a3a !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background-color: transparent !important;
    white-space: normal !important;
}

.description-content {
    line-height: 1.9;
    font-size: 16px;
    letter-spacing: 0.01em;
}

.description-content.description-collapsed {
    max-height: 420px;
    overflow: hidden;
    position: relative;
}

.description-content.description-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.description-toggle {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    background: none;
    border: none;
    color: var(--teal);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.description-toggle:hover {
    color: var(--teal-hover);
}

.description-content p {
    margin: 0 0 18px 0;
    font-size: 16px !important;
}

.description-content strong,
.description-content span[style*="font-weight:700"],
.description-content span[style*="font-weight: 700"] {
    font-family: 'Playfair Display', serif !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    color: var(--text-dark) !important;
    display: block;
    margin-top: 28px;
    margin-bottom: 4px;
}

.description-content em,
.description-content span[style*="font-style:italic"],
.description-content span[style*="font-style: italic"] {
    font-style: italic !important;
    color: #7a6550 !important;
}

.description-content ul {
    padding-left: 24px !important;
    margin: 12px 0 20px !important;
}

.description-content li {
    margin-bottom: 8px;
    padding-left: 4px;
}

.description-content li p {
    margin: 0 0 4px 0;
}

.matching-explanation {
    background: linear-gradient(135deg, #faf5ef 0%, #f5efe6 100%);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    border-left: 4px solid var(--accent-warm);
}

.matching-explanation h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--accent-warm);
}

.matching-explanation p {
    margin: 0;
    font-size: 14px;
}

/* Campaign Sidebar / Donation Card */
.campaign-sidebar {
    grid-column: 2;
    grid-row: 1 / 3;
    position: sticky;
    top: 24px;
    align-self: start;
}

.campaign-donation-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(44, 26, 14, 0.1);
}

.campaign-ended-notice {
    text-align: center;
    padding: 40px 20px;
}

.ended-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.campaign-ended-notice p {
    color: #8a7a6a;
    font-size: 14px;
}

/* Matching Display */
.matching-display {
    background: linear-gradient(135deg, #f5f9f8 0%, #eef7f6 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 2px solid rgba(32, 163, 158, 0.2);
}

.your-donation {
    font-size: 14px;
    color: #8a7a6a;
    margin-bottom: 8px;
}

.your-donation span {
    font-weight: 700;
    color: var(--text-dark);
}

.org-receives {
    font-size: 16px;
    color: var(--teal);
}

.org-receives .sparkle {
    margin-right: 4px;
}

.org-receives span {
    font-size: 1.4rem;
    color: var(--teal);
}

/* Campaign Footer */
.campaign-footer {
    background: var(--dark);
    padding: 32px 24px;
}

.campaign-footer .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 240, 220, 0.8);
    font-size: 14px;
}

.campaign-footer .footer-links {
    display: flex;
    gap: 24px;
}

.campaign-footer .footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.campaign-footer .footer-links a:hover {
    color: white;
}

/* Campaign Responsive */
@media (max-width: 1080px) {
    .campaign-content {
        display: flex;
        flex-direction: column;
        margin-top: -40px;
        gap: 24px;
    }

    .campaign-progress-card {
        order: -2;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .campaign-sidebar {
        order: -1;
        position: static;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        box-sizing: border-box;
    }


    .campaign-hero {
        min-height: 400px;
    }

    .campaign-title {
        font-size: 2rem;
    }

    .campaign-match-message {
        font-size: 1rem;
    }

    .matchers-slider {
        gap: 16px;
    }

    .matcher-card {
        min-width: 80px;
    }

    .matcher-avatar {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .campaign-hero-content {
        padding: 24px 16px 40px;
    }

    .campaign-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }

    .progress-amount {
        font-size: 1.8rem;
    }

    .campaign-progress-card,
    .campaign-donation-card {
        padding: 24px;
        border-radius: 12px;
    }
    .campaign-description {
        padding: 24px 4px;
    }

    .campaign-footer .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ========================================
   CAMPAIGN TABS STYLES
   ======================================== */

/* Tab Navigation */
.campaign-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #9a8a7a;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.tab-btn:hover {
    color: var(--teal);
}

.tab-btn.active {
    color: var(--teal);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--teal);
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* Donations List */
.donations-list {
    padding: 20px 0;
}

.donation-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #ece4da;
}

.donation-item:last-child {
    border-bottom: none;
}

.donation-info {
    flex: 1;
}

.donor-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.donation-message {
    margin-top: 6px;
    font-size: 13px;
    color: #8a7a6a;
    font-style: italic;
    line-height: 1.4;
}

.donation-amount {
    font-weight: 700;
    font-size: 16px;
    color: var(--teal);
}

.no-donations {
    padding: 40px 20px;
    text-align: center;
    color: #9a8a7a;
}

/* Form Textarea */
.payment-step textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
    min-height: 60px;
}

.payment-step textarea:focus {
    border-color: var(--teal);
}

/* Checkbox Group */
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #6a5a4a;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
}

/* Form Hint */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9a8a7a;
}

/* PayArc Card Form */
.payarc-form {
    margin-bottom: 20px;
}

.payarc-form .form-group {
    margin-bottom: 16px;
}

.payarc-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.payarc-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.payarc-form input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(32, 163, 158, 0.1);
}

.payarc-form input::placeholder {
    color: #b5a898;
}

/* Form Row - Split Layout */
.form-row {
    display: flex;
    gap: 12px;
}

.form-group.half {
    flex: 1;
}

/* Card input icon styling */
.payarc-form #card-number {
    padding-left: 16px;
    letter-spacing: 2px;
}

/* Integrated Campaign Countdown Styles */
.campaign-countdown-integrated {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ece4da;
    text-align: center;
}

.campaign-countdown-integrated .countdown-timer {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 4px;
}

.campaign-countdown-integrated .timer-unit {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.campaign-countdown-integrated .timer-unit span {
    font-size: 20px;
    font-weight: 800;
    color: var(--teal);
}

.campaign-countdown-integrated .timer-unit small {
    font-size: 11px;
    font-weight: 600;
    color: #a09080;
    text-transform: lowercase;
}

.campaign-countdown-integrated .countdown-label {
    font-size: 13px;
    font-weight: 500;
    color: #8a7a6a;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .campaign-countdown-integrated .timer-unit span {
        font-size: 18px;
    }
}

/* ========================================
   RAFFLE STYLES
   ======================================== */

/* ---- Nudge Box (Yellow) ---- */
.raffle-nudge {
    background: #fffde7;
    border: 1.5px solid #ffe082;
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 14px;
    text-align: center;
    display: none;
}

.raffle-nudge .nudge-text {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #5d4e00;
    line-height: 1.4;
}

.nudge-upgrade-btn {
    background: var(--teal, #20a39e);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.02em;
}

.nudge-upgrade-btn:hover {
    background: #178a86;
    transform: translateY(-1px);
}

.nudge-upgrade-btn:active {
    transform: translateY(0);
}

/* ---- Ticket Summary (Mint) ---- */
.raffle-ticket-summary {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    border: 1.5px solid rgba(32, 163, 158, 0.25);
    border-radius: 14px;
    padding: 16px 20px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ticket-summary-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-summary-icon {
    font-size: 30px;
    line-height: 1;
}

.ticket-summary-label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 500;
    color: #4a7c79;
    line-height: 1.35;
}

.ticket-summary-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ticket-summary-count {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--teal, #20a39e);
    line-height: 1;
}

.ticket-summary-price {
    font-size: 11px;
    font-weight: 500;
    color: #7ba8a5;
    margin-top: 3px;
}

@media (max-width: 480px) {
    .raffle-ticket-summary {
        padding: 14px 16px;
    }
    .ticket-summary-count {
        font-size: 2rem;
    }
    .raffle-nudge {
        padding: 14px 16px;
    }
    .raffle-nudge .nudge-text {
        font-size: 13px;
    }
}

/* Raffle Countdown — slim banner */
.raffle-countdown-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin: 12px 0 20px;
    padding: 0;
}

.raffle-countdown-left {
    flex: 1;
    min-width: 0;
}

/* Pill badge */
.raffle-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(32, 163, 158, 0.08);
    border-radius: 20px;
    padding: 5px 14px 5px 10px;
    margin-bottom: 8px;
}

.raffle-countdown-badge .raffle-countdown-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Live pulse dot */
.live-pulse {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
}
.live-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.4);
    animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.6); opacity: 0; }
}

/* Timer — large digits */
.raffle-timer {
    display: flex;
    gap: 2px;
    align-items: center;
}

.raffle-timer .timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    text-align: center;
}

.raffle-timer .timer-unit span {
    font-family: 'Montserrat', 'SF Mono', 'Consolas', monospace;
    font-size: 42px;
    font-weight: 900;
    color: var(--teal);
    line-height: 1;
    letter-spacing: -1px;
    display: inline-block;
    min-width: 48px;
    text-align: center;
}

.raffle-timer .timer-unit small {
    font-size: 9px;
    font-weight: 600;
    color: #b5a898;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.raffle-timer .timer-sep {
    font-family: 'Montserrat', monospace;
    font-size: 28px;
    font-weight: 800;
    color: rgba(32, 163, 158, 0.25);
    line-height: 1;
    align-self: flex-start;
    margin-top: 6px;
}

/* Prize cards with white card container */
.raffle-countdown-prizes {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
}

.countdown-prize {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-prize-card {
    background: transparent;
    border: none;
    border-radius: 12px;
    padding: 0;
    transition: transform 0.25s ease;
}

.countdown-prize-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.08);
}

.countdown-prize-card img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.countdown-prize-label {
    font-size: 11px;
    font-weight: 700;
    color: #5a4a3a;
    margin-top: 6px;
    text-align: center;
    max-width: 130px;
    line-height: 1.3;
    word-wrap: break-word;
}

.countdown-prize-subline {
    font-size: 10px;
    font-weight: 500;
    color: #9a8a7a;
    text-align: center;
    max-width: 130px;
    line-height: 1.3;
    word-wrap: break-word;
    margin-top: 2px;
}

/* OR circle separator */
.countdown-prize-or {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: #f7f3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.5px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 46px;
}

/* Responsive */
/* Collapse countdown two-column when main layout goes single-column */
@media (max-width: 1080px) {
    /* -- Countdown: stack vertically -- */
    .raffle-countdown-section {
        flex-direction: column;
        gap: 16px;
        text-align: center;
        align-items: center;
        position: relative;
        z-index: 1;
        overflow: visible;
    }
    .raffle-countdown-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        position: relative;
        z-index: 2;
    }
    .raffle-timer {
        justify-content: center;
    }

    /* -- Prizes: stack vertically with OR between -- */
    .raffle-countdown-prizes {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .countdown-prize {
        width: 100%;
        align-items: center;
    }
    .countdown-prize-card {
        display: inline-block;
    }
    .countdown-prize-or {
        align-self: center;
        margin-top: 0;
    }
    .countdown-prize-label {
        max-width: 200px;
    }
    .countdown-prize-subline {
        max-width: 200px;
    }
}

/* Small mobile: tighten sizes */
@media (max-width: 600px) {
    .raffle-timer .timer-unit {
        min-width: 36px;
    }
    .raffle-timer .timer-unit span {
        font-size: 28px;
        min-width: 36px;
    }
    .raffle-timer .timer-sep {
        font-size: 18px;
        margin-top: 4px;
    }
    .countdown-prize-card img {
        width: 90px;
        height: 90px;
    }

    /* -- Nudge box -- */
    .raffle-nudge {
        margin-top: 16px;
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    .raffle-nudge .nudge-text {
        font-size: 14px;
        margin-bottom: 12px;
    }
    .nudge-upgrade-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 12px;
    }

    /* -- Ticket summary -- */
    .raffle-ticket-summary {
        margin-top: 14px;
        padding: 14px 16px;
        width: 100%;
        box-sizing: border-box;
    }
    .ticket-summary-count {
        font-size: 2rem;
    }
    .ticket-summary-label {
        font-size: 12px;
    }
    .ticket-summary-icon {
        font-size: 26px;
    }
}

/* ---- Raffle Inactive (post-raffle revert) ---- */
body.raffle-inactive .raffle-nudge,
body.raffle-inactive .raffle-ticket-summary,
body.raffle-inactive #prize-selection-step,
body.raffle-inactive .raffle-countdown-prizes {
    display: none !important;
}

body.raffle-inactive .raffle-timer {
    display: none !important;
}

body.raffle-inactive .raffle-countdown-badge .live-pulse {
    display: none !important;
}

body.raffle-inactive .raffle-countdown-section {
    justify-content: center;
}

/* ---- Winner Banner ---- */
.winner-banner {
    margin: 20px -28px -28px;
    overflow: hidden;
    background: linear-gradient(135deg, #20a39e 0%, #1a8a86 100%);
    border-radius: 0 0 16px 16px;
    padding: 10px 0;
    position: relative;
}

.winner-banner::before,
.winner-banner::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}
.winner-banner::before {
    left: 0;
    background: linear-gradient(to right, #20a39e, transparent);
}
.winner-banner::after {
    right: 0;
    background: linear-gradient(to left, #1a8a86, transparent);
}

.wb-track {
    display: flex;
    animation: wbSlide 12s linear infinite;
    width: max-content;
}

.wb-segment {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 48px;
    white-space: nowrap;
    flex-shrink: 0;
}

.wb-star {
    font-size: 14px;
    color: #fbbf24;
    flex-shrink: 0;
}

.wb-text {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
}

.wb-name {
    font-weight: 800;
    color: #fbbf24;
}

.wb-prize {
    font-weight: 700;
    font-style: italic;
}

.wb-sep {
    color: rgba(255,255,255,0.3);
    font-size: 18px;
    margin: 0 16px;
    flex-shrink: 0;
}

@keyframes wbSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.winner-banner:hover .wb-track {
    animation-play-state: paused;
}

@media (max-width: 600px) {
    .winner-banner {
        margin: 16px -24px -24px;
        border-radius: 0 0 12px 12px;
    }
    .wb-text {
        font-size: 12px;
    }
}

/* Prize Selection */
.prize-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prize-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.prize-card:hover {
    border-color: var(--teal);
}

.prize-card.active {
    border-color: var(--teal);
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    box-shadow: 0 0 0 3px rgba(32, 163, 158, 0.1);
}

.prize-card input[type="radio"] {
    display: none;
}

.prize-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ece4da;
}

.prize-card .prize-icon {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0e8de;
    border-radius: 8px;
}

.prize-card .prize-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
}

@media (max-width: 480px) {
    .raffle-ticket-display .ticket-count {
        font-size: 2rem;
    }

}

/* ========================================
   FIXED MOBILE DONATE BAR
   ======================================== */

.mobile-donate-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--card-bg);
    box-shadow: 0 -4px 20px rgba(44, 26, 14, 0.1);
    padding: 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-donate-bar.visible {
    transform: translateY(0);
}

.mobile-donate-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    gap: 16px;
}

.mobile-donate-amount {
    font-size: 13px;
    font-weight: 600;
    color: #6a5a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-donate-btn {
    flex-shrink: 0;
    background: var(--teal);
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}

.mobile-donate-btn:hover {
    background: var(--teal-hover);
}

@media (max-width: 1080px) {
    .mobile-donate-bar {
        display: block;
    }
}

@media (min-width: 1081px) {
    .mobile-donate-bar {
        display: none !important;
    }
}

/* #9 - Campaign tabs stack on narrow screens */
@media (max-width: 480px) {
    .campaign-tabs {
        flex-direction: column;
        gap: 0;
    }
    .tab-btn {
        text-align: center;
    }
}


/* #5 - Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    /* Keep winner banner scrolling regardless */
    .wb-track {
        animation-name: wbSlide !important;
        animation-duration: 12s !important;
        animation-timing-function: linear !important;
        animation-iteration-count: infinite !important;
    }
    .winner-banner:hover .wb-track {
        animation-play-state: paused !important;
    }
}