/* =======================================================================
   news Page Styles
======================================================================= */
.main-offset {
    position: relative;

    &:after {
        content: "";
        background: url(../images/tree_02.svg) no-repeat center;
        background-size: contain;
        width: clamp(13.5rem, -1.929rem + 32.14vw, 27rem);
        height: clamp(15.875rem, -2.339rem + 37.95vw, 31.813rem);
        position: fixed;
        top: 48vh;
        right: 0;
        left: initial;
        z-index: -1;
    }
}

#news {
    position: relative;
    z-index: 100;

    .news-list-container {
        width: 100%;
        max-width: 100% !important;

        .news-list {
            .news-item {
                border-bottom: 1px dotted #ccc;
                gap: 1rem;
                margin-bottom: 0;
                padding: 2rem 0;

                .news-item__image {
                    max-height: 350px;

                    figure {
                        height: 100%;

                        img {
                            border-radius: 20px;
                            box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            object-position: top;
                        }
                    } /* //figure */
                } /* //.news-item__image */

                .news-item__content {
                    background-color: #ffffffdb;
                    border-radius: 20px;
                    padding: 1rem;

                    .category-label {
                        background-color: #1EAA39;
                        border-radius: 100vmax;
                        color: #FFF;
                        display: block;
                        font-weight: 500;
                        padding: 0.25rem 1rem;
                        text-decoration: none;
                        width: fit-content;
                    }

                    .news-item__title {
                        a {
                            color: #543A22;
                            text-decoration: none;
                        }
                    }

                    .read-more {
                        color: #1EAA39;
                        font-weight: 500;
                        text-decoration: none;
                    }
                } /* //.news-item__content */
            } /* //.news-item */
        } /* //.news-list */
    } /* //.news-list-container */

    .news-contents-container {
        .wp-block-separator {
            margin-block-start: 0.5rem;
        }

        .taxonomy-category {
            a {
                color: #212529;
                text-decoration: none;
            }
        }

        .post-navigation {
            a {
                text-decoration: none;
            }
        }
    } /* //.news-contents-container */
} /* //#news */




/* =======================================================================
   Media Query
======================================================================= */
@media (min-width: 769px) {
    #news {
        .news-list-container {
            .news-list {
                .news-item {
                    gap: 3rem;
                }

            }
        } /* //.news-list-container */

        .news-contents-container {
            border-radius: 30px;
            padding-left: 2rem !important;
            padding-right: 2rem !important;

            .news-contents-contents {
                padding: 0 1.5rem;
            }
        } /* //.news-contents-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: #1EAA39;
        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 #1EAA39;
    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;
}