@charset "UTF-8";

/*---------------------------------
  GI Sophia オリジナルウィジェット
---------------------------------*/

/* Headingウィジェット（見出し） */
.gi-sophia-heading {
    margin: 1.5em 0;
}
.gi-sophia-heading__title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-heading-dark, #1E3A5F);
    margin: 0;
    padding-bottom: 0.5em;
    border-bottom: 1px solid var(--color-widget-divider, #A6BEE0);
    display: block;
    width: 100%;
}
/* H3見出し: 罫線なし、フォントサイズ調整 */
.gi-sophia-heading--h3 .gi-sophia-heading__title {
    font-size: 24px;
    border-bottom: none;
    padding-bottom: 0;
}

.gi-sophia-heading__number {
    color: var(--color-heading-dark, #1E3A5F);
    margin-right: 0.25em;
}
.gi-sophia-heading__text {
    color: var(--color-heading-dark, #1E3A5F);
}

/* Block_Quoteウィジェット（引用ブロック） */
.gi-sophia-quote {
    width: 100%;
    margin: 1.5em 0;
}
.gi-sophia-quote__box {
    background-color: var(--color-table-header-bg, #F3F8FF);
    border: 1px solid #A6BEE0;
    border-radius: 8px;
    padding: 16px;
    box-sizing: border-box;
    font-size: 15px;
}
.gi-sophia-quote__text {
    font-size: inherit;
    color: var(--color-text, #333333);
    line-height: 1.8;
    margin: 0;
}
@media screen and (max-width: 767px) {
    .gi-sophia-quote__box {
        padding: 16px;
    }
    .gi-sophia-quote__text {
        font-size: inherit;
    }
}

/* ==========================================================================
   Block_BulletPoints 共通ベース（arrow / check / number）
   ========================================================================== */
.gi-sophia-bullet-arrow,
.gi-sophia-bullet-check,
.gi-sophia-bullet-number {
    width: 100%;
    border: 1px solid #A6BEE0;
    border-radius: 8px;
    box-sizing: border-box;
}

.gi-sophia-bullet-check,
.gi-sophia-bullet-number {
    margin: 1.5em 0;
}

.gi-sophia-bullet-arrow__box,
.gi-sophia-bullet-check__box,
.gi-sophia-bullet-number__box {
    background-color: var(--color-table-header-bg, #F3F8FF);
    border: 1px solid var(--color-table-header-bg, #F3F8FF);
    border-radius: var(--border-radius-md, 8px);
    padding: 16px;
    box-sizing: border-box;
}

.gi-sophia-bullet-arrow__box,
.gi-sophia-bullet-check__box,
.gi-sophia-bullet-number__box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
}

.gi-sophia-bullet-arrow__title,
.gi-sophia-bullet-check__title {
    font-size: 16px;
    font-weight: bold;
    color: var(--color-heading-dark, #1E3A5F);
    letter-spacing: 0.05em;
}
.gi-sophia-bullet-check__title {
    margin: 0;
}

.gi-sophia-bullet-arrow__list,
.gi-sophia-bullet-check__list,
.gi-sophia-bullet-number__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
}

.gi-sophia-bullet-arrow__item,
.gi-sophia-bullet-check__item,
.gi-sophia-bullet-number__item {
    position: relative;
    padding-left: 36px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text, #333333);
    line-height: 1.5;
}

.gi-sophia-bullet-arrow__title,
.gi-sophia-bullet-arrow__list,
.gi-sophia-bullet-arrow__item,
.gi-sophia-bullet-number__list,
.gi-sophia-bullet-number__item {
    margin: 0;
}

/* ::before 共通ベース */
.gi-sophia-bullet-arrow__item::before,
.gi-sophia-bullet-check__item::before,
.gi-sophia-bullet-number__item::before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: #2873C9;
    border-radius: 50%;
}

/* === Arrow バリアント === */
.gi-sophia-bullet-arrow__item::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

/* === Check バリアント === */
.gi-sophia-bullet-check__item::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
}

/* === Number バリアント === */
.gi-sophia-bullet-number__list {
    counter-reset: number-counter;
}
.gi-sophia-bullet-number__item {
    counter-increment: number-counter;
}
.gi-sophia-bullet-number__item::before {
    content: counter(number-counter);
    color: var(--color-white);
    font-size: 0.8em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* BulletPoints 共通レスポンシブ */
@media screen and (max-width: 767px) {
    .gi-sophia-bullet-arrow__box,
    .gi-sophia-bullet-check__box,
    .gi-sophia-bullet-number__box {
        padding: 16px;
        font-size: 13px;
    }
    .gi-sophia-bullet-arrow__title,
    .gi-sophia-bullet-check__title {
        font-size: 13px;
    }
    .gi-sophia-bullet-arrow__item,
    .gi-sophia-bullet-check__item,
    .gi-sophia-bullet-number__item {
        font-size: 13px;
        padding-left: 30px;
    }
    .gi-sophia-bullet-arrow__item::before,
    .gi-sophia-bullet-check__item::before,
    .gi-sophia-bullet-number__item::before {
        width: 20px;
        height: 20px;
    }
    .gi-sophia-bullet-arrow__item::before,
    .gi-sophia-bullet-check__item::before {
        background-size: 13px;
    }
    .gi-sophia-bullet-number__item::before {
        font-size: inherit;
    }
}

/* Gutenbergエディター内プレビュー調整 */
.editor-styles-wrapper .wp-block-gi-sophia-heading,
.editor-styles-wrapper .wp-block-gi-sophia-quote,
.editor-styles-wrapper .wp-block-gi-sophia-bullet-arrow,
.editor-styles-wrapper .wp-block-gi-sophia-bullet-check,
.editor-styles-wrapper .wp-block-gi-sophia-bullet-number,
.editor-styles-wrapper .wp-block-gi-sophia-table,
.editor-styles-wrapper .wp-block-gi-sophia-feature-banner {
    margin-top: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   Block_Tableウィジェット（テーブル）
   ========================================================================== */
.gi-sophia-table {
    width: 100%;
    margin: 1.5em 0;
}
.gi-sophia-table__wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius-md, 8px);
}
.gi-sophia-table__table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-section-title);
}
.gi-sophia-table__table thead th {
    background-color: var(--color-table-header-bg, #F3F8FF);
    color: var(--color-heading-dark, #1E3A5F);
    font-weight: 700;
    font-size: var(--font-size-sub);
    padding: var(--space-16) var(--space-16);
    text-align: left;
    border-bottom: 1px solid var(--color-widget-divider, #A6BEE0);
}
.gi-sophia-table__table thead th:first-child {
    border-top-left-radius: var(--border-radius-md, 8px);
}
.gi-sophia-table__table thead th:last-child {
    border-top-right-radius: var(--border-radius-md, 8px);
}
.gi-sophia-table__table tbody td {
    padding: var(--space-16) var(--space-16);
    border-bottom: 1px solid var(--color-widget-divider, #A6BEE0);
    color: var(--color-text, #333333);
}
.gi-sophia-table__table tbody tr:last-child td {
    border-bottom: none;
}
.gi-sophia-table__table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--border-radius-md, 8px);
}
.gi-sophia-table__table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--border-radius-md, 8px);
}
.gi-sophia-table__table tbody tr:nth-child(odd),
.gi-sophia-table__table tbody tr:nth-child(even) {
    background-color: var(--color-white, #FFFFFF);
}
.gi-sophia-table__table tbody tr:hover {
    background-color: var(--color-white, #FFFFFF);
}
@media screen and (max-width: 767px) {
    .gi-sophia-table__table {
        font-size: var(--font-size-sub);
    }
    .gi-sophia-table__table thead th,
    .gi-sophia-table__table tbody td {
        padding: var(--space-12) 10px;
    }
}

/* ==========================================================================
   Feature Bannerブロック（特集バナー）
   ========================================================================== */
.p-feature-banner {
    display: flex;
    align-items: stretch;
    gap: var(--space-32);
    background: var(--color-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--space-32) var(--space-32);
    color: var(--color-white, #ffffff);
    margin: 1.5em 0;
}

.p-feature-banner__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.p-feature-banner__title {
    font-size: var(--space-32);
    font-weight: var(--font-weight-bold);
    color: var(--color-white, #ffffff);
    margin: 0;
}

.p-feature-banner__desc {
    font-size: var(--font-size-sub);
    line-height: 1.6;
    color: var(--color-white-90);
    margin: 0;
}

.p-feature-banner__actions {
    display: flex;
    gap: var(--space-12);
    margin-top: auto;

}

.p-feature-banner__actions .c-gi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    max-inline-size: none;
    flex: 1 1 0;
    min-inline-size: 0;
    --c-gi-btn-icon-size: 1em;
    --c-gi-btn-icon-offset: var(--space-6);
    padding: 12px 20px;
    font-size: 16px;
    text-align: center;
    white-space: nowrap;
    box-shadow: none;
    line-height: var(--line-height-tight);
}

/* PC時: [br_pc]は改行、[br_sp]は非表示 */
.p-feature-banner__actions .c-gi-btn .u-br-sp {
    display: none;
}

.p-feature-banner__image {
    flex: 0 0 320px;
    border-radius: var(--border-radius-md);
    width: 36%;
    overflow: hidden;
}

.p-feature-banner__image img {
    height: auto;
    display: block;
    border-radius: var(--border-radius-md);
}

/* エディター上で画像未設定時にレイアウトを維持 */
.p-feature-banner__image--placeholder {
    min-height: 120px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white-90, rgba(255, 255, 255, 0.9));
}

@media screen and (max-width: 767px) {
    .p-feature-banner {
        flex-direction: column;
        padding: var(--space-24) var(--space-16);
        gap: var(--space-16);
        border-radius: 0;
        margin-left: -16px;
        margin-right: -16px;
    }

    .p-feature-banner__image {
        flex: none;
        width: 100%;
        order: -1;
    }

    .p-feature-banner__title {
        font-size: 16px;
    }

    .p-feature-banner__desc {
        font-size: 13px;
    }

    .p-feature-banner__actions {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .p-feature-banner__actions .c-gi-btn {
        padding: 8px;
        font-size: 13px;
        white-space: normal;
        overflow-wrap: normal;
    }

    /* スマホ時: [br_sp]は改行、[br_pc]は非表示 */
    .p-feature-banner__actions .c-gi-btn .u-br-sp {
        display: inline;
    }

    .p-feature-banner__actions .c-gi-btn .u-br-pc {
        display: none;
    }

    /* gi-sophia-heading h2 */
    .gi-sophia-heading__title {
        font-size: 16px;
    }

    /* gi-sophia-heading h3 */
    .gi-sophia-heading--h3 .gi-sophia-heading__title {
        font-size: 16px;
    }

}
