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

: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: 100; }
.site-branding h1 { font-size: 24px; font-weight: 800; color: var(--primary); margin: 0; }

/* Navigation & Dropdowns */
.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; }

/* Sub Menu Fix */
.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;
}
.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul {
    display: block;
}
.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; }

/* Mobile Menu Toggle */
.menu-toggle { display: none; }
@media (max-width: 768px) {
    .menu-toggle { display: block; background: none; border: none; font-size: 24px; cursor: pointer; float: right; }
    .main-navigation ul { display: none; flex-direction: column; width: 100%; position: absolute; top: 100%; left: 0; background: var(--white); padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .main-navigation.toggled ul { display: flex; }
    .main-navigation ul ul { position: static; box-shadow: none; display: none; padding-left: 20px; background: var(--bg); }
    .main-navigation ul li.focus > ul { display: block; }
}

/* 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); }

/* Hierarchical ToC */
.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; }

/* --- ENHANCED COMMENTS SECTION --- */
.comments-area { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.8rem; margin-bottom: 40px; 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;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    position: relative;
}
.comment-list .children {
    list-style: none;
    margin-left: 50px;
    margin-top: 20px;
    border-left: 3px solid var(--border);
    padding-left: 20px;
}
.comment-author { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.comment-author img.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--bg);
}
.comment-author cite {
    font-style: normal;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
}
.comment-meta { font-size: 0.85rem; color: #94a3b8; margin-left: auto; }
.comment-meta a { color: #94a3b8; }
.comment-content p { margin-bottom: 15px; font-size: 16px; }
.reply { text-align: right; }
.comment-reply-link {
    display: inline-block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
}
.comment-reply-link:hover { background: var(--accent); color: white; }

.comment-respond { background: var(--white); padding: 30px; border-radius: 8px; border: 1px solid var(--border); margin-top: 40px; }
.comment-reply-title { font-size: 1.5rem; margin-bottom: 20px; display: block; }
.comment-form p { margin-bottom: 20px; }
.comment-form label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-submit .submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}
.form-submit .submit:hover { background: var(--accent); }

/* 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; }

/* Archive Header */
.archive-header { padding: 40px 0; background: var(--white); border-bottom: 1px solid var(--border); margin-bottom: 40px; text-align: center; }
.archive-title { font-size: 2rem; color: var(--primary); }

/* 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 Timer 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; }

/* Back to Top */
#back-to-top { position: fixed; bottom: 30px; right: 30px; background: var(--accent); color: white; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: 0.3s; z-index: 999; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3); }
#back-to-top.visible { opacity: 1; }

/* Mobile */
@media (max-width: 768px) {
    .content-grid { grid-template-columns: 1fr; }
    .related-posts-grid { grid-template-columns: 1fr; }
    .footer-widgets { grid-template-columns: 1fr; }
    .inline-related-card { flex-direction: column; text-align: center; }
    .inline-card-thumb img { width: 100%; height: 150px; }
    .site-branding { float: left; }
}
