/* SFADA Diaries: Captured Moments Section */
.sfada-diaries-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.sfada-diaries-title {
    font-size: 2rem;
    font-weight: 600;
    color: #862C91;
    text-align: center;
    margin-bottom: 1.5rem;
}

.sfada-diaries-description {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    line-height: 1.6;
    color: #4b5563;
    font-size: 1.05rem;
}

/* Full Width Video Grid for SFADA Diaries */
.sfada-diaries-video-fullwidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background-color: #000;
}

/* Variant for 5 videos - will be applied via separate class */
.sfada-diaries-video-fullwidth-five {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    background-color: #000;
}

.sfada-diaries-video-fullwidth-five .video-item {
    position: relative;
    aspect-ratio: 463/626;
    overflow: hidden;
    cursor: pointer;
    /* Override any flex properties from other CSS */
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
}

.sfada-diaries-video-fullwidth-five .video-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sfada-diaries-video-fullwidth-five .video-item:hover img {
    transform: scale(1.05);
}

.sfada-diaries-video-fullwidth-five .video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.sfada-diaries-video-fullwidth-five .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.sfada-diaries-video-fullwidth-five .video-item:hover .play-button {
    background-color: rgba(134, 44, 145, 0.9);
}

.sfada-diaries-video-fullwidth-five .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}

.sfada-diaries-video-fullwidth .video-item {
    position: relative;
    aspect-ratio: 463/626;
    overflow: hidden;
    cursor: pointer;
    /* Override any flex properties from other CSS */
    flex: none !important;
    max-width: none !important;
    width: 100% !important;
}

.sfada-diaries-video-fullwidth .video-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.sfada-diaries-video-fullwidth .video-item:hover img {
    transform: scale(1.05);
}

.sfada-diaries-video-fullwidth .video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

/* Play Button Styling */
.sfada-diaries-video-fullwidth .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    pointer-events: none;
}

.sfada-diaries-video-fullwidth .video-item:hover .play-button {
    background-color: rgba(134, 44, 145, 0.9);
}

/* Creates the triangle "play" icon */
.sfada-diaries-video-fullwidth .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent white;
    margin-left: 4px;
}


/* Responsive Design for 5-video layout */
@media (max-width: 1200px) {
    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Position 4th and 5th videos in bottom row with gap */
    .sfada-diaries-video-fullwidth-five .video-item:nth-child(4) {
        grid-column: 1 / 2;
    }

    .sfada-diaries-video-fullwidth-five .video-item:nth-child(5) {
        grid-column: 3 / 4;
    }
}

/* Responsive Design for 4-video layout (original) */
@media (max-width: 992px) {
    /* 2 columns on tablets - but we'll override this for mobile below */
    .sfada-diaries-video-fullwidth {
        grid-template-columns: repeat(2, 1fr);
    }

    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Reset positioning for 5 videos on smaller screens */
    .sfada-diaries-video-fullwidth-five .video-item:nth-child(4),
    .sfada-diaries-video-fullwidth-five .video-item:nth-child(5) {
        grid-column: auto;
    }
}

/* Additional mobile breakpoint for better control */
@media (max-width: 640px) {
    .sfada-diaries-video-fullwidth {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .sfada-diaries-video-fullwidth-five .video-item,
    .sfada-diaries-video-fullwidth .video-item {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sfada-diaries-section {
        padding: 3rem 0;
    }

    .sfada-diaries-title {
        font-size: 1.75rem;
        padding: 0 1rem;
    }

    .sfada-diaries-description {
        padding: 0 1rem;
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* 2 columns on small tablets */
    .sfada-diaries-video-fullwidth {
        grid-template-columns: repeat(2, 1fr);
    }

    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sfada-diaries-section {
        padding: 2.5rem 0;
    }

    .sfada-diaries-title {
        font-size: 1.75rem;
        padding: 0 1rem;
    }

    .sfada-diaries-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* Force 1 column on tablets and below */
    .sfada-diaries-video-fullwidth {
        grid-template-columns: 1fr !important;
    }

    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .sfada-diaries-section {
        padding: 2.5rem 0;
    }

    .sfada-diaries-title {
        font-size: 1.5rem;
    }

    .sfada-diaries-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    /* 1 column on mobile */
    .sfada-diaries-video-fullwidth {
        grid-template-columns: 1fr !important;
    }

    .sfada-diaries-video-fullwidth-five {
        grid-template-columns: 1fr !important;
    }
}