/* Crusades & Outreaches Page Styles */

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #d4a217;
}

/* Crusade Card Styles */
.crusade-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.crusade-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.crusade-image-container {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.crusade-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.crusade-card:hover .crusade-thumbnail {
    transform: scale(1.1);
}

.image-count-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(212, 162, 23, 0.95);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.crusade-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.crusade-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: #130d0b;
    margin-bottom: 15px;
    line-height: 1.3;
}

.crusade-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.crusade-date,
.crusade-location {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crusade-date i,
.crusade-location i {
    color: #d4a217;
    width: 16px;
}

.crusade-description {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.view-gallery-btn {
    margin-top: auto;
}

/* Gallery Modal Styles */
.modal-xl {
    max-width: 90%;
}

.gallery-main-image {
    position: relative;
    width: 100%;
    height: 70vh;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: #130d0b;
    font-size: 1.2rem;
}

.gallery-nav-btn:hover {
    background: #d4a217;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Thumbnail Strip */
.gallery-thumbnails {
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.thumbnail-strip {
    display: flex;
    gap: 15px;
    padding: 5px;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.gallery-thumbnail:hover {
    opacity: 1;
    border-color: #d4a217;
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: #d4a217;
    box-shadow: 0 0 15px rgba(212, 162, 23, 0.5);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scrollbar Styling for Thumbnails */
.gallery-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: #d4a217;
    border-radius: 10px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #b38a15;
}

/* Modal Header */
.modal-header {
    background-color: #130d0b;
    color: white;
    border-bottom: 3px solid #d4a217;
}

.modal-title {
    font-weight: bold;
    font-size: 1.5rem;
}

.btn-close {
    filter: invert(1);
}

/* Loading State */
.crusade-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    z-index: 1;
    pointer-events: none;
}

.crusade-image-container.loaded::before {
    display: none;
}

.crusade-thumbnail {
    position: relative;
    z-index: 2;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .crusade-image-container {
        height: 220px;
    }

    .crusade-title {
        font-size: 1.2rem;
    }

    .modal-xl {
        max-width: 95%;
    }

    .gallery-main-image {
        height: 50vh;
    }

    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .gallery-thumbnail {
        width: 90px;
        height: 60px;
    }

    .image-counter {
        bottom: 10px;
        padding: 6px 15px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .crusade-meta {
        font-size: 0.85rem;
    }

    .crusade-description {
        font-size: 0.9rem;
    }

    .hero4 .heading {
        font-size: 2.5rem;
    }

    .hero4 .lead {
        font-size: 1rem;
    }
}

/* Animation for cards on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crusade-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Pagination Styling */
.pagination {
    margin-top: 30px;
}

.pagination .page-link {
    color: #130d0b;
    border-color: #d4a217;
}

.pagination .page-link:hover {
    background-color: #d4a217;
    color: white;
    border-color: #d4a217;
}

.pagination .page-item.active .page-link {
    background-color: #d4a217;
    border-color: #d4a217;
}