/* Stripe Donations Page Styles - Mobile Optimized Version */

/* Base Styles */
* {
    box-sizing: border-box; /* Ensure padding doesn't break mobile layouts */
}

.donations-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 60px 20px;
    margin-bottom: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.donations-hero h1 {
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    font-weight: 600;
    line-height: 1.2;
}

.donations-hero p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.donations-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px; /* Add horizontal padding for mobile */
}

.content-section {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

.content-section h2 {
    color: #1e40af;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8rem;
    line-height: 1.2;
}

.content-section h3 {
    color: #1e40af;
    margin-bottom: 10px;
    margin-top: 25px;
    line-height: 1.3;
}

.video-section {
    text-align: center;
    margin-bottom: 40px;
}

/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 20px 0;
}

.youtube-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.youtube-video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    cursor: pointer;
}

.custom-play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* Impact Statistics - Mobile Optimized */
.impact-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
    margin: 30px 0;
}

.stat-item {
    flex: 1 1 calc(33.333% - 20px);
    min-width: 0; /* Allow shrinking below content */
    padding: 20px 10px;
    border-radius: 8px;
}

.stat-item:nth-child(1) {
    background-color: #f0f7ff;
}

.stat-item:nth-child(2) {
    background-color: #f0fdf4;
}

.stat-item:nth-child(3) {
    background-color: #fef7ff;
}

.stat-item h3 {
    font-size: clamp(1.5rem, 5vw, 2rem); /* Responsive font size */
    margin: 0;
    color: #1e40af;
    word-break: break-word;
}

.stat-item:nth-child(2) h3 {
    color: #10b981;
}

.stat-item:nth-child(3) h3 {
    color: #2563eb;
}

.stat-item p {
    margin: 10px 0 0 0;
    color: #4b5563;
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.testimonial {
    margin-top: 30px;
    text-align: center;
    font-style: italic;
    color: #6b7280;
    padding: 0 20px;
    line-height: 1.5;
}

/* Donation Form Section - Mobile Optimized */
.donation-form-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-bottom: 40px;
}

.donation-form-section h2 {
    margin: 0 0 15px 0;
    font-size: clamp(1.5rem, 5vw, 1.75rem);
}

.donation-subtitle {
    margin: 0 0 30px 0;
    opacity: 0.9;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    line-height: 1.4;
}

.amount-selection {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.amount-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: clamp(1rem, 3vw, 1.125rem);
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 70px;
    flex: 0 1 auto;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.amount-btn:hover, .amount-btn:active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.amount-btn.selected {
    background: white;
    color: #2563eb;
    border-color: white;
}

.custom-amount {
    margin: 20px auto;
    max-width: 300px;
}

.custom-amount input {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: clamp(1rem, 3vw, 1.125rem);
    width: 100%;
    max-width: 200px;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-appearance: none; /* Remove default iOS styling */
    -moz-appearance: none;
    appearance: none;
}

.custom-amount input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.custom-amount input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
}

/* Remove spinner buttons on number inputs for better mobile UX */
.custom-amount input[type="number"]::-webkit-inner-spin-button,
.custom-amount input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.selected-amount {
    margin: 20px 0;
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    font-weight: 600;
}

.donation-actions {
    margin: 20px 0;
}

.stripe-donate-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: clamp(1rem, 3vw, 1.125rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px auto;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    min-height: 48px; /* Touch-friendly size */
    touch-action: manipulation; /* Improve touch response */
}

.stripe-donate-btn:hover, .stripe-donate-btn:active {
    background: #059669;
    transform: translateY(-2px);
}

.stripe-donate-btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Stripe Payment Form - Mobile Optimized */
.stripe-payment-form {
    display: none;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.stripe-payment-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    text-align: center;
}

#stripe-elements-container {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

/* Payment Amount Display - Mobile Optimized */
#payment-amount-display {
    animation: fadeIn 0.3s ease-in;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

#payment-amount-display > div:first-child {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    margin-bottom: 8px;
}

#payment-amount-display > div:nth-child(2) {
    color: white;
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: bold;
}

#payment-amount-display > div:last-child {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.75rem, 2vw, 0.875rem);
    margin-top: 10px;
}

.stripe-submit-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: all 0.3s ease;
    min-height: 48px;
    touch-action: manipulation;
}

.stripe-submit-btn:hover, .stripe-submit-btn:active {
    background: #059669;
}

.stripe-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Thank You Message */
.donation-thank-you {
    display: none;
    text-align: center;
    padding: 30px 20px;
    background: #d1fae5;
    border: 2px solid #10b981;
    border-radius: 12px;
    margin-top: 30px;
    color: #065f46;
}

.donation-thank-you h3 {
    margin: 0 0 15px 0;
    color: #065f46;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.donation-thank-you p {
    margin: 0;
    color: #1f2937;
    line-height: 1.5;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/* FAQ Content */
.faq-content {
    margin-top: 30px;
}

.faq-content h3 {
    color: #1e40af;
    margin-bottom: 10px;
    margin-top: 25px;
    font-size: clamp(1.125rem, 3vw, 1.25rem);
}

.faq-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #4b5563;
    font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Breakpoints */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .donations-hero {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .donations-hero h1 {
        font-size: 2rem;
    }
    
    .donations-hero p {
        font-size: 1.1rem;
    }
    
    .donations-content {
        padding: 0 10px;
    }
    
    .content-section {
        padding: 30px 20px;
        margin-bottom: 20px;
    }
    
    .donation-form-section {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .amount-selection {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .amount-btn {
        width: 100%;
        max-width: 250px;
        padding: 18px 20px;
    }
    
    .impact-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        width: 100%;
        flex: 1 1 100%;
    }
    
    .stripe-payment-form {
        padding: 20px 15px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .donations-hero {
        padding: 30px 15px;
        border-radius: 12px;
    }
    
    .donations-hero h1 {
        font-size: 1.75rem;
    }
    
    .donations-hero p {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .content-section {
        padding: 20px 15px;
        border-radius: 8px;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .donation-form-section {
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    .donation-form-section h2 {
        font-size: 1.5rem;
    }
    
    .amount-btn {
        width: 100%;
        max-width: 200px;
        font-size: 1rem;
    }
    
    .custom-amount input {
        font-size: 1rem;
    }
    
    .stripe-donate-btn {
        padding: 16px 30px;
        font-size: 1rem;
    }
    
    #stripe-elements-container {
        padding: 10px;
    }
    
    .testimonial {
        padding: 0 10px;
        font-size: 0.9rem;
    }
}

/* Very small devices (360px and below) */
@media (max-width: 360px) {
    .donations-hero {
        padding: 25px 10px;
    }
    
    .donations-hero h1 {
        font-size: 1.5rem;
    }
    
    .donations-hero p {
        font-size: 0.9rem;
    }
    
    .donations-content {
        padding: 0 5px;
    }
    
    .content-section {
        padding: 15px 10px;
    }
    
    .content-section h2 {
        font-size: 1.25rem;
    }
    
    .donation-form-section {
        padding: 20px 10px;
    }
    
    .amount-btn {
        padding: 15px 15px;
        max-width: 100%;
    }
    
    .stripe-donate-btn {
        padding: 14px 20px;
    }
    
    .stat-item h3 {
        font-size: 1.5rem;
    }
    
    .stat-item p {
        font-size: 0.875rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .donations-hero {
        padding: 20px;
    }
    
    .content-section {
        padding: 20px;
    }
    
    .donation-form-section {
        padding: 20px;
    }
}