/* ============================================================
 * libnew-base.css
 * lib-inc.co.jp リニューアル 全ページ共通スタイル
 * SWELL 子テーマ functions.php で全ページに wp_enqueue_style
 * Google Fonts は functions.php 側で wp_enqueue_style 別管理
 * ============================================================ */

/* ===== Reset / Base ===== */
/* ===== Reset ===== */
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
      font-family: 'Noto Sans JP', 'Inter', system-ui, -apple-system, sans-serif;
      color: #1a1a1a;
      background: #fff;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

/* ===== 共通ユーティリティ ===== */
.libnew-nobreak { white-space: nowrap; }
.pc-only { display: inline; }
    .mobile-only { display: none; }

/* ============================================================
 * SWELLレイアウト互換 — 固定ページ LP 化
 * preview-new-top（is_page 限定 enqueue）でのみロードされるため、
 * 既存ページには影響しない。
 * ============================================================ */
.l-mainContent, .p-mainContent, .l-main, main.l-main, .l-content {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.l-sidebar, #sidebar, aside.p-sideWidget, .swl-sidebar,
.p-sideWidget, .l-mainWrap__sidebar {
    display: none !important;
}
.l-mainWrap, .l-mainWrap__inner,
.l-mainContent .l-container, .l-article .l-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    display: block !important;
}
.p-articleTitle, .c-pageTitle, .p-postEyecatch, .p-articleThumb,
.c-postEyecatch, .p-eyecatch, .post_eyecatch,
.p-breadcrumb, .c-breadcrumb {
    display: none !important;
}
.post_content, .p-postContent, .c-postContent, article.post,
.c-mainContent {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}
.l-mainContent__inner, .l-article__inner,
.l-mainContent .l-container, .l-article .l-container,
.p-articleBody, .p-articleBody__inner {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* libnew セクションを画面いっぱい（100vw）に広げる */
.post_content > section[class*="libnew-"],
.p-articleBody > section[class*="libnew-"],
.libnew-hero, .libnew-aishain, .libnew-pain, .libnew-why,
.libnew-process, .libnew-wlib, .libnew-ind, .libnew-sem,
.libnew-service, .libnew-price, .libnew-message, .libnew-blog,
.libnew-faq, .libnew-office {
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    max-width: 100vw !important;
}

/* ============================================================
 * SWELL .post_content デフォルト見出し装飾の無効化
 * libnew セクション内では SWELL の H2/H3 等の装飾（紺帯・白文字・縦線等）を
 * 効かせない。libnew CSS は build script により全セレクタに ".post_content " が
 * 前置されているため、装飾以外（font-size/color/margin 等）は libnew 側の指定が
 * 特異度で勝つ。ここでは SWELL がデフォルトで足す装飾だけを潰す。
 * ============================================================ */
.post_content [class*="libnew-"] h1,
.post_content [class*="libnew-"] h2,
.post_content [class*="libnew-"] h3,
.post_content [class*="libnew-"] h4,
.post_content [class*="libnew-"] h5,
.post_content [class*="libnew-"] h6 {
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-top: 0 !important;  /* SWELL が h2 等に足す上マージン（80-100px）を打ち消す。
                                   margin-bottom は libnew CSS の個別指定が勝つよう触らない */
    box-shadow: none !important;
    position: static !important;
}
/* SWELL が h2-h6 にデフォルトで足す ::before/::after 装飾を消す。
   libnew CSS で ::before を実際に使っているのは下記3クラスの H3 のみ（オレンジ縦バー）。
     .libnew-aishain-h3 / .libnew-pr-h3 / .libnew-sem-h3
   これら以外の h3 と、h2/h4/h5/h6 全てで SWELL の装飾を消す。 */
.post_content [class*="libnew-"] h2::before,
.post_content [class*="libnew-"] h2::after,
.post_content [class*="libnew-"] h4::before,
.post_content [class*="libnew-"] h4::after,
.post_content [class*="libnew-"] h5::before,
.post_content [class*="libnew-"] h5::after,
.post_content [class*="libnew-"] h6::before,
.post_content [class*="libnew-"] h6::after,
.post_content [class*="libnew-"] h3:not(.libnew-aishain-h3):not(.libnew-pr-h3):not(.libnew-sem-h3)::before,
.post_content [class*="libnew-"] h3:not(.libnew-aishain-h3):not(.libnew-pr-h3):not(.libnew-sem-h3)::after {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* SWELL .post_content の p / ul / ol / li のデフォルトを libnew セクション内で抑制
   ※ a タグは libnew 側で CTA ボタン背景色等を設定するため、ここでは text-decoration のみ。
   ※ margin は libnew CSS の個別指定（特異度 0,2,0）が勝てるよう、!important なしで margin-top だけ 0 にする。
      これで SWELL の自動上マージンは消えるが、libnew の margin-bottom 等は残る。 */
.post_content [class*="libnew-"] p,
.post_content [class*="libnew-"] ul,
.post_content [class*="libnew-"] ol,
.post_content [class*="libnew-"] li,
.post_content [class*="libnew-"] figure,
.post_content [class*="libnew-"] blockquote,
.post_content [class*="libnew-"] table {
    margin-top: 0 !important;
    padding-left: 0;
    background: none;
    border: none;
}
.post_content [class*="libnew-"] ul,
.post_content [class*="libnew-"] ol {
    list-style: none;
}
.post_content [class*="libnew-"] a {
    text-decoration: none;
    /* color / background / border は libnew CSS の個別指定が勝つように触らない */
}

/* ============================================================
 * Gutenberg / wpautop が挿入する不要マージン・空要素の除去
 * カスタムHTMLブロック間の余白を 0 にして、各 libnew セクションが
 * preview/*.html と同じ間隔で並ぶようにする。
 * ============================================================ */
.post_content > p:empty,
.post_content > br {
    display: none !important;
}
.post_content > section[class*="libnew-"],
.post_content section[class*="libnew-"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.post_content > .wp-block-html,
.post_content > .wp-block-group,
.post_content > .wp-block-spacer {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

