/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul {
    list-style: none;
}

/* 共通スタイル */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: #f0f0f0;
}

.btn {
    display: inline-block;
    background-color: #bf2b44;
    color: #fff;
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-align: center;
    border: solid 3px #bf2b44;
    font-weight: bold;
}

.btn:hover {
    background-color: #fff;
    color: #bf2b44;
    font-weight: bold;
    border: solid 3px #bf2b44;
}

.mt-30 {
    margin: 30px auto;
    width: 100%;
}

.pp-mt {
    margin: 60px 0 0;
}

.mt-40 {
    margin: 0 0 40px;
}

.text-center {
    text-align: center;
}

/* ヘッダー */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 28px;
    font-weight: 700;
    z-index: 1001; /* ハンバーガーメニューより手前に */
}

header h1 a {
    color: #bf2b44;
}

/* PC時のナビゲーションメニューのスタイル */
header .main-nav ul {
    display: flex;
}

header .main-nav ul li {
    margin-left: 30px;
}

header .main-nav ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
}

header .main-nav ul li a:hover {
    color: #bf2b44;
    font-weight: bold;
}

/* ハンバーガーメニューの基本スタイル（PCでは非表示） */
.hamburger-menu {
    display: none; /* PCでは非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1002; /* ナビメニューより手前に */
}

.hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* ハンバーガーメニューのアニメーション */
.hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ヒーローセクション */
.hero-section {
    position: relative; /* 子要素の絶対配置の基準にする */
    height: 94vh;
    margin-top: 60px; /* ヘッダーの高さ分 */
    overflow: hidden; /* はみ出しを隠す */
}

.hero-it, .hero-security {
    position: absolute; /* 親要素内で絶対配置 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex; /* コンテンツを中央寄せするため */
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-size: cover;
    background-position: center;
    z-index: 1; /* デフォルトのz-index */
    opacity: 0; /* JSでフェードインさせるため初期は非表示 */
}

.hero-it {
    background-image: url('../img/hero-it.jpg');
    z-index: 2; /* 最初に見せる方を上に */
    opacity: 1; /* JSでfadeInさせるため最初は表示 */
}

.hero-security {
    background-image: url('../img/hero-security.jpg');
}

.hero-it::before, .hero-security::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* オーバーレイ */
    z-index: 1; /* コンテンツの下に配置 */
}

.hero-content {
    position: relative;
    z-index: 2; /* オーバーレイの上に配置 */
    padding: 20px;
    max-width: 800px; /* テキストの幅を制限 */
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content h3 {
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* 会社概要 */
#about {
    text-align: center;
    background-color: #f0f0f0;
}

#about h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: #bf2b44;
    position: relative;
    display: inline-block;
}

#about h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #bf2b44;
}

#about h3 {
    margin: 10px 0 10px 13px;
    color: #bf2b44;
    position: relative;
    display: inline-block;
    font-size: 24px;
}

#about h3::after {
    content: '';
    position: absolute;
    left: -10px;
    top: 8px;
    transform: translateX(-50%);
    width: 3px;
    height: 26px;
    background-color: #bf2b44;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.about-content p {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* サービスセクション */
.service-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.service-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    text-align: center;
    flex: 1 1 45%; /* 2列表示 */
    max-width: 450px;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 3px solid #42b8c9;
}

.service-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #42b8c9;
}

.service-item p {
    font-size: 16px;
    line-height: 1.7;
}

#it-service h2, #security-service h2 {
    font-size: 36px;
    margin-bottom: 40px;
    text-align: center;
    color: #bf2b44;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

#it-service h2::after, #security-service h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #bf2b44;
}

/* 新規追加: ページヘッダー（ポートフォリオページ用） */
.page-hero-section {
    background-color: #1a2c4e;
    color: #fff;
    padding: 100px 0 60px; /* ヘッダーの高さとコンテンツのバランスを考慮 */
    text-align: center;
    margin-top: 60px; /* 固定ヘッダーの高さ分 */
}

.page-hero-section .container {
    max-width: 800px;
}

