/* --- VARIABLES & BASE STYLES --- */
:root {
    /* CLG Logo Colors */
    --clg-dark-blue: #0A2240; /* From "CLG" text */
    --clg-red: #D21A20;       /* From "legitgov.org" and underscore */
    --clg-light-blue: #3E6492; /* Derived from logo, for subtle accents */
    --clg-grey: #68798A;      /* Derived from logo, for secondary text */

    /* General UI Colors */
    --color-primary: var(--clg-dark-blue);
    --color-accent: var(--clg-red);
    --color-accent-dark: #b81519; /* Slightly darker red for hover */
    --color-text: var(--clg-dark-blue);
    --color-text-light: var(--clg-grey);
    --color-heading: var(--clg-dark-blue);
    --color-background: #f8f9fa; /* Light background */
    --color-surface: #ffffff;    /* Card backgrounds */
    --color-border: #e0e6ed;     /* Soft borders */
    --color-paypal: #0070ba;     /* PayPal brand blue */
    --color-paypal-dark: #005ea6;

    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Roboto Slab', serif;
    --border-radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    margin-bottom: 0.75em;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; font-weight: 700;}
h2 { font-size: 2.2rem; font-weight: 700;}
h3 { font-size: 1.4rem; color: var(--color-primary); font-weight: 600;}
p { margin-bottom: 1rem; }

.lead-text {
    font-size: 1.25rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px; /* Space for the underline */
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-accent { /* Used for the main CTA button */
    background-color: var(--color-accent);
    color: var(--color-surface);
}
.btn-accent:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-paypal {
    background-color: var(--color-paypal);
    color: var(--color-surface);
    width: 100%;
    margin-top: 1rem;
}
.btn-paypal:hover {
    background-color: var(--color-paypal-dark);
}

/* --- HEADER --- */
.main-header {
    background-color: var(--color-surface);
    padding: 10px 0; /* Reduced padding */
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-logo { 
    max-height: 60px; /* Constrains the logo size */
    width: auto;
}

.main-nav a {
    color: var(--clg-grey);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 600;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(135deg, #e9f5ff, #fdfefe); /* Lighter blue gradient */
    padding: 80px 0;
    text-align: center;
}

/* --- WHY DONATE SECTION --- */
.why-donate {
    padding: 60px 0;
    background-color: #f1f6fd; /* Subtle light blue background */
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.impact-card {
    background: var(--color-surface);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--clg-light-blue); /* Consistent light blue top border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.impact-card h3 { color: var(--color-heading); }
.impact-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--clg-red); } /* Red icon */

/* --- DONATION METHODS SECTION --- */
.donation-methods { padding: 60px 0; }

.payment-methods-stack { /* New container for stacked cards */
    display: flex;
    flex-direction: column;
    gap: 30px; /* Space between stacked cards */
    margin-top: 40px;
}

.payment-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    border-top: 5px solid var(--color-accent); /* Stronger accent border for donation cards */
}

/* --- DONATION TOGGLE --- */
.donation-type-toggle {
    display: flex;
    background-color: #e9ecef; /* Light gray background for toggle */
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    padding: 5px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--clg-grey);
    background-color: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background-color: var(--color-surface);
    color: var(--color-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.donation-content { display: none; text-align: center; }
.donation-content.active { display: block; }

.paypal-footer {
    margin-top: auto; /* Pushes to the bottom of the card */
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center; /* Center PayPal images */
}

.paypal-info { font-size: 0.9em; color: var(--clg-grey); margin-bottom: 10px; }
.paypal-acceptance img { max-width: 150px; margin-top: 10px; display: inline-block;}


/* --- OTHER PAYMENT CARDS --- */
.digital-methods-list {
    list-style: none;
    margin-top: 1rem;
}

.digital-methods-list li {
    background-color: #f8f9fa;
    border-left: 4px solid var(--clg-light-blue); /* Subtle blue accent */
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
}

.method-label { font-weight: 600; color: var(--color-primary); }
.method-handle { font-family: monospace; background-color: #e9ecef; padding: 4px 8px; border-radius: 4px; color: var(--clg-dark-blue); }
.email-link { color: var(--clg-light-blue); text-decoration: none; font-weight: 600; }
.email-link:hover { text-decoration: underline; }

.mailing-address {
    background-color: #f8f9fa;
    border: 1px dashed var(--color-border);
    padding: 20px;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    font-style: normal;
    font-size: 1.1em;
    line-height: 1.8;
}

.digital-note, .mailing-note { font-size: 0.9em; color: var(--clg-grey); margin-top: 1rem; }

/* --- TAX INFO & FOOTER --- */
.tax-info {
    margin-top: 40px;
    padding: 20px;
    background-color: #fff3cd; /* Light warning yellow */
    border-left: 5px solid #ffc107; /* Orange warning accent */
    border-radius: var(--border-radius);
    color: #856404;
}

.main-footer {
    background-color: var(--clg-dark-blue); /* Dark blue from logo */
    color: #ced4da;
    padding: 30px 0;
    font-size: 0.9em;
    margin-top: 40px;
    border-top: 5px solid var(--color-accent); /* Red accent line */
}
.main-footer p { margin-bottom: 5px; }
.main-footer a { color: #f8f9fa; text-decoration: none; transition: color 0.3s ease; }
.main-footer a:hover { color: var(--clg-light-blue); text-decoration: underline; }
.last-updated { font-size: 0.9em; color: #aebecf; margin-top: 5px; }


/* --- CUSTOM SLIDER --- */
.custom-slider-container {
    position: relative;
    width: 100%;
    margin: 30px auto 20px auto;
    height: 24px; /* Matches thumb height for easier alignment */
    display: flex;
    align-items: center;
}

.slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0; 
    right: 0;
    height: 6px;
    background-color: #dee2e6;
    border-radius: 3px;
    z-index: 1;
    pointer-events: none; /* Allows clicks to go through to the input */
    overflow: hidden; /* Ensures fill stays within the track */
}

.slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0; /* JS will update this */
    background-color: var(--color-accent);
    border-radius: 3px;
    transition: width 0.1s linear; /* Smooth fill transition */
}

.custom-donation-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    background: transparent;
    outline: none;
    position: relative;
    z-index: 2;
    margin: 0;
}

/* THUMB (HANDLE) */
.custom-donation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: grab;
    border: 4px solid var(--color-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    margin-top: -9px; /* (Thumb height - Track height) / 2 */
}
.custom-donation-slider::-webkit-slider-thumb:active { cursor: grabbing; }
.custom-donation-slider:hover::-webkit-slider-thumb { background: var(--color-accent-dark); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.custom-donation-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-accent);
    cursor: grab;
    border: 4px solid var(--color-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.custom-donation-slider::-moz-range-thumb:active { cursor: grabbing; }
.custom-donation-slider:hover::-moz-range-thumb { background: var(--color-accent-dark); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

.slider-value-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-heading);
    margin-bottom: 1rem;
}

.slider-value-display span {
    color: var(--color-accent);
}


/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .header-content { flex-direction: column; text-align: center; gap: 10px; padding-bottom: 10px;}
    .main-nav { margin-top: 10px; }
    .main-nav a { margin: 0 10px; }

    .payment-methods-stack { gap: 20px; }
    
    .digital-methods-list li { flex-direction: column; align-items: flex-start; gap: 5px; }
}

@media (max-width: 480px) {
    .main-logo { max-height: 50px; }
    .hero-section { padding: 40px 0; }
    .lead-text { font-size: 1rem; }
    .payment-card { padding: 20px; }
}