/*
Theme Name: ARK (Business Media Prototype)
Author: Development Team
Description: 会員制メディア構築のためのコンセプト実証用オリジナルテーマ。
Version: 5.0.0
*/

/* -------------------------------------------
   1. ベース設定 (Typography & Reset)
------------------------------------------- */
body {
    font-family: "Yu Gothic Medium", "游ゴシック Medium", YuGothic, "游ゴシック体", "Helvetica Neue", Helvetica, Arial, sans-serif;
    margin: 0;
    color: #222;
    line-height: 1.8;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; line-height: 1.4; letter-spacing: 0.05em; }
img { max-width: 100%; height: auto; vertical-align: bottom; }

/* フォーム部品の完全矩形化 */
input[type="text"], input[type="email"], input[type="password"], textarea {
    border: 1px solid #ccc;
    border-radius: 0 !important;
    padding: 12px;
    box-shadow: none;
    appearance: none;
}
input:focus { border-color: #222; outline: none; }


/* -------------------------------------------
   2. ヘッダーナビゲーション
------------------------------------------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 1000;
}
.header-inner {
    display: flex; justify-content: space-between; align-items: center; height: 80px;
}
/* ロゴ */
.site-logo a { font-size: 1.8rem; font-weight: bold; color: #222; letter-spacing: 0.1em; }
.site-logo span { color: #e74c3c; }

/* PCメニュー */
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 40px; }
.main-navigation li a {
    color: #222; font-size: 0.95rem; font-weight: 600;
    padding: 28px 0; display: block; position: relative;
    letter-spacing: 0.05em;
}
.main-navigation li a::after {
    content: ''; position: absolute; bottom: -1px; left: 0; width: 0%; height: 3px;
    background: #e74c3c; transition: width 0.3s;
}
.main-navigation li a:hover::after { width: 100%; }

/* ハンバーガーボタン */
.menu-trigger { display: none; position: relative; width: 30px; height: 22px; z-index: 9991; }
.menu-trigger span {
    position: absolute; left: 0; width: 100%; height: 2px; background: #222; transition: 0.3s;
}
.menu-trigger span:nth-of-type(1) { top: 0; }
.menu-trigger span:nth-of-type(2) { top: 10px; }
.menu-trigger span:nth-of-type(3) { bottom: 0; }
@media (max-width: 900px) {
    .menu-trigger { display: block; }
    .main-navigation { display: none; }
    .container { padding: 0 20px; }
}


/* -------------------------------------------
   3. ヒーローエリア (画像適用済み)
------------------------------------------- */
.hero-section {
    position: relative;
    /* ↓ Unsplashの高品質なビジネス画像を背景に設定 */
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: #fff; text-align: center; padding: 150px 20px;
}
/* 画像の上に黒いフィルターを掛けて文字を読みやすくする */
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 濃さはお好みで調整 (0.0〜1.0) */
    z-index: 0;
}
/* 文字やボタンをフィルターの上に出す */
.hero-content, .hero-title, .hero-subtitle, .hero-btn, .hero-note {
    position: relative;
    z-index: 1;
}

.hero-title { font-size: 3.5rem; margin-bottom: 20px; font-weight: bold; letter-spacing: 0.05em; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.2rem; opacity: 1; margin-bottom: 50px; font-weight: 500; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.hero-note { font-size: 0.85rem; opacity: 0.9; margin-top: 15px; }

/* 共通ボタン (矩形) */
.hero-btn, button[type="submit"] {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 18px 60px;
    border-radius: 0 !important;
    font-weight: bold;
    font-size: 1rem;
    border: 2px solid #e74c3c;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s;
}
.hero-btn:hover, button[type="submit"]:hover {
    background: #fff;
    color: #e74c3c;
}


/* -------------------------------------------
   4. メインレイアウト & 記事グリッド
------------------------------------------- */
.main-wrapper {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 60px; padding: 80px 0;
}
.content-area { width: 70%; }
.sidebar { width: 25%; position: sticky; top: 100px; }
@media (max-width: 900px) {
    .main-wrapper { flex-direction: column; padding: 40px 0; }
    .content-area, .sidebar { width: 100%; }
    .sidebar { position: static; margin-top: 60px; }
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2.2rem; margin-bottom: 10px; color: #222; }
.section-subtitle { color: #e74c3c; font-size: 1rem; font-weight: bold; letter-spacing: 0.2em; }

/* 記事カード */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px; }
.post-card {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid #eee;
    transition: border-color 0.3s;
}
.post-card:hover { border-color: #e74c3c; }
.post-img-wrap { position: relative; height: 220px; overflow: hidden; }
.post-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .post-img { transform: scale(1.03); }

/* 会員限定ラベル */
.lock-label {
    position: absolute; top: 0; left: 0;
    background: #222; color: #fff;
    font-size: 0.75rem; padding: 8px 15px;
    border-radius: 0;
    display: flex; align-items: center; gap: 5px; font-weight: bold; letter-spacing: 0.1em;
}
.no-image { width: 100%; height: 100%; background: #f5f5f5; display: flex; align-items: center; justify-content: center; color: #ccc; font-weight: bold; }

.post-content { padding: 30px; }
.post-meta { font-size: 0.85rem; color: #999; margin-bottom: 15px; display: flex; gap: 15px; }
.post-cat { color: #e74c3c; font-weight: bold; }
.post-title { font-size: 1.3rem; margin: 0 0 15px; line-height: 1.5; color: #222; transition: color 0.3s; }
.post-card:hover .post-title { color: #e74c3c; }
.post-excerpt { font-size: 0.95rem; color: #666; margin-bottom: 25px; }
.read-more {
    font-size: 0.9rem; font-weight: bold; color: #222;
    display: inline-block; border-bottom: 2px solid #222; padding-bottom: 2px;
    letter-spacing: 0.1em;
}
.post-card:hover .read-more { border-color: #e74c3c; color: #e74c3c; }


/* -------------------------------------------
   5. サイドバーウィジェット
------------------------------------------- */
.auth-widget, .sidebar-widget {
    background: #fff; padding: 30px;
    border: 1px solid #eee; margin-bottom: 40px;
}
.widget-title, .sidebar-widget h3 {
    font-size: 0.9rem; font-weight: bold; letter-spacing: 0.15em;
    text-align: center; margin-bottom: 25px; color: #222;
    border-bottom: 2px solid #e74c3c; display: inline-block; padding-bottom: 10px;
}
.sidebar-widget h3 { display: block; border-bottom: 1px solid #eee; padding-bottom: 15px; text-align: left; }

.sidebar-btn {
    display: block; width: 100%; border: none; padding: 18px;
    text-align: center; font-weight: bold; cursor: pointer; transition: 0.3s;
    text-decoration: none; box-sizing: border-box;
    border-radius: 0 !important; letter-spacing: 0.1em;
}
.btn-login { background: #222; color: #fff; margin-bottom: 15px; border: 2px solid #222; }
.btn-login:hover { background: #fff; color: #222; }
.btn-register { background: #e74c3c; color: #fff; line-height: 1.2; border: 2px solid #e74c3c; }
.btn-register:hover { background: #fff; color: #e74c3c; }
.btn-register span { font-size: 0.8rem; font-weight: normal; display: block; margin-top: 5px; }
.btn-mypage { background: #222; color: #fff; }
.logout-link { display: block; text-align: center; margin-top: 15px; font-size: 0.9rem; color: #999; text-decoration: underline; }

.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget li { border-bottom: 1px solid #eee; }
.sidebar-widget li a { display: block; padding: 15px 0; color: #555; font-weight: 500; }
.sidebar-widget li a:hover { color: #e74c3c; padding-left: 5px; }


/* -------------------------------------------
   6. 記事詳細 & ロック画面
------------------------------------------- */
.entry-header { text-align: center; margin-bottom: 60px; max-width: 900px; margin-left: auto; margin-right: auto; }
.entry-title { font-size: 2.5rem; font-weight: bold; margin-bottom: 20px; color: #222; }
.entry-header .meta { color: #999; margin-bottom: 20px; font-size: 0.9rem; }
.post-thumbnail img { width: 100%; height: auto; }

.member-lock {
    background: #f9f9f9;
    border: none;
    border-top: 4px solid #e74c3c;
    padding: 60px 40px;
    text-align: center; margin: 60px 0;
    border-radius: 0;
}
.member-lock h3 { color: #222; margin-bottom: 20px; font-size: 1.5rem; }
.member-lock p { margin-bottom: 30px; color: #666; }


/* -------------------------------------------
   7. PC用追従サイドボタン (SHIPS完全再現・修正版)
------------------------------------------- */
#side_button {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    display: flex;
    flex-direction: column;
    filter: drop-shadow(-4px 4px 6px rgba(0,0,0,0.15));
}

/* ボタン共通 */
#side_button a {
    display: block;
    width: 56px;
    height: 140px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3em;
    line-height: 1;
    font-family: "Yu Gothic Medium", "游ゴシック Medium", sans-serif;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    border-radius: 0 !important;
    box-sizing: border-box;
}

/* 未ログイン: ログイン (白背景 + グレー枠線) */
#side_button a.open_login_modal {
    background: #fff;
    color: #222;
    border: 1px solid #ddd;
    border-right: none;
    margin-bottom: -1px;
}
#side_button a.open_login_modal:hover {
    background: #f0f0f0;
    width: 65px;
}

/* 未ログイン: 登録 (赤背景) */
#side_button a.open_register_modal {
    background: #e74c3c;
    color: #fff;
    border: 1px solid #e74c3c;
    border-right: none;
}
#side_button a.open_register_modal:hover {
    background: #c0392b;
    width: 65px;
}

/* ログイン済: マイページ (黒背景) */
#side_button a[href*="mypage"] {
    background: #222; 
    color: #fff;
    border: 1px solid #222;
    border-right: none;
    height: 140px;
    margin-bottom: -1px;
}
#side_button a[href*="mypage"]:hover {
    background: #444;
    width: 65px;
}

/* ログイン済: ログアウト (白背景 + グレー枠線) */
#side_button a[href*="logout"] {
    background: #fff; 
    color: #777;
    border: 1px solid #ccc;
    border-right: none;
    height: 100px;
}
#side_button a[href*="logout"]:hover {
    background: #f9f9f9;
    color: #e74c3c;
    width: 65px;
}

@media (max-width: 900px) {
    #side_button { display: none; }
}


/* -------------------------------------------
   8. スマホ用ドロワー & モーダル
------------------------------------------- */
#drawer_menu {
    position: fixed; top: 0; right: -350px; width: 320px; height: 100vh;
    background: #fff; z-index: 10000; transition: right 0.4s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1); overflow-y: auto;
}
#drawer_menu.active { right: 0; }
#drawer_menu .header { display: flex; justify-content: space-between; align-items: center; padding: 25px; border-bottom: 1px solid #eee; }
.close_button { width: 24px; height: 24px; position: relative; cursor: pointer; }
.close_button::before, .close_button::after {
    content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: #222;
}
.close_button::before { transform: rotate(45deg); }
.close_button::after { transform: rotate(-45deg); }
.drawer_nav li a { display: block; padding: 20px 25px; border-bottom: 1px solid #f5f5f5; color: #222; font-weight: bold; }

#mobile_login_button { padding: 30px 25px; background: #f9f9f9; }
#mobile_login_button a {
    display: block; width: 100%; padding: 15px; margin-bottom: 15px;
    text-align: center; border-radius: 0; font-weight: bold;
    text-decoration: none; box-sizing: border-box;
}
#mobile_login_button a.open_login_modal { background: #fff; color: #222; border: 2px solid #222; }
#mobile_login_button a.open_register_modal { background: #e74c3c; color: #fff; border: 2px solid #e74c3c; }

#drawer_overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 9999;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
#drawer_overlay.active { opacity: 1; visibility: visible; }

/* モーダル */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.95);
    z-index: 99999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.4s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #fff; width: 90%; max-width: 500px; padding: 60px 40px;
    border-radius: 0; position: relative;
    box-shadow: none; border: 1px solid #eee;
    transform: translateY(30px); transition: 0.4s ease-out;
    text-align: center;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close {
    position: absolute; top: 20px; right: 20px; background: none; border: none;
    font-size: 2rem; cursor: pointer; color: #999; transition: 0.3s;
}
.modal-close:hover { color: #e74c3c; }
.modal-content h2 { margin-top: 0; margin-bottom: 40px; font-size: 1.8rem; letter-spacing: 0.1em; }
.modal-link { margin-top: 30px; font-size: 0.9rem; }
.modal-link a { text-decoration: underline; }


/* -------------------------------------------
   9. フッター
------------------------------------------- */
footer {
    background: #1a1a1a; color: #fff;
    padding: 80px 0; margin-top: 100px; text-align: center;
}
footer p { opacity: 0.6; font-size: 0.9rem; letter-spacing: 0.1em; }