/* Foundation Page Styles */

/* Layout */
.foundation-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-3xl) var(--space-xl);
}

.foundation-content {
    display: grid;
    grid-template-columns: 1fr 520px;
    gap: var(--space-3xl);
    align-items: start;
}

/* Foundation Hero with Video */
.foundation-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.foundation-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.foundation-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.foundation-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Foundation Header (for non-video headers) */
.foundation-header {
    padding: var(--space-3xl) 0;
    color: white;
    text-align: center;
}

.foundation-header h1 {
    color: white;
    margin-bottom: var(--space-md);
    font-size: 2.5rem;
}

.foundation-header p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.foundation-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    font-weight: 500;
}

/* Impact Statistics */
.impact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.impact-stat {
    text-align: center;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
}

.impact-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-sm);
}

.impact-label {
    color: var(--color-neutral-700);
    font-weight: 500;
}

/* Donation Box - New Design */
.donation-box {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 20px;
    padding: var(--space-2xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
    border: 3px solid;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05); }
    50% { box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2), 0 0 30px rgba(var(--glow-color), 0.3); }
}

.donation-box h3 {
    font-size: 1.75rem;
    margin-bottom: var(--space-sm);
    font-weight: 800;
}

.donation-box-subtitle {
    color: var(--color-neutral-600);
    margin-bottom: var(--space-xl);
    font-size: 0.95rem;
}

/* Amount Selection */
.donation-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.amount-btn {
    padding: var(--space-lg) var(--space-md);
    border: 2px solid var(--color-neutral-300);
    border-radius: 12px;
    background: white;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.amount-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.amount-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.amount-btn:hover::before {
    opacity: 1;
}

.amount-btn.selected {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Custom Amount */
.custom-amount-wrapper {
    margin-bottom: var(--space-xl);
}

.custom-amount-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-neutral-700);
}

.custom-amount {
    width: 100%;
    padding: var(--space-lg);
    border: 2px solid var(--color-neutral-300);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    background: white;
}

.custom-amount:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Toggle Switches */
.donation-options {
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-neutral-50);
    border-radius: 12px;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-neutral-200);
}

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

.option-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
    color: var(--color-neutral-800);
}

.option-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--color-neutral-300);
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

/* Name Input (shown when not anonymous) */
.name-input-wrapper {
    margin-top: var(--space-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.name-input-wrapper.show {
    max-height: 100px;
}

.name-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--color-neutral-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.name-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Terms Checkbox */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-neutral-50);
    border-radius: 12px;
}

.checkbox-wrapper {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-neutral-400);
    border-radius: 6px;
    background: white;
    transition: all 0.3s;
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-input:checked + .checkbox-custom::after {
    display: block;
}

.terms-label {
    font-size: 0.9rem;
    color: var(--color-neutral-700);
    line-height: 1.5;
}

.terms-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.terms-label a:hover {
    text-decoration: underline;
}

/* Donate Button */
.donate-btn {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.donate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.donate-btn:hover::before {
    left: 100%;
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

/* Security Notice */
.security-notice {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-neutral-200);
    text-align: center;
}

.security-notice p {
    font-size: 0.85rem;
    color: var(--color-neutral-600);
}

/* Watermark for Videos and Images */
.media-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.media-watermark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 10;
    opacity: 0.7;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.media-watermark img {
    height: 35px;
    width: auto;
}

.hero-watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    opacity: 0.8;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.hero-watermark img {
    height: 45px;
    width: auto;
}

/* Media Gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.media-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.media-item img,
.media-item video {
    width: 100%;
    height: auto;
    display: block;
}

.media-caption {
    padding: var(--space-md);
    background: var(--color-neutral-50);
    font-size: 0.9rem;
    color: var(--color-neutral-700);
}

/* Responsive */
@media (max-width: 1024px) {
    .foundation-content {
        grid-template-columns: 1fr;
    }

    .donation-box {
        position: relative;
        top: 0;
        margin-top: var(--space-2xl);
    }

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

@media (max-width: 640px) {
    .donation-amounts {
        grid-template-columns: 1fr;
    }

    .foundation-header h1,
    .foundation-hero-content h1 {
        font-size: 2rem;
    }

    .donation-box {
        padding: var(--space-xl);
    }

    .foundation-hero {
        min-height: 350px;
    }

    .media-gallery {
        grid-template-columns: 1fr;
    }

    .media-watermark img {
        height: 25px;
    }

    .hero-watermark img {
        height: 35px;
    }
}

/* ========================================
   PayForAid Package Specific Styles
   ======================================== */

/* Foundation Badge */
.foundation-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.foundation-badge img {
    width: 24px;
    height: 24px;
}

.foundation-badge span {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

/* Hero Content Enhanced */
.foundation-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: var(--space-lg);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.foundation-hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Lead Text */
.lead-text {
    font-size: 1.15rem;
    color: var(--color-neutral-700);
    line-height: 1.8;
    margin-bottom: var(--space-xl);
    font-weight: 500;
}

/* Content Highlight Box */
.content-highlight {
    padding: var(--space-xl);
    border-left: 4px solid;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: var(--space-xl) 0;
}

.content-highlight h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--color-neutral-800);
}

/* Impact List */
.impact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.impact-list li {
    position: relative;
    padding-left: 28px;
    padding-bottom: var(--space-sm);
    color: var(--color-neutral-700);
    line-height: 1.6;
}

.impact-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Emotional Text */
.emotional-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-neutral-600);
    line-height: 1.8;
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-neutral-200);
}

/* Partners Section */
.partners-section {
    background: var(--color-neutral-50);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin: var(--space-2xl) 0;
    text-align: center;
}

.partners-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-neutral-800);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.partners-section p {
    color: var(--color-neutral-600);
    margin-bottom: var(--space-md);
    font-size: 0.95rem;
}

.partners-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* Security Notice Enhanced */
.security-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-neutral-200);
}

.security-notice svg {
    color: var(--color-neutral-400);
    flex-shrink: 0;
}

/* Donate Button Enhanced */
.donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Impact Grid Enhanced */
.impact-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .impact-number {
        font-size: 1.75rem;
    }

    .foundation-hero-content h1 {
        font-size: 2.25rem;
    }

    .foundation-hero-content p {
        font-size: 1rem;
    }

    .lead-text {
        font-size: 1rem;
    }
}
