/*
Theme Name: Erohantepu Magazine
Theme URI: https://erohantepu.icu/
Author: Erohantepu
Author URI: https://erohantepu.icu/
Description: えろはんてーぷ 専用カスタムテーマ
Version: 1.0
Text Domain: erohantepu
*/
:root {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --accent: #d4a017;
  --accent2: #ffd700;
  --pink: #ff6b9d;
}
body { font-family: 'M PLUS Rounded 1c', sans-serif; }

/* ===== Theme BASE CSS ===== */
/* breakpoints: SP(<600) SM(600-767) TB(768-1023) PC(1024-1279) WD(1280+) */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* SP横スクロール防止 — html/bodyレベルで封じ込め */
html { overflow-x: hidden; }
body {
    background: var(--bg, #0f0f15);
    color: var(--text, #f0f0f5);
    font-size: 15px;
    line-height: 1.75;
    font-family: 'Noto Sans JP', 'Yu Gothic UI', 'Hiragino Sans', sans-serif;
    overflow-x: hidden; /* 728pxバナー等のはみ出し防止 */
}
@media (min-width: 1024px) {
    body { font-size: 16px; line-height: 1.7; }
}

a { color: var(--accent2, #9b7fff); text-decoration: none; }
a:hover { text-decoration: underline; }
/* メディア要素はSP/PCで必ず親幅に収める */
img, iframe, video, embed, object { max-width: 100%; height: auto; }
img { display: block; }

/* ヘッダー（最小化: ロゴ + PCヘッダー広告のみ、空白なし） */
.sp-header {
    background: var(--bg2, #161620);
    border-bottom: 1px solid var(--border, #2a2a3d);
    padding: 4px 0;
    line-height: 1;
}
.sp-header .inner {
    max-width: 1160px; margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; min-height: 0;
}
.site-title { font-size: 18px; font-weight: 700; color: var(--accent2, #9b7fff); line-height: 1.3; }
.site-title a { color: inherit; }

/* ヘッダーバナー: PCのみ表示（728x90）/ SP広告は撤去 */
.sp-banner-pc { display: none; text-align: center; padding: 4px 0 0; background: var(--bg, #0d0d12); margin: 0; }
.sp-banner-sp { display: none; } /* SP広告撤去済み */
@media (min-width: 768px) {
    .sp-banner-pc { display: block; }
}

/* ナビ撤去: グローバルナビはエロタレスト送客動線に不要のため非表示 */
.site-nav { display: none; }

/* メインレイアウト共通（パターンCSSで上書き） */
.sp-content {
    max-width: 1160px; margin: 0 auto; padding: 20px 16px;
    display: grid; grid-template-columns: 1fr 280px; gap: 24px;
}
@media (max-width: 1023px) {
    .sp-content { grid-template-columns: 1fr; }
}

/* 記事グリッド — デフォルト2列 */
.sp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
/* SP: 1列 */
@media (max-width: 599px) {
    .sp-grid { grid-template-columns: 1fr; gap: 12px; }
}
/* TB/SM: 2列 */
@media (min-width: 600px) and (max-width: 1023px) {
    .sp-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* 記事カード */
.sp-card {
    background: var(--bg2, #161620);
    border: 1px solid var(--border, #2a2a3d);
    border-radius: 8px; overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.sp-card:hover {
    border-color: var(--accent, #e8305a);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
.sp-card .thumb {
    width: 100%; padding-top: 56.25%;
    background: var(--bg3, #1e1e2e); position: relative; overflow: hidden;
}
.sp-card .thumb img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.sp-card:hover .thumb img { transform: scale(1.05); }
.sp-card .thumb .duration {
    position: absolute; bottom: 5px; right: 5px;
    background: rgba(0,0,0,0.8); color: #fff; font-size: 11px;
    padding: 1px 6px; border-radius: 3px;
}
.sp-card .info { padding: 10px; }
.sp-card .info h2 {
    font-size: 13px; font-weight: 500; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; margin-bottom: 5px;
}
@media (min-width: 1024px) {
    .sp-card .info h2 { font-size: 14px; }
}
.sp-card .info h2 a { color: var(--text, #f0f0f5); }
.sp-card .info h2 a:hover { color: var(--accent2, #ff5577); text-decoration: none; }
.sp-card .tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.sp-card .tags a {
    font-size: 10px; padding: 1px 5px; border-radius: 3px;
    background: var(--bg3, #1e1e2e); color: var(--text2, #8888aa);
}
.sp-card .meta {
    font-size: 11px; color: var(--text2, #8888aa); margin-top: 5px;
    display: flex; gap: 8px; flex-wrap: wrap;
}

/* ページタイトル */
.page-title { margin-bottom: 18px; }
.page-title h1 {
    font-size: 18px; font-weight: 700; line-height: 1.4;
}
@media (min-width: 1024px) {
    .page-title h1 { font-size: 22px; }
}

/* サイドバー */
.sp-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sp-widget {
    background: var(--bg2, #161620);
    border: 1px solid var(--border, #2a2a3d);
    border-radius: 8px; padding: 14px;
    overflow: hidden; /* 広告はみ出し防止 */
    max-width: 100%; /* 親幅を超えない */
    box-sizing: border-box;
}
/* WordPressウィジェット内の広告コンテナも強制収納 */
.widget_text, .textwidget, .custom-html-widget {
    max-width: 100%; overflow: hidden; box-sizing: border-box;
}
.sp-widget-title {
    font-size: 14px; font-weight: 700; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 2px solid var(--accent, #e8305a);
    color: var(--accent2, #ff5577);
}
/* PC/SP共通: サイドバー広告ラッパー */
.sp-ad-wrap { max-width: 280px; overflow: hidden; }
/* SP時: サイドバーがメインカラム下に移動→幅制限を解除して100%に */
@media (max-width: 1023px) {
    .sp-ad-wrap { max-width: 100%; }
}

/* 個別記事 */
.single-content {
    background: var(--bg2, #161620);
    border: 1px solid var(--border, #2a2a3d);
    border-radius: 8px; padding: 22px;
    min-width: 0;
}
.sp-title {
    font-size: 18px; font-weight: 700; margin-bottom: 14px; line-height: 1.5;
}
@media (min-width: 1024px) {
    .sp-title { font-size: 22px; }
}
.sp-meta { font-size: 12px; color: var(--text2, #8888aa); margin-bottom: 14px; }
.sp-entry {
    line-height: 1.8; font-size: 15px;
}
@media (min-width: 1024px) {
    .sp-entry { font-size: 16px; }
}
.sp-entry img { max-width: 100%; height: auto; border-radius: 4px; margin: 8px 0; }
.sp-entry a { color: var(--accent2, #ff5577); }
.sp-entry p { margin-bottom: 12px; }

/* 動画ボタン */
.video-link { text-align: center; margin: 20px 0; }
.video-link a {
    display: inline-block; padding: 14px 40px;
    background: var(--pink, #ff2d6b); color: #fff;
    border-radius: 8px; font-weight: 700; font-size: 18px;
    transition: opacity 0.2s;
}
.video-link a:hover { opacity: 0.85; text-decoration: none; color: #fff; }

/* KOK広告 */
.kok-ads { margin: 22px 0; }
.article-bottom-parts { margin-top: 20px; }

/* ページネーション */
.pagination { margin-top: 24px; display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-block; padding: 7px 13px;
    background: var(--bg2, #161620);
    border: 1px solid var(--border, #2a2a3d);
    border-radius: 4px; font-size: 13px;
    color: var(--text2, #8888aa);
}
.pagination .current {
    background: var(--accent, #e8305a); color: #fff;
    border-color: var(--accent, #e8305a);
}

/* フッター */
.sp-footer {
    background: var(--bg2, #161620);
    border-top: 1px solid var(--border, #2a2a3d);
    padding: 20px 0; margin-top: 0;
}
.sp-footer .inner {
    max-width: 1160px; margin: 0 auto; padding: 0 16px;
}
.footer-bottom {
    display: flex; gap: 16px; align-items: center;
    font-size: 11px; color: var(--text2, #8888aa); flex-wrap: wrap;
}
.footer-bottom a { color: var(--text2, #8888aa); }

/* フッター上 エロタレスト大型パーツブロック */
.footer-eroterest-block {
    background: var(--bg2, #161620);
    border-top: 1px solid var(--border, #2a2a3d);
    padding: 20px 0; margin-top: 16px;
}

/* エロタレスト セクションタイトル共通スタイル */
.eroterest-section-title {
    font-size: 15px; font-weight: 700; margin-bottom: 10px;
    padding: 8px 0; border-bottom: 2px solid var(--accent, #e8305a);
    color: var(--accent2, #ff5577);
}

/* 記事下パーツブロック */
.article-bottom-parts, .article-popular-parts {
    margin-top: 24px;
}

/* 一覧ページ エロタレストブロック */
.index-eroterest-block {
    margin-top: 24px; margin-bottom: 8px;
}

/* エロタレスト全部見るボタン */
.btn-eroterest-all {
    display: inline-block; padding: 14px 40px;
    background: var(--accent, #e8305a); color: #fff !important;
    border-radius: 8px; font-weight: 700; font-size: 16px;
    text-decoration: none !important;
    transition: opacity 0.2s;
}
.btn-eroterest-all:hover { opacity: 0.85; text-decoration: none !important; }

/* SP時ナビ調整 */
@media (max-width: 599px) {
    .sp-header .inner { padding: 0 12px; }
    .sp-content { padding: 14px 12px; }
    /* SP: コンテンツ全体のはみ出し防止 */
    .sp-content, .sp-main, .sp-sidebar { overflow-x: hidden; }
    /* SP: WPウィジェット内固定幅広告をクリップ */
    .widget_text iframe, .textwidget iframe, .custom-html-widget iframe {
        max-width: 100% !important;
    }
    .btn-eroterest-all { padding: 12px 28px; font-size: 15px; }
}
/* 動画サムネ・リンクの強制中央寄せ (画像が左に寄る対策) */
.video-thumbnail, .video-link, .video-fallback { text-align: center !important; }
.video-thumbnail a, .video-link a, .video-fallback a { display: inline-block; }
.video-thumbnail img { display: block; margin: 0 auto; max-width: 100%; height: auto; border-radius: 4px; }



/* ===== hero パターン固有CSS（カバーフロー型） ===== */
/* hero はサイドバー無しで集中度を上げる */
.sp-content { grid-template-columns: 1fr; max-width: 880px; }
.sp-sidebar { display: none; }

.hero-stream {
    display: flex; flex-direction: column;
    gap: 36px;
    margin: 0 auto;
}
.hero-post {
    display: block;
    background: transparent;
    border: none;
}
.hero-cover-link { display: block; position: relative; }
.hero-cover {
    position: relative; width: 100%; padding-top: 52%;
    overflow: hidden; border-radius: 12px;
    background: var(--bg3, #1e1e2e);
}
@media (max-width: 599px) {
    .hero-cover { padding-top: 60%; border-radius: 8px; }
}
.hero-cover img {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-post:hover .hero-cover img { transform: scale(1.03); }
.hero-cover-shade {
    position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    pointer-events: none;
}
.hero-cover-placeholder {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: #666; font-size: 13px;
}
.hero-info {
    padding: 16px 4px 0;
}
.hero-date {
    display: block; font-family: monospace;
    font-size: 12px; color: var(--text2, #8888aa);
    margin-bottom: 6px; letter-spacing: 0.05em;
}
.hero-title {
    font-size: 22px; line-height: 1.4; font-weight: 700;
    margin: 0 0 10px;
}
@media (min-width: 1024px) { .hero-title { font-size: 26px; } }
.hero-title a { color: var(--text, #f0f0f5); }
.hero-title a:hover { color: var(--accent2, #ff5577); text-decoration: none; }
.hero-excerpt {
    font-size: 14px; line-height: 1.7; color: var(--text2, #aaaabe);
    margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tag {
    font-size: 11px; color: var(--accent2, #ff5577);
}

/* 個別記事 */
.hero-single { background: transparent; border: none; padding: 0; }
.hero-single-head { margin-bottom: 18px; }
.hero-single-title { font-size: 24px; line-height: 1.4; }
@media (min-width: 1024px) { .hero-single-title { font-size: 32px; } }
.hero-single-body { font-size: 16px; line-height: 1.85; }

