@charset "UTF-8";

/**
 * 目次
 * 1. 基本設定・ユーティリティ
 * 2. カスタムレイアウト・ボックス
 * 3. 写真・動画ギャラリー
 * 4. 装飾・バナー・テキスト
 * 5. レスポンシブ対応 (スマホ専用設定)
 */

/* ==========================================================================
   1. 基本設定・ユーティリティ
   ========================================================================== */

.wp-has-aspect-ratio {
    margin-left: auto !important;
    margin-right: auto !important;
}

.wp-block-embed {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
}

.img-sp-only {
    display: none;
}

@media (max-width: 767px) {
    .img-pc-only {
        display: none !important;
    }
    .img-sp-only {
        display: block !important;
    }
}

/* ==========================================================================
   2. カスタムレイアウト・ボックス
   ========================================================================== */

/* 見出し付きカスタムボックス */
.ict-custom-box {
    border: 2px solid var(--color-secondary) !important;
    padding: 0 !important;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 2em;
    border-radius: 0; 
}

/* ボックス内の見出し設定 */
.ict-custom-box h2,
.ict-custom-box h3,
.ict-custom-box h4,
.ict-custom-box .wp-block-heading {
    background: var(--color-secondary) !important;
    color: var(--color-text-white) !important;
    text-align: center;
    padding: 15px 10px;
    margin: 0 !important;
    width: 100%;
    font-size: 1.2em;
    font-weight: bold;
}

/* ボックス内部の余白設定 */
.ict-custom-box-inner {
    padding: 30px 50px !important;
}

.ict-custom-box-inner p {
    margin-bottom: 1em !important;
}

/* 比較用カラム（2色） */
.colored-comparison-columns {
    margin-bottom: 2em;
    gap: 20px !important;
}

.colored-comparison-columns .wp-block-column {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: bold;
    color: var(--color-text-dark);
    border-radius: 0;
}

/* 左側カラム：青系 */
.colored-comparison-columns .wp-block-column:nth-child(1) {
    background-color: #eef6ff;
    border: 1px solid #d0e2f5;
    border-top: 4px solid var(--color-primary);
}

/* 右側カラム：オレンジ系 */
.colored-comparison-columns .wp-block-column:nth-child(2) {
    background-color: #fcf4eb;
    border: 1px solid #ebdccb;
    border-top: 4px solid #f39c12; 
}

/* シンプルな枠線ボックス */
.service-template .simple-bordered-box {
    border: 2px solid var(--color-primary);
    background-color: #ffffff;
    padding: 30px;
    margin: 20px 0;
    border-radius: 0;
}

/* ==========================================================================
   3. 写真・動画ギャラリー
   ========================================================================== */

/* ギャラリー：カラム形式（シャドウ付き） */
.photo-gallery-columns {
    margin-bottom: 40px;
    gap: 30px !important;
}

.photo-gallery-columns .wp-block-column {
    background-color: #ffffff;
    border: 1px solid var(--color-border-medium);
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.photo-gallery-columns figure {
    margin: 0 auto 20px auto;
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.photo-gallery-columns img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.photo-gallery-columns p,
.photo-gallery-columns a {
    color: var(--color-text-dark);
    font-size: var(--fs-p);
    line-height: 1.6;
    text-decoration: none;
    margin-bottom: 0;
    display: block;
    font-weight: bold;
}

/* ギャラリー：広い余白の2カラムグリッド */
.wide-gap-gallery,
ul.wp-block-gallery.wide-gap-gallery {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important; 
    list-style: none !important;
}

.wide-gap-gallery > li,
.wide-gap-gallery > figure,
.wide-gap-gallery .wp-block-image {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: block !important;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.wide-gap-gallery img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover !important;
    vertical-align: bottom !important;
}

/* シンプルな写真グリッド（説明文付き） */
.simple-photo-grid {
    margin-bottom: 40px;
    gap: 20px !important;
}

.simple-photo-grid figure {
    margin: 0 0 10px 0;
    width: 100%;
}

.simple-photo-grid img {
    width: 100%;
    height: auto !important;
    object-fit: contain;
    display: block;
    border: 1px solid var(--color-border-medium);
    border-radius: 0;
}

.simple-photo-grid p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    text-align: left;
    color: var(--color-text-dark);
    font-weight: 500;
}

/* 8枚並べる小型グリッド */
.photo-grid-8 {
    margin-bottom: 20px !important;
    gap: 10px !important;
}

.photo-grid-8 figure {
    margin: 0;
    width: 100%;
    height: 100%;
}

.photo-grid-8 img {
    width: 100%;
    height: 200px !important;
    object-fit: contain !important;
    border: 1px solid var(--color-border-medium);
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 0;
}

/* 固定比率（5:4）の画像 */
.img-fixed img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: contain;
}

/* ==========================================================================
   4. 装飾・バナー・テキスト
   ========================================================================== */

