/* Read More functionality styles */
.story-content.collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.story-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.story-content {
    transition: max-height 0.3s ease;
}

/* Media Modal styles */
.media-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.media-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.media-modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.media-modal-close:hover,
.media-modal-close:focus {
    color: #bbb;
    text-decoration: none;
}

.media-modal-title {
    color: white;
    margin-top: 15px;
    font-size: 18px;
}

/* Countdown Timer styles */
.countdown-timer-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.countdown-timer-container::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="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="50" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.countdown-timer-container h5 {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.countdown-values {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px 15px;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.countdown-item span:first-child {
    font-size: 32px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-item .label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.campaign-ended-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 5px 15px rgba(238, 90, 36, 0.3);
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .media-modal-content {
        width: 95%;
        padding: 10px;
    }

    .media-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .countdown-timer-container {
        padding: 20px;
        margin: 20px 0;
    }

    .countdown-timer-container h5 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .countdown-values {
        gap: 15px;
    }

    .countdown-item {
        padding: 15px 10px;
        min-width: 70px;
    }

    .countdown-item span:first-child {
        font-size: 24px;
    }

    .countdown-item .label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .countdown-values {
        gap: 10px;
    }

    .countdown-item {
        padding: 12px 8px;
        min-width: 60px;
    }

    .countdown-item span:first-child {
        font-size: 20px;
    }
}

/* Recent Donations styles */
.recent-donations-container {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.recent-donations-container h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.donation-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
    /* For scrollbar spacing */
}

/* Custom scrollbar for donation list */
.donation-list::-webkit-scrollbar {
    width: 6px;
}

.donation-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.donation-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.donation-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.donation-item {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    border-bottom: 1px solid #e9ecef;
    transition: 0.3s ease;
}

.donation-item:last-child {
    border-bottom: none;
}

.donation-item:hover {
    background-color: #ffffff;
    border-radius: 8px;
}

.donor-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

.donor-info {
    flex-grow: 1;
}

.donor-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.donation-time {
    font-size: 12px;
    color: #6c757d;
}

.donation-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--oxpins-base);
    margin-left: 15px;
    white-space: nowrap;
}

.no-donations-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    font-style: italic;
}

/* Donations Modal styles */
.donations-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.donations-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.donations-modal-close:hover,
.donations-modal-close:focus {
    color: #333;
}

.donations-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.see-all-donations-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    background-color: #e9ecef;
    border: none;
    border-radius: 8px;
    color: #333;
    font-weight: 600;
    margin-top: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.see-all-donations-btn:hover {
    background-color: #dee2e6;
}

.donation-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.donation-section-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.donation-view-toggle {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
    cursor: pointer;
    text-decoration: none;
}

.donation-view-toggle:hover {
    text-decoration: underline;
}

.campaign-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    width: 100%;
    height: 400px; /* Fixed height for consistency */
    margin: 0 auto 20px;
    box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa; /* Fallback background */
}

.campaign-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers container while maintaining aspect ratio */
    object-position: center; /* Centers the image */
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.campaign-image-container:hover img {
    transform: scale(1.02); /* Subtle zoom on hover */
}

.campaign-featured-image {
    display: block;
    border-radius: 15px;
}

/* Responsive adjustments for campaign image */
@media (max-width: 1200px) {
    .campaign-image-container {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .campaign-image-container {
        height: 300px;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .campaign-image-container {
        height: 250px;
        border-radius: 10px;
        margin-bottom: 15px;
    }
    
    .campaign-featured-image {
        border-radius: 10px;
    }
}

@media (max-width: 576px) {
    .campaign-image-container {
        height: 200px;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    
    .campaign-featured-image {
        border-radius: 8px;
    }
}

/* Loading placeholder for images */
.campaign-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
}

.campaign-image-container img {
    position: relative;
    z-index: 2;
}

.campaign-image-container img[src]:not([src=""]) + ::before {
    display: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Image optimization classes */
.img-optimized {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Lazy loading support */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

.donation-details__donate-list li i {
    position: relative;
    display: inline-block;
    color: var(--oxpins-base);
}

/* Custom CSS for Gallery Carousel Containment */
.gallery-carousel-page {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    padding: 50px 0 100px;
}

#donationAmount:focus {
    outline: none;
    box-shadow: 0 0 0 .25rem rgba(0, 113, 93, 0.25);
}

.order_table_detail tbody td {
    padding: 20px 0 2px;
}

/* Custom Radio Button Styles */
.radio-wrapper {
    /* margin-top: 15px; */
    margin-bottom: 15px;
}

.radio-single {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    /* Prevent text selection */
}

.radio-single input[type="radio"] {
    /* Hide the default radio button */
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-single label {
    display: flex;
    align-items: center;
    padding-left: 30px;
    /* Space for the custom radio */
    position: relative;
    cursor: pointer;
    font-size: 16px;
    color: var(--oxpins-black);
    /* Adjust color as needed */
    font-weight: 500;
}

/* Custom radio circle */
.radio-single label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    border: 2px solid var(--oxpins-bdr-color);
    /* Border color for unchecked state */
    border-radius: 50%;
    background-color: var(--oxpins-white);
    transition: all 0.3s ease;
}

/* Checkmark icon */
.radio-single label::after {
    font-family: "Font Awesome 5 Free";
    content: "\f00c";
    /* Font Awesome check icon */
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scale(0);
    /* Hide by default */
    font-size: 10px;
    color: var(--oxpins-black);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    /* Adjust to center icon within the circle */
    width: 20px;
    /* Adjust to center icon within the circle */
    transition: all 0.3s ease;
}

/* Checked state */
.radio-single input[type="radio"]:checked+label::before {
    border-color: var(--oxpins-primary);
    /* Yellow border when checked */
    background-color: var(--oxpins-primary);
}

.radio-single input[type="radio"]:checked+label::after {
    transform: translateY(-50%) scale(1);
    /* Show checkmark */
}

/* Hover state */
.radio-single label:hover::before {
    border-color: var(--oxpins-primary);
    /* Highlight border on hover */
}

.donor-info-loggedin i {
    color: var(--oxpins-base);
}

/* Custom Checkbox Styles */
.form-check-custom input[type="checkbox"] {
    /* Hide the default checkbox */
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.form-check-custom label {
    display: flex;
    align-items: center;
    padding-left: 30px;
    /* Space for the custom checkbox */
    position: relative;
    cursor: pointer;
    user-select: none;
    /* Prevent text selection */
    font-size: 16px;
    color: var(--oxpins-black);
    /* Adjust color as needed */
    font-weight: 500;
}

/* Custom checkbox square */
.form-check-custom label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    border: 2px solid var(--oxpins-bdr-color);
    /* Border color for unchecked state */
    border-radius: 40px;
    /* Slightly rounded corners for square */
    background-color: var(--oxpins-white);
    transition: all 0.3s ease;
}

/* Checkmark icon */
.form-check-custom label::after {
    font-family: "Font Awesome 5 Free";
    content: "\f00c";
    /* Font Awesome check icon */
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scale(0);
    /* Hide by default */
    font-size: 10px;
    color: var(--oxpins-white);
    /* White color for checkmark */
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    /* Adjust to center icon within the square */
    width: 18px;
    /* Adjust to center icon within the square */
    transition: all 0.3s ease;
}

/* Checked state */
.form-check-custom input[type="checkbox"]:checked+label::before {
    border-color: var(--oxpins-base);
    /* Blue border when checked */
    background-color: var(--oxpins-base);
    /* Blue background when checked */
}

.form-check-custom input[type="checkbox"]:checked+label::after {
    transform: translateY(-50%) scale(1);
    /* Show checkmark */
}

/* Hover state */
.form-check-custom label:hover::before {
    border-color: var(--oxpins-base);
    /* Highlight border on hover */
}

.trust-elements-container .secure-text {
    color: var(--oxpins-black);
    font-weight: 600;
    display: flex;
    align-items: center;
    line-height: 20px;
}

.trust-elements-container .secure-text i {
    color: var(--oxpins-primary);
    margin-right: 10px;
}

.trust-elements-container .secure-text i.fa.fa-check-square {
    color: var(--oxpins-base);
}

.policy-links {
    position: relative;
    display: block;
    border: 1px solid var(--oxpins-bdr-color);
    padding: 13px 13px;
    border-radius: var(--oxpins-bdr-radius);
}

.policy-links a {
    transition: all 0.3s ease;
    padding: 7px 14px 10px;
    white-space: nowrap; /* Ensure text stays on one line */
}

.policy-links a:hover {
    color: var(--oxpins-black);
    text-shadow: 1px 0 0 rgba(14, 34, 7, 0.5);
}

.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 30px; /* Adjust as needed for spacing from the top */
    z-index: 10; /* Ensure it stays above other content if needed */
}

#seeAllDonationsBtn,
#seeTopDonationsLink {
    padding: 10px 10px;
}

.donor-avatar{
    background-color: var(--oxpins-primary);
}


.donations-list__progress{
    padding-top: 30px;
}


.news-details__tags a + a{
    margin-left: 0;
}
