/* contribute.css - Styles specific to contribute.html */

/* Logo Belt/Carousel Animation Styles */
.logo-belt {
    width: 100%;
    overflow: hidden;
    margin: 30px 0;
    position: relative;
    background-color: #f9f9f9;
    padding: 20px 0;
    border-radius: 8px;
}

.belt-track {
    display: flex;
    align-items: center;
    gap: 80px; /* Increased gap for better spacing with fewer items */
    padding: 10px 40px; /* Added horizontal padding */
    /* animation removed - now handled by JavaScript */
    white-space: nowrap;
}

/* Pause animation on hover */
.belt-track:hover {
    animation-play-state: paused;
}

/* Add animation to the logo belt */
@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%); /* Extended animation to create more space between cycles */
    }
}

/* For a single sponsor, don't animate */
.belt-track.single-sponsor {
    animation: none;
    justify-content: center;
    padding: 10px 0;
}

.sponsor-item {
    flex: 0 0 auto;
    transition: transform 0.3s ease;
}

.sponsor-item:hover {
    transform: translateY(-5px);
}

.sponsor-item img {
    max-height: 100px;
    object-fit: contain;
}

.no-sponsors {
    width: 100%;
    text-align: center;
    font-style: italic;
    color: #666;
}

@media (max-width: 768px) {
    .sponsor-item img {
        max-height: 90px;
    }
}

/* Signup cards - improved layout with better responsive behavior */
.signup-card-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
    width: 100%;
    justify-content: center; /* Center cards instead of left-aligning */
}

.card-row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.top-row {
    justify-content: center;
}

.bottom-row {
    justify-content: center;
}

.signup-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Simplified width calculation */
    width: calc((100% - 40px) / 3); /* Default: 3 cards per row */
    min-width: 250px;
    min-height: 150px;
    flex: 0 0 auto;
    box-sizing: border-box;
    flex: 0 0 calc(50% - 20px); /* Each card takes up roughly half width in the top row */
    max-width: 400px;
}

.bottom-row .signup-card {
    flex: 0 0 calc(33% - 20px); /* Each card takes up roughly a third in the bottom row */
    max-width: 350px;
}

/* Special case for the last two cards when they're alone in a row */
.signup-card-container:has(.signup-card:nth-child(3):not(:last-child)) .signup-card:nth-child(n+4) {
    width: calc(50% - 10px); /* Make the last two cards take 50% width each */
}

/* Fallback for browsers that don't support :has */
@supports not (selector(:has(*))) {
    .signup-card:nth-child(4),
    .signup-card:nth-child(5) {
        width: calc(50% - 10px);
    }
}

/* Responsive styles - improved */
@media (max-width: 992px) {
    .signup-card,
    .signup-card-container:has(.signup-card:nth-child(3):not(:last-child)) .signup-card:nth-child(n+4) {
        width: calc((100% - 20px) / 2); /* Two cards per row */
    }
}

@media (max-width: 768px) {
    .signup-card,
    .signup-card-container:has(.signup-card:nth-child(3):not(:last-child)) .signup-card:nth-child(n+4) {
        width: 100%; /* One card per row */
        max-width: 450px; /* Limit maximum width on mobile */
        margin: 0 auto; /* Center single cards */
    }
    
    .card-row {
        flex-direction: column;
        align-items: center;
    }
    
    .signup-card, .bottom-row .signup-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Additional breakpoint for medium-small screens */
@media (min-width: 769px) and (max-width: 1100px) {
    .signup-card {
        width: calc((100% - 20px) / 2); /* Ensure two cards per row at this range */
    }
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.overlay-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%; /* Increased from 80% to 90% */
    max-width: 1000px; /* Increased from 800px to 1000px */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Form container with increased padding */
#volunteer-form-container {
    max-width: 85%;
    margin: 0 auto;
}

/* Form description styles with added padding */
.form-description {
    padding: 0 20px;
    margin-bottom: 30px;
}

/* Form styles with increased padding */
#volunteer-form {
    padding: 0 30px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.close-btn:hover {
    color: #ff6600;
}

/* Form styles - fix overflow issues */
.form-row {
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-row input, 
.form-row textarea, 
.form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
    transition: border-color 0.3s ease;
}

.form-row input:focus, 
.form-row textarea:focus, 
.form-row select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-row input[type="number"] {
    text-align: left; /* Keep numbers left-aligned for better usability */
}

/* Form message styling */
.message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* URL input styling */
.form-row input[type="url"] {
    font-family: monospace;
}

/* Special styling for conditional fields */
.conditional-field {
    margin-top: 10px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

/* Checkbox and radio containers */
.checkbox-container, 
.radio-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.checkbox-container input[type="checkbox"],
.radio-container input[type="radio"] {
    margin-right: 10px;
    width: auto;
    padding: 0;
}

.checkbox-container label,
.radio-container label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
    flex: 1;
}

/* File input styling */
.form-row input[type="file"] {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
}

.form-row input[type="file"]:hover {
    background-color: #e9ecef;
}

.form-row small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Specific style for when there's only one sponsor */
.belt-track.single-sponsor {
    justify-content: center;
}

.belt-track.single-sponsor .sponsor-item {
    flex: 0 0 auto;
    max-width: 300px;
    padding: 20px;
}

/* Remove pointer cursor from sponsorship tier cards (they're not clickable) */
#donate .signup-card {
    cursor: default;
}

#donate .signup-card:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Keep the pointer cursor only for the clickable volunteer signup cards */
#contribute .signup-card {
    cursor: pointer;
}

/* Donator Sections Styling */
.sponsor-tier {
    margin: 40px 0;
    padding: 20px 0;
}

.sponsor-tier h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8em;
    font-weight: 600;
}

/* Static Sponsors Grid Layout */
.static-sponsors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
}

.static-sponsor-item {
    flex: 0 0 auto;
    transition: transform 0.3s ease;
    max-width: 200px;
}

.static-sponsor-item:hover {
    transform: translateY(-5px);
}

.static-sponsor-item img {
    max-height: 120px;
    max-width: 200px;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* Responsive adjustments for static sponsors */
@media (max-width: 768px) {
    .static-sponsors-grid {
        gap: 20px;
        padding: 10px;
    }
    
    .static-sponsor-item {
        max-width: 150px;
    }
    
    .static-sponsor-item img {
        max-height: 90px;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .static-sponsors-grid {
        gap: 15px;
        padding: 5px;
    }
    
    .static-sponsor-item {
        max-width: 120px;
    }
    
    .static-sponsor-item img {
        max-height: 70px;
        max-width: 120px;
    }
}

/* Hide empty sponsor tiers by default */
.sponsor-tier {
    display: none;
}

/* Show sponsor tiers when they have content (controlled by JS) */
.sponsor-tier[style*="display: block"] {
    display: block !important;
}