/* Updated Donor Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.doner-heading {
    position: relative;
    height: 197px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    animation: fadeIn 1s ease-out;
    overflow: hidden;
    background: none;
}

.doner-heading img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    left: 0;
    top: 0;
    z-index: 0;
    object-position: 0 79%;
    pointer-events: none;
}

.doner-heading h1,
.doner-heading p {
    position: relative;
    z-index: 1;
}

/* Skeleton Loader Styles */
.skeleton-loader {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    justify-content: start;
}

.skeleton-card {
    background: radial-gradient(60% 200% at 90% 110%, rgba(173, 216, 230, 0.15) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(40% 80% at 10% 10%, rgba(200, 230, 255, 0.25) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(30% 70% at 50% 50%, rgba(220, 240, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%),
        #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    flex-shrink: 0;
}

.skeleton-text {
    background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 16px;
}

.skeleton-name {
    height: 18px;
    width: 70%;
    margin-bottom: 6px;
}

.skeleton-subtitle {
    height: 14px;
    width: 50%;
}

.skeleton-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.skeleton-detail:last-child {
    margin-bottom: 0;
}

.skeleton-label {
    width: 30%;
    height: 14px;
}

.skeleton-value {
    width: 45%;
    height: 14px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes skeletonPulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 1;
    }
}

/* Skeleton Loader Responsive */
@media (max-width: 768px) {
    .skeleton-loader {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
}

/* Updated Donor List Grid */
.donor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1100px;
    /* ✅ Optional: controls overall container width */
    margin: 2.5rem auto;
    padding: 0 1rem;
    justify-content: start;
    /* ✅ Prevents stretching when only 1-2 items */
}

/* Updated Donor Card Styles */
.donor-card {
    background: radial-gradient(60% 200% at 90% 110%, rgba(173, 216, 230, 0.25) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(40% 80% at 10% 10%, rgba(200, 230, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%),
        radial-gradient(30% 70% at 50% 50%, rgba(220, 240, 255, 0.3) 0%, rgba(255, 255, 255, 0) 100%),
        #f0f8ff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    position: relative;
}

.donor-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

/* Donor Header - Avatar and Name in same line */
.donor-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

/* Avatar Styles */
.donor-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: cover;
}

.donor-img::before {
    content: "👤";
    color: white;
    font-size: 20px;
}

.donor-initial {
    width: 48px;
    height: 48px;
    background: #0e7490;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Donor Info Container */
.donor-info {
    flex: 1;
    min-width: 0;

}

/* Donor Name Styles */
.donor-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
    line-height: 1.3;
}

/* Subtitle for relationship */
.donor-subtitle {
    font-size: 13px;
    color: #9d8264;
    font-weight: 400;
    line-height: 1.2;
}

/* Donation Details */
.donation-details {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.donation-details p {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.donation-details p:last-child {
    margin-bottom: 0;
}

.donation-details span:first-child {
    font-weight: 500;
    color: #6b7280;
    min-width: 100px;
    flex-shrink: 0;
}

.donation-details span:last-child {
    font-weight: 500;
    color: #111827;
    text-align: right;
    flex: 1;
}

/* Special styling for donation type badges */
.top_price_donation {
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.donation_date {
    font-weight: 500;
}

/* Blog Filter Section */
.blog-filter {
    background-color: white;
    padding: 16px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1.2s ease-out;
}

.filter-container h2 {
    margin-bottom: 15px;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: #374151;
}

.filter-btn:hover {
    background-color: #0e7490;
    color: white;
}

.filter-btn.active-category {
    background-color: #0e7490;
    color: white;
    border-color: #0e7490;
}

.search-container {
    display: flex;
    max-width: 300px;
    width: 100%;
}

.search-container input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    outline: none;
}

.search-container input:focus {
    border-color: #0e7490;
    box-shadow: 0 0 0 1px #0e7490;
}

.search-container button {
    background-color: #0e7490;
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-container button:hover {
    background-color: #0e7490;
}

/* Load More Button */
.loadmore-doners {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    padding-bottom: 25px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--dark-color);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}



.no-results {
    display: none;
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 500px;
    /* Increased from 320px */
    width: 100%;
    text-align: center;
    padding: 2.5rem 1.5rem;
    background-color: var(--footer-color);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease-in-out;
}

.no-results img {
    width: 110px;
    opacity: 0.85;
    margin-bottom: 1.2rem;
}

.no-results h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 0.4rem;
}

.no-results p {
    font-size: 1rem;
    color: #666;
}

/* Enhanced Date Filter Section */
.enhanced-date-filter {
    display: flex;
    gap: 18px;
    align-items: flex-end;
    background: linear-gradient(90deg, #e0f2fe 0%, #f0f9ff 100%);
    border-radius: 14px;
    padding: 14px 18px 10px 18px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.07);
    margin-top: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.enhanced-date-filter .date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
    flex: 1 1 120px;
}

.enhanced-date-filter label span {
    font-size: 0.98rem;
    color: black;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}

.enhanced-date-filter input[type="date"] {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: #1e293b;
    transition: border 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.04);
}

.enhanced-date-filter input[type="date"]:focus {
    border: 1.5px solid #183d4c;
    outline: none;
    box-shadow: 0 2px 8px rgba(24, 61, 76, 0.10);
}

.enhanced-date-filter .date-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #183d4c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(24, 61, 76, 0.10);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 0;
}

.enhanced-date-filter .date-btn:hover {
    background: linear-gradient(90deg, #2b5c6b 60%, #183d4c 100%);
    transform: translateY(-2px) scale(1.04);
}

@media (max-width: 900px) {
    .enhanced-date-filter {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 8px 8px 8px;
    }

    .enhanced-date-filter .date-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
}

@media (max-width: 600px) {
    .enhanced-date-filter {
        align-items: stretch;
        gap: 10px;
        padding: 10px 4px 6px 4px;
        /* flex-wrap: wrap; */
        /* gap: 12px; */
        padding: 12px 8px 8px 8px;
    }

    .enhanced-date-filter .date-field {
        min-width: 0;
    }

    .enhanced-date-filter input[type="date"] {
        padding: 6px 6px;
        font-size: 0.95rem;
        border-radius: 6px;
    }

    .enhanced-date-filter .date-btn {
        width: 100%;
        margin-top: 4px;
        padding: 8px 0;
        font-size: 0.98rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .donor-list {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }

    .blog-filter {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .search-container {
        max-width: 100%;
    }

    .filter-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .donor-card {
        padding: 20px;
    }

    .filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .donation-details p {
        display: flex;
        justify-content: space-between;

    }

    /* .donation-details span:last-child {
        text-align: left;
    } */

    .donor-header {
        gap: 10px;
    }

    .donor-name {
        font-size: 15px;
    }

    .donor-subtitle {
        font-size: 12px;
    }
}



.donor-info-tooltip-wrapper:hover .donor-info-tooltip-bottom {
    visibility: visible !important;
    opacity: 1;
}

.donor-info-tooltip-bottom {
    visibility: hidden;
    opacity: 0;
    background: #fff;
    color: #333;
    text-align: left;
    border-radius: 6px;
    padding: 12px 16px;
    position: absolute;
    z-index: 10;
    left: 50%;
    top: 120%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 100%;
    font-size: 15px;
    white-space: normal;
    transition: opacity 0.2s;
}

@media (max-width: 600px) {
    .donor-info-tooltip-bottom {
        min-width: 200px;
        font-size: 13px;
        padding: 10px 8px;
    }

    .donor-info-tooltip-bottom strong {
        font-size: 13px;
    }
}

.donor-father-name {
    color: #9d8264;
    font-size: 13px;
    font-weight: 500;
    display: block;
    margin-top: 2px;
}