/* top_page.css - top_page.php 専用スタイルシート */

/* ===== 共通設定・リセット（common.cssからの影響を考慮） ===== */
html,
body {
    margin: 0;
    padding: 0;
    /* flex-direction: column; */
    display: block;
    overflow-x: hidden;
    /* ★重要: ページ全体の横スクロールを抑制 */
}


/* ===== メインコンテンツエリア ===== */
.main-content {
    width: 100%;
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
    color: #eee;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* 各セクションの共通スタイル */
.info-section,
.announcement-section,
.today-shifts-section,
.newface-pickup-section {
    width: 100%;
    padding: 25px;
    /* background-color: rgba(0, 0, 0, 0.7); */
    border-radius: 10px;
    /* box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); */
    box-sizing: border-box;
    color: #eee;
    text-align: center;
}


.section-title {
    font-family: "Hachi Maru Pop", cursive;
    font-size: 2.5em;
    color: #fff;
    text-shadow:
        0 0 7px #ff0000,
        0 0 10px #ff0000,
        0 0 21px #ff0000;
    margin: 0 auto;
    /* border-bottom: 2px solid #ff0000; */
    padding-bottom: 10px;
    display: inline-block;
}


/* ===== インフォメーション (スライドショー) セクション ===== */
.slideshow-container {
    max-width: 800px;
    margin: 0 auto;
}

.main-slide img {
    /* スライド画像調整 */
    width: 100%;
    max-width: 800px;
    height: 400px;
    /* border: 3px solid #ff0000; */
    object-fit: contain;
    /* box-shadow: 0 0 20px rgba(255, 0, 0, 0.7); */
    border-radius: 8px;
    margin: 0 auto;
    display: block;
    transition: opacity 0.5s ease-in-out;
}

.thumbnail-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #ff0000;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

/* ===== お知らせリスト ===== */
.announcement-list-container {
    max-height: 300px;
    width: 90%;
    margin: 0 auto;
    overflow-y: auto;
    border: 2px solid rgba(255, 0, 0, 0.342);
    border-radius: 8px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.747);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    scrollbar-color: #ff0000 #333;
}

.announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announcement-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px dashed rgba(255, 0, 0, 0.89);
    text-align: left;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
        /* ★ テキストと画像を左右に寄せる */
}

.announcement-item:last-child {
    border-bottom: none;
}

/* 新規追加: お知らせの日付と内容をまとめるコンテナ */
.announcement-text-content {
    display: flex;
    /* ★ 日付と内容を縦に並べる */
    flex-direction: column;
    /* ★ 縦並び */
    flex-grow: 1;
    /* ★ 利用可能なスペースを埋める */
    /* min-width: 150px; */
    /* 必要に応じて最小幅を設定 */
}

.announcement-text-content p {
    margin: 0 auto;
}

.announcement-date {
    font-weight: bold;
    color: #ff0000;
    margin-right: 0;
    /* min-width: 90px; */
    flex-shrink: 0;
    /* margin-bottom: 5px; */
        /* 日付と内容の間にスペース */
}

.announcement-content {
    flex-grow: 1;
    color: #eee;
    margin-bottom: 0;
}

.announcement-image {
    width: 100px;
    height: 150px;
    min-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    /* margin-left: auto; */
    flex-shrink: 0;
}


/* ===== 横スクロールするガールカードの共通スタイル (Today's Shifts, New Face, Pickup) ===== */
.girl-cards-horizontal-scroll {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
    gap: 15px;
    justify-content: flex-start;
    scrollbar-width: thin;
    scrollbar-color: #ff0000 #333;
}

/* Webkit系ブラウザ (Chrome, Safari) のスクロールバーのカスタマイズ */
.girl-cards-horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.girl-cards-horizontal-scroll::-webkit-scrollbar-track {
    background: #333;
    border-radius: 4px;
}

.girl-cards-horizontal-scroll::-webkit-scrollbar-thumb {
    background-color: #ff0000;
    border-radius: 4px;
    border: 1px solid #555;
}

/* 個々の横スクロールガールカードのスタイル */
.girl-card-horizontal {
    flex: 0 0 auto;
    width: 200px;
    /* デフォルトのカード幅 */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(255, 0, 0);
    transition: transform 0.2s ease-in-out;
    text-align: center;
    padding: 15px;
    margin: 10px 10px;
    box-sizing: border-box;
    white-space: normal;
}

.girl-card-horizontal:hover {
    transform: translateY(-5px);
}

.girl-card-horizontal img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.girl-card-horizontal h3 {
    margin: 10px 0 5px;
    font-size: 1.4em;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 0, 0);
}

.girl-card-horizontal p {
    font-size: 1em;
    color: #ccc;
    margin: 0 auto;
}

.girl-card-horizontal .girl-link-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.girl-card-horizontal .girl-item-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}


