/* =======================================================================
   news Page Styles
======================================================================= */
#news {
   .news-list-container {
        box-sizing: border-box;
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;

        .news-item {
            margin-bottom: 4rem;

            .news-item__content {
                order: 1;

                .news-item__date {
                    display: block;
                    margin-top: 1rem;
                }

                .news-item__title {
                    margin-top: 0;
                }

                .category-link {
                    text-decoration: none;
                }

                .news-item__excerpt {
                    line-height: 1.8;
                }
            } /* //.news-item__content */

            .news-item__image {
                background-color: #FFF;
                border-radius: 5px;
                margin: 0 auto 2rem;
                height: 350px;
                max-width: 65%;
                overflow: hidden;

                figure {
                    height: 100%;
                    text-align: center;

                    img {
                        object-fit: cover;
                        height: 100%;
                        width: auto;
                    }
                }
            } /* //.news-item__image */
        } /* //.news-item */
   } /* //.news-list-container */
} /* //#news */




/* =======================================================================
   Media Query
======================================================================= */
@media (min-width: 769px) {
    #news {
        .news-list-container {
            .news-item {
                .news-item__content {
                    flex-grow: 2;
                    order: 0;
                    padding-right: 2rem;
                }

                .news-item__image {
                    margin: 0;
                    width: 100%;
                    max-width: 100%;
                }
            } /* //.news-item */
        } /* //.news-list-container */
    } /* //#news */
}




/* =======================================================================
   Loading Indicator
======================================================================= */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    
    svg {
        width: 100%;
        height: 100%;
        animation: rotate 2s linear infinite;
    }
    
    circle {
        stroke: var(--wp--preset--color--custom-purple);
        stroke-width: 3;
        stroke-linecap: round;
        fill: none;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* CSSのみでくるくるアイコンを作る場合（SVGの代替） */
.loading-spinner-css {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--wp--preset--color--custom-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* News Item Animation */
.news-item {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* ローディング状態のコンテナ */
.news-list-container[data-loading="true"] {
    pointer-events: none;
}