/* ===== MPFoundation Appeals Archive - Modern UI/UX ===== */

.mpf-appeals-archive {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
}

/* ===== Custom Header Integration ===== */
.mpf-appeals-archive .mpf-custom-header {
    position: relative;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.mpf-appeals-archive .mpf-custom-header .mpf-nav {
    background: transparent;
}

.mpf-appeals-archive .mpf-custom-header .mpf-nav ul {
    margin: 0;
    padding: 0;
}

/* Ensure appeals page header doesn't overlap with hero */
.mpf-appeals-archive .mpf-appeals-hero {
    margin-top: 0;
    padding-top: 0;
}

/* Fix any potential header spacing issues */
.mpf-appeals-archive {
    padding-top: 0;
}

.mpf-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

@media (min-width: 1400px) {
    .mpf-container {
        max-width: 1320px;
    }
}

@media (max-width: 992px) {
    .mpf-container {
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .mpf-container {
        padding: 0 10px;
    }
}

/* ===== Hero Section ===== */
.mpf-appeals-hero {
    background: linear-gradient(135deg, #207dad 0%, #1e6aa0 100%);
    background-attachment: fixed;
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 40px 0;
}

.mpf-appeals-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.mpf-hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
}

.mpf-hero-content {
    text-align: center;
    color: white;
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
}

.mpf-hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
    line-height: 1.1;
}

.mpf-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 50px;
    opacity: 0.95;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
    line-height: 1.6;
    color: rgba(255,255,255,0.95);
}

.mpf-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 60px;
    animation: fadeInUp 1s ease-out 0.4s both;
    flex-wrap: wrap;
}

.mpf-stat {
    text-align: center;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 32px 28px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    min-width: 160px;
    flex: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.mpf-stat:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
}

.mpf-stat-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.mpf-stat-label {
    font-size: 0.9rem;
    opacity: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== Filter Section ===== */
.mpf-appeals-filters {
    background: #f8fafc;
    padding: 40px 0;
    border-bottom: 1px solid #e2e8f0;
}

.mpf-filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.mpf-filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mpf-filter-btn {
    background: white;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.mpf-filter-btn:hover {
    border-color: #207dad;
    color: #207dad;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15);
}

.mpf-filter-btn.active {
    background: linear-gradient(135deg, #207dad, #1e6aa0);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.mpf-search-box {
    position: relative;
    max-width: 300px;
    width: 100%;
}

.mpf-search-box input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.mpf-search-box input:focus {
    outline: none;
    border-color: #207dad;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

.mpf-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #94a3b8;
    pointer-events: none;
}

/* ===== Appeals Grid ===== */
.mpf-appeals-grid {
    padding: 80px 0;
    background: white;
}

.mpf-appeals-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.mpf-appeal-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    border: 1px solid #f1f5f9;
}

.mpf-appeal-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.mpf-appeal-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.mpf-card-header {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.mpf-urgent-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.mpf-appeal-type {
    background: rgba(255,255,255,0.95);
    color: #207dad;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.mpf-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.mpf-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mpf-appeal-card:hover .mpf-card-image img {
    transform: scale(1.05);
}

.mpf-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #207dad, #1e6aa0);
}

.mpf-placeholder-image svg {
    width: 60px;
    height: 60px;
    fill: white;
    opacity: 0.7;
}

.mpf-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mpf-appeal-card:hover .mpf-card-overlay {
    opacity: 1;
}

.mpf-view-details {
    background: white;
    color: #2c3e50;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.mpf-appeal-card:hover .mpf-view-details {
    transform: translateY(0);
}

.mpf-view-details:hover {
    background: #207dad;
    color: white;
    transform: translateY(-2px);
}

.mpf-view-details svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mpf-card-content {
    padding: 30px;
}

.mpf-card-meta {
    margin-bottom: 15px;
}

.mpf-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.mpf-location svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.mpf-card-title {
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.mpf-card-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.mpf-card-title a:hover {
    color: #207dad;
}

.mpf-card-excerpt {
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.6;
}

.mpf-progress-section {
    margin-bottom: 25px;
}

.mpf-progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.mpf-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 1s ease-in-out;
    position: relative;
}

.mpf-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.mpf-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mpf-raised .mpf-amount,
.mpf-goal .mpf-percentage {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
}

.mpf-raised .mpf-amount {
    color: #10b981;
}

.mpf-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 4px;
}

.mpf-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.mpf-min-donation {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.mpf-donate-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.mpf-donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.4);
}