/* ===== New Face と Pickup セクションのコンテナ ===== */
.newface-pickup-section {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.newface-section,
.pickup-section {
    flex: 1 1 calc(50% - 15px);
    min-width: 300px;
    box-sizing: border-box;
    border-radius: 15px;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 15px rgb(255, 0, 0);
}

/* 女の子がいない場合のメッセージ */
.no-girls-message {
    width: 100%;
    color: #ff0000;
    font-size: 1.1em;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    margin-top: 20px;
    display: inline-block;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}


/* =============================================== */
/* メディアクエリ (デバイス対応) */
/* =============================================== */

/* タブレット横向き〜小型ノートPC (max-width: 1024px) の調整を追加 */
@media (max-width: 1024px) {
    .main-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* New Face と Pickup セクションの調整 */
    .newface-pickup-section {
        gap: 20px;
    }

    .newface-section,
    .pickup-section {
        flex: 1 1 calc(50% - 10px);
        /* ギャップ調整 */
    }

    /* 横スクロールするガールカードの調整 */
    .girl-card-horizontal {
        width: 180px;
        padding: 12px;
    }

    .girl-card-horizontal img {
        height: 220px;
    }

    .girl-card-horizontal h3 {
        font-size: 1.3em;
    }

    .girl-card-horizontal p {
        font-size: 0.8em;
    }
}


/* スマートフォン〜タブレット縦向き (max-width: 768px) */
@media (max-width: 768px) {

    .info-section,
    .announcement-section,
    .today-shifts-section,
    .newface-pickup-section {
        padding: 0 20px 20px 20px;
    }

    .section-title {
        font-size: 2em;
    }

    /* スライドショー調整 */
    .main-slide img {
        max-width: 100%;
        height: 260px;

    }

    .thumbnail {
        width: 80px;
        height: 60px;
    }

    /* 横スクロール対応のガールカード調整（全般） */
    .girl-cards-horizontal-scroll {
        display: flex;
        /* ★ 横スクロールを維持するためにflexに戻す */
        overflow-x: auto;
        /* ★ 横スクロールを有効に */
        white-space: nowrap;
        /* ★ カードが折り返さないように */
        padding-bottom: 15px;
        /* スクロールバーのためのスペース */
        gap: 15px;
        /* カード間のスペース */
        justify-content: flex-start;
        scrollbar-width: thin;
        scrollbar-color: #ff0000 #333;
        /* スクロールバーのスタイルも維持 */
    }

    /* ガールカードの幅調整 */
    .girl-card-horizontal {
        width: 160px;
        /* スマートフォンでのカード幅 */
        padding: 10px;
    }

    .girl-card-horizontal img {
        height: 200px;
    }

    /* お知らせリスト調整 */
    .announcement-list-container {
        max-height: 200px;
    }

    .announcement-item {
        flex-direction: column;
        /* ★ 縦積みに戻す */
        align-items: flex-start;
        /* 左寄せにする */
        padding: 8px 8px 15px 8px;
        gap: 5px;
        /* 要素間のスペースを小さく */
        justify-content: flex-start;
            /* 縦積みなので不要だが念のため */
    }

    /* 新規追加: announcement-text-content のスマホでの調整 */
    .announcement-text-content {
        width: 100%;
        /* スマホではテキストコンテンツを全幅に */
        flex-direction: column;
        /* 縦並びを維持 */
        align-items: center; /*テキストの位置*/
        gap: 0;
        /* 必要に応じて調整 */
    }

    .announcement-date {
        font-size: 0.9em;
        margin-bottom: 5px;
        }

    .announcement-content {
        font-size: 0.9em;
        margin-bottom: 5px;
    }

    .announcement-item {
        align-items: center;
    }

    .announcement-image {
        width: 100%;
        max-width: 150px;
        height: 150px;
        margin-left: 0;
        margin-top: 5px;
    }


    .announcement-thumbnail {
        width: 50px;
        height: 38px;
    }

    /* New Face と Pickup セクションのコンテナ調整 */
    .newface-pickup-section {
        flex-direction: column;
        gap: 20px;
    }

    .newface-section,
    .pickup-section {
        flex: 1 1 auto;
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {

    .main-content {
        padding-left: 5px;
        padding-right: 5px;
    }

    .info-section,
    .announcement-section,
    .today-shifts-section,
    .newface-pickup-section {
        padding: 5px 15px 15px 15px;
    }

    .section-title {
        font-size: 1.5em;
    }

    /* スライドショー調整 */
    .main-slide img {
        border-width: 2px;
    }

    .thumbnail {
        width: 60px;
        height: 45px;
    }

    /* ガールカードの幅調整 */
    .girl-card-horizontal {
        width: 140px;
        padding: 8px;
    }

    .girl-card-horizontal img {
        height: 180px;
    }

    .girl-card-horizontal h3 {
        font-size: 1.2em;
    }

    .girl-card-horizontal p {
        font-size: 0.75em;
    }

    /* お知らせリスト調整 */
    .announcement-list-container {
        max-height: 180px;
    }

    .announcement-item {
        /* flex-direction: column;
        align-items: flex-start; */
        padding: 5px 5px 15px 5px;
        gap: 3px
    }

    .announcement-date {
        font-size: 0.8em;
        /* margin-right: 0;
        margin-bottom: 5px; */
    }

    .announcement-content {
        font-size: 0.8em;
    }

    .announcement-image {
        width: 100%;
        max-width: 120px;
        height: 150px;
    }
}