/*
Theme Name: Aorin Industry Theme
Author: Your Name
Description: 碧臨重工
Version: 1.0.4 
License: GNU General Public License v2 or later
*/

/* ==================================== */
/* 1. Reset & Global Styles */
/* ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
    color: #333;
    background-color: #0a1929;
    line-height: 1.6;
    overflow-x: hidden;
    /* 修正: ヘッダー高さの3分の2 (75px -> 50px) に調整 */
    padding-top: 50px; 
}

a {
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    margin-bottom: 80px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 40px;
    background: linear-gradient(180deg, #00d4ff, #0099cc);
    border-radius: 3px;
}

.cta-btn {
    display: inline-block;
    background: #00d4ff;
    color: #1a1a1a;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.3s, transform 0.3s;
}

.cta-btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* ==================================== */
/* 2. Header & Logo (ヘッダー画像表示対応へ修正) */
/* ==================================== */
header.site-header {
    /* 固定ヘッダーの基本設定 */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    
    /* 修正: ヘッダー高さの3分の2 (75px -> 50px) に調整 */
    height: 50px;
    overflow: hidden; /* 画像がはみ出さないように */
    background: #1a1a1a; /* 画像が読み込まれない場合の背景色 */
}

.header-inner {
    position: relative;
    width: 100%;
    height: 100%; /* 親のheight: 50pxを継承 */
}

.header-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.header-image-link picture,
.header-image-link img {
    width: 100%;
    height: 100%; /* 親のheight: 50pxを継承 */
    object-fit: cover; /* 画像をトリミングし、コンテナ全体を覆う */
    display: block;
    transition: filter 0.3s;
}


/* ロゴアイコン・テキストのスタイルは削除 (header.phpが画像ベースになったため) */
.logo-container, .logo-icon, .logo-text, .header-left, .header-right {
    display: none !important; 
}

/* 🚨 PC版でのハンバーガーボタンは非表示 (モバイル対応セクションで上書き) */
.menu-toggle {
    display: none; 
}


/* Aoiroserver CTAボタンを画像上に配置 */
.header-overlay-btn {
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    z-index: 1010;
}

.aoiroserver-btn {
    /* 修正: 背景色を #0097B2 に変更 */
    background: #0097B2;
    /* 修正: 文字色を黒 #1a1a1a に変更 */
    color: #1a1a1a;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.aoiroserver-btn:hover {
    background: #00d4ff;
    color: white;
    transform: translateY(-2px);
}

/* --- 追加 --- */
.aoiroserver-btn .btn-icon-img {
    /* 修正: アイコン画像を角丸にする */
    border-radius: 5px; 
}
/* ------------ */

.btn-icon {
    font-size: 16px;
    line-height: 1;
}


/* ==================================== */
/* 3. Navigation (Top Page & Sub Pages) */
/* ==================================== */
nav.top-navigation {
    /* bodyのpadding-topを補完する固定ヘッダーの一部ではないため、position:fixedは削除 */
    background: #1a1a1a;
    padding: 0 0;
    border-top: 2px solid #00d4ff;
    margin-top: 0; 
    /* is_front_pageではないページでのみ表示されるため、位置は固定ヘッダーの直下 */
}

.top-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.top-navigation ul {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.top-navigation ul li {
    width: calc(100% / 7); 
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.top-navigation ul li a {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 5px;
    padding: 15px 5px;
    width: 100%;
    text-align: center;
}

.top-navigation ul li a .icon {
    font-size: 24px;
    transition: transform 0.3s;
}

.top-navigation ul li a:hover .icon {
    transform: scale(1.1);
}

.top-navigation ul li a:hover,
.top-navigation ul li a.active {
    color: #00d4ff;
}

.top-navigation ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #00d4ff;
    transition: width 0.3s;
}

.top-navigation ul li a:hover::after,
.top-navigation ul li a.active::after {
    width: 80%;
}

/* ==================================== */
/* 4. Hero & Main Content */
/* ==================================== */
.main-content .hero {
    margin-top: 0;
    padding: 150px 40px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://via.placeholder.com/1920x600/1a3a52/ffffff?text=Main+Hero+Image') no-repeat center center/cover;
    text-align: left;
    color: white;
    min-height: 500px;
}

.hero:not(.main-content .hero) {
    /* bodyのpadding-topで50pxは確保済み */
    margin-top: 0; 
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://via.placeholder.com/1920x400/0a1929/ffffff?text=SUB+PAGE+HERO') no-repeat center center/cover;
    padding: 100px 40px;
    text-align: center;
    color: white;
    min-height: unset;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

.hero.sub-page-hero h1 {
    background-color: transparent !important; 
    color: white; 
    padding: 0; 
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}


.main-content {
    padding: 0;
    background: #1a1a1a; 
}

/* 詳細ページなど、ナビゲーションバーが表示されないページのための余白調整 */
.main-content .section-container {
    padding-top: 0px; 
    padding-bottom: 60px; 
}

/* 事業カードのスタイルは変更なし */
.business-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.business-card {
    background: #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    border: 2px solid transparent;
}

/* ==================================== */
/* 5. TOP Page News Highlight (統合済み) */
/* ==================================== */

.top-highlight-section {
    background: #1a1a1a;
    padding: 0;
}

/* --- 適用された調整 --- */
.top-highlight-section .section-container {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
}

.top-highlight-container {
    padding: 0;
    margin: 0;
}

.highlight-grid,
.news-white-area {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}
/* -------------------- */


.highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 60vh; 
    min-height: 400px;
    /* ★★★ カード間の隙間を追加 ★★★ */
    gap: 4px;
    /* ★★★ 背景色を設定（隙間の色） ★★★ */
    background-color: #1a1a1a;
}

.highlight-card {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    overflow: hidden;
    /* ★★★ border-rightを削除してgapで対応 ★★★ */
    border-right: none;
}

.highlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.8));
    transition: background 0.3s;
    /* ★★★ 確実に全体をカバー ★★★ */
    pointer-events: none;
    z-index: 1;
}

