/* Events Specific Styles */
.event-card {
    border-radius: 16px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    height: 100%;
    will-change: transform, box-shadow;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-color-2);
}

.event-card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
    will-change: transform;
}

.event-card:hover .event-card-img {
    transform: scale(1.05);
}

.event-card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.event-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--theme-color-2);
    color: var(--theme-color-3);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #121212;
}

.event-meta i {
    color: var(--theme-color-2);
    margin-right: 5px;
    font-size: 1.1rem;
}

.event-title {
    font-family: var(--outfit-font);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--theme-color-1, #253150);
}

.event-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: var(--theme-color-2);
}

.event-desc {
    color: #121212;
    margin-bottom: 25px;
    line-height: 1.7;
    flex-grow: 1;
}

.event-read-more {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--theme-color-1, #253150);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-decoration: none;
    transition: color 0.3s ease;
    margin-top: auto;
}

.event-read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.event-read-more:hover {
    color: var(--theme-color-2);
}

.event-read-more:hover i {
    transform: translateX(5px);
}

/* Event Details specific */
.event-details-content {
    background-color: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.event-details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.event-details-meta-item {
    display: flex;
    align-items: center;
    color: #121212;
    font-size: 1rem;
}

.event-details-meta-item i {
    color: var(--theme-color-2);
    font-size: 1.4rem;
    margin-right: 10px;
}

.event-details-text p {
    line-height: 1.8;
    color: #121212;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.event-details-text h3 {
    font-family: var(--outfit-font);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--theme-color-1, #253150);
}

/* Details page hero image — responsive, no cropping on mobile */
.event-details-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

@media (max-width: 768px) {
    .event-details-img {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

.event-sidebar-widget {
    background-color: #f4f7fa;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.event-sidebar-title {
    font-family: var(--outfit-font);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.event-sidebar-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--theme-color-2);
    border-radius: 3px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eaeaea;
    color: #121212;
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-list li span:first-child {
    font-weight: 600;
    color: var(--theme-color-1, #253150);
}

.impact-stats-box {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid rgba(254, 189, 17, 0.3);
}

.impact-stats-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(254, 189, 17, 0.1);
    color: var(--theme-color-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.impact-stats-text h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--theme-color-1, #253150);
}

.impact-stats-text p {
    margin: 0;
    color: #121212;
    font-size: 0.9rem;
}

.white-btn:hover {
    background-color: #fff !important;
    color: #253150 !important;
}

/* Horizontal Event Card Styles for Upcoming Events */
.event-card-horizontal {
    display: flex;
    flex-direction: row;
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    margin-bottom: 20px;
}

.event-card-horizontal:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--theme-color-2);
}

.event-card-h-img-wrapper {
    position: relative;
    width: 40%;
    flex-shrink: 0;
    overflow: hidden;
}

.event-card-h-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card-horizontal:hover .event-card-h-img {
    transform: scale(1.05);
}

.event-card-h-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 60%;
}

.event-h-action {
    margin-top: 20px;
}

/* Responsive adjustments for horizontal card */
@media (max-width: 991px) {
    .event-card-horizontal {
        flex-direction: column;
    }
    .event-card-h-img-wrapper {
        width: 100%;
        height: 250px;
    }
    .event-card-h-content {
        width: 100%;
        padding: 30px;
    }
}

/* Event Filters */
.event-filter-nav {
    gap: 10px;
}
.event-filter-nav .nav-link {
    color: var(--theme-color-1, #253150);
    font-weight: 600;
    border-radius: 30px;
    padding: 8px 24px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}
.event-filter-nav .nav-link:hover {
    color: var(--theme-color-2);
}
.event-filter-nav .nav-link.active {
    background-color: var(--theme-color-2);
    color: var(--theme-color-3, #fff);
    box-shadow: 0 4px 10px rgba(254, 189, 17, 0.3);
}

/* Event Details & Fundraising Events Gallery Styles */
.events-gallery .gallery-item {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background-color: #eaeaea; /* placeholder bg while loading */
    width: 100%;
    will-change: transform, box-shadow;
}

/* Aspect ratios for different size items to make them look uniform and premium */
.events-gallery .gallery-item-large {
    aspect-ratio: 16 / 10;
}

.events-gallery .gallery-item-small {
    aspect-ratio: 4 / 3;
}

.events-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
    will-change: transform;
}

.events-gallery .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.events-gallery .gallery-item:hover img {
    transform: scale(1.05);
}

/* Hover overlay style matching the main gallery */
.events-gallery .gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(37, 49, 80, 0.8), rgba(37, 49, 80, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.events-gallery .gallery-icon {
    color: #fff;
    font-size: 2.5rem;
    transform: translateY(15px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
}

.events-gallery .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.events-gallery .gallery-item:hover .gallery-icon {
    transform: translateY(0);
    opacity: 1;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    .events-gallery .gallery-item-large,
    .events-gallery .gallery-item-small {
        aspect-ratio: 3 / 2; /* more standard ratio for tablets/mobile */
    }
}

@media (max-width: 576px) {
    .events-gallery .gallery-item-large,
    .events-gallery .gallery-item-small {
        aspect-ratio: 4 / 3; /* standard square-ish ratio for phones */
    }
}

/* Optimize AOS animations scroll performance globally on this page */
[data-aos] {
    will-change: transform, opacity;
}