/*
Theme Name: justice_hp
Author: admin
Version: 1.0
*/


/* 基本設定 */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    padding-top: 100px;
}

/* ヘッダー */
header {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    overflow: visible !important;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;

    padding: 10px 50px;

    border-top: 5px solid rgb(33, 98, 48);
    z-index: 1000;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2);
}

/* ヘッダーロゴエリア */

.header-logo {
    flex: 1;
}

.header-logo img {
    width: 100px;
}

/* ヘッダーメニューエリア */
.header-menu {
    flex: 0 0 auto;
}

.header-menu ul {
    display: flex;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.header-menu ul li {
    position: relative;
    width: auto;

}

.header-menu ul li a {
    display: block;
    padding: 0 25px;
    white-space: nowrap;
    text-align: center;

    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    font-size: 18px;
    font-weight: 550;
    letter-spacing: 0.1em;
    text-decoration: none;
    transition: 0.3s;
}

.header-menu-sub {
    display: block;
    font-size: 12px;
}

.header-menu ul li a:hover {
    color: rgb(106, 151, 60);
}

.sub-menu {
    position: absolute;
    top: 120%;
    left: 0;
    z-index: 999;

    background-color: rgb(255, 255, 255);
    padding: 0;
    width: max-content;
    min-width: 100%;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    border-radius: 6px;

    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.header-menu li:hover>.sub-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.sub-menu ul {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.sub-menu ul li {
    display: block;
    width: 100%;
}

.sub-menu ul li a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    white-space: nowrap;

    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.5s, background-color 0.5s;
    text-align: left;
    line-height: 1.5;
}

.sub-menu ul li a:hover {
    background-color: #f8f9fa;
    color: rgb(106, 151, 60);
}

.sub-menu ul ul {
    position: absolute;
    top: -1px;
    left: 100%;

    background-color: rgb(255, 255, 255);
    padding: 0;
    width: max-content !important;
    min-width: 100%;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #eee;
    border-radius: 6px;

    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.sub-menu li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu ul ul li a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    width: auto !important;
    white-space: nowrap;

    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.5s, background-color 0.5s;
    text-align: left;
    line-height: 1.5;
}

.sub-menu ul ul li a:hover {
    background-color: #f8f9fa;
    color: rgb(106, 151, 60);
}

.sub-menu li.menu-item-has-children>a::after {
    content: " >";
    font-size: 12px;
    float: right;
    color: #ccc;
}

/* ヘッダーコンタクトエリア */
.header-contact {
    flex: 1;
    text-align: right;
}

.contact-label {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.contact-tel {
    font-size: 28px;
    font-weight: 700;
    color: rgb(106, 151, 60);

    margin: 2px 0;
    line-height: 1;
    letter-spacing: 0.05em;
}

.contact-time {
    font-size: 14px;
    color: #999;
    margin: 0;
    letter-spacing: 0.02em;
}

/* ハンバーガーボタン */
.hamburger-btn {
    position: fixed;
    top: 35px;
    right: 25px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1100;
    /* ヘッダーより上に */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: rgb(33, 98, 48);
    /* ロゴの色に合わせる */
    border-radius: 2px;
    transition: 0.3s;
}

/* サイドメニュー */
.side-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    z-index: 1200;
    padding: 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    overflow-y: auto;
}

.side-menu.active {
    right: 0;
}

.side-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    cursor: pointer;
    color: #999;
}

.side-menu-list {
    list-style: none;
    padding: 0;
    margin: 40px 0;
}

.side-menu-list li {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #eee;
    position: relative;
    background-color: #fff;
}

.side-menu-list li a {
    flex: 1;
    display: block;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    line-height: 1.4;
}

.side-menu-contact {
    margin-top: 40px;
}

.side-menu-contact a {
    font-size: 22px;
    font-weight: bold;
    color: rgb(33, 98, 48);
    text-decoration: none;
}

/* ▼ボタンの設定 */
.side-menu-toggle {
    width: 50px;
    height: 50px;
    background: transparent !important;
    border: none !important;

    cursor: pointer;
    font-size: 10px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    outline: none;
    padding: 0;
}

.side-menu-toggle.active {
    color: rgb(106, 151, 60);
    transform: rotate(180deg);
}

/* 子メニュー */
.side-sub-menu {
    display: none;
    /* JSで開閉 */
    width: 100%;
    background-color: #f9f9f9;
}

.side-sub-menu>ul {
    display: block !important;
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-sub-menu ul li a {
    padding-left: 25px !important;
    font-size: 16px !important;
    font-weight: normal !important;
}

/* 孫メニュー */
.side-sub-menu ul li ul {
    display: none;
    width: 100%;
    background-color: #ebebeb;
    list-style: none;
    padding: 0;
    margin: 0;

    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
}

.side-sub-menu ul ul li a {
    padding-left: 45px !important;
    font-size: 14px !important;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1150;
    display: none;
}

.hamburger-btn,
.side-menu,
.menu-overlay {
    display: none;
}

/* パソコンの通常のメニューを表示 */
.header-menu {
    display: block;
}

/* スライダー */
.Top_slider {
    height: 600px;
}

.Top_slider .slick-slide {
    position: relative;
    height: 600px;
}

.Top_slider .slick-slide::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));

    z-index: 1;
    pointer-events: none;
}