.page-hero-section h2 {
    font-size: 42px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.page-hero-section p {
    font-size: 18px;
    line-height: 1.7;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* 新規追加: 作品グリッド */
.works-grid {
    display: grid; /* CSS Gridを使用 */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* レスポンシブにカラム数を調整 */
    gap: 40px; /* グリッド間の間隔 */
    margin-top: 40px;
    justify-content: center; /* 中央寄せ */
}

.work-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden; /* 画像のはみ出しを防ぐ */
    text-align: center;
    transition: transform 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
}

.work-item img {
    width: 100%;
    height: auto; /* 画像の高さを固定 */
    object-fit: cover; /* 画像がはみ出さないようにフィットさせる */
    display: block;
}

.work-item h4 {
    font-size: 20px;
    margin: 20px 20px 10px;
    color: #42b8c9;
}

.work-item p {
    font-size: 15px;
    line-height: 1.6;
    padding: 0 20px 20px;
}

.btn-small {
    display: inline-block;
    background-color: #28a745;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-small:hover {
    background-color: #218838;
}

/* お問い合わせ */
.contact-section {
    background-image: url('../img/contact-background.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 0;
    position: relative;
}

.contact-overlay {
    background-color: rgba(0, 0, 0, 0.7); /* 暗めのオーバーレイ */
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-section .container {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 60px 20px
}

.contact-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.contact-section p {
    font-size: 18px;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group .required {
    color: #dc3545;
    margin-left: 5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    font-family: 'Noto Sans JP', sans-serif;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

/* フッター */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

.footer-grid {
    display: flex;
    justify-content: center;
    gap: 76px;
    flex-wrap: wrap;
}

.footer-item {
    padding: 10px;
    text-align: center;
    flex: 1 1 45%; /* 2列表示 */
    max-width: 450px;
    transition: transform 0.3s ease;
}

/* 新規追加: 採用ページセクション共通スタイル */
.recruit-overview {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
}

.recruit-overview.reverse {
    flex-direction: row-reverse; /* 画像とテキストの左右を反転 */
}

.recruit-img-wrapper {
    flex: 1;
    min-width: 300px; /* 画像の最小幅 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.recruit-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.recruit-text-content {
    flex: 1;
}

.recruit-text-content p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 職種リスト */
.job-listing {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 40px;
}

.job-listing h4 {
    font-size: 24px;
    color: #42b8c9;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.job-details {
    list-style: none; /* デフォルトのリストスタイルを解除 */
    padding: 0;
}

.job-details li {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.job-details li:last-child {
    margin-bottom: 0;
}

.job-details li::before {
    content: '•'; /* ドットのアイコン */
    color: #42b8c9;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    position: absolute;
    left: 0;
}

.job-details li strong {
    color: #333;
}

.job-details ul { /* ネストされたリストのスタイル */
    margin-top: 5px;
    margin-left: 20px;
}

.job-details ul li {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 5px;
    padding-left: 15px;
}

.job-details ul li::before {
    content: '-'; /* ハイフンのアイコン */
    color: #555;
    font-weight: normal;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    header .container {
        flex-direction: row; /* SPでもロゴとハンバーガーメニューを横並びにするため */
        justify-content: space-between; /* 両端に配置 */
        align-items: center;
    }

    /* ハンバーガーメニューの表示 */
    .hamburger-menu {
        display: block; /* SPで表示 */
    }

    /* ナビゲーションメニューのスタイル（SP用） */
    header .main-nav {
        position: fixed;
        top: 60px; /* ヘッダーの高さに合わせて調整 */
        left: 0;
        width: 100%;
        height: calc(100vh - 60px); /* 画面全体からヘッダー高さを引いた高さ */
        background-color: rgba(255, 255, 255, 0.95); /* 半透明の背景 */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%); /* 初期状態では画面外に隠す */
        transition: transform 0.3s ease-in-out;
        z-index: 999; /* 他のコンテンツより上、ヘッダーより下 */
        overflow-y: auto; /* メニューが多い場合にスクロール可能に */
    }

    header .main-nav.active {
        transform: translateX(0); /* active クラスが付いたら表示 */
    }

    header .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        text-align: center;
    }

    header .main-nav ul li {
        margin: 20px 0; /* 縦方向の間隔を確保 */
    }

    header .main-nav ul li a {
        font-size: 24px; /* SPでタップしやすいように大きく */
        display: block;
        padding: 10px 0;
    }

    .hero-section {
        flex-direction: column;
        height: 90vw;
    }

    .hero-it, .hero-security {
        height: 50vh;
    }

    .hero-content h2 {
        font-size: 36px;
    }

    .hero-content h3 {
        font-size: 24px;
    }

    .section-padding {
        padding: 60px 0;
    }

    #about h2, #it-service h2, #security-service h2 {
        font-size: 30px;
    }

    .service-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-item {
        flex: 1 1 90%;
        max-width: 90%;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .page-hero-section {
        padding: 80px 0 50px;
        margin-top: 50px; /* SPヘッダー高さに合わせて調整 */
    }
    .page-hero-section h2 {
        font-size: 36px;
    }
    .page-hero-section p {
        font-size: 16px;
    }

    .works-grid {
        grid-template-columns: 1fr; /* スマホでは1列表示 */
        gap: 30px;
    }

    .work-item img {
        height: auto; /* スマホでの画像高さを調整 */
    }

    h3 {
        font-size: 28px;
    }

    .footer-grid {
        flex-direction: column-reverse;
        align-items: center;
        gap: 10px;
    }

    .footer-item {
        flex: 1 1 90%;
        max-width: 90%;
    }

    .recruit-overview {
        flex-direction: column; /* スマホでは縦並び */
        gap: 30px;
    }
    .recruit-overview.reverse {
        flex-direction: column; /* reverseも縦並びに統一 */
    }

    .recruit-img-wrapper {
        min-width: unset; /* 最小幅を解除 */
        width: 100%;
    }
    
    .recruit-text-content p {
        font-size: 16px;
    }

    .job-listing {
        padding: 25px;
    }

    .job-listing h4 {
        font-size: 22px;
    }

    .job-details li {
        font-size: 15px;
    }
    .job-details ul li {
        font-size: 14px;
    }

}

@media (max-width: 480px) {
    header h1 {
        font-size: 24px;
    }

    header nav ul li {
        margin: 0 10px;
        font-size: 14px;
    }

    .hero-content h2 {
        font-size: 28px;
    }

    .hero-content h3 {
        font-size: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 16px;
    }

    #about h2, #it-service h2, #security-service h2 {
        font-size: 26px;
    }

    #about h3 {
        font-size: 20px;
    }

    #about h3::after {
    left: -10px;
    top: 5px;
    transform: translateX(-50%);
    width: 3px;
    height: 24px;
    }

    .about-content p {
        font-size: 16px;
    }

    .service-item h3 {
        font-size: 20px;
    }

    .service-item p {
        font-size: 15px;
    }

    .contact-section h2 {
        font-size: 30px;
    }

    .contact-section p {
        font-size: 16px;
    }

    .form-group label {
        font-size: 15px;
    }

    .form-group input, .form-group select, .form-group textarea {
        font-size: 15px;
    }

    .page-hero-section {
        padding: 60px 0 40px;
    }
    .page-hero-section h2 {
        font-size: 30px;
    }
    .page-hero-section p {
        font-size: 15px;
    }

    .work-item h4 {
        font-size: 18px;
    }
    .work-item p {
        font-size: 14px;
    }
    .btn-small {
        font-size: 13px;
        padding: 6px 12px;
    }

    h3 {
        font-size: 24px;
    }

    .recruit-overview {
        gap: 20px;
    }

    .recruit-text-content p {
        font-size: 15px;
    }

    .job-listing {
        padding: 20px;
    }

    .job-listing h4 {
        font-size: 20px;
    }

    .job-details li {
        font-size: 14px;
        padding-left: 18px;
    }
    .job-details li::before {
        width: 0.8em;
        margin-left: -0.8em;
    }
    .job-details ul li {
        font-size: 13px;
        padding-left: 13px;
    }
}