@charset "utf-8";

/* ===== ローディングアニメーション ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #004A78;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s ease;
    overflow: hidden;
}

.loading.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.loading-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loading-spinner-wrapper {
    margin-bottom: 50px;
    position: relative;
}

.loading-spinner {
    position: relative;
    width: 70px;
    height: 70px;
    margin: 0 auto;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(1) {
    border-top-color: #fff;
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 75%;
    height: 75%;
    top: 12.5%;
    left: 12.5%;
    border-top-color: rgba(255, 255, 255, 0.8);
    animation-delay: 0.15s;
    animation-duration: 1s;
}

.spinner-ring:nth-child(3) {
    width: 50%;
    height: 50%;
    top: 25%;
    left: 25%;
    border-top-color: rgba(255, 255, 255, 0.6);
    animation-delay: 0.3s;
    animation-duration: 0.8s;
}

.loading-logo {
    opacity: 0;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
    margin-bottom: 40px;
    filter: brightness(0) invert(1);
}

.loading-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ===== トップページ専用スタイル ===== */

/* メイン画像 */
.main-image {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* PC版画像 */
.main-image-pc {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* モバイル版画像 */
.main-image-mobile {
    display: none;
}

/* モバイル版（900px以下） */
@media screen and (max-width: 900px) {
    .main-image {
        margin: 0;
        padding: 0;
    }

    .main-image-pc {
        display: none;
    }

    .main-image-mobile {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
    }
}

/* 画像グリッド */
.image-grid {
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

.image-item {
    width: 100%;
    overflow: hidden;
}

.image-item a {
    display: block;
    width: 100%;
    text-decoration: none;
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item img:hover {
    transform: scale(1.02);
}

/* モバイル版（900px以下） */
@media screen and (max-width: 900px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: 30px auto;
        padding: 0 5%;
    }

    .image-item img:hover {
        transform: none;
    }
}

/* ボトム画像 */
.bottom-image {
    width: 100%;
    text-align: center;
    margin: -100px 0 0 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.bottom-image-link {
    display: block;
    width: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

/* PC版画像 */
.bottom-image-pc {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* モバイル版画像 */
.bottom-image-mobile {
    display: none;
}

/* モバイル版（900px以下） */
@media screen and (max-width: 900px) {
    .bottom-image {
        margin: -50px 0 0 0;
    }

    .bottom-image-pc {
        display: none;
    }

    .bottom-image-mobile {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
    }
}

/* サード画像 */
.third-image {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    margin-top: 50px;
}

/* PC版画像 */
.third-image-pc {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

/* モバイル版画像 */
.third-image-mobile {
    display: none;
}

/* モバイル版（900px以下） */
@media screen and (max-width: 900px) {
    .third-image {
        margin: 0;
        padding: 0;
    }

    .third-image-pc {
        display: none;
    }

    .third-image-mobile {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
    }
}

/* フォース画像 */
.fourth-image {
    width: 100%;
    text-align: center;
    margin: 40px 0;
    padding: 0;
}

/* PC版画像 */
.fourth-image-pc {
    width: 70%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* モバイル版画像 */
.fourth-image-mobile {
    display: none;
}

/* モバイル版（900px以下） */
@media screen and (max-width: 900px) {
    .fourth-image {
        margin: 30px 0;
        padding: 0;
    }

    .fourth-image-pc {
        display: none;
    }

    .fourth-image-mobile {
        display: block;
        width: 100%;
        height: auto;
        margin: 0;
    }
}

/* ===== トップページ ブログセクション ===== */
.top-blog {
    width: 100%;
    max-width: 1400px;
    margin: 50px auto 60px;
    padding: 0 5%;
}

.top-blog-heading {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.top-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.top-blog-item {
    display: block;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.top-blog-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 16 / 10;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.top-blog-item:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.top-blog-item-title {
    display: block;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.top-blog-item:hover .top-blog-item-title {
    color: #000;
    text-decoration: underline;
}

.top-blog-btn-wrap {
    text-align: center;
    margin-top: 35px;
}

.top-blog-btn {
    display: inline-block;
    padding: 12px 40px;
    background: #004A78;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.top-blog-btn:hover {
    background: #003a5f;
    opacity: 0.95;
}

/* モバイル版：ブログ2件表示 */
@media screen and (max-width: 900px) {
    .top-blog {
        margin: 40px auto 50px;
        padding: 0 5%;
    }

    .top-blog-heading {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .top-blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .top-blog-item-pc {
        display: none !important;
    }

    .top-blog-item-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }

    .top-blog-btn-wrap {
        margin-top: 25px;
    }

    .top-blog-btn {
        padding: 10px 32px;
        font-size: 15px;
    }
}