.highlight-card:hover .highlight-overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.9));
}

.highlight-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #00d4ff; 
    color: #1a1a1a;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
}

.highlight-content {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 2;
    text-align: left;
}

.highlight-title {
    color: white;
    font-size: 32px; 
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.highlight-date {
    color: #ddd;
    font-size: 14px;
}

.news-white-area {
    background: white;
    padding: 40px 20px;
    border-top: 4px solid #00d4ff;
}

.news-area-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
    border-left: 5px solid #00d4ff;
    padding-left: 15px;
}

.white-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.white-news-item {
    border-bottom: 1px solid #eee;
}

.white-news-item a {
    display: flex;
    align-items: center;
    padding: 15px 0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    flex-wrap: wrap;
}

.white-news-item a:hover {
    color: #00d4ff;
}

.white-news-item .news-date {
    font-weight: bold;
    margin-right: 20px;
    font-size: 14px;
    color: #666;
}

.white-news-item .news-label {
    background: #333;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 2px;
    margin-right: 15px;
}

.white-news-item .news-title {
    flex: 1;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-btn-area {
    text-align: right;
    margin-top: 20px;
}

.small-cta-btn {
    font-size: 14px;
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .highlight-grid {
        grid-template-columns: 1fr; 
        height: auto;
        gap: 4px;
    }
    .highlight-card {
        height: 300px;
    }
    .highlight-title {
        font-size: 24px;
    }
    .white-news-item .news-title {
        white-space: normal;
        margin-top: 5px;
        width: 100%;
    }
}


/* ==================================== */
/* 6. Product Grid (製品情報ページ用) */
/* ==================================== */
.product-news-archive {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

.product-card {
    display: block;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    color: white;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #333;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.product-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 10px;
}

.product-tag-label {
    background: #00ffb7a8;
    color: #1a1a1a;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.product-content {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-description {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-date {
    font-size: 12px;
    opacity: 0.8;
    display: block;
    text-align: right;
}

/* レスポンシブ調整 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================================== */
/* 7. Single Post/Product Detail Page */
/* ==================================== */

.single-post-wrapper {
    max-width: 1000px; 
    margin: 0 auto 60px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border-radius: 12px;
    overflow: hidden;
    position: relative; 
    z-index: 1001; 
}

/* ヘッダー画像エリア */
.post-header-image {
    position: relative;
    margin-bottom: 0; 
    background: #2a2a2a; 
    overflow: hidden;
    
    /* 修正: bodyのpadding-top (50px) を相殺 */
    margin-top: -50px; 
}

.post-header-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px; 
}

/* post-header-caption のスタイルはそのまま維持 (画像上の文字表示用) */
.post-header-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7); 
    color: white;
    padding: 20px 40px; 
    line-height: 1.5;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.entry-title-on-image {
    font-size: 36px;
    font-weight: 800;
    color: white;
    line-height: 1.3;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00d4ff;
}

.entry-meta-on-image {
    font-size: 14px;
    color: #ccc;
    display: block;
}

.entry-meta-on-image .tag-product {
    font-weight: bold;
    color: #00d4ff;
}


/* 白い背景のコンテンツエリア */
.single-post-content {
    background: white; 
    padding: 60px 80px; 
    margin: 0; 
}

/* タイトルとメタ情報 (現在は PHP 側で削除済み/コメントアウト) */
.entry-header {
    margin-bottom: 40px;
    border-bottom: 3px solid #00d4ff;
    padding-bottom: 15px;
}

.entry-title {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 10px;
}

/* 記事本文 */
.entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-size: 28px; 
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 15px;
    border-left: 5px solid #00d4ff;
    padding-left: 15px;
}
.entry-content h3 { font-size: 24px; }
.entry-content h4 { font-size: 20px; }


/* ページナビゲーション */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}

.post-nav a {
    color: #0066cc;
    transition: color 0.3s;
    font-weight: 600;
}

