/* --- VARIABLE SETTINGS --- */
/* --- Global Variables --- */
:root {
    --p-green: #0E7E47;      /* ブランドカラー：深緑 */
    --text-black: #1a1a1a;
    --bg-white: #ffffff;
    --bg-light: #fafafa;
    --border-gray: #c6c6c6;
    --header-bg: #dedede;    /* ロゴが映える薄いグレー */
    
    /* 互換性のためのエイリアス */
    --brand-color: var(--p-green);
}

/* --- Base Styles --- */
body {
    background-color: var(--bg-white);
    color: var(--text-black);
    font-family: 'Geist', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* --- Navigation (Update) --- */
.nav-custom {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border-gray);
    transition: all 0.3s ease;
}

.text-brand {
    color: var(--p-green);
}

/* --- Utility --- */
.bg-brand {
    background-color: var(--p-green);
}

/* --- Base Styles --- */
body {
    background-color: var(--bg-black); /* 基本は黒ベース */
    color: var(--bg-white);
    font-family: 'Geist', sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ユーティリティクラス */
.text-brand { color: var(--p-green); }
.bg-brand { background-color: var(--p-green); }

/* --- 全体設定：突き出しと横揺れを完全に防止 --- */
*, *::before, *::after {
    box-sizing: border-box; 
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* 120%になるのを防ぐ */
}

body {
    font-family: 'Poppins', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-black);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER --- */
header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--header-bg);
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 5px 0;
}

.header-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pc-nav {
    display: flex;
    gap: 40px;
}

.pc-nav a {
    text-decoration: none; 
    color: rgba(0, 0, 0, 0.8);
    font-size: 14px; 
    font-weight: 700; 
    letter-spacing: 0.15em;
    transition: 0.3s;
}

.pc-nav a:hover {
    color: var(--p-green);
}

/* --- HAMBURGER --- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--p-green);
    transition: 0.3s;
}

/* --- MOBILE SIDE NAV (幅40%設定) --- */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 40%; 
    min-width: 220px; 
    height: 100vh;
    background-color: var(--p-green);
    display: flex;
    flex-direction: column;
    padding: 100px 25px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
}

.mobile-nav.active {
    right: 0;
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 40px;
    color: #ffffff !important;
    cursor: pointer;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.mobile-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
}

/* --- HERO --- */
.hero {
    /* 画面いっぱいの高さ（dvhはモバイルのブラウザバーを考慮した最新の書き方） */
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 上下の真ん中 */
    align-items: center;     /* 左右の真ん中 */
    text-align: center;
    
    /* 重要：ヘッダーの高さ(120px)分だけ上に「見えない壁」を作って、
       残りの白いスペースでど真ん中を取るように調整します */
    padding-top: 120px; 
    box-sizing: border-box;
    background-color: var(--bg-white);
}

.hero h1 {
    color: var(--p-green);
    font-family: 'Noto Sans JP', sans-serif;
    font-size: clamp(22px, 5vw, 42px);
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 20px;
}

.hero p {
    font-family: 'JetBrains Mono', monospace;
    font-style: italic;
    color: var(--p-green);
    font-size: 16px;
    letter-spacing: 0.1em;
}

/* スマホ用の微調整 */
@media (max-width: 690px) {
    .hero {
        padding-top: 90px; /* スマホヘッダーの高さに合わせる */
    }
}

/* --- COMMON SECTIONS --- */
.section-container {
    padding: 140px 40px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.bg-light-section {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-gray);
    border-bottom: 1px solid var(--border-gray);
}

.section-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 32px;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.title-underline {
    width: 30px;
    height: 2px;
    background: var(--p-green);
    margin: 0 auto 60px;
}

/* --- ABOUT (パーツ復活) --- */
.about-content {
    max-width: 750px;
    margin: 0 auto;
}

.about-lead {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--p-green);
}

.about-text {
    text-align: left;
    font-size: 16px;
    color: #444;
}

/* --- SERVICE --- */
.service-list {
    display: grid;
    /* 1枚あたり280px〜300px程度に制限して「4分の1」感を出す */
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    gap: 25px;
    justify-content: center;
    width: 100%;
    margin-top: 40px;
}
.service-card {
    background-color: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 12px;
    /* ★ 角丸に合わせて画像を切り抜く */
    overflow: hidden;    
    display: flex;
    flex-direction: column;
    /* ★ カード自体のパディングは0にして画像を角に密着させる */
    padding: 0;          
    transition: transform 0.3s ease;
}
/* --- SERVICE SECTION --- */
.service-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- 1. 親要素：カード全体の高さを決める --- */
/* --- カード全体の箱 --- */
.service-card {
    background-color: #000; /* 背景は黒 */
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 450px; /* カードに高さを出さないと「上下中央」にならないので注意 */
    border: 1px solid #333;
}

/* --- 画像エリア --- */
.service-card img {
    width: 100%;
    height: 220px; /* 写真の高さ */
    object-fit: cover;
    display: block;
}

/* --- 【ここが解決の鍵】テキストエリア --- */
.service-card-content {
    flex-grow: 1;         /* 画像以外の余白をすべて使う */
    width: center;          /* ★重要：横幅いっぱいに広げる（これで左寄りを防ぐ） */
    display: flex;
    flex-direction: column;
    
    /* ★重要：これで上下・左右のど真ん中に配置 */
    justify-content: center; /* 上下の真ん中 */
    align-items: center;     /* 左右の真ん中 */
    text-align: center;      /* 文字列自体のセンター寄せ */
    padding: 30px 20px;
}

/* タイトル：CombineCam */
.service-card h3 {
    color: var(--p-green);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    width: 100%; /* 横幅を確保 */
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 説明文 */
.service-card p {
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    max-width: 90%;
    margin: 0 auto; 
    text-align: center; 
}

.service-card-link {
    text-decoration: none !important;
    outline: none;
}

/* --- Hover Effects --- */
.service-card-link:hover .service-card {
    /* ホバー時の枠線の色もアクセントカラーに合わせる */
    border-color: var(--card-accent); 
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* --- COMPANY TABLE (パーツ復活) --- */
.company-table {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.table-row {
    display: flex;
    border-bottom: 1px solid var(--border-gray);
    padding: 24px 0;
}

.table-label {
    width: 200px;
    font-size: 14px;
    font-weight: 700;
    color: #888;
}

.table-value {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
}

/* --- CONTACT & FORM --- */
.form-container {
    max-width: 700px;
    margin: 0 auto 60px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    text-align: left;
}

.form-group { margin-bottom: 30px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--p-green); }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
}

.btn-submit {
    width: 100%;
    background-color: var(--p-green);
    color: #fff;
    padding: 20px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

/* --- INSTAGRAM BUTTON: サイズ最適化 --- */
.btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--p-green);
    color: #fff;
    
    /* 余白を少し削ってスマートに */
    padding: 12px 35px; 
    min-width: 200px; 
    
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 75, 45, 0.2);
}

.btn-contact:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

/* スマホではもっと馴染むように */
@media (max-width: 690px) {
    .btn-contact {
        width: 70%;       /* 画面を占領しすぎない幅 */
        min-width: 180px; 
        font-size: 13px;
        padding: 11px 0;
    }
}

/* --- FOOTER --- */
footer {
    background-color: var(--p-green);
    padding: 80px 40px;
    color: #fff;
}

.footer-links { display: flex; justify-content: center; gap: 20px; font-size: 12px; margin-bottom: 20px; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; }
.copyright { font-size: 11px; opacity: 0.5; font-family: 'JetBrains Mono'; }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 690px) {
    header { height: 85px; padding: 0 20px; }
    .header-logo { height: 55px; }
    .pc-nav { display: none; }
    .hamburger { display: flex; }
    .section-container { padding: 80px 20px; }
    .hero h1 { font-size: 24px; }
    .btn-contact { width: 85%; padding: 12px 0; min-width: auto; }
    .form-container { padding: 25px 20px; }
    .service-list { grid-template-columns: 1fr; }
    .table-row { flex-direction: column; gap: 8px; }
}