/*
Theme Name: Nexott Modern Theme V4
Description: High-performance, fully English dark mode theme optimized for Google PageSpeed Insights, with Sidebar Sticky CTA.
Version: 4.0
Author: Nexott
*/

:root {
    --bg-main: #0b0b0e;
    --bg-card: #15151c;
    --bg-accent: #1f1f2a;
    --primary-purple: #8a2be2;
    --primary-hover: #a142f5;
    --text-white: #ffffff;
    --text-gray: #a0a0b0;
    --border-color: #262633;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-gray);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-white); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-purple); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
header {
    background: rgba(11, 11, 14, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: 75px; }
.logo { font-size: 26px; font-weight: 800; color: var(--text-white); letter-spacing: -0.5px; }
.logo span { color: var(--primary-purple); }
.nav-menu { display: flex; list-style: none; gap: 28px; align-items: center; }
.nav-menu li { position: relative; }
.nav-menu a { font-size: 15px; font-weight: 500; color: #e0e0e0; }
.nav-menu .sub-menu {
    display: none; position: absolute; top: 100%; left: 0; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: 8px; min-width: 200px;
    padding: 10px 0; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); list-style: none;
}
.nav-menu li:hover .sub-menu { display: block; }
.nav-menu .sub-menu li a { padding: 8px 20px; display: block; font-size: 14px; }
.nav-menu .sub-menu li a:hover { background: var(--bg-accent); color: var(--primary-purple); }

.btn-trial {
    background: var(--primary-purple); color: var(--text-white) !important;
    padding: 10px 22px; border-radius: 30px; font-weight: 600 !important;
    font-size: 14px !important; transition: all 0.3s ease; display: inline-block; text-align: center;
}
.btn-trial:hover { background: var(--primary-hover); box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4); transform: translateY(-1px); }

/* Fast Category Filters */
.category-filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 40px 0 30px; }
.filter-btn {
    background: var(--bg-card); color: var(--text-gray); border: 1px solid var(--border-color);
    padding: 8px 20px; border-radius: 25px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s ease;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary-purple); color: var(--text-white); border-color: var(--primary-purple); box-shadow: 0 4px 12px rgba(138, 43, 226, 0.3); }

/* Post Cards Layout */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; margin-bottom: 50px; }
.post-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease; }
.post-card:hover { transform: translateY(-4px); border-color: var(--primary-purple); }
.post-card img { width: 100%; height: 200px; object-fit: cover; display: block; background: var(--bg-accent); }
.post-card-body { padding: 22px; }
.post-card-tag { font-size: 12px; font-weight: 700; color: var(--primary-purple); text-transform: uppercase; margin-bottom: 8px; display: inline-block; }
.post-card-title { font-size: 19px; font-weight: 700; color: var(--text-white); line-height: 1.35; margin-bottom: 12px; }
.post-card-excerpt { font-size: 14px; color: var(--text-gray); margin-bottom: 0; }

/* --- Single Article with Sidebar --- */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin: 40px auto;
    align-items: start; /* Crucial for sticky behavior */
}

.single-main-content { min-width: 0; }

.single-header { margin-bottom: 30px; }
.single-title { font-size: 36px; color: var(--text-white); font-weight: 800; line-height: 1.25; margin-bottom: 15px; }
.single-meta { font-size: 14px; color: var(--text-gray); }
.single-featured-image { width: 100%; height: auto; border-radius: 12px; margin-bottom: 35px; border: 1px solid var(--border-color); }
.single-content { font-size: 17px; color: #d1d1e0; line-height: 1.8; }
.single-content h2, .single-content h3 { color: var(--text-white); margin: 35px 0 15px; }
.single-content p { margin-bottom: 22px; }
.single-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* Sticky Sidebar */
.single-sidebar { position: relative; }
.sticky-wrapper {
    position: sticky;
    top: 100px; /* Space for the fixed header */
    z-index: 10;
}

/* Subscription & Free Trial Callout Box */
.cta-box {
    background: linear-gradient(135deg, #18122B 0%, #110e1b 100%);
    border: 1px solid var(--primary-purple);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.15);
}
.cta-box h3 { font-size: 22px; color: var(--text-white); margin-bottom: 12px; font-weight: 700; line-height: 1.3;}
.cta-box p { font-size: 14px; color: #c4c4d4; margin-bottom: 25px; }

.cta-buttons { display: flex; flex-direction: column; gap: 15px; }

.btn-secondary {
    background: transparent; border: 1px solid var(--primary-purple); color: var(--text-white);
    padding: 10px 22px; border-radius: 30px; font-weight: 600; font-size: 14px; transition: all 0.3s ease; text-align: center; display: block;
}
.btn-secondary:hover { background: rgba(138, 43, 226, 0.15); color: var(--text-white); }

/* Responsive layout for smaller screens */
@media (max-width: 992px) {
    .single-layout { grid-template-columns: 1fr; }
    .sticky-wrapper { position: static; margin-top: 40px; }
    .cta-buttons { flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .nav-menu { display: none; /* In a real theme you'd have a mobile menu toggle here */ }
}

/* Related Articles */
.related-section { margin-top: 60px; padding-top: 40px; border-top: 1px solid var(--border-color); }
.related-title { font-size: 22px; color: var(--text-white); margin-bottom: 25px; font-weight: 700; }

footer { background: #070709; border-top: 1px solid var(--border-color); padding: 30px 0; text-align: center; font-size: 14px; color: var(--text-gray); margin-top: 60px; }
