/* 基本的なスタイル */
body {
    margin: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #f9f9f9;
    font-feature-settings: "palt";
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background-color: #fff;
    padding: 15px 40px; /* 不要な右側の余白を削除し、左右を40pxに統一 */
    border-bottom: 1px solid #eee;
    display: flex; /* Flexboxを有効化 */
    justify-content: space-between; /* 両端に配置 */
    align-items: center; /* 上下中央揃え */
    position: fixed; /* ヘッダーをビューポートに固定 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* 他の要素より手前に表示 */
}


/* ヘッダーのロゴ */
.logo {
    width: 240px;
    /* padding-leftとvertical-alignは不要になるため削除 */
}

/* ハンバーガーメニュー (PCでは非表示) */
.hamburger-menu {
    display: none;
}

/* ヘッダーナビゲーション */
.header-nav > ul {
    display: flex; /* リスト項目を横並びにする */
    list-style: none; /* リストの黒点を削除 */
    margin: 0;
    padding: 0;
}

.header-nav li {
    margin-left: 30px; /* 各メニュー項目の間隔 */
}

.header-nav a {
    text-decoration: none; /* リンクの下線を削除 */
    color: #333;
    font-weight: normal; /* 文字の太さを細めに */
    font-size: 1rem; /* 文字の大きさを少し大きく */
    transition: color 0.3s; /* ホバー時の色の変化を滑らかに */
}

.header-nav a:hover {
    color: #007bff; /* ホバー時の色 */
}

/* ドロップダウンメニュー */
.dropdown {
    position: relative; /* ドロップダウンメニューの位置の基準点 */
    z-index: 1002; /* メニュー全体が最前面に来るように設定 */
    margin-right: 120px; /* 右側のマージンを広げる */
}

.dropdown-toggle::after {
    content: ' ▼'; /* 下向きの矢印を追加 */
    font-size: 0.7em;
    display: inline-block;
    margin-left: 4px;
}

.dropdown-menu {
    display: none; /* 通常時は非表示 */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin-top: 0; /* 親メニューとの間隔をなくし、マウスが外れないようにする */
    min-width: 160px;
    z-index: 1001;
}

/* 親要素(.dropdown)にホバーしたときにドロップダウンメニューを表示 */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin-left: 0; /* 親メニューのスタイルをリセット */
    margin-bottom: 0; /* 他のスタイルからの影響をリセット */
}

.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    font-weight: normal;
    color: #333;
}

/* メインコンテンツ */
main {
    padding-top: 72px; /* 固定ヘッダーの高さ分だけ余白を設ける */
}

/* ヒーローセクション */
.hero {
    position: relative; /* テキストを画像の上に配置するための基準点 */
    height: 600px; /* 高さを400pxに指定 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 画像のURLをここに指定してください */
    background-image: url('../images/result_top1.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-text {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero-text h2 {
    font-size: 3.6rem;
    letter-spacing: 0.2em;
    margin: 0;
    font-weight: bold;
    color: #28cdd0; /* エメラルドグリーン */
    text-shadow:
        -2px -2px 5px #fff,
         2px -2px 5px #fff,
        -2px  2px 5px #fff,
         2px  2px 5px #fff; /* 白い縁取りをぼかす */
}

/* 概要セクション */
.overview {
    padding: 30px 0 60px;
    background-color: #fff;
    text-align: center; /* セクション内の要素を中央揃え */
}

.overview-text {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 10px; /* テキストと画像の間の余白を詰める */
}

.overview-title-image {
    display: block;
    margin: 0 auto; /* 中央揃えを維持 */
    max-width: 80%; /* 画像の最大幅を80%に縮小 */
}

.overview-body {
    margin-top: 40px; /* タイトル画像との間の余白 */
    text-align: left; /* テキストを左揃えに戻す */
}

.overview-body p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5em; /* 段落ごとの下の余白 */
}

/* 総評セクション */
.summary {
    padding: 20px 0;
    background-color: #f0f0f0; /* 背景色を薄いグレーに変更 */
}

.summary h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 30px;
}

.summary-content {
    display: flex;
    align-items: center;
    gap: 30px; /* テキストと画像の間の余白 */
    margin-bottom: 40px; /* 各総評ブロックの下の余白 */
}

.summary-text {
    flex: 1; /* テキストが利用可能なスペースを埋めるようにする */
}

.summary-image {
    width: 250px; /* 画像の幅を指定 */
    height: auto;
}

