/* ========================================
   仙台商工会議所青年部 会員名鑑システム
   共通スタイルシート
   ======================================== */

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* カラー変数定義 */
:root {
    --primary-blue: #145ab0; /* 新しいキーカラー */
    --secondary-blue: #3a79c9; /* 中間の青 */
    --light-blue: #6495ed; /* 明るい青 */
    --dark-blue: #0e4483; /* 最も濃い青 */
    --accent-green: #4caf50;
    --text-dark: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg-light: #f0f0f0; /* 薄いグレー（セクション背景）*/
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 基本設定 */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* コンテナ */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1200px; /* containerと同じ幅に変更 */
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* ヘッダー */
.header {
    background-color: var(--primary-blue); /* グラデーションを単色に変更 */
    color: var(--text-white);
    padding: 20px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    overflow-x: hidden;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-white);
}

.logo-text {
    font-size: 14px;
    font-weight: normal;
    display: block;
    margin-top: 5px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu a {
    color: var(--text-white);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* メインビジュアル */
.hero {
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('/images/1000008649.jpg');
    background-size: 120%; /* PCで拡大気味で表示 */
    background-position: 50% 55%; /* 水平：50%（中央）、垂直：60%（下寄り） */
    background-repeat: no-repeat;
    color: var(--primary-blue);
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    opacity: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 40px 20px;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-blue); /* 濃い青に変更 */
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
}

/* セクション */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center; /* 中央寄せに戻す */
    margin-bottom: 40px;
    color: var(--dark-blue); /* 濃い青に戻す */
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}


/* 1. 全般的なスタイルとスマートフォン（16px）の適用 */
/* セレクタの前に .section をつけることで、他の場所にある section-subtitle と区別します */
.section .section-subtitle {
    /* 以前の h2 (section-title) が持っていたスタイルを継承し、中央揃えを維持 */
    text-align: center;
    color: var(--text-light); /* 元の色を維持 */
    
    /* 太字の指定 */
    font-weight: bold;
    
    /* スマートフォンでのフォントサイズ (16px) */
    font-size: 16px; 
    
    /* h2が削除されたことによるマージン調整 */
    /* 元の h2 の下マージン (40px) と、元 p の上マージンを合算して調整します。 */
    /* h2の代わりにpがタイトル役を果たすため、上下の余白は元のpの40pxを維持し、
       必要に応じて h2の分の余白を p の上部に追加します。ここでは合計で上部に 70px を設定する例です。 */
    margin-top: 50px; /* h2分の余白をpに追加（例: 30px + 元のpの上下40px） */
    margin-bottom: 40px; /* 元のpの下マージンを維持 */
}

/* 2. PC（画面幅768px以上）でのフォントサイズを指定 */
@media (min-width: 768px) {
    .section .section-subtitle {
        /* PCでのフォントサイズ (25px) */
        font-size: 25px; 
    }
}















/* 検索エリア */
.search-area-wrapper {
    background-color: var(--bg-white);
    padding: 30px; /* パディングを戻す */
    border-radius: 8px;
    box-shadow: var(--shadow-sm); /* 影を戻す */
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-box {
    display: flex;
    align-items: center; /* 垂直方向中央揃え */
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.clear-search-text {
    color: var(--text-dark); /* 文字色を黒に */
    font-size: 14px;
    cursor: pointer;
    text-decoration: underline; /* アンダーラインを追加 */
    white-space: nowrap;
    padding: 0 5px; /* 検索ボタンとの間に少し余白 */
}

.clear-search-text:hover {
    color: var(--dark-blue);
}

.search-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.search-area > .search-box {
    margin: 0;
    max-width: 500px; /* 検索ボックスの幅を調整 */
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid var(--border-color); /* 枠線を細く */
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.search-button {
    padding: 12px 30px;
    background-color: var(--primary-blue);
    color: var(--text-white);
    border: none;
    border-radius: 8px; /* 角丸を8pxに変更 */
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: var(--dark-blue);
}

/* 業種フィルター */
.industry-filter {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.filter-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--dark-blue); /* 濃い青に戻す */
    text-align: center; /* 中央寄せに戻す */
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.filter-tag {
    padding: 8px 16px;
    background-color: var(--bg-white); /* 白背景 */
    color: var(--primary-blue); /* 紺文字 */
    border-radius: 4px; /* 角丸を調整 */
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-blue); /* 紺縁 */
}

.filter-tag:hover {
    background-color: var(--bg-light); /* ホバーで薄いグレーに戻す */
    border-color: var(--primary-blue);
    transform: translateY(-1px);
}

.filter-tag.active {
    background-color: var(--primary-blue); /* アクティブは紺背景 */
    color: var(--text-white); /* 白文字 */
    border-color: var(--primary-blue);
}

/* 表示切り替えコントロール */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.result-count {
    font-size: 16px;
    color: var(--text-light);
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.view-button {
    padding: 10px 20px;
    background-color: var(--bg-light); /* 薄いグレーに戻す */
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.view-button:hover {
    background-color: var(--border-color);
}

.view-button.active {
    background-color: var(--primary-blue);
    color: var(--text-white);
    border-color: var(--primary-blue);
}

/* フッター */
.footer {
    background-color: var(--primary-blue); /* グラデーションを単色に変更 */
    color: var(--text-white);
    padding: 40px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

/* ユーティリティクラス */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text-white);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container,
    .container-wide {
        padding: 0 15px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .header-content {
        position: relative;
        width: 100%;
        max-width: 100%;
    }

    .logo {
        text-align: left;
        flex: 1;
    }

    .logo a {
        align-items: center;
    }

    /* ハンバーガーメニューボタンを表示 */
    .hamburger {
        display: flex;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    /* ナビゲーションメニューを非表示 */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--primary-blue);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        display: block;
        padding: 15px 20px;
        text-align: left;
        border-radius: 0;
    }

    /* スマホ表示時の調整 */
@media (max-width: 768px) {
    .hero {
        min-height: 300px;
        background-size: 150%; /* スマホで拡大（寄り・ズーム） */
        background-position: 50% 20%; /* 中央を表示 */
    }
}


    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .search-box {
        flex-direction: column;
        width: 100%;
    }

    .search-area,
    .industry-filter {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
    }

    .filter-tags {
        gap: 8px;
    }

    .filter-tag {
        font-size: 13px;
        padding: 6px 12px;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
    }

    .view-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .result-count {
        font-size: 14px;
    }

    .view-toggle {
        width: 100%;
        justify-content: center;
    }

    .view-button {
        flex: 1;
        max-width: 150px;
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* オーバーレイ（メニュー開閉時の背景） */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* スマホ表示時の改行制御 */
.mobile-break {
    display: none; /* デスクトップでは非表示 */
}

@media (max-width: 768px) {
    .mobile-break {
        display: inline; /* スマホでは表示（改行） */
    }
}


/* ロゴを囲むコンテナ全体 */
.logo-container {
    /* 1. テキスト（インライン要素）を中央寄せにする */
    text-align: center; 
    /* 上下の余白を設定したい場合はここに記述 (例: padding: 20px 0;) */
}

/* ロゴのリンク要素（aタグ） */
.logo-link {
    /* 2. ブロック要素として振る舞わせる */
    display: block; 
    
    /* 3. 要素の幅を設定（画像幅300pxに合わせる）*/
    width: 300px;
    
    /* 4. 左右マージンを自動にして、ブロック要素自体を中央寄せにする */
    margin: 0 auto;
}
/* スマホ表示時のロゴサイズ調整 */
@media (max-width: 768px) {
    /* ヘッダーのロゴ */
    .header .logo img {
        width: 200px !important; /* スマホでは200pxに縮小（調整可能） */
        max-width: 100%;
    }
    
    /* フッターのロゴ */
    .footer .logo-container img {
        width: 200px !important; /* スマホでは200pxに縮小（調整可能） */
        max-width: 100%;
    }
    
    /* フッターのロゴリンク要素の幅も調整 */
    .footer .logo-link {
        width: 200px; /* スマホでは200pxに縮小（調整可能） */
    }
}

/* 生活関連サービスのみ中央寄せ */
.filter-tag.center-text {
    text-align: center;
}