.Top_slider img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    display: block;
}

.slider-content {
    position: absolute;
    top: 50%;
    left: 10%;

    transform: translateY(-50%);
    z-index: 2;
    text-align: left;
    width: auto;
    color: #ffffff;

}

.slider-title {
    font-size: 50px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.5);
}

.slider-text {
    font-size: 20px;
    font-weight: 700;
    padding-right: 20px;
    margin-bottom: 30px;
    text-shadow:
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(0, 0, 0, 0.5);
}

.slider-btn {
    display: inline-block;
    padding: 15px 50px;
    background-color: rgb(33, 98, 48);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s;
    pointer-events: auto;
}

.slider-btn:hover {
    background-color: rgb(106, 151, 60);
}


/* トップページ上部 */
.toppage-main-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
    margin: 50px auto;
    padding: 0 20px;
    align-items: stretch;
    width: fit-content;
    /* コンテナを中身の幅に合わせる */
    max-width: 100%;
}

/* お知らせ */
.news-container {
    flex: 1 1 500px;
    max-width: 100%;
    padding: 0 20px;
}

.news-header {
    display: flex;
    align-items: center;
    border-bottom: 2px dotted rgb(106, 151, 60);
}

.news-title {
    font-size: 20px;
}

.news-header h2 {
    margin: 0;
    margin-bottom: 10px;
    font-size: 24px;
    color: rgb(106, 151, 60);
}

.news-header a {
    margin-left: auto;
    font-size: 18px;
    color: rgb(106, 151, 60);
    text-decoration: none;
    transition: 0.3s;
}

.news-header a:hover {
    color: rgb(33, 98, 48);
}

.news-post {
    align-items: center;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.news-post th:first-child {
    width: 100px;
}

.news-post tr th {
    padding: 15px 0 5px 0;
    text-align: left;
    font-weight: normal;
    border-bottom: 1px solid #757575;
}

.news-post tr th a {
    text-decoration: none;
    display: block;
    /* ブロック要素にする */
    white-space: nowrap;
    /* 改行禁止 */
    overflow: hidden;
    /* はみ出しを隠す */
    text-overflow: ellipsis;
    /* 三点リーダー（...）を表示 */
    color: #333;
    transition: 0.3s;
}

.news-post tr th a:hover {
    color: #7a7a7a;
}

/* コンテンツ */
.contents-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 40px;
    align-items: stretch;
    width: fit-content;
    flex: 1 1 500px;
    max-width: 100%;
}

.toppage-main-container>div:first-child,
.contents-container>div:first-child {
    position: relative;
}

.toppage-main-container>div:first-child::after,
.contents-container>div:first-child::after {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 0px;
    right: -20px;
    width: 1px;
    background-color: #ccc;
}

.contents-sub-container {
    flex: 1 300px;
    max-width: 100%;
    padding: 0 20px 0 0;
}

.contents-header {
    display: flex;
    align-items: flex-start;
}

.contents-header img {
    width: 35px;
    margin: 0 7px;
}

.contents-header h2 {
    margin: 0;
    color: rgb(106, 151, 60);
    font-size: 24px;
}

.contents-detail {
    display: flex;
    flex-direction: column;
    /* 縦に並べる */
}

.contents-detail p {
    margin-bottom: 5px;
}

.contents-detail a {
    margin-left: auto;
    display: inline-block;
    color: rgb(106, 151, 60);
    text-decoration: none;
    transition: color 0.3s;
    pointer-events: auto;
}

.contents-detail a:hover {
    color: rgb(33, 98, 48);
}

/* トップページ中部 */
.toppage-appeal-container {
    max-width: max-content;
    margin: 0 auto;
    padding: 0 10px;
}

.toppage-appeal-container p {
    font-weight: 700;
}

/* トップページ下部 */
.toppage-target-container {
    overflow: hidden;
    /* はみ出し防止 */
}

.toppage-target-container h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    /* 前後の余白 */
    font-size: 27px;
    /* 画面幅に合わせて文字サイズを自動調整 */

}

.toppage-target-container h1::before,
.toppage-target-container h1::after {
    content: "";
    flex: 1;
    /* 伸びる設定 */
    min-width: 30px;
    /* 【重要】幅が狭くなっても消えない最小の長さを確保 */
    max-width: 600px;
    /* 逆に広すぎるときに伸びすぎないよう制限 */
    border-bottom: 4px dotted rgb(33, 98, 48);
    height: 1px;
    transform: translateY(-2px);
}