/* ハイライトバナー（青背景） */
.service-template .highlight-banner {
    max-width: 100%;
    margin: 60px auto;
    box-sizing: border-box;
    background-color: rgba(1, 64, 153, 0.85);
    color: #ffffff;
    padding: 60px 20px;
    border-top: 4px solid var(--color-primary);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.service-template .highlight-banner > * {
    max-width: var(--w-text);
    margin: 0 auto;
}

.service-template .highlight-banner h2,
.service-template .highlight-banner h3,
.service-template .highlight-banner h4 {
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.service-template .highlight-banner p {
    color: #ffffff;
    font-size: 16px;
    text-align: center;
    font-weight: 500;
    line-height: 1.8;
    margin: 0;
}

/* テキスト装飾：青 */
.service-template .text-highlight-blue,
.service-template .text-highlight-blue a,
.service-template .text-highlight-blue strong {
    color: var(--color-primary) !important;
    font-weight: bold;
    text-decoration: none;
}

.service-template .text-cyan {
    color: var(--color-primary) !important;
}

/* 下向き吹き出し */
.speech-bubble-down {
    position: relative;
    background-color: #f9f9f9;
    border: 2px solid var(--color-primary);
    border-radius: 0;
    padding: 25px;
    margin: 20px auto 40px auto;
    color: var(--color-text-dark);
    font-weight: bold;
    text-align: center;
    max-width: var(--w-text);
}

.speech-bubble-down::after,
.speech-bubble-down::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: solid transparent;
    height: 0;
    width: 0;
    pointer-events: none;
}

.speech-bubble-down::after {
    border-top-color: #f9f9f9;
    border-width: 15px;
}

.speech-bubble-down::before {
    border-top-color: var(--color-primary);
    border-width: 18px;
}

/* ==========================================================================
   5. レスポンシブ対応 (スマホ)
   ========================================================================== */

@media (max-width: 768px) {
    /* ボックス余白の調整 */
    .ict-custom-box-inner {
        padding: 20px !important;
    }

    /* 多段組を縦並びにする一括設定 */
    .service-template ul.survey-menu-list,
    .service-template ol.survey-menu-list,
    .service-template .merit-columns,
    .service-template .comparison-columns,
    .mixed-uniform-grid,
    .uniform-2col-grid,
    .uniform-3col-grid,
    .mixed-gallery-row,
    .simple-2col-vertical,
    .photo-grid-8,
    .simple-photo-grid {
        display: block !important;
    }

    /* グリッドを1カラムに */
    .service-template ul.survey-menu-grid {
        grid-template-columns: 1fr;
    }

    /* カラム内の余白・幅調整 */
    .service-template ul.survey-menu-list li,
    .service-template ol.survey-menu-list li,
    .service-template .merit-columns .wp-block-column,
    .service-template .comparison-columns .wp-block-column,
    .wp-block-column {
        margin-bottom: 15px !important;
        width: 100% !important;
    }

    /* ギャラリーの調整 */
    .wide-gap-gallery,
    ul.wp-block-gallery.wide-gap-gallery {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* スマホ時の画像アスペクト比固定 */
    .photo-gallery-columns figure,
    .uniform-3col-grid img,
    .simple-2col-vertical img,
    .simple-photo-grid img,
    .uniform-2col-grid img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    /* ハイライトバナーの調整 */
    .service-template .highlight-banner {
        padding: 40px 20px;
    }
    .service-template .highlight-banner h2,
    .service-template .highlight-banner h3,
    .service-template .highlight-banner h4 {
        font-size: 22px;
    }
    .service-template .highlight-banner p {
        font-size: 14px;
    }

    /* 吹き出しの調整 */
    .speech-bubble-down {
        padding: 20px 15px;
    }
}

/* ==========================================================================
   年別リストのグリッドスタイル
   ========================================================================== */

/* リスト全体のコンテナ */
.year-list-grid {
    display: grid !important;
    /* PCでは5カラム（5個ずつ並ぶ） */
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 20px 0;
    padding: 0;
    list-style: none !important;
}

/* 各リスト項目（ボタン） */
.year-list-grid li {
    margin: 0 !important;
    padding: 0 !important;
}

.year-list-grid li a {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-secondary);
    color: var(--color-text-white) !important;
    text-decoration: none;
    padding: 12px 5px;
    font-weight: bold;
    font-size: 15px;
    transition: opacity 0.3s;
}

.year-list-grid li a:hover {
    opacity: 0.8;
}

.year-list-grid li.is-active a {
    background-color: #ffffff;
    color: #014099 !important;
    border: 1px solid #014099;
}

/* -------------------------------------------
   レスポンシブ対応
   ------------------------------------------- */

@media (max-width: 960px) {
    .year-list-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* スマホサイズ (幅768px以下) */
@media (max-width: 768px) {
    .year-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .year-list-grid li a {
        font-size: 14px;
        padding: 10px 5px;
    }
}

/* 極小スマホサイズ (幅480px以下) */
@media (max-width: 480px) {
    .year-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}