/* ============================================================
   CSS VARIABLES (Client Specification)
   ============================================================ */
:root {
    --background: #09090B;
    --surface: #121214;
    --card: #18181B;
    --primary: #7C3AED;
    --primary-hover: #8B5CF6;
    --text: #FFFFFF;
    --text-secondary: #A1A1AA;
    --border: #27272A;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    letter-spacing: -0.03em;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 1280px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
    height: 80px;
    background: rgba(9, 9, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.nav-brand span {
    color: var(--primary);
}

.brand-icon {
    color: var(--primary);
    font-size: 20px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-login {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.btn-login:hover {
    color: var(--text);
}

.btn-get-started {
    padding: 14px 28px;
    background: var(--primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    transition: all 0.2s ease;
}

.btn-get-started:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: 0.3s ease;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    height: 420px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #09090B, #1B102B);
    border-bottom: 1px solid var(--border);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 64px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hero-desc {
    font-size: 18px;
    color: #B4B4B8;
    max-width: 520px;
}

.hero-mockup {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.mockup-dashboard {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    width: 280px;
}

.mockup-header {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.mockup-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.mockup-header .dot.red { background: #EF4444; }
.mockup-header .dot.yellow { background: #F59E0B; }
.mockup-header .dot.green { background: #10B981; }

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mockup-chart {
    height: 60px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.mockup-stats {
    display: flex;
    gap: 8px;
}

.mockup-stats span {
    flex: 1;
    height: 20px;
    background: var(--surface);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.mockup-phone {
    width: 80px;
    height: 140px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 16px;
    position: relative;
}

.mockup-phone::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
}

/* ============================================================
   CATEGORIES SECTION
   ============================================================ */
.categories-section {
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
}

.categories-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill {
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--card);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.category-pill:hover {
    border-color: var(--border);
    color: var(--text);
}

.category-pill.active {
    background: var(--primary);
    color: #fff;
}

.search-wrapper {
    width: 360px;
    position: relative;
}

.search-wrapper form {
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    height: 52px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 48px 0 16px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.25s ease;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 14px;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
}

.search-btn:hover {
    color: var(--primary);
}

/* ============================================================
   BLOG GRID
   ============================================================ */
.blog-section {
    padding: 40px 0 60px;
}

.blog-container {
    display: flex;
    gap: 32px;
}

.articles-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* ============================================================
   BLOG CARD
   ============================================================ */
.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 24px;
    transition: all 0.25s ease;
    display: flex;
    gap: 24px;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.15);
}

.card-image {
    flex-shrink: 0;
    width: 320px;
    height: 180px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--surface);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 32px;
    background: var(--surface);
}

.card-category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 14px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.card-title a:hover {
    color: var(--primary);
}

.card-excerpt {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.card-meta i {
    margin-right: 4px;
}

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.25s ease;
}

.read-more:hover {
    gap: 14px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Newsletter */
.newsletter-card {
    background: var(--card);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.newsletter-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.newsletter-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    height: 52px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 16px;
    color: var(--text);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.newsletter-form input:focus {
    border-color: var(--primary);
}

.newsletter-form button {
    height: 52px;
    background: var(--primary);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.newsletter-form button:hover {
    background: var(--primary-hover);
}

.newsletter-card small {
    display: block;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 12px;
}

/* Popular Posts */
.popular-posts h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.popular-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-link {
    display: flex;
    gap: 14px;
    align-items: center;
}

.popular-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface);
}

.popular-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.popular-info h4:hover {
    color: var(--primary);
}

.popular-info span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.breadcrumb {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb .separator {
    margin: 0 8px;
    opacity: 0.4;
}

.breadcrumb .current {
    color: var(--text);
}

.single-post {
    padding: 40px 0 60px;
}

.single-container {
    display: flex;
    gap: 32px;
}

.single-main {
    flex: 1;
}

.single-featured {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid var(--border);
}

.single-featured img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.single-category {
    display: inline-block;
    padding: 4px 16px;
    background: rgba(124, 58, 237, 0.12);
    color: var(--primary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.single-title {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.author-name {
    font-weight: 600;
    color: var(--text);
}

.meta-divider {
    opacity: 0.3;
}

.single-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.single-content h2,
.single-content h3 {
    color: var(--text);
    margin: 24px 0 12px;
}

.single-content p {
    margin-bottom: 16px;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
    padding: 40px 0 60px;
    border-top: 1px solid var(--border);
}

.related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.related-card img,
.related-placeholder {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-secondary);
}

.related-card h4 {
    padding: 14px 16px 4px;
    font-size: 15px;
    font-weight: 600;
}

.related-card span {
    display: block;
    padding: 0 16px 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    opacity: 0.4;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 4px;
}

.empty-state a {
    color: var(--primary);
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-header,
.category-header {
    padding: 24px 0 8px;
    border-bottom: 1px solid var(--border);
}

.search-title,
.category-title {
    font-size: 28px;
    font-weight: 800;
}

.search-query {
    color: var(--text-secondary);
    font-size: 16px;
}

.search-count,
.category-count {
    color: var(--text-secondary);
    font-size: 14px;
}

.search-section {
    padding: 24px 0 0;
}

.search-form-large {
    display: flex;
    gap: 12px;
}

.search-form-large input {
    flex: 1;
    height: 52px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    color: var(--text);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.search-form-large input:focus {
    border-color: var(--primary);
}

.search-form-large button {
    padding: 0 32px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s ease;
}

.search-form-large button:hover {
    background: var(--primary-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--background);
    border-top: 1px solid var(--border);
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand span {
    color: var(--primary);
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
}

.social-icons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-col h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-col ul a:hover {
    color: var(--text);
}

.footer-bottom {
    padding-top: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .blog-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .single-container {
        flex-direction: column;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-mockup {
        display: none;
    }
}

/* Tablet Small */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--background);
        border-bottom: 1px solid var(--border);
        padding: 20px 24px;
        gap: 16px;
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-actions {
        display: none;
    }
    
    .hero {
        height: auto;
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .categories-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .blog-card {
        flex-direction: column;
    }
    
    .card-image {
        width: 100%;
        height: 200px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .single-title {
        font-size: 28px;
    }
    
    .single-meta {
        flex-wrap: wrap;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form-large {
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .category-pill {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .blog-card {
        padding: 16px;
    }
    
    .card-title {
        font-size: 17px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .single-title {
        font-size: 22px;
    }
    
    .single-content {
        font-size: 15px;
    }
}