/*
Theme Name: Specializing-Aff
Theme URI: https://prosperitylabo.com/
Author: Antigravity AI
Description: アフィリエイト特化型・超軽量専用テーマ。フルワイドヘッダー、9カテゴリー、サイドバーランキングを標準装備。
Version: 1.0.0
Text Domain: specializing-aff
*/

/* Base Styles & Variables */
:root {
    --primary-color: #21539e;
    --primary-hover: #1a427e;
    --accent-color: #FF8C00;
    --accent-hover: #cc7000;
}

/* Individual Theme (Orange) */
body.theme-individuals {
    --primary-color: #E67E22;
    --primary-hover: #D35400;
}

* { box-sizing: border-box; }
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif; 
    color: #333; 
    line-height: 1.6; 
    background: #f8f9fa;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-color); text-decoration: none; transition: 0.3s; }
a:hover { color: var(--primary-hover); }

/* Layout Containers */
.full-width-container { width: 100%; margin: 0; padding: 0; }
.site-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex; 
    gap: 40px; 
    margin-top: 40px;
    margin-bottom: 80px;
}
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 320px; flex-shrink: 0; }

/* Header Tabs (Switcher) */
.header-tabs {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: #f0f2f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1001;
}
.tab-item {
    padding: 10px 30px;
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}
.tab-item:hover { color: #333; }
.tab-item.active {
    background: #fff;
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}
.tab-label-en { display: block; font-size: 10px; opacity: 0.7; font-weight: 400; text-transform: uppercase; margin-bottom: 2px; }

/* Header */
.site-header { 
    background: #fff; 
    border-bottom: 1px solid #eee; 
    padding: 15px 0; 
    z-index: 1000; 
    width: 100vw; 
    margin-left: calc(50% - 50vw);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative !important; /* 強制的に追従を解除 */
}
.header-inner { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.header-logo { display: flex; align-items: center; gap: 12px; }
.header-logo-icon { height: 38px; width: auto; }
.header-logo-text { font-family: 'Cinzel', serif; font-size: 24px; color: #111; letter-spacing: 0.1em; font-weight: 400; text-transform: uppercase; }

.header-nav { display: flex; gap: 20px; align-items: center; }
.header-nav a { font-weight: bold; font-size: 14px; color: #333; }
.btn-inquiry { 
    background: #FF8C00; 
    color: #fff !important; 
    padding: 10px 22px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 13px; 
    box-shadow: 0 3px 0 #cc7000;
}
.btn-inquiry:active { transform: translateY(2px); box-shadow: none; }

/* Hero */
.hero-belt { 
    width: 100vw; 
    height: auto; 
    min-height: 300px;
    aspect-ratio: 16 / 9;
    margin-left: calc(50% - 50vw);
    background: #001529;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
}
.hero-belt img { width: 100%; height: 100%; object-fit: cover; }

/* Sidebar Widget: AI Consultation */
.ai-consult-widget { 
    background: #fff; 
    padding: 25px; 
    border-radius: 12px; 
    margin-top: 50px;
    margin-bottom: 30px; 
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.ai-consult-widget .title { font-weight: bold; color: #004b87; margin-bottom: 15px; font-size: 16px; border-left: 4px solid #004b87; padding-left: 12px; }
.ai-consult-widget textarea { width: 100%; border: 1px solid #ccd6e0; padding: 12px; border-radius: 6px; font-size: 14px; margin-bottom: 12px; height: 100px; outline: none; }
.ai-consult-button { width: 100%; background: #004b87; color: #fff; border: none; padding: 12px; border-radius: 6px; font-weight: bold; cursor: pointer; }

/* Sidebar Category Buttons */
.sidebar-cat-btn { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    background: var(--primary-color); 
    color: #fff !important; 
    padding: 15px 20px;
    border-radius: 6px; 
    margin-bottom: 10px; 
    font-weight: bold; 
    font-size: 14px; 
}
.sidebar-cat-btn:hover { background: var(--primary-hover); transform: translateX(5px); }

/* Sidebar Heading */
.sidebar-heading { 
    font-size: 18px; 
    font-weight: bold; 
    margin-top: 40px; 
    margin-bottom: 20px; 
    padding-bottom: 8px; 
    border-bottom: 2px solid #21539e; 
    color: #21539e; 
    position: relative;
}
.sidebar-heading::after { 
    content: ""; 
    position: absolute; 
    left: 0; 
    bottom: -2px; 
    width: 60px; 
    height: 2px; 
    background: #21539e; 
}

/* Post List */
.section-title { font-size: 24px; font-weight: bold; margin-bottom: 30px; border-left: 6px solid var(--primary-color); padding-left: 15px; color: #111; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.post-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #eee; display: flex; flex-direction: column; height: 100%; }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.post-card-title { 
    font-size: 16px; 
    font-weight: bold; 
    margin: 0 0 15px 0; 
    color: #333; 
    line-height: 1.5; 
    height: 4.5em; /* Always reserve 3 lines to prevent displacement */
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
}
.post-card-img { 
    aspect-ratio: 16 / 9; /* Strictly 16:9 to match professional reports */
    overflow: hidden; 
    position: relative; 
    background: #000;
}
.post-card-img img { 
    transition: 0.5s; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block; 
    border-bottom: 1px solid #eee; 
}
.post-card-meta { font-size: 12px; color: #999; border-top: 1px solid #f5f5f5; padding-top: 12px; }
/* Footer */
.site-footer { 
    background: #1a2b3c; 
    color: #fff; 
    padding: 80px 0 40px 0; 
    margin-top: 100px; 
    width: 100vw; 
    margin-left: calc(50% - 50vw);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.footer-nav { 
    display: flex; 
    justify-content: center; 
    gap: 30px; 
    margin: 20px 0; 
    padding: 0;
    list-style: none;
}
.footer-nav a { color: #fff; opacity: 0.7; font-size: 14px; }
.footer-nav a:hover { opacity: 1; }
/* Responsive Adjustments */
@media (max-width: 1024px) {
    .site-container { flex-direction: column; gap: 60px; }
    .sidebar { width: 100%; }
}

@media (max-width: 800px) {
    /* [1] GLOBAL RESET: Remove blue glow & container constraints on mobile */
    #page, .site, .site-container { 
        box-shadow: none !important; 
        margin: 0 !important; 
        padding: 0 !important; 
        width: 100% !important;
        max-width: 100% !important;
    }

    /* [2] MAIN CONTENT: Remove fixed 20px border/40px padding discovered in audit */
    .main-content, .entry-content, .post-inner { 
        border: none !important; 
        padding: 25px 15px !important; /* Optimized comfortable reading padding */
        margin: 0 !important; 
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
    }

    /* [3] SIDEBAR: Stack below content */
    .sidebar { display: block !important; width: 100% !important; margin-top: 60px !important; }

    /* [4] HEADER: Ensure flush but keep design */
    .site-header { width: 100% !important; margin: 0 !important; padding: 15px 10px !important; }
    .header-nav { display: none !important; }

    .hero-belt { min-height: 200px; width: 100% !important; margin: 0 !important; }
    .site-footer { width: 100% !important; margin: 0 !important; }
    .post-grid { grid-template-columns: 1fr !important; }
}

html, body { overflow-x: hidden !important; }

.re-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px 60px;
    background: #fff;
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.9;
    color: #1a1a1a;
}

@media (max-width: 810px) {
    .re-container { padding: 25px 15px; width: 100%; box-shadow: none; margin: 0; }
}

.re-h2-belt {
    background: #21539e;
    color: #fff;
    padding: 22px 30px;
    border-radius: 6px;
    font-size: 1.6rem;
    font-weight: 900;
    margin: 80px 0 40px;
    box-shadow: 0 4px 15px rgba(33, 83, 158, 0.15);
}

.re-toc {
    background: #fdfdfd;
    border-radius: 12px;
    padding: 30px 40px;
    margin: 50px 0;
    border: 1px solid #ebecef;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.02);
}

.re-toc-header {
    font-weight: 900;
    font-size: 1.25rem;
    color: #21539e;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 12px;
}

.re-toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 650px) {
    .re-toc-grid { grid-template-columns: 1fr; }
}

.re-toc-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-decoration: none;
    padding: 15px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #f0f2f5;
    transition: 0.25s ease;
}

.re-toc-item:hover {
    background: #f4f8ff;
    border-color: #21539e;
    transform: translateY(-2px);
}

.re-toc-num {
    background: #21539e;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

.re-toc-content { display: flex; flex-direction: column; gap: 4px; }
.re-toc-title { color: #21539e; font-weight: 900; font-size: 1.05rem; }
.re-toc-desc { color: #666; font-size: 0.82rem; line-height: 1.4; }

.re-faq-list { display: grid; gap: 20px; margin: 40px 0; }
.re-faq-item {
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 16px;
    background: #fff;
    transition: 0.3s;
}
.re-faq-q { color: #21539e; font-weight: 900; margin-bottom: 15px; font-size: 1.15rem; }
.re-faq-a { font-size: 1rem; color: #444; line-height: 1.8; }

.re-table-wrapper { width: 100%; overflow-x: auto; margin: 40px 0; border-radius: 12px; border: 1px solid #eee; }
.re-data-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.re-data-table th, .re-data-table td { padding: 18px; border-bottom: 1px solid #f0f0f0; text-align: left; }
.re-data-table th { background: #f8f9fb; font-weight: 900; color: #21539e; }
.re-accent-cell { background: #fffdf0 !important; font-weight: 900; color: #d48806; }

.re-link-block-bottom {
    background: #ff44e6;
    border-radius: 16px;
    padding: 35px;
    margin: 40px 0;
    border: 2px solid #ff9f43;
}

.re-toc-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.re-toc-grid > p, .re-toc-grid > br, .re-toc-grid > *:not(.re-toc-item) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.re-toc-item {
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 8px !important;
    min-height: 0 !important;
}

.re-container { max-width: 1100px; margin: 40px auto; padding: 40px 60px; background: #fff; line-height: 1.9; color: #1a1a1a; }
@media (max-width: 810px) { .re-container { padding: 25px 15px; width: 100%; margin: 0; } }

.re-h2-belt { background: #21539e; color: #fff; padding: 22px 30px; border-radius: 6px; font-size: 1.6rem; font-weight: 900; margin: 80px 0 40px; }

.re-toc { background: #fdfdfd; border-radius: 12px; padding: 30px 40px; margin: 50px 0; border: 1px solid #ebecef; }
.re-toc-header { font-weight: 900; font-size: 1.25rem; color: #21539e; margin-bottom: 25px; border-bottom: 2px solid #f0f2f5; padding-bottom: 12px; }

.re-container .re-toc .re-toc-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.re-container .re-toc .re-toc-grid .re-toc-item {
    display: flex !important;
    width: 100% !important;
    align-items: flex-start !important;
    gap: 20px !important;
    padding: 22px 0 !important;
    border: none !important;
    border-bottom: 1px solid #f0f2f5 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.re-container .re-toc .re-toc-grid .re-toc-item:last-child { border-bottom: none !important; }

@media (max-width: 650px) {
    .re-toc-item { flex: 0 0 100% !important; }
}

.re-toc-item:hover { background: #f4f8ff; border-color: #21539e; }

.re-toc-num { background: #21539e; color: #fff; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 900; flex-shrink: 0; }
.re-toc-content { display: flex; flex-direction: column; gap: 4px; }
.re-toc-title { color: #21539e; font-weight: 900; font-size: 1.15rem; }
.re-toc-desc { color: #444; font-size: 0.95rem; line-height: 1.4; }

.re-faq-list { display: grid; gap: 20px; margin: 40px 0; }
.re-faq-item { border: 1px solid #eee; padding: 30px; border-radius: 16px; background: #fff; }
.re-faq-q { color: #21539e; font-weight: 900; margin-bottom: 12px; font-size: 1.1rem; }
.re-faq-a { font-size: 0.98rem; color: #444; line-height: 1.8; }

/* ==========================================================================
   Hierarchical Sidebar Toggles (site pivot)
   ========================================================================== */
.sidebar-cats-hierarchical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-cat-group {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eee;
}

.sidebar-cat-parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    font-weight: 900;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
}

.sidebar-cat-parent.cat-money { background: #21539e; }
.sidebar-cat-parent.cat-money:hover { background: #1a427e; }

.sidebar-cat-parent.cat-tool { background: #27ae60; }
.sidebar-cat-parent.cat-tool:hover { background: #219150; }

.sidebar-cat-parent.cat-solution { background: #e67e22; }
.sidebar-cat-parent.cat-solution:hover { background: #d35400; }

.sidebar-cat-parent i {
    font-size: 12px;
    transition: transform 0.3s;
}

.sidebar-cat-group.active .sidebar-cat-parent i {
    transform: rotate(180deg);
}

.sidebar-cat-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
}

.sidebar-cat-group.active .sidebar-cat-children {
    max-height: 500px; /* Arbitrary large height */
    border-top: 1px solid #eee;
}

.sidebar-child-link {
    padding: 12px 20px 12px 35px;
    font-size: 13.5px;
    color: #555 !important;
    border-bottom: 1px solid #f9f9f9;
    font-weight: bold;
}

.sidebar-child-link:last-child { border-bottom: none; }
.sidebar-child-link:hover {
    background: #f0f4f8;
    color: #21539e !important;
}

.sidebar-child-link i {
    margin-right: 8px;
    font-size: 11px;
    opacity: 0.5;
}

/* ==========================================================================
   Individuals Page Special Styles
   ========================================================================== */
.individuals-view-wrapper { 
    background: #fff;
    padding-bottom: 100px;
}

.site-container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.individuals-hero {
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    background: #001529; /* Placeholder bg */
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.individuals-hero .hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.3));
    z-index: 1;
}

.individuals-hero .container {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    width: 100%;
}

.individuals-hero .badge {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 2rem;
}

.individuals-hero h1 { font-size: 3.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
.individuals-hero h1 .small { font-size: 1.2rem; display: block; opacity: 0.8; font-weight: 400; margin-bottom: 0.5rem; }
.individuals-hero h1 .highlight { color: var(--primary-color); }
.individuals-hero .hero-sub { font-size: 1.2rem; max-width: 600px; margin: 0 auto 3rem; }

.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 100px;
    font-weight: 700;
    transition: 0.3s;
    text-decoration: none;
}
.btn-primary { background: var(--primary-color); color: #fff !important; }
.btn-outline { border: 2px solid var(--primary-color); color: #fff; }

.btn-outline:hover { background: var(--primary-color); color: #fff !important; }

/* Plan Grid - Individual Version */
.plan-grid-individuals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.plan-card-ind {
    background: #fff;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    text-align: center;
    position: relative;
}
.plan-card-ind.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}
.plan-card-ind .badge-featured {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 5px 20px;
    border-radius: 100px;
    font-size: 12px;
}
.price-ind { font-size: 3rem; font-weight: 900; color: var(--primary-color); margin: 20px 0; font-family: 'Outfit', sans-serif; }
.price-ind span { font-size: 1rem; opacity: 0.6; }
.features-ind { list-style: none; padding: 0; margin-bottom: 30px; text-align: left; }
.features-ind li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; display: flex; align-items: center; }
.features-ind li::before { content: '✓'; color: var(--primary-color); margin-right: 10px; font-weight: bold; }

.problem-section { padding: 100px 0; background: #fdfdfd; }
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.problem-card { padding: 30px; background: #fff; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); border: 1px solid #eee; }
.problem-card h3 { font-size: 1.1rem; color: #333; margin-bottom: 10px; }
.problem-card p { font-size: 0.9rem; color: #666; line-height: 1.6; }

/* --- SƃeLXg̏cYC --- */
.header-logo a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-decoration: none !important;
}

.header-logo-icon {
    width: 44px !important;
    height: auto !important;
    margin-bottom: 0 !important;
}

.header-logo-text {
    line-height: 1 !important;
    padding-top: 3px !important;
}
