/* Main Containers and Layout */
.showcase-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-section {
    margin-bottom: 2rem;
}

/* Modern Hero Section */
.project-hero {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 3rem;
    overflow: hidden;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.project-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: 0;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
    color: white;
}

.project-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.project-hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    font-weight: 300;
}

.project-hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stat-item {
    text-align: center;
    flex: 0 1 auto;
}

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.hero-stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 1px;
}

.hero-progress-container {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 4px;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.hero-progress-bar {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 50px;
    padding: 1rem 2rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: width 0.5s ease;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-cta-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    display: inline-block;
}

.hero-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: #764ba2;
}

/* Previous Hero Section (now secondary) */
.hero-section {
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    background-color: var(--surface-1);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
    z-index: 1;
}

/* Stats Cards - 2x3 Grid */
.stats-highlight-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid transparent;
}

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

.stat-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.highlight-card {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(128, 90, 213, 0.15) 0%, rgba(128, 90, 213, 0) 70%);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

.highlight-card::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(128, 90, 213, 0.3) 0%, rgba(128, 90, 213, 0) 80%);
    filter: blur(5px);
    z-index: -2;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Animation for the trophy */
.fa-trophy {
    position: relative;
}

/* Project Stats Dashboard */
.stats-card {
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    background-color: var(--surface-1);
    border-radius: 0.5rem;
    height: 100%;
}

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

.stats-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.stats-title i {
    margin-right: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 1rem;
}

.stats-item {
    display: flex;
    flex-direction: column;
}

.stats-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stats-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.pace-indicator {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    margin-top: 1rem;
}

.pace-indicator:hover {
    transform: scale(1.02);
}

/* Contribution Breakdown Styling */
.contribution-pie {
    display: flex;
    align-items: center;
    margin-top: 1rem;
}

.pie-chart-container {
    flex: 0 0 130px;
    height: 130px;
    margin-right: 1rem;
}

.contribution-breakdown {
    flex: 1;
}

.breakdown-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.breakdown-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.breakdown-label {
    flex: 1;
    font-size: 0.9rem;
}

.breakdown-value {
    font-weight: 600;
}

/* League Contributions */
.league-contribution-chart {
    margin-top: 1rem;
}

.league-bar-container {
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.league-bar-container:hover {
    transform: translateY(-3px);
}

.league-image {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-radius: 6px;
    overflow: hidden;
    width: 60px;
    height: 40px;
    object-fit: cover;
}

.league-bar-container:hover .league-image,
.league-bar-container:hover .course-emblem {
    transform: scale(1.05);
}

.progress {
    overflow: visible;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 1rem;
    height: 25px;
}

.progress-bar {
    border-radius: 1rem;
    transition: width 0.5s ease-out, transform 0.3s ease;
}

.league-bar-container:hover .progress-bar {
    transform: scaleY(1.05);
}

.league-name {
    font-weight: 500;
    font-size: 1.1rem;
}

.league-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.league-meta i {
    margin-right: 0.25rem;
}

.league-amount {
    font-weight: bold;
    font-size: 1.25rem;
    white-space: nowrap;
}

/* Timeline for Updates */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 0;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--bs-primary);
    border: 2px solid var(--surface-1);
    box-shadow: var(--shadow-sm);
}

.timeline-content {
    background: var(--surface-1);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Contributors */
.contributor-list {
    max-height: 400px;
    overflow-y: auto;
}

.contributor-item {
    transition: all 0.2s ease;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.contributor-item:hover {
    transform: translateX(5px);
    background-color: var(--surface-2);
}

.contributor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.contributor-info {
    flex: 1;
}

.contributor-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contributor-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.contributor-amount {
    font-weight: 600;
    color: var(--bs-success);
}

/* Recent Activity */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    background: var(--surface-1);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.3s ease;
}

.activity-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.activity-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.activity-contributor {
    font-weight: 500;
}

.activity-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Donation Form */
.donation-amount-btn {
    width: 80px;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.donation-amount-btn:hover,
.donation-amount-btn.active {
    transform: scale(1.05);
}

.quick-donate-btn {
    transition: all 0.2s ease;
}

.quick-donate-btn:hover {
    transform: scale(1.05);
}

/* Chart Styles */
.chart-container {
    position: relative;
    height: 300px;
}

.chart-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-2);
    border-radius: 0.5rem;
}

.chart-stat-item {
    text-align: center;
}

.chart-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.chart-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-stat-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .timeline-marker {
        border-color: var(--surface-3);
    }

    .timeline-content {
        background-color: var(--surface-2);
    }

    .stat-card {
        background-color: var(--surface-2);
    }

    .contributor-item:hover {
        background-color: var(--surface-3);
    }
    
    .stats-card,
    .activity-item {
        background-color: var(--surface-2);
    }
    
    .hero-section {
        background-color: var(--surface-2);
    }
    
    /* Fix for Time Projections and Highlights in dark mode */
    .pace-indicator {
        background-color: rgba(25, 135, 84, 0.2) !important;
        color: var(--bs-success) !important;
    }
    
    .pace-indicator.bg-warning-subtle {
        background-color: rgba(255, 193, 7, 0.2) !important;
        color: var(--bs-warning) !important;
    }
    
    .pace-indicator.bg-info-subtle {
        background-color: rgba(13, 202, 240, 0.2) !important;
        color: var(--bs-info) !important;
    }
}

/* Print Optimizations */
@media print {
    .timeline::before {
        display: none;
    }

    .timeline-item {
        break-inside: avoid;
    }

    .hero-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .league-bar-container,
    .stats-card,
    .stat-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Mobile Responsiveness - Tablets */
@media (max-width: 992px) {
    .stats-highlight-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Responsiveness - Landscape phones */
@media (max-width: 768px) {
    .project-hero {
        min-height: 400px;
    }
    
    .project-hero-content {
        padding: 2rem 0;
    }
    
    .project-hero-title {
        font-size: 2rem;
    }
    
    .project-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stat-value {
        font-size: 1.8rem;
    }
    
    .project-hero-stats {
        gap: 1.5rem;
        justify-content: space-around;
    }
    
    .hero-progress-bar {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .hero-cta-button {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    .stats-highlight-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    /* League/Course contribution bars */
    .league-bar-container .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .league-info {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .league-amount {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .league-meta {
        font-size: 0.75rem;
    }
    
    /* Stats cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Timeline */
    .timeline-item {
        padding-left: 2rem;
    }
    
    .timeline::before {
        left: 0.5rem;
    }
    
    /* Chart stats */
    .chart-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 0.75rem;
    }
}

/* Mobile Responsiveness - Portrait phones */
@media (max-width: 576px) {
    .showcase-container {
        padding: 0 10px;
    }
    
    .project-hero {
        min-height: 350px;
    }
    
    .project-hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .project-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .project-hero-stats {
        gap: 1rem;
    }
    
    .hero-stat-item {
        flex: 0 1 45%;
    }
    
    .hero-stat-value {
        font-size: 1.5rem;
    }
    
    .hero-stat-label {
        font-size: 0.75rem;
    }
    
    .hero-progress-container {
        margin: 1rem 0;
    }
    
    .hero-progress-bar {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .stats-highlight-row {
        grid-template-columns: 1fr;
    }
    
    .contribution-pie {
        flex-direction: column;
        align-items: center;
    }
    
    .pie-chart-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Top contributors cards */
    .col-md-6.col-lg-4 {
        margin-bottom: 1rem;
    }
    
    /* Donation buttons */
    .quick-donate-btn,
    .donation-amount-btn {
        width: auto;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* League contributions mobile */
    .league-image {
        width: 50px;
        height: 35px;
    }
    
    .league-name {
        font-size: 1rem;
    }
    
    .league-amount {
        font-size: 1rem;
    }
    
    .progress {
        height: 20px;
    }
    
    .progress-label {
        font-size: 0.75rem !important;
    }
    
    /* Activity list */
    .activity-item {
        padding: 0.75rem;
    }
    
    .activity-amount {
        font-size: 1rem;
    }
    
    /* Chart on mobile */
    .chart-container {
        height: 250px;
    }
    
    .chart-stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Section titles */
    .section-title h2 {
        font-size: 1.25rem;
    }
    
    .section-title .badge {
        font-size: 0.75rem;
    }
    
    /* Buttons in hero */
    .hero-cta-button {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* User status module in mobile */
    .rounded-circle[style*="width: 80px"] {
        width: 60px !important;
        height: 60px !important;
    }
    
    .rounded-circle[style*="font-size: 2rem"] {
        font-size: 1.5rem !important;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .project-hero-title {
        font-size: 1.25rem;
    }
    
    .hero-stat-item {
        flex: 0 1 100%;
    }
    
    .donation-amount-btn {
        width: 60px;
        font-size: 0.85rem;
        padding: 0.375rem 0.5rem;
    }
}