/* Active Volunteer Project Component Styles */

.active-volunteer-project {
    position: relative;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--theme-shadow);
}

.active-volunteer-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Urgency-based styling */
.active-volunteer-project.critical {
    border-color: var(--theme-danger);
    animation: pulse-critical 2s infinite;
}

.active-volunteer-project.high {
    border-color: var(--theme-warning);
}

.active-volunteer-project.critical .project-glow,
.active-volunteer-project.high .project-glow {
    display: block;
}

/* Glowing effect for urgent projects */
.project-glow {
    display: none;
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.1) 0%, transparent 70%);
    animation: rotate-glow 10s linear infinite;
    pointer-events: none;
}

.active-volunteer-project.critical .project-glow {
    background: radial-gradient(circle, rgba(220, 53, 69, 0.1) 0%, transparent 70%);
}

/* Header Section */
.project-header {
    margin-bottom: 20px;
}

.urgency-badge {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge-urgent,
.badge-grant {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-urgent {
    background: rgba(220, 53, 69, 0.1);
    color: var(--theme-danger);
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.badge-grant {
    background: rgba(255, 193, 7, 0.1);
    color: var(--theme-warning);
}

.project-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.milestone-spark {
    color: var(--theme-warning);
    animation: sparkle 1.5s ease-in-out infinite;
}

.project-location {
    color: var(--theme-text-secondary);
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Progress Section */
.progress-section {
    margin: 24px 0;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.milestone-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-accent);
}

.progress-percentage {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-container {
    position: relative;
    margin-bottom: 20px;
}

.progress-track {
    position: relative;
    height: 24px;
    background: var(--surface-2);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--theme-primary), var(--theme-accent));
    border-radius: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.progress-shine {
    position: absolute;
    top: 0;
    left: -100px;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

/* Milestone markers */
.milestone-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.marker-dot {
    width: 12px;
    height: 12px;
    background: var(--surface-3);
    border: 2px solid var(--theme-border-color);
    border-radius: 50%;
    z-index: 1;
}

.progress-fill ~ .milestone-marker .marker-dot {
    background: var(--theme-bg-primary);
    border-color: var(--theme-primary);
}

.marker-label {
    font-size: 10px;
    color: var(--theme-text-secondary);
    margin-top: 20px;
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--theme-text-primary);
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Impact Section */
.impact-section {
    margin: 24px 0;
}

.project-description {
    color: var(--theme-text-primary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.impact-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.impact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.impact-item i {
    font-size: 24px;
    color: var(--theme-primary);
}

.impact-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--theme-text-primary);
}

.impact-label {
    font-size: 12px;
    color: var(--theme-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Motivational Section */
.motivational-section {
    text-align: center;
    margin: 24px 0;
}

.motivational-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pulse-icon {
    color: var(--theme-danger);
    animation: pulse-heart 1.5s ease-in-out infinite;
}

/* Action Section */
.action-section {
    text-align: center;
    margin-top: 32px;
}

.btn-volunteer-now {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb), 0.3);
}

.btn-volunteer-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--theme-primary-rgb), 0.4);
    color: white;
    text-decoration: none;
}

.btn-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-volunteer-now:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.btn-volunteer-now:hover .btn-shine {
    transform: rotate(45deg) translateX(100%);
}

.countdown-timer {
    margin-top: 16px;
    color: var(--theme-warning);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.countdown-timer i {
    animation: rotate-hourglass 2s ease-in-out infinite;
}

/* Empty State */
.active-volunteer-project.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--surface-1);
}

.empty-icon {
    font-size: 48px;
    color: var(--theme-primary);
    opacity: 0.5;
    margin-bottom: 16px;
}

.empty-message {
    color: var(--theme-text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    color: var(--theme-accent);
    gap: 12px;
}

/* Animations */
@keyframes pulse-critical {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes pulse-heart {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2) rotate(180deg);
    }
}

@keyframes shine {
    0% {
        left: -100px;
    }
    100% {
        left: calc(100% + 100px);
    }
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-hourglass {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .active-volunteer-project {
        padding: 20px;
    }

    .project-title {
        font-size: 20px;
    }

    .progress-percentage {
        font-size: 24px;
    }

    .progress-stats,
    .impact-stats {
        gap: 24px;
    }

    .stat-value,
    .impact-number {
        font-size: 20px;
    }

    .motivational-text {
        font-size: 16px;
    }

    .btn-volunteer-now {
        padding: 14px 32px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .progress-stats,
    .impact-stats {
        flex-direction: column;
        gap: 16px;
    }

    .marker-label {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .active-volunteer-project {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }

    .active-volunteer-project:hover {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    }

    .btn-volunteer-now {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    }

    .btn-volunteer-now:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
    }
}