/* IEC Materials Section Styles */
.event-contain {
    padding: 2rem 0 3rem;
}

/* Header Section - Matching Services Style */
.iec-header-section {
    /* margin-bottom: 50px; */
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.iec-header-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.iec-title {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 40px;
    color: #1C2B78;
    text-align: center;
}

.iec-title:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: rgb(255 102 0);
    border-radius: 3px;
}

.iec-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(30px);
    width: 10px;
    height: 3px;
    background-color: #504f93;
    border-radius: 3px;
}

.iec-header-section .description {
    color: #45494b;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

/* Image Grid Styles */
.iec-images-grid {
    margin: 0;
}

.iec-image-wrapper {
    position: relative;
    width: 100%;
    /* height: 450px; */
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 10px; */
    opacity: 0;
    transform: translateY(60px) scale(0.85) rotateX(10deg);
    filter: blur(8px);
    will-change: opacity, transform, filter;
}

/* Glow effect during animation */
@keyframes iecGlow {
    0% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    }
    50% {
        box-shadow: 0 20px 50px rgba(255, 102, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.12);
    }
    100% {
        box-shadow: 0 15px 40px rgba(255, 102, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.12);
    }
}

.iec-image-wrapper.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0);
    box-shadow: 0 15px 40px rgba(255, 102, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1s cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 1s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.6s ease;
    animation: iecGlow 1.5s ease-out;
}

/* Staggered animation for each image */
.iec-images-grid .col-lg-4:nth-child(1) .iec-image-wrapper.animate-in {
    animation-delay: 0s;
}

.iec-images-grid .col-lg-4:nth-child(2) .iec-image-wrapper.animate-in {
    animation-delay: 0.2s;
}

.iec-images-grid .col-lg-4:nth-child(3) .iec-image-wrapper.animate-in {
    animation-delay: 0.4s;
}

.iec-image-wrapper:hover {
    transform: translateY(-15px) scale(1.05) rotateY(2deg);
    box-shadow: 0 25px 60px rgba(255, 102, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.iec-image-wrapper.animate-in:hover {
    transform: translateY(-15px) scale(1.05) rotateY(2deg);
}

.iec-image-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    align-items: center;
    justify-content: center;
}

.iec-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.6s ease, filter 0.4s ease;
    filter: brightness(0.98);
}

.iec-image-wrapper:hover .iec-image {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.iec-image-link {
    cursor: pointer;
}

/* IEC Modal Styles */
.iec-modal {
    z-index: 9999;
}

.iec-modal .modal-dialog {
    max-width: 95%;
    margin: 1rem auto;
}

.iec-modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

.iec-modal-header {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(10px);
}

.iec-modal-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.iec-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    padding: 0;
    transition: all 0.3s ease;
    opacity: 1;
}

.iec-modal-close:hover {
    background: rgba(255, 102, 0, 0.9);
    transform: rotate(90deg);
    color: #ffffff;
}

.iec-modal-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 102, 0, 0.5);
}

.iec-modal-body {
    padding: 0;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 0 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    max-height: 90vh;
    overflow: auto;
}

.iec-modal-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0 0 10px 10px;
    animation: fadeInScale 0.4s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal Backdrop */
.iec-modal.show .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

/* Responsive Modal */
@media (max-width: 991px) {
    .iec-modal .modal-dialog {
        max-width: 98%;
        margin: 0.5rem auto;
    }
    
    .iec-modal-body {
        min-height: 60vh;
        max-height: 85vh;
    }
    
    .iec-modal-image {
        max-height: 85vh;
    }
}

@media (max-width: 767px) {
    .iec-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .iec-modal-title {
        font-size: 18px;
    }
    
    .iec-modal-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .iec-modal-body {
        min-height: 50vh;
        max-height: 80vh;
    }
    
    .iec-modal-image {
        max-height: 80vh;
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .iec-image-wrapper {
        height: 380px;
        margin-bottom: 1.5rem;
    }
    
    .iec-title {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .iec-image-wrapper {
        height: 320px;
        margin-bottom: 1.5rem;
    }
    
    .iec-images-grid {
        flex-wrap: wrap;
    }
    
    .iec-images-grid > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .iec-title {
        font-size: 28px;
    }
    
    .iec-header-section {
        margin-bottom: 30px;
    }
}

@media (max-width: 575px) {
    .iec-image-wrapper {
        height: 280px;
    }
    
    .iec-title {
        font-size: 24px;
    }
}
@keyframes slideFromLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideFromRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-left {
    animation: slideFromLeft 1s ease-out forwards;
}

.slide-right {
    animation: slideFromRight 1s ease-out forwards;
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.hidden {
    opacity: 0;
}

.row .text{
    font-size: 16px;
    font-weight: 500;
    color: #666666;
    font-family: "poppins", "sans-serif";
    line-height: 2.3;
    text-align: justify;
   
}

.image-container {
    height: 400px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.collapse-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
    transform: translateX(-50%);
    filter: grayscale(100%); /* Make the image black and white initially */
}

.image-container:hover .collapse-image {
    transform: translateX(0);
    filter: grayscale(0%); /* Remove the grayscale filter on hover */
}

@media (max-width: 768px) {
    .event-contain .row {
        flex-direction: column;
        align-items: center;
    }
    .col-md-3 {
        width: 100%;
        max-width: 18rem;
    }
}
