/*
Theme Name: ArchitectPress
Author: WPArchitect
Description: Lightweight, SEO-optimized theme for Tech/Streaming niches.
Version: 3.8
*/

:root {
    --primary: #0f172a;
    --accent: #2563eb;
    --highlight: #f97316;
    --bg: #f8fafc;
    --text: #334155;
    --white: #ffffff;
    --border: #e2e8f0;
}

/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 18px;
}
a { color: var(--accent); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--highlight); }
img { max-width: 100%; height: auto; display: block; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.site-header { 
    background: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    padding: 15px 0; 
    position: relative; 
    z-index: 1000; 
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-branding h1 { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0; }

/* Navigation */
.main-navigation ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.main-navigation ul li { position: relative; }
.main-navigation ul li a { color: var(--primary); font-weight: 600; font-size: 16px; display: block; padding: 10px 0; }

/* Dropdowns - Desktop */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    flex-direction: column;
    gap: 0;
    padding: 10px 0;
    z-index: 999;
    border-radius: 4px;
}
.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
    display: flex;
}
.main-navigation ul ul li { padding: 0 20px; }
.main-navigation ul ul li a { font-size: 15px; padding: 8px 0; border-bottom: 1px solid var(--bg); }
.menu-item-has-children > a::after { content: " ▾"; font-size: 12px; margin-left: 5px; }

/* Hero Section */
.hero {
    background: var(--primary);
    color: white;
    padding: 80px 0;
    text-align: center;
}
.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Hubs Grid */
.niche-hubs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}
.hub-link {
    display: block;
    padding: 20px;
    background: white;
    border: 1px solid var(--border);
    text-align: center;
    font-weight: bold;
    color: var(--primary);
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hub-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Grid Layouts */
.site-content { padding: 40px 0; }
.content-grid {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 40px;
}

/* Page Layout (No Sidebar) */
.page-layout {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

/* Typography & Articles */
.entry-header { margin-bottom: 30px; }
.entry-title { font-size: 2.5rem; line-height: 1.2; color: var(--primary); margin-bottom: 15px; }
.entry-meta { font-size: 0.9rem; color: #64748b; margin-bottom: 20px; }

.entry-content h1 { font-size: 2rem; margin: 30px 0; }
.entry-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--primary);
    border-bottom: 3px solid var(--highlight);
    display: inline-block;
}
.entry-content h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.entry-content p { margin-bottom: 20px; }

/* Breadcrumbs */
.breadcrumbs { font-size: 0.85rem; color: #64748b; margin-bottom: 15px; }
.breadcrumbs a { color: #64748b; }

/* Inline Cards */
.inline-related-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    padding: 15px;
    margin: 30px 0;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.inline-card-thumb img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; }
.inline-card-content h4 { font-size: 16px; margin-bottom: 5px; }
.inline-card-btn { font-size: 13px; font-weight: bold; text-transform: uppercase; color: var(--accent); }

/* Sidebar Widgets */
.widget-area { position: sticky; top: 20px; height: fit-content; }
.widget { background: var(--white); padding: 25px; margin-bottom: 30px; border: 1px solid var(--border); border-radius: 8px; }
.widget-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 10px; }

/* Collapsible & Scrollable ToC */
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.toc-header h3 { margin: 0; border: none; padding: 0; }
.toc-toggle-icon { font-weight: bold; font-size: 20px; color: var(--accent); }

.toc-content {
    max-height: 70vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.toc-content::-webkit-scrollbar { width: 6px; }
.toc-content::-webkit-scrollbar-thumb { background-color: var(--border); border-radius: 3px; }

.toc-widget.collapsed .toc-content { display: none; }
.toc-widget.collapsed .toc-header { border-bottom: none; margin-bottom: 0; }
.toc-widget ul { list-style: none; padding: 0; margin: 0; }
.toc-widget li { margin-bottom: 10px; line-height: 1.4; }
.toc-widget a { font-size: 15px; color: var(--text); display: block; }
.toc-widget a:hover { color: var(--accent); }

.toc-item-h2 { font-weight: 600; }
.toc-item-h3 { margin-left: 15px; padding-left: 10px; border-left: 2px solid var(--border); font-size: 14px; color: #64748b; }

/* Section Styling */
.section-header-wrap {
    border-bottom: 2px solid var(--primary); 
    padding-bottom: 10px; 
    margin-bottom: 20px;
}
.expert-guides-section {
    background: #f1f5f9; 
    padding: 30px; 
    border-radius: 8px; 
    margin-bottom: 60px;
}

/* Related Posts Grid */
.related-posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; }
.related-post-card { background: var(--white); border: 1px solid var(--border); overflow: hidden; border-radius: 8px; transition: transform 0.2s; }
.related-post-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.related-post-card img { height: 150px; width: 100%; object-fit: cover; }
.related-content { padding: 15px; }
.related-content h4 { font-size: 16px; line-height: 1.4; margin: 0; }

/* COMMENTS SECTION STYLING */
#comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.comments-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--primary);
}
.comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.comment-list li.comment {
    margin-bottom: 30px;
}
.comment-body {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 8px;
    position: relative;
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #64748b;
}
.fn {
    font-weight: bold;
    font-size: 16px;
    color: var(--primary);
    font-style: normal;
}
.comment-content p {
    margin-bottom: 15px;
    font-size: 16px;
}
.reply a {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
}

/* Comment Form */
.comment-respond {
    margin-top: 50px;
    background: #fff;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.comment-reply-title {
    font-size: 20px;
    margin-bottom: 20px;
    display: block;
}
.comment-form p {
    margin-bottom: 15px;
}
.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    background: #f8fafc;
}
.comment-form input:focus, 
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}
.comment-form .submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-form .submit:hover {
    background: var(--accent);
}


/* Footer (4 Columns) */
.site-footer { background: var(--primary); color: #94a3b8; padding: 60px 0 20px; margin-top: 60px; }
.footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 40px; }
.footer-widget h3 { color: var(--white); font-size: 18px; margin-bottom: 20px; }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget li { margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.footer-widget a { color: #cbd5e1; }
.footer-widget a:hover { color: var(--accent); }

/* Download Page */
.download-timer-wrapper { max-width: 600px; margin: 50px auto; text-align: center; background: var(--white); padding: 40px; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.timer-display { font-size: 48px; font-weight: 800; color: var(--primary); margin: 20px 0; }
.progress-bar { height: 6px; background: var(--bg); width: 100%; margin: 20px 0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--highlight); width: 0%; transition: width 1s linear; }
.download-btn-final { display: inline-block; background: var(--accent); color: white; padding: 15px 40px; font-size: 18px; font-weight: bold; border-radius: 50px; margin-top: 20px; }
.ad-slot { background: #f1f5f9; height: 250px; display: flex; align-items: center; justify-content: center; margin: 20px 0; border: 1px dashed #cbd5e1; color: #94a3b8; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--primary); }

/* Responsive Design */
@media (max-width: 768px) {
    /* Typography adjustment */
    body { font-size: 16px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    /* Layout flattener */
    .content-grid { grid-template-columns: 1fr; gap: 30px; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr; }
    .niche-hubs { grid-template-columns: repeat(2, 1fr); }
    
    /* Cards */
    .inline-related-card { flex-direction: column; text-align: center; }
    .inline-card-thumb img { width: 100%; height: 150px; }

    /* Hero */
    .hero h2 { font-size: 2rem; }
    .hero { padding: 50px 0; }

    /* Navigation */
    .menu-toggle { display: block; }
    .main-navigation { 
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
    .main-navigation.toggled {
        max-height: 500px;
        border-top: 1px solid var(--border);
    }
    .main-navigation ul { 
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    .main-navigation ul li { 
        width: 100%; 
        border-bottom: 1px solid var(--bg);
    }
    .main-navigation ul li a { 
        padding: 15px 20px; 
    }
    
    /* Mobile Dropdowns */
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        display: none;
        padding-left: 20px;
        background: #f8fafc;
        min-width: unset;
    }
    .main-navigation ul li.mobile-expanded > ul {
        display: block;
    }
}