/* ===== Reset & Variables ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    line-height: 1.3;
}

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

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.top-bar {
    background: var(--dark);
    color: var(--white);
    padding: 12px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: var(--white);
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.date i {
    margin-right: 8px;
}

.subscribe-btn {
    background: var(--primary);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* Navbar */
.navbar {
    padding: 20px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark);
    text-decoration: none;
    font-family: 'Merriweather', serif;
}

.logo i {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-toggle:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    max-width: 800px;
    width: 90%;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.search-form {
    display: flex;
    gap: 15px;
}

.search-input {
    flex: 1;
    padding: 20px 30px;
    font-size: 1.3rem;
    border: none;
    border-radius: 50px;
    font-family: 'Open Sans', sans-serif;
}

.search-submit {
    padding: 20px 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* ===== Featured Post ===== */
.featured-post {
    padding: 60px 0;
    background: var(--light);
}

.featured-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.featured-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 10;
}

.image-placeholder {
    width: 100%;
    height: 500px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.3);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category {
    background: var(--primary);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.reading-time {
    color: var(--gray);
    font-size: 0.95rem;
}

.reading-time i {
    margin-right: 5px;
}

.featured-text h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.featured-text p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
    line-height: 1.8;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

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

.author-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.post-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

.btn-read-more:hover i {
    transform: translateX(5px);
}

/* ===== Trending ===== */
.trending {
    padding: 80px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 i {
    color: var(--accent);
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.trending-item {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.trending-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.trending-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--gradient);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.3rem;
}

.trending-item h3 {
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 15px;
    color: var(--dark);
    line-height: 1.4;
}

.trending-meta {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.trending-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Latest Articles ===== */
.latest-articles {
    padding: 80px 0;
    background: var(--light);
}

.filter-tabs {
    display: flex;
    gap: 15px;
}

.filter-tab {
    padding: 10px 25px;
    background: var(--white);
    border: 2px solid var(--light);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--dark);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.article-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    position: relative;
    width: 100%;
    height: 250px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.4);
}

.article-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--white);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
}

.article-content {
    padding: 30px;
}

.article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.article-content p {
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.7;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.author-small {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray);
    font-size: 0.9rem;
}

.author-small i {
    font-size: 1.2rem;
}

.article-date {
    color: var(--gray);
    font-size: 0.85rem;
}

.article-stats {
    display: flex;
    gap: 20px;
    color: var(--gray);
    font-size: 0.85rem;
}

.article-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.load-more {
    text-align: center;
    margin-top: 60px;
}

.btn-load-more {
    padding: 15px 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-load-more:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Categories Showcase ===== */
.categories-showcase {
    padding: 80px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-box {
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.category-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.category-box i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.category-box h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.category-box span {
    font-size: 1rem;
    opacity: 0.9;
}

/* ===== Newsletter ===== */
.newsletter {
    padding: 80px 0;
    background: var(--light);
}

.newsletter-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-text {
    margin-bottom: 40px;
}

.newsletter-text i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.newsletter-text h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.newsletter-text p {
    font-size: 1.2rem;
    color: var(--gray);
}

.newsletter-form {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 18px 30px;
    border: 2px solid var(--light);
    border-radius: 50px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.newsletter-form button {
    padding: 18px 40px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.newsletter-form button:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

.newsletter-note {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 20px;
    font-family: 'Merriweather', serif;
}

.footer-logo i {
    color: var(--primary);
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 25px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--white);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Scroll to Top ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    background: var(--secondary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.scroll-to-top.show {
    display: flex;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .featured-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .featured-text h1 {
        font-size: 2.2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 153px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 153px);
        background: var(--white);
        flex-direction: column;
        padding: 40px;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .featured-text h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}