.post-nav a:hover {
    color: #00d4ff;
}

/* ==================================== */
/* 8. News Archive Page Styles (ニュース一覧) */
/* ==================================== */

/* サブページヒーローの調整 */
.hero.sub-page-hero {
    /* bodyにpadding-top: 50px; があるため、ナビゲーションの分の余白を確保 */
    padding: 100px 40px; 
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://via.placeholder.com/1920x400/0a1929/ffffff?text=NEWS+ARCHIVE+HERO') no-repeat center center/cover;
    background-size: cover;
    background-position: center;
    text-align: center;
    color: white;
}
.hero.sub-page-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: 2px;
}
.hero.sub-page-hero p {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}


.main-content .news-archive-section {
    padding-top: 40px;
    padding-bottom: 80px;
    background: #1a1a1a;
}

/* ニュースカードのグリッドレイアウト */
.main-content .news-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.main-content .news-card {
    display: flex; 
    flex-direction: column; 
    background: #2a2a2a;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden; 
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.main-content .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: #00d4ff;
}

/* カードのアイキャッチ画像エリア */
.main-content .card-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative; 
    flex-shrink: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background-color: #333; 
}

/* アイキャッチ画像がない場合のテキスト */
.main-content .card-image.no-thumbnail .no-thumbnail-text {
    color: #ccc;
    font-size: 18px;
    font-weight: bold;
}


/* ステータスタグのスタイル (アイキャッチ画像上) */
.main-content .card-status-label {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* 予告タグ */
.main-content .card-status-label.tag-yokoku {
    background: #ffaa00;
    color: #1a1a1a;
}

/* 開催中タグ */
.main-content .card-status-label.tag-kaisaichu {
    background: #00d4ff;
    color: #1a1a1a;
}


/* カードのテキストコンテンツエリア */
.main-content .card-content-area {
    padding: 20px 25px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.main-content .card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

.main-content .card-date {
    color: #00d4ff;
    font-weight: 600;
}

.main-content .card-category {
    background: #0066cc;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.main-content .card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.main-content .card-excerpt {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1; 
}


/* ページネーションのスタイル */
.main-content .news-pagination {
    grid-column: 1 / -1;
    margin-top: 40px;
    text-align: center;
}

.main-content .news-pagination ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0; 
}

.main-content .news-pagination li {
    display: inline-block; 
}

.main-content .news-pagination li a,
.main-content .news-pagination li span {
    display: block;
    padding: 8px 15px;
    border: 1px solid #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.main-content .news-pagination li a:hover {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #1a1a1a;
}

.main-content .news-pagination li span.current {
    background: #00d4ff;
    border-color: #00d4ff;
    color: #1a1a1a;
    font-weight: bold;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .main-content .news-list-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================================== */
/* 9. Contact Page Styles (お問い合わせ) */
/* ==================================== */

/* ヒーローセクションの背景画像（あれば） */
.hero.sub-page-hero {
    background-image: url('https://via.placeholder.com/1920x400/0a1929/ffffff?text=CONTACT+US+HERO');
}

/* フォーム全体と情報エリアのグリッド */
.contact-grid-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    background: #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

/* フォームエリア */
.contact-form-area {
    padding-right: 20px;
    border-right: 1px solid #333;
}

/* フォーム全体のデザイン */
.custom-contact-form {
    color: white;
}

/* フォームグループ */
.form-group {
    margin-bottom: 25px;
}

/* ラベル */
.custom-contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}
.custom-contact-form .required {
    color: #00d4ff;
    font-size: 12px;
}
.custom-contact-form .optional {
    color: #ccc;
    font-size: 12px;
}

/* 入力フィールド */
.custom-contact-form input[type="text"],
.custom-contact-form input[type="email"],
.custom-contact-form select,
.custom-contact-form textarea {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #444;
    color: white;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-contact-form input:focus,
.custom-contact-form select:focus,
.custom-contact-form textarea:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0,212,255,0.3);
    outline: none;
}

/* プルダウンの矢印の色（ブラウザによっては効かない） */
.custom-contact-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ccc' d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 16px;
}

/* テキストエリア */
.custom-contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* フォームフッターとボタン */
.form-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.privacy-note {
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.privacy-note input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.submit-btn {
    min-width: 250px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
}

/* メッセージ（成功/エラー） */
.success-message {
    background: #4CAF50;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}
.error-message {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

/* フォーム注釈 */
.form-note {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
    text-align: center;
}


/* 連絡先情報エリア (右側の情報) */
.contact-info-area {
    padding-left: 20px;
    color: white;
}
.info-title {
    color: #00d4ff;
    font-size: 20px;
    margin-bottom: 30px;
    border-bottom: 2px solid #00d4ff;
    padding-bottom: 5px;
}

.info-card {
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.info-card i {
    color: #00d4ff;
    font-size: 24px;
    margin-bottom: 10px;
}

.info-card h4 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 700;
}

.info-card p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 0;
}

.info-card .phone-number {
    font-size: 20px;
    font-weight: bold;
    color: white;
    margin-top: 5px;
}

.info-card .map-link {
    color: #00d4ff;
    font-size: 14px;
    margin-top: 10px;
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .contact-grid-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 40px;
    }
    
    .contact-form-area {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #333;
        padding-bottom: 40px;
    }
    
    .contact-info-area {
        padding-left: 0;
    }
}


/* ==================================== */
/* 10. Footer (モダンな統合フッター) */
/* ==================================== */

/* フッター本体 */
footer {
    background: #1a1a1a;
    color: white;
    border-top: 3px solid #00d4ff;
    padding: 60px 0 30px;
}

/* ロゴコンテナ (ヘッダーと似たスタイルだが、フッター用に調整) */
.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    text-decoration: none;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: white;
}

.footer-logo-ja {
    font-size: 18px;
    font-weight: 700;
}

.footer-logo-en {
    font-size: 10px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* フッターのグリッド（主要コンテンツ） */
.footer-grid-top {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

/* 会社情報エリア */
.footer-info-col {
    font-size: 14px;
    color: #ccc;
}
.company-address {
    margin-bottom: 15px;
    line-height: 1.6;
}
.footer-contact-details p {
    margin-bottom: 5px;
    font-size: 13px;
    color: #aaa;
}
.footer-contact-details strong {
    color: white;
}

/* リンク列のヘッダー */
.footer-link-col h4 {
    font-size: 16px;
    color: #00d4ff;
    margin-bottom: 15px;
    font-weight: 700;
}

/* リンクリスト */
.footer-link-col ul {
    list-style: none;
    padding: 0;
}

.footer-link-col ul li {
    margin-bottom: 10px;
}

.footer-link-col ul li a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
    position: relative;
    padding-left: 10px;
}

.footer-link-col ul li a:hover {
    color: white;
}

.footer-link-col ul li a::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #0099cc;
    font-weight: bold;
}

/* ソーシャルリンク */
.social-links-footer {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.social-links-footer a {
    color: #00d4ff;
    font-size: 20px;
    transition: color 0.3s, transform 0.3s;
}

.social-links-footer a:hover {
    color: white;
    transform: translateY(-2px);
}

/* フッター下部のコピーライトバー */
.footer-bottom-bar {
    text-align: center;
    padding-top: 20px;
}

.copyright-text {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
}


/* レスポンシブ対応 */
@media (max-width: 900px) {
    footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .footer-info-col {
        grid-column: 1 / -1;
    }
}

@media (max-width: 550px) {
    .footer-grid-top {
        grid-template-columns: 1fr;
    }
}


/* ==================================== */
/* 11. 事業紹介ページ (デジタルコンテンツ) */
/* ==================================== */

.section.digital-business {
    padding-top: 40px;
    background-color: #f4f7f9;
    border-left: 5px solid #00d4ff; 
    padding: 30px;
    margin-top: 40px;
}

.digital-business .section-title {
    color: #1a1a1a;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.digital-business p {
    font-size: 16px;
    color: #444;
}

.content-features {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    flex: 1;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.feature-item h3 {
    font-size: 18px;
    color: #0099cc;
    margin-bottom: 10px;
    font-weight: 600;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .content-features {
        flex-direction: column;
    }
}


/* ==================================== */
/* 12. Responsive Design (ヘッダー画像対応へ修正) */
/* ==================================== */
@media (max-width: 1024px) {
    
    /* ヘッダーの高さはそのまま (50px) */

    /* ナビゲーションの調整 */
    .top-navigation ul li {
        width: calc(100% / 3); 
    }
    
    /* Aoiroserver CTAボタンの位置調整 */
    .header-overlay-btn {
        right: 20px;
    }

    /* モバイル時のコンテンツ開始位置も調整 */
    .main-content .section-container {
        padding-top: 30px; 
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* ----------------------------------------------------
     * ★★★ モバイルレイアウト統合作業の開始 ★★★
     * ---------------------------------------------------- */
     
    /* 💡 1. 固定ヘッダーの高さ調整 */
    header.site-header {
        height: 50px; 
    }
    /* 修正: bodyの余白も新しい高さに合わせて調整 */
    body {
        padding-top: 50px; 
    }

    /* 💡 2. AOIROSERVER ボタンを非表示にする (ご要望の対応) */
    .header-overlay-btn {
        display: none !important; 
    }
    
    /* 💡 3. ハンバーガーボタンの表示と配置 */
    .menu-toggle {
        display: block; /* スマホでのみ表示 */
        position: fixed; /* 右上に固定 */
        /* ★★★ 修正: topを5pxに変更し、上に引き上げる ★★★ */
        top: 5px; 
        right: 15px;
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1000; /* ヘッダーや他の要素より手前に表示 */
        padding: 0;
    }

    /* ハンバーガーアイコンの線 */
    .hamburger-icon,
    .hamburger-icon::before,
    .hamburger-icon::after {
        content: '';
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff; /* アイコンの色 */
        position: absolute;
        transition: transform 0.3s, opacity 0.3s;
    }

    .hamburger-icon {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-icon::before {
        top: -10px;
    }

    .hamburger-icon::after {
        top: 10px;
    }

    /* メニューが開いたときのアイコン変化 (X印に) */
    .menu-toggle.active .hamburger-icon {
        background-color: transparent;
    }

    .menu-toggle.active .hamburger-icon::before {
        transform: rotate(45deg) translate(7px, 7px);
        top: 0;
    }

    .menu-toggle.active .hamburger-icon::after {
        transform: rotate(-45deg) translate(7px, -7px);
        top: 0;
    }
    
    /* 💡 4. ナビゲーション本体の隠蔽とスライド設定 */
    #site-navigation {
        /* メニューを画面外(右)に完全に隠す */
        position: fixed; 
        top: 0;
        right: -300px; /* メニュー幅（例: 300px）分外側に移動 */
        width: 300px; 
        max-width: 80%;
        height: 100vh;
        background-color: #222; 
        padding: 60px 20px 20px; 
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4);
        transition: right 0.3s ease;
        z-index: 998; 
        overflow-y: auto;
        
        /* PCで適用されている Flexbox設定を解除して、モバイルメニューとして機能させる */
        display: block; 
    }
    
    /* ナビゲーションが開いたとき */
    #site-navigation.toggled {
        right: 0;
    }
    
    /* 💡 5. ナビゲーションリストの縦並び化 */
    #site-navigation .top-nav-container ul {
        display: block; /* Flexを解除 */
    }
    
    #site-navigation .top-nav-container ul li {
        width: 100%; /* 横並びの計算を無効化 */
        display: block; /* Flexを解除 */
        border-bottom: 1px solid #333; 
        justify-content: flex-start; /* 左寄せに戻す */
    }
    
    #site-navigation .top-nav-container ul li a {
        display: flex; /* アイコンとテキストを横並びにするためFlexに戻す */
        flex-direction: row; 
        align-items: center; 
        gap: 15px;
        padding: 15px 5px;
        color: #ddd;
        text-align: left;
    }
    
    /* モバイルメニューでは下線アニメーションを無効化 */
    #site-navigation .top-nav-container ul li a::after {
        display: none;
    }


    /* ----------------------------------------------------
     * ★★★ 既存のモバイルメディアクエリの設定（継承） ★★★
     * ---------------------------------------------------- */
    .section-container, .footer-top-inner {
        padding: 0 20px;
    }
    .section-title {
        font-size: 28px;
    }

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

    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post-wrapper {
        margin: 30px auto; 
    }
    /* 修正: モバイル時はヘッダー高さ50pxを相殺 */
    .post-header-image {
        margin-top: -50px; 
    }
    .post-header-image img {
        max-height: 300px;
    }
    .post-header-caption {
        padding: 10px 20px;
        font-size: 14px;
    }
    .single-post-content {
        padding: 30px 20px;
    }
    .entry-title-on-image {
        font-size: 28px;
    }
    .entry-title {
        font-size: 28px;
    }
    .post-nav {
        flex-direction: column;
        gap: 15px;
    }
    .entry-content h2 {
        font-size: 24px;
    }
    .entry-content h3 { font-size: 20px; }
    .entry-content h4 { font-size: 18px; }
}

@media (max-width: 550px) {
    .section-container {
        padding: 0 15px;
    }
    .hero.sub-page-hero h1 {
        font-size: 36px;
    }
    .top-navigation ul li {
        /* モバイルメニューが開いたとき、これは影響しないはず */
        /* PCでのナビゲーションが非表示になるため、この値は事実上使用されない */
        width: 50%; /* 2列表示 */
    }
}


/* =======================================================
   13. パスワード保護フォームのデザイン (最終統合版)
   ======================================================= */

/* --------------------
   パスワードフォーム本体 (爽やかな青と白)
   -------------------- */
.post-password-form {
    max-width: 550px;
    margin: 60px auto; 
    padding: 50px 40px; 
    
    background-color: rgba(255, 255, 255, 0.95);
    border: 3px solid #70a1ff; 
    border-radius: 15px; 
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(112, 161, 255, 0.5); 
}

.post-password-form p {
    font-size: 1.15em;
    color: #333333; 
    margin-bottom: 30px;
    line-height: 1.6;
}

.post-password-form label {
    display: block;
    color: #297bff; 
    margin-bottom: 10px;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-shadow: none; 
}

.post-password-form input[type="password"] {
    display: block;
    width: calc(100% - 24px); 
    max-width: 250px;
    margin: 0 auto 20px auto;
    padding: 12px;
    background-color: #f7faff; 
    color: #000000; 
    border: 1px solid #a3e6ff; 
    border-radius: 6px;
    font-size: 1em;
    transition: all 0.3s;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); 
}

.post-password-form input[type="password"]:focus {
    border-color: #297bff; 
    box-shadow: 0 0 0 3px rgba(41, 123, 255, 0.2); 
    outline: none;
}

.post-password-form input[type="submit"] {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(145deg, #5aa9ff, #297bff);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.0em;
    font-weight: bold;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(41, 123, 255, 0.4);
}

.post-password-form input[type="submit"]:hover {
    background: linear-gradient(145deg, #297bff, #5aa9ff);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(41, 123, 255, 0.6);
}

/* --------------------
   Discord CTAセクション (モダンデザイン)
   -------------------- */

.password-protection-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed #a3e6ff;
    /* CTAセクション全体を中央寄せに保つための設定 */
    text-align: center; 
}

/* パスワードヒントテキスト (中央寄せ、太字で分かりやすく) */
.password-protection-footer .password-hint-text {
    /* PHP側のインラインスタイルを削除し、このクラスで制御する想定 */
    color: #555555; 
    font-size: 1.0em; 
    margin-bottom: 25px;
    font-weight: bold;
    text-align: center; 
}


/* Discord CTAボックス本体 */
.discord-cta-box {
    padding: 30px; 
    background: linear-gradient(145deg, #7289DA, #5865F2); 
    border-radius: 12px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(114, 137, 218, 0.8);
    text-align: center;
}

/* Discordアイコン (Font Awesome対応、サイズ調整済み) */
.discord-cta-box .discord-icon {
    display: block; 
    /* Font Awesomeのiタグを囲むspan */
    margin: 0 auto 10px auto; 
}

.discord-cta-box .discord-icon i {
    /* ☆☆☆ 最終調整: サイズを 2em に縮小 (元の 3em の定義を上書き) ☆☆☆ */
    font-size: 2em; 
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.7)); 
    display: block; /* 中央寄せのためにブロック化 */
}

/* ボックス内の説明テキスト */
.discord-cta-box p {
    font-size: 1.0em;
    margin: 8px 0;
    color: #ffffff;
    text-align: center; 
}

/* Discordというタイトル部分 */
.discord-cta-box p:first-of-type {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

/* --------------------
   Discord参加ボタン
   -------------------- */
.discord-cta-box .discord-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    margin-top: 20px;
    
    background-color: transparent; 
    border: 2px solid #ffffff; 
    border-radius: 30px; 
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.05em;
    transition: all 0.3s;
}

.discord-cta-box .discord-btn:hover {
    background-color: #ffffff; 
    color: #5865F2; 
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* 参加ボタンアイコン (Font Awesome対応) */
.discord-cta-box .discord-btn i {
    /* iタグに直接スタイルを適用 */
    margin-right: 8px;
    width: 18px;
    height: 18px;
    /* SVG用のスタイルを削除し、iタグ用のみ残す */
}

/* =======================================================
   4. 車両基地ページのデザイン調整
   ======================================================= */

/* 固定ページ「車両基地」の本文コンテナに適用する */
/* bodyに特定のクラス名（例：.page-id-XX）が付与されている前提で、
   もし固定ページIDが分かれば、よりピンポイントに指定できます。
   ここでは汎用的なクラスを使います。
*/

/* 車両がリスト表示されるエリア全体 */
.vehicle-gallery-wrapper {
    background-color: #000000; /* 例: 背景が黒の場合 */
    padding: 30px;
    border-radius: 8px;
}

/* 車両カード内のコンテンツ全体の文字色を白に強制 */
.vehicle-gallery-wrapper .vehicle-card {
    /* 必要に応じて、カードの背景色も調整（例：濃いグレー） */
    background-color: #111111;
    color: #ffffff; /* 文字色を白に強制 */
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 6px;
}

/* 投稿本文内の全要素（p, li, h4, tableなど）の文字色を白に統一 */
.vehicle-gallery-wrapper .vehicle-card .vehicle-content-container,
.vehicle-gallery-wrapper .vehicle-card .vehicle-content-container p,
.vehicle-gallery-wrapper .vehicle-card .vehicle-content-container li,
.vehicle-gallery-wrapper .vehicle-card .vehicle-content-container h4 {
    color: #ffffff !important; /* !important を使用して強制的に上書き */
}

/* リンクの色も調整 */
.vehicle-gallery-wrapper .vehicle-card .vehicle-content-container a {
    color: #4ac7ff; /* 視認性の高い水色などに変更 */
}




/* ==================================== */
/* 14. 一般配布ページ専用スタイル */
/* ==================================== */

/* 配布カードの全体的なレイアウト調整 */
.products-grid .product-card {
    /* flexboxを解除して、内部でコンテンツとボタンを制御 */
    display: block; 
    padding: 0; /* paddingは内部の要素で調整 */
    height: 100%; /* グリッド内で高さを揃えるため */
    display: flex;
    flex-direction: column;
}

/* カードのコンテンツとボタンを分けるためのラッパー */
.products-grid .product-card .card-link-wrapper {
    display: block;
    text-decoration: none;
    color: white;
    flex-grow: 1; /* リンク部分を伸ばす */
}

/* ダウンロードボタンエリア */
.download-button-area {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #333; /* 区切り線 */
}

/* ダウンロードボタンのスタイル */
.distribution-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90%; 
    padding: 10px 20px;
    font-size: 16px;
    
    /* 青系のCTAボタンに変更 */
    background: #00d4ff; 
    color: #1a1a1a;
    border-radius: 4px;
    transition: background 0.3s, transform 0.3s;
    font-weight: 700;
}

.distribution-download-btn i {
    margin-right: 8px;
    font-size: 1.1em;
}

.distribution-download-btn:hover {
    background: white;
    transform: translateY(-2px);
}





/* --- 新規投稿ボタン (モダンフローティング) --- */

/* 投稿ボタンのコンテナ (ページ内配置用だが、ボタン自体を固定する) */
.submission-top-button-container {
    position: relative; /* 必要であれば */
    padding-top: 20px; /* 既存コンテンツとの間隔 */
    text-align: right;
}

/* モダンスタイルの固定投稿ボタン */
.modern-submission-btn {
    /* 画面右下に固定配置 */
    position: fixed;
    right: 20px;
    bottom: 20px;
    
    /* デザイン */
    background: #0073AA; /* WordPressの標準的な青、またはテーマのメインカラー */
    color: #ffffff;
    padding: 12px 25px;
    border-radius: 50px; /* 丸いボタンの形状 */
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* 影で浮いているように見せる */
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000; /* 他の要素より手前に表示 */
}

.modern-submission-btn:hover {
    background: #005A87; /* ホバーで少し暗くする */
    transform: translateY(-2px); /* わずかに浮き上がらせる */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modern-submission-btn i {
    font-size: 1.1em;
    margin-right: 8px; /* アイコンとテキストの間隔 */
}

/* スマホ表示時の調整 (ボタンを少し小さくする) */
@media (max-width: 768px) {
    .modern-submission-btn {
        right: 15px;
        bottom: 15px;
        padding: 10px 20px;
        font-size: 14px;
    }
}



/* =======================================================
   15. フォーム投稿テンプレート/マルチステップフォーム専用スタイル
   ======================================================= */

/* フォーム全体のコンテナデザイン */
.submission-form-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* フィールドセットのデザイン (海/青を基調に) */
.modern-submission-form fieldset {
    border: 2px solid #a8c0d6; /* 柔らかい青の枠線 */
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #f7faff; /* 非常に薄い水色背景 */
    
    /* ★★★ ここが重要: 非アクティブなステップを隠します ★★★ */
    display: none; 
}

.modern-submission-form fieldset.active {
    display: block; 
}


.modern-submission-form legend.section-legend {
    font-size: 1.5em;
    font-weight: 700;
    color: #004a80; /* 深い青 */
    padding: 0 10px;
    margin-left: -10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea,
.form-group input[type="datetime-local"] /* datetime-localも追加 */ {
    width: 100%;
    padding: 12px;
    border: 1px solid #cceeff; /* 薄い水色の枠線 */
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #0073AA;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.2); /* 強めの影 */
    outline: none;
}

.form-group .required {
    color: #d63638;
}

.file-note {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
}

/* --- リッチテキストエディタ (wp_editor) のレイアウトバグ修正 --- */

.full-width-editor .wp-editor-wrap {
    width: 100%;
    /* 重なりを防ぐためのfloatやoverflow解除 */
    clear: both; 
    display: block; 
}

/* TinyMCEフレーム自体の幅を強制的に100%に */
.full-width-editor .wp-editor-container,
.full-width-editor iframe#post_content_ifr {
    width: 100% !important;
    max-width: 100% !important;
}

/* タブボタン（ビジュアル/テキスト）のレイアウト修正 */
.full-width-editor .wp-editor-tools {
    overflow: hidden; /* float要素を保持 */
}

/* --- カスタムファイル入力のデザイン修正 --- */

.custom-file-input {
    position: relative;
    /* 高さを確保 */
    height: 40px; 
    line-height: 40px; 
    overflow: visible; /* after疑似要素が表示されるように */
    cursor: pointer;
}

.custom-file-input input[type="file"] {
    display: none;
}

/* ファイル名表示ラベル */
.custom-file-input .file-input-label {
    display: block;
    background-color: #fff;
    color: #555;
    padding: 0 15px; /* 上下のpaddingを0に */
    border: 1px solid #ccc;
    border-radius: 6px;
    line-height: 38px; /* labelの高さを確保 */
    transition: background-color 0.3s;
    overflow: hidden; /* テキストがボタン領域に侵入するのを防ぐ */
    white-space: nowrap;
    text-overflow: ellipsis;
    /* ボタンの幅を引いたサイズに設定 */
    width: calc(100% - 130px); 
    box-sizing: border-box;
}

/* ファイルを選択 ボタン本体（after疑似要素による実装を修正） */
.custom-file-input .file-input-label:after {
    content: "ファイルを選択";
    position: absolute;
    right: 0;
    top: 0;
    width: 120px; /* ボタンの固定幅 */
    text-align: center;
    background: #0073AA;
    color: #fff;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    line-height: 40px; /* 高さを親と同じに */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-left: 1px solid #005a87; /* 境界線を追加 */
}

.custom-file-input:hover .file-input-label:after {
    background-color: #005A87;
}

/* ファイルアップロード欄がディスエーブルの時のスタイル */
#addon_upload_wrapper.disabled-upload .file-input-label {
    background-color: #eee;
    color: #999;
    cursor: not-allowed;
}

