@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    --bg-main: #0a0813;
    --bg-card: rgba(22, 19, 41, 0.7);
    --bg-card-hover: rgba(33, 29, 61, 0.9);
    --bg-header: rgba(10, 8, 19, 0.85);
    
    --accent-purple: #9d4edd;
    --accent-purple-glow: rgba(157, 78, 221, 0.4);
    --accent-cyan: #00f5d4;
    --accent-cyan-glow: rgba(0, 245, 212, 0.3);
    
    --text-primary: #ffffff;
    --text-secondary: #a9a5c3;
    --text-muted: #6e6a8a;
    
    --border-color: rgba(157, 78, 221, 0.15);
    --border-hover: rgba(0, 245, 212, 0.4);
    
    --font-ui: 'Outfit', sans-serif;
    --font-body: 'Lora', serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 20px rgba(157, 78, 221, 0.2);
}

/* ==========================================
   RESET & GLOBAL STYLES
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

ul {
    list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(157, 78, 221, 0.3);
    border-radius: 5px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    padding: 16px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    color: var(--accent-cyan);
    -webkit-text-fill-color: initial;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: 6px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition-smooth);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Search Bar in Header */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 16px 8px 40px;
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
    width: 200px;
}

.search-input:focus {
    width: 280px;
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

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

/* Hero Section / Featured Post */
.hero-section {
    padding: 40px 0;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
}

.featured-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 15px 40px -10px rgba(0, 245, 212, 0.15);
}

.featured-img-wrapper {
    position: relative;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.featured-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card:hover .featured-img-wrapper img {
    transform: scale(1.05);
}

.featured-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 50%, rgba(10, 8, 19, 0.9) 100%);
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tag {
    display: inline-block;
    align-self: flex-start;
    background: rgba(157, 78, 221, 0.15);
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 20px;
    transition: var(--transition-smooth);
}

.tag:hover {
    background: var(--accent-purple);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow);
}

.tag.cyan {
    background: rgba(0, 245, 212, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.tag.cyan:hover {
    background: var(--accent-cyan);
    color: var(--bg-main);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.featured-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.featured-title a:hover {
    color: var(--accent-cyan);
}

.featured-excerpt {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 16px;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.meta-author {
    color: var(--text-secondary);
    font-weight: 600;
}

.separator {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

/* ==========================================
   NEWS GRID
   ========================================== */
.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -13px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-purple);
    box-shadow: var(--shadow-glow);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 15px 35px -5px rgba(157, 78, 221, 0.1);
}

.post-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.post-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-img-wrapper img {
    transform: scale(1.04);
}

.post-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card .tag {
    margin-bottom: 12px;
}

.post-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 50px;
}

.post-title a:hover {
    color: var(--accent-cyan);
}

.post-excerpt {
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Sidebar and Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
    padding-bottom: 80px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}

/* Popular Posts list */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-item {
    display: flex;
    gap: 14px;
    align-items: center;
}

.popular-img {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popular-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-title a:hover {
    color: var(--accent-purple);
}

/* ==========================================
   ARTICLE DETAIL PAGE STYLES
   ========================================== */
.article-header {
    padding: 40px 0 20px 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--accent-cyan);
}

.article-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
    margin-bottom: 30px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-purple);
    box-shadow: var(--shadow-glow);
}

.author-detail {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
}

.article-date {
    font-size: 12px;
    color: var(--text-muted);
}

.article-main-image {
    width: 100%;
    max-height: 550px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
}

.article-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-body-content {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    letter-spacing: 0.1px;
}

.article-body-content p {
    margin-bottom: 24px;
}

.article-body-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-body-content a {
    color: var(--accent-cyan);
    border-bottom: 1px dashed var(--accent-cyan);
}

.article-body-content a:hover {
    color: var(--accent-purple);
    border-color: var(--accent-purple);
}

/* ==========================================
   FOOTER
   ========================================== */
.main-footer {
    background: #06050c;
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h3 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-about p {
    margin-top: 15px;
    line-height: 1.6;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover {
    color: var(--accent-cyan);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    background: var(--accent-purple);
    color: var(--text-primary);
    border-color: var(--accent-purple);
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px);
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */
@media (max-width: 992px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-img-overlay {
        background: linear-gradient(to top, rgba(10, 8, 19, 0.9) 30%, transparent 100%);
    }
    
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none; /* In a real app we'd toggle a mobile menu */
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .featured-title {
        font-size: 26px;
    }
    
    .article-title {
        font-size: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