.summary p {
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

/* ギャラリーセクション */
.gallery {
    padding: 30px 0 60px;
    background-color: #fff;
}

.gallery h2 {
    font-size: 1.4rem; /* 文字を小さく */
    text-align: center;
    margin-bottom: 40px;
    font-weight: normal; /* 文字を細く */
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
}

.carousel-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 25%; /* 4枚表示 */
    padding: 0 10px;
    box-sizing: border-box;
}

.video-container {
    position: relative;
    padding-bottom: 66.7%; /* 画像のアスペクト比に合わせる */
    height: 0;
    overflow: hidden;
    width: 100%;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* 透明なオーバーレイ */
    z-index: 1; /* iframeの上に配置 */
    cursor: pointer; /* クリック可能であることを示す */
}

.video-container {
    cursor: pointer; /* クリック可能であることを示すカーソル */
    background-color: #000; /* 背景を黒に */
    position: relative;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-caption {
    margin-top: 10px;
    text-align: center;
}

.carousel-caption p {
    margin: 0;
    font-size: 0.9rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent; /* 背景を透明にする */
    color: #333; /* 矢印の色を濃いグレーにする */
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.carousel-button.prev {
    left: -40px;
}

.carousel-button.next {
    right: -40px;
}

/* 受賞作品セクション */
.winners {
    padding: 30px 0 60px;
    background-color: #f0f0f0; /* 背景色を薄いグレーに変更 */
}

.winners h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
}

.winners-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.winner-entry {
    display: grid;
    grid-template-columns: 0.6fr 1.2fr 1.1fr; /* 1列目を狭く、2列目を広く */
    gap: 30px; /* カラム間のマージンを空ける */
    padding: 20px; /* 左右の余白を同じにする */
    align-items: start; /* カラムの内容を一番上に揃える */
    border-radius: 5px;
    background-color: #fff; /* 奇数番目の背景色 */
}

.winners-item {
}

.winners-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.winners-award {
    max-width: 100%;
    height: auto;
}

.winners-thumbnail-link {
    display: block;
    text-align: center;
}

.winners-thumbnail {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.winners-thumbnail:hover {
    transform: scale(1.05);
}

.thumbnail-small {
    width: 80%; /* 画像の幅をコンテナの80%に縮小 */
    margin: 0 auto; /* 中央に配置 */
}

.winners-text {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #333;
    text-decoration: none;
}

.winners-text:hover {
    text-decoration: underline;
}

.winners-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    margin-top: 0;
    text-align: left;
}

.winners-item p {
    margin-top: 0;
    margin-bottom: 10px; /* pタグ間の下の余白を詰める */
    margin-bottom: 10px;
}

/* ライトボックス */
.lightbox {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    /* 初期状態では非表示にする */
    display: none;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px; /* 最大幅を少し広げる */
    margin: auto;
    display: flex; /* コンテンツのサイズにコンテナを合わせる */
    justify-content: center;
    align-items: center;
}

.lightbox-content img,
.lightbox-content iframe {
    max-width: 100%;
    max-height: 90vh; /* 画面の高さの90%を上限とする */
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 15px; /* コンテンツの上端からさらに内側に配置 */
    top: 10px; /* ボタンを少し上に移動 */
    right: 15px; /* コンテンツの右端からさらに内側に配置 */
    color: #f1f1f1;
    font-size: 40px;
    font-weight: normal; /* middleは無効な値のため修正 */
    cursor: pointer;
    z-index: 2001; /* コンテンツより手前に表示 */
    background-color: rgba(0, 0, 0, 0.4); /* 半透明の背景を少し薄く */
    border-radius: 50%; /* 円形にする */
    width: 40px; /* 幅を指定 */
    height: 40px; /* 高さを指定 */
    line-height: 38px; /* Xマークを少し上に移動 */
    text-align: center; /* テキストを水平方向の中央に */
    padding: 0; /* パディングをリセット */
}

.lightbox-content img,
.lightbox-content iframe {
    max-width: 100%;
    max-height: 90vh; /* 画面の高さの90%を上限とする */
    object-fit: contain;
}

/* フッター */
footer {
    background-color: #333;
    color: #fff;
    text-align: center; /* フッター全体を中央揃えに */
    padding: 20px 0;
    font-size: 1.1rem;
}

footer p {
    margin: 0;
    padding: 2px 0;
}

footer a {
    color: #fff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-info {
    /* display: flex; を削除して縦並びに戻す */
    margin-bottom: 10px;
}

.footer-info h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 30px 0 0; /* 上の余白を少し広げる */
    padding: 0;
}

.office-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 40px;
}

.contact-info {
    font-size: 0.9rem;
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: lighter;
    letter-spacing: 0.1rem;
}

