/* =========================
   home.css (index.html用)
========================= */

/* 全体共通 */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #ffffff;
}

/* =========================
   スライドショー
========================= */
.slideshow-container {
    position: relative; /* 絶対配置の基準 */
    width: 100vw; /* ブラウザ幅いっぱい */
    margin: 0;
    padding: 0;
    overflow: hidden;
    margin-top: 70px; /* 固定ナビバー分の余白 */
    height: 600px; /* 高さ固定 */
}


/* スライド画像 */
.slideshow {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* 横幅いっぱい */
    height: 100%; /* 高さも枠いっぱい */
    object-fit: cover; /* 縦横比を維持 */
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 4s ease-in-out;
}

.slideshow img.active {
    opacity: 1;
    transform: scale(1.1);
}

/* =========================
   サイド画像・テキスト
========================= */
.side-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 600px;
    box-sizing: border-box;
    padding: 10px;
}

.side-image img {
    width: 600px;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.side-text {
    margin-top: 15px;
    text-align: center;
    font-size: 18px;
    color: #333;
    line-height: 1.6;
}

/* =========================
   タブブロック（下段セクション）
========================= */
.tab-section {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.tab-block {
    width: 100%;
    margin: 0;
}

.tab-block:nth-child(odd) {
    background-color: #ffffff;
}

.tab-block:nth-child(even) {
    background-color: #ffffff;
}

.tab-content {
    display: flex;
    width: 100%;
    align-items: stretch;
    padding: 0 0 40px;
}

.tab-block.right .tab-content {
    flex-direction: row;
}

.tab-block.left .tab-content {
    flex-direction: row-reverse;
    justify-content: flex-start; /* 左寄せ */
    align-items: center;
    flex-wrap: nowrap; /* 改行させない */
    margin-top: 80px
}

.tab-image {
    flex: 1;
}

.tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.tab-text {
    flex: 1;
    padding: 0 40px 60px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tab-block.right .tab-text {
    align-items: flex-start;
    text-align: left;
}

/* 修正箇所 */
.tab-block.left .tab-content {
    align-items: center;
}

.tab-block.left .tab-image {
    flex: 0 0 45%; /* 幅を45%に固定 */
    overflow: hidden; /* スクロール帯がはみ出さないようにする */
}
.tab-block.left .tab-image .ticker .track {
    flex-shrink: 0; /* スクロールテキストが縮まないようにする */
}

.tab-block.left .tab-text {
    flex: 0 0 45%; /* 幅を45%に固定 */
    min-width: 200px; /* 最低幅確保 */
    margin-left: 5%;
    align-items: flex-end;
    text-align: right;
    overflow-wrap: break-word; /* 長文がはみ出さない */
}
/* 修正箇所 終わり */

.tab-text h3 {
    margin: 0 0 20px;
    font-size: 30px;
    color: #000000;
}

.tab-text ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tab-text ul li a::before {
    content: '';
    background-image: url('images/image2.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-right: 5px;
    vertical-align: middle;
    line-height: 1;
}

.tab-text li {
    margin: 10px 0;
}

.tab-text a {
    text-decoration: none;
    color: #003300;
    font-size: 26px;
    transition: color 0.3s ease;
}

.tab-text a:hover {
    color: #66bb66;
    text-decoration: underline;
}

/* =========================
   スライド下テキスト
========================= */
.slideshow-caption {
    position: absolute;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
    text-align: left;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
    z-index: 10;
    max-width: 90%;
}

/* =========================
   ticker（スクロール文）設定
========================= */
.ticker {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 2.5em;
    padding-left: var(--start-gap, 50px); /* 右端余白 */
    box-sizing: content-box;
}

.ticker .track {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 1.5em;
    animation: scroll-left var(--duration, 20s) linear infinite;
    flex-shrink: 1; /* 長文でも右側を押さない */
}

.ticker .item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-right: 3em; /* アイテム間のスペース */
    font-size: 24px;
}

.ticker-a .item {
    color: red;      /* A行は赤 */
}

.ticker-b .item {
    color: blue;     /* B行は青 */
}

.ticker-c .item {
    color: green;    /* C行は緑 */
}

.ticker-d .item {
    color: orange;   /* D行はオレンジ */
}

.tab-slideshow {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}
.tab-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease; /* ふわっと切替 */
}
.tab-slideshow img.active {
    opacity: 1;
    position: relative;
}

@keyframes scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); } /* 2セットの場合の半分移動 */
}

/* =========================
   レスポンシブデザイン
========================= */
@media (max-width: 768px) {
    .slideshow-container {
        flex-direction: column;
        align-items: center;
        height: auto;
    }

    .side-image img {
        width: 100%;
        max-width: 600px;
    }

    .slideshow {
        width: 100%;
        height: auto;
    }

    .slideshow img {
        position: relative;
        height: auto;
    }

    .overlay-texts {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }

    .overlay-text {
        font-size: 20px;
        text-align: center;
    }

    .tab-content {
        flex-direction: column !important;
    }

    .tab-text {
        padding: 20px;
        align-items: center !important;
        text-align: center !important;
    }

    .tab-text h3 {
        font-size: 40px;
    }

    .tab-text a {
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slideshow-caption {
        font-size: 18px;
        bottom: 10px;
        right: 50%;
        transform: translateX(50%);
        text-align: center;
    }
}

/* =========================
   全体画像共通設定
========================= */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =============================
   スマホ向けレスポンシブ対応
   ============================= */
@media screen and (max-width: 768px) {

    /* --------------------------
       ナビメニュー（ハンバーガー）
       -------------------------- */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
    }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        background: #ffffff;
        border-top: 1px solid #ddd;
    }

    .menu.show {
        display: flex;
    }

    .navbar .logo img {
        height: 50px;
    }

    /* ハンバーガーボタン */
    .hamburger {
        display: block;
        cursor: pointer;
        margin-left: auto;
        margin-right: 15px;
        font-size: 28px;
        user-select: none;
    }

    /* PC用ドロップダウンはスマホでは縦並びに変更 */
    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        display: none;
        background: #f7f7f7;
        padding-left: 20px;
    }

    .dropdown.open .dropdown-content {
        display: block;
    }

    /* --------------------------
       英文スライドのブロック
       -------------------------- */
    .tab-block {
        padding: 20px;
    }

    .tab-content {
        flex-direction: column;
        text-align: center;
    }

    .tab-image,
    .tab-text {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 0;
    }

    /* 画像スライド */
    .tab-slideshow img {
        width: 100%;
        height: auto;
    }

    /* --------------------------
       上部の大スライドショー
       -------------------------- */
    .slideshow img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .slideshow-caption {
        font-size: 16px;
        bottom: 10px;
        padding: 10px;
    }

    /* --------------------------
       本文サイズ調整
       -------------------------- */
    p {
        font-size: 16px !important;
        max-width: 100% !important;
        padding: 0 15px;
    }

    /* タイトル */
    h3 {
        font-size: 22px;
    }

    /* --------------------------
       ボタン
       -------------------------- */
    .button-section {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .action-button {
        width: 90%;
        text-align: center;
        display: block;
        margin: 0 auto;
    }

    /* --------------------------
       フッター
       -------------------------- */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        width: 100%;
        padding: 20px 0;
    }

    .footer-column img {
        margin-bottom: 20px;
        width: 120px;
    }
}