/* ターゲット */
.target-container {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    justify-content: center;
    gap: 50px;
    width: 100%;
}

.target-personal-box {
    width: 100%;
    max-width: 700px;
    padding: 10px 0 40px 0;
    overflow: hidden;
    background:
        linear-gradient(to right, rgba(230, 245, 210, 1) 60%, rgba(255, 255, 255, 0) 100%),
        url('/wp-content/themes/justice_hp/images/top-page/top-personal-background.jpg') no-repeat right center / cover;

    border: 2px solid rgb(106, 151, 60);
    border-radius: 10px;

}

.target-business-box {
    width: 100%;
    max-width: 700px;
    padding: 10px 0 40px 0;
    overflow: hidden;
    background:
        linear-gradient(to right, rgb(210, 234, 245) 60%, rgba(255, 255, 255, 0) 100%),
        url('/wp-content/themes/justice_hp/images/top-page/top-business-background.jpg') no-repeat right center / cover;

    border: 2px solid rgb(60, 102, 151);
    border-radius: 10px;

}

.target-content {
    display: flex;
    align-items: flex-start;
}

.target-content img {
    width: 120px;
    margin: 10px 20px;
    height: auto;
    display: block;
}

.target-content h3 {
    margin: 0;
    margin-top: 10px;
    font-size: 22px;
}

.target-personal-button {
    display: inline-block;
    background-color: #006432;
    /* 濃い緑 */
    color: #fff;
    padding: 10px 40px;
    border: none;
    border-radius: 50px;
    /* 丸いボタン */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s;
    position: relative;
}

.target-personal-button:hover {
    cursor: pointer;
    background-color: #004a23;
}

.target-business-button {
    display: inline-block;
    background-color: #002b64;
    /* 濃い緑 */
    color: #fff;
    padding: 10px 40px;
    border: none;
    border-radius: 50px;
    /* 丸いボタン */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s;
    position: relative;
}

.target-business-button:hover {
    cursor: pointer;
    background-color: #00074a;
}

/* フッダー */
footer {
    display: flex;
    align-items: center;
    position: relative;
    padding: 20px 100px;
    margin-top: 50px;
    color: #fff;
    background-color: rgb(33, 98, 48);
}

.footer-menu {
    flex: 1;
}

.footer-menu ul {
    display: flex;
    list-style: none;
    margin: 0 auto;
    padding: 0;
}

.footer-menu ul li a {
    display: block;
    padding: 0 10px;
    white-space: nowrap;

    font-size: 14px;
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.footer-menu ul li a:hover {
    color: #0011ff;
}

.footer-copylight {
    flex: 1;
    font-size: 12px;
    text-align: right;
}




/* =================================================
   スマホ・タブレット用 ( 1200px以下)
   ================================================= */
@media screen and (max-width: 1200px) {

    /* パソコン用のメニューとコンタクト情報を隠す */
    .header-menu,
    .header-contact {
        display: none;
    }

    /* 3本線ボタンを表示する */
    .hamburger-btn {
        display: flex;
        /* 隠していたのを表示 */
    }

    /* サイドメニュー本体を準備 */
    .side-menu {
        display: block;
    }

    /* ロゴのサイズを調整 */
    .header-logo img {
        width: 80px;
    }

    header {
        padding: 10px 20px !important;
    }

    footer {
        padding: 20px !important;
        flex-direction: column;
        gap: 10px;
    }

    .footer-menu ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-copylight {
        text-align: center;
    }

    /* スライダーの高さを調整 */
    .Top_slider,
    .Top_slider .slick-slide,
    .Top_slider img {
        height: 400px !important;
    }

    .slider-title {
        font-size: 30px;
    }

    .news-container,
    .contents-sub-container {
        padding: 0;
    }

    /* 点々の見出し（スマホで点々を短く、または消す） */
    .toppage-target-container h1 {
        font-size: 18px !important;
        /* 文字を小さく */
        gap: 10px !important;
    }

    .toppage-target-container h1::before,
    .toppage-target-container h1::after {
        min-width: 10px !important;
        /* 点々を控えめに */
    }

    /* お知らせの表をスマホで見やすく */
    .news-post th:first-child {
        width: 100px !important;
        /* 日付幅を固定 */
        font-size: 13px;
    }

    .news-post th a {
        font-size: 14px;
    }
}

/* =================================================
   スマホ用 (480px以下)
   ================================================= */
@media screen and (max-width: 480px) {

    /* スライダーの中の大きな文字を調整 */
    .slider-title {
        font-size: 24px !important;
    }

    .slider-text {
        font-size: 14px !important;
    }

    .slider-btn {
        padding: 12px 30px !important;
        /* ボタンを横幅いっぱいにして押しやすく */
    }

    .target-content img {
        width: 80px;
    }

    .target-content p {
        font-size: 14px;
    }

    .target-personal-button,
    .target-business-button {
        font-size: 14px !important;
        padding: 10px 30px !important;
    }
}