/* --- スマートフォン対応 (レスポンシブ) --- */
@media (max-width: 768px) {

    /* ヘッダー */
    header {
        padding: 10px 20px;
    }

    .logo {
        width: 180px;
    }

    .header-nav {
        display: none; /* PC用メニューを非表示 */
        position: fixed;
        top: 62px; /* ヘッダーの高さ分下げる */
        left: 0;
        width: 100%;
        height: calc(100% - 62px);
        background-color: rgba(255, 255, 255, 0.95);
        flex-direction: column;
        padding-top: 20px;
    }

    .header-nav.active {
        display: flex; /* JSでactiveクラスが付いたら表示 */
    }

    .header-nav > ul {
        flex-direction: column;
        width: 100%;
    }

    .header-nav li {
        margin-left: 0;
        text-align: left; /* 中央揃えから左揃えに変更 */
        padding: 15px 20px; /* 左右に余白を追加 */
        border-bottom: 1px solid #eee;
    }
    .header-nav li:first-child { border-top: 1px solid #eee; } /* 先頭にも線を追加 */

    .dropdown-menu {
        position: static;
        display: none; /* デフォルトでは非表示にする */
        border: none;
        box-shadow: none;
        background-color: #f9f9f9;
        margin-top: 0; /* 上マージンを削除 */
        padding: 0;
    }
    .header-nav .dropdown.open .dropdown-menu {
        display: block; /* openクラスが付いたら表示 */
    }
    .dropdown-menu li {
        padding-left: 0px; /* インデントを少し狭くする */
        padding-top: 0px; /* 上下の余白をさらに詰める */
        padding-bottom: 0px; /* 上下の余白をさらに詰める */
        border: none; /* 親メニューの線を継承しない */
    }
    .dropdown:hover .dropdown-menu {
        display: none; /* ホバーでの表示を無効化 */
    }

    /* ハンバーガーメニュー */
    .hamburger-menu {
        display: block;
        cursor: pointer;
        background: none;
        border: none;
        z-index: 1003;
    }
    .hamburger-menu span {
        display: block;
        width: 25px;
        height: 3px;
        margin: 5px 0;
        background-color: #333;
        transition: 0.4s;
    }

    /* メインコンテンツ */
    main {
        padding-top: 62px; /* ヘッダーの高さ分 */
    }

    /* ヒーロー */
    .hero {
        height: 300px;
    }
    .hero-text h2 {
        font-size: 2.5rem;
    }

    /* 概要、ギャラリー、総評セクションの上下余白を詰める */
    .overview,
    .gallery,
    .summary,
    .winners {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* 概要 */
    .overview-text {
        font-size: 1.2rem;
        line-height: 1.5; /* 行間を詰める */
    }
    .overview-title-image {
        max-width: 100%; /* 画像の最大幅を100%に戻す */
    }


    /* ギャラリー */
    .gallery h2 {
        font-size: 1.1rem;
    }
    .carousel-item {
        min-width: 100%; /* 1枚表示 */
    }
    .carousel-button {
        /* 上下中央に配置 */
        top: 50%;
        transform: translateY(-50%);
        font-size: 2rem;
        color: #fff;
        background-color: rgba(0, 0, 0, 0.4);
        padding: 5px 10px;
    }
    .carousel-button.prev {
        left: 10px;
    }
    .carousel-button.next {
        right: 10px;
    }

    /* 総評 */
    .summary-content {
        flex-direction: column; /* 縦積みに変更 */
        gap: 10px; /* テキストと画像の間の余白をさらに詰める */
    }
    .summary-image {
        width: 250px; /* 画像を大きくする */
    }

    /* 受賞作品 */
    .winner-entry {
        grid-template-columns: 1fr; /* 1カラムレイアウトに変更 */
        gap: 20px;
    }

    .winners-item {
        text-align: left; /* テキストを左揃えに変更 */
    }

    .winner-entry .winners-item:first-child {
        text-align: center; /* 1カラム目の中身だけ中央揃えに */
    }

    .winners-image {
        width: 180px; /* 1カラム目の画像の幅を小さくする */
        height: auto;
    }


}

/* ページトップへ戻るボタン */
#page-top-btn {
    position: fixed;
    bottom: 30px;
    right: 50px;
    width: 60px;
    height: 60px;
    background-color: rgba(220, 50, 50, 0.8);
    border-radius: 50%;
    text-decoration: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#page-top-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%) rotate(45deg);
    width: 20px;
    height: 20px;
    border-top: 3px solid #fff;
    border-left: 3px solid #fff;
}

#page-top-btn.show {
    opacity: 1;
    visibility: visible;
}