#addon_upload_wrapper.disabled-upload .file-input-label:after {
    background: #a0a0a0;
    border-left: 1px solid #777;
    content: "無効 (URL入力済)";
}

#addon_upload_wrapper.disabled-upload:hover .file-input-label:after {
    background: #a0a0a0; /* ホバーしても色を変えない */
}


/* --- 投稿ボタン (海/青を基調に) --- */

.form-footer {
    padding-top: 20px;
    text-align: center;
}

.submit-post-btn.primary-action {
    background-color: #1a73e8; /* Googleのような鮮やかな青 */
    border: none;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.submit-post-btn.primary-action:hover {
    background-color: #0059b3;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}


/* --- マルチステップフォーム UI (追加) --- */

.form-steps-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.form-steps-indicator .step {
    flex-grow: 1;
    text-align: center;
    padding: 10px 5px;
    border-bottom: 3px solid transparent;
    color: #999;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    cursor: default;
}

.form-steps-indicator .step.active {
    color: #0073AA;
    border-color: #0073AA;
}

.form-steps-indicator .step:before {
    content: attr(data-step);
    display: block;
    width: 25px;
    height: 25px;
    line-height: 25px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-size: 12px;
    margin: 0 auto 5px;
    transition: background 0.3s;
}

.form-steps-indicator .step.active:before {
    background: #0073AA;
}

/* ステップ切り替えボタン配置 */
.form-step {
    min-height: 300px; /* フォームの高さが急に変わるのを防ぐ */
    /* フォームの高さが急に変わるのを防ぐ */
}

/* .modern-submission-form fieldset の display: none と .active の display: block で対応 */

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.step-navigation button {
    cursor: pointer;
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 5px;
}

.prev-step-btn {
    background: #ccc;
    color: #333;
    border: none;
}

.next-step-btn {
    background: #0073AA;
    color: #fff;
    border: none;
    margin-left: auto; /* 右寄せ */
}

/* --- 確認画面 (Step 5) のスタイル --- */

.confirmation-box {
    padding: 20px;
    border: 1px dashed #0073AA;
    background-color: #f0f8ff;
    border-radius: 6px;
}

.summary-group {
    margin-bottom: 15px;
    padding: 10px;
    border-left: 3px solid #0073AA;
    background-color: #fff;
    border-radius: 4px;
}

.summary-group strong {
    display: block;
    color: #004a80;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.summary-group p, .summary-group .summary-content {
    margin: 0;
    padding-left: 10px;
    white-space: pre-wrap; /* 説明文の改行を保持 */
    color: #333; /* 確認画面のテキスト色 */
}






/* ==================================== */
/* 16. Accessibility Helpers (アクセシビリティ補助) */
/* ==================================== */

/* スクリーンリーダー専用テキストの隠蔽 (視覚的に隠し、スクリーンリーダーでのみ読み上げさせる) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* キーボードフォーカスされた際に、読み上げテキストを見えるようにするためのスタイル（通常は隠す） */
.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875em;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* =======================================================
   フォーム投稿専用スタイル（追加・修正版）
   ======================================================= */

/* ファイル選択UI（新デザイン） */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.file-input-hidden {
    display: none !important;
}

.file-select-btn {
    background: #0073AA;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
    white-space: nowrap;
}

.file-select-btn:hover {
    background: #005A87;
}

.file-select-btn:disabled {
    background: #a0a0a0;
    cursor: not-allowed;
}

.file-name-display {
    flex: 1;
    padding: 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* アップロード無効時のスタイル */
#addon_upload_wrapper.disabled-upload .file-select-btn {
    background: #a0a0a0;
    cursor: not-allowed;
}

#addon_upload_wrapper.disabled-upload .file-name-display {
    background: #eee;
    color: #999;
}

/* フォームの区切り線 */
.form-divider {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* 確認画面のスタイル改善 */
.summary-group {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 3px solid #0073AA;
    background-color: #fff;
    border-radius: 4px;
}

.summary-group strong {
    display: block;
    color: #004a80;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.summary-group p,
.summary-group .summary-content {
    margin: 0;
    padding-left: 10px;
    color: #333;
    line-height: 1.6;
}

.summary-content {
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .file-upload-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .file-select-btn {
        width: 100%;
        justify-content: center;
    }
}


