/* adflask 케러셀 표시 스타일 */
ol[itemscope] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    list-style: none;
    padding: 20px 0;
    margin: 0 auto !important;
    max-width: 1200px;
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    justify-content: center;
    justify-items: center;
}

.d365-events-wrapper {
    margin-bottom: 40px;
    padding: 20px 0;
}

/* 최대 6개 항목만 표시 (3열 2행) */
ol[itemscope] li:nth-child(n+7) {
    display: none;
}

ol[itemscope] li {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

ol[itemscope] li:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

ol[itemscope] img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

ol[itemscope] li:hover img {
    transform: scale(1.05);
}

ol[itemscope] span[itemprop="name"] {
    display: block;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

ol[itemscope] link[itemprop="url"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}


/* 반응형 */
@media (max-width: 1024px) {
    ol[itemscope] {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
    }
    
    /* 태블릿에서도 6개 항목 표시 (2열 3행) */
    ol[itemscope] li:nth-child(n+7) {
        display: none;
    }
}

@media (max-width: 768px) {
    ol[itemscope] {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 15px;
    }
    
    ol[itemscope] span[itemprop="name"] {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    ol[itemscope] {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        margin-bottom: 30px;
        padding: 15px 20px;
        max-width: calc(100% - 40px);
    }
}

/* 로딩 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

ol[itemscope] li {
    animation: fadeIn 0.5s ease forwards;
}

ol[itemscope] li:nth-child(1) { animation-delay: 0.1s; }
ol[itemscope] li:nth-child(2) { animation-delay: 0.2s; }
ol[itemscope] li:nth-child(3) { animation-delay: 0.3s; }
ol[itemscope] li:nth-child(4) { animation-delay: 0.4s; }
ol[itemscope] li:nth-child(5) { animation-delay: 0.5s; }
ol[itemscope] li:nth-child(6) { animation-delay: 0.6s; }