.mpf-donate-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ===== No Appeals State ===== */
.mpf-no-appeals {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.mpf-no-appeals-content svg {
    width: 80px;
    height: 80px;
    fill: #cbd5e1;
    margin-bottom: 20px;
}

.mpf-no-appeals-content h3 {
    font-size: 1.5rem;
    color: #475569;
    margin-bottom: 10px;
}

.mpf-no-appeals-content p {
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== Pagination ===== */
.mpf-pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.mpf-pagination .page-numbers {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mpf-pagination .page-numbers li {
    margin: 0;
}

.mpf-pagination .page-numbers a,
.mpf-pagination .page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.mpf-pagination .page-numbers a:hover {
    background: #207dad;
    color: white;
    border-color: #207dad;
    transform: translateY(-2px);
}

.mpf-pagination .page-numbers .current {
    background: #207dad;
    color: white;
    border-color: #207dad;
}

.mpf-pagination .page-numbers svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .mpf-hero-title {
        font-size: 2.5rem;
    }
    
    .mpf-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .mpf-hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .mpf-stat {
        padding: 20px;
        min-width: 200px;
    }
    
    .mpf-filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mpf-filter-tabs {
        justify-content: center;
    }
    
    .mpf-appeals-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mpf-appeal-card {
        margin: 0 10px;
    }
    
    .mpf-card-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .mpf-donate-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .mpf-container {
        padding: 0 15px;
    }
    
    .mpf-appeals-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mpf-appeal-card {
        margin: 0;
    }
    
    .mpf-card-content {
        padding: 20px;
    }
    
    .mpf-hero-stats {
        gap: 15px;
    }
    
    .mpf-stat {
        padding: 15px;
        min-width: 150px;
    }
    
    .mpf-stat-number {
        font-size: 2.2rem;
        font-weight: 900;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }
    
    .mpf-stat-label {
        font-size: 0.8rem;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
}

/* ===== Dark mode support ===== */
@media (prefers-color-scheme: dark) {
    .mpf-appeals-archive {
        background: #0f172a;
        color: #e2e8f0;
    }
    
    .mpf-appeals-filters {
        background: #1e293b;
        border-color: #334155;
    }
    
    .mpf-appeals-grid {
        background: #0f172a;
    }
    
    .mpf-appeal-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .mpf-card-title a {
        color: #f1f5f9;
    }
    
    .mpf-filter-btn {
        background: #334155;
        color: #cbd5e1;
        border-color: #475569;
    }
    
    .mpf-search-box input {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }
}

/* ===== Print styles ===== */
@media print {
    .mpf-appeals-filters,
    .mpf-pagination,
    .mpf-card-overlay,
    .mpf-donate-btn {
        display: none !important;
    }
    
    .mpf-appeal-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .mpf-appeals-wrapper {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
}

/* ===== Enhanced Responsive Design ===== */
@media (max-width: 768px) {
    .mpf-appeals-hero {
        min-height: 60vh;
        padding: 20px 0;
    }
    
    .mpf-hero-title {
        font-size: 2.8rem;
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .mpf-hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 40px;
        padding: 0 20px;
        line-height: 1.5;
    }
    
    .mpf-hero-stats {
        gap: 25px;
        margin-top: 40px;
        padding: 0 20px;
        justify-content: center;
    }
    
    .mpf-stat {
        min-width: 140px;
        padding: 28px 22px;
        flex: 0 1 auto;
    }
    
    .mpf-stat-number {
        font-size: 2.4rem;
    }
    
    .mpf-stat-label {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
    
    .mpf-filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mpf-filter-tabs {
        justify-content: center;
        margin-bottom: 20px;
    }
    
    .mpf-search-box {
        max-width: 100%;
    }
    
    .mpf-appeals-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .mpf-hero-title {
        font-size: 2.2rem;
    }
    
    .mpf-hero-subtitle {
        font-size: 1rem;
    }
    
    .mpf-hero-stats {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .mpf-stat {
        max-width: 300px;
        width: 100%;
        padding: 24px 20px;
    }
    
    .mpf-stat-number {
        font-size: 2.2rem;
    }
    
    .mpf-stat-label {
        font-size: 0.75rem;
    }
}
