/* ===================================
   ARTICLES PAGE - ENHANCED STYLES
   =================================== */

/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --white-clr: #ffffff;
    --black-clr: #000000;
    --muted-clr: #cfcfcf;
    --yellow-clr: #f2bf31;
    --accent-clr: #2e9c70;
    --hire-clr: #4fb0bd;
    --bg-dark: #0b132b;
    --card-bg: rgba(255, 255, 255, 0.03);
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ===== GLOBAL STYLES ===== */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, #030409 0%, #061021 100%);
    color: var(--white-clr);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

section {
    padding: var(--section-padding);
}

/* ===== NAVBAR (Same as main page) ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(11, 19, 43, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(11, 19, 43, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-clr);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition-normal);
}

.logo span {
    color: var(--yellow-clr);
}

.logo:hover {
    transform: scale(1.05);
}

.navlist {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.navlinks {
    color: var(--white-clr);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.navlinks::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--yellow-clr), var(--hire-clr));
    transition: width var(--transition-normal);
}

.navlinks:hover,
.navlinks.active {
    color: var(--yellow-clr);
}

.navlinks:hover::before,
.navlinks.active::before {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--white-clr);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    transform: translateY(-3px);
    border-color: var(--yellow-clr);
    box-shadow: 0 4px 12px rgba(242, 191, 49, 0.3);
}

.theme-toggle[aria-pressed="true"] {
    background: linear-gradient(90deg, var(--yellow-clr), var(--hire-clr));
    color: #051417;
    border-color: transparent;
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: var(--white-clr);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition-normal);
}

.hamburger:hover {
    color: var(--yellow-clr);
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 999;
    padding: 100px 30px 30px;
    transition: right var(--transition-normal);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-navlist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-navlinks {
    color: var(--white-clr);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color var(--transition-normal);
}

.mobile-navlinks:hover,
.mobile-navlinks.active {
    color: var(--yellow-clr);
}

/* ===== ARTICLES HERO SECTION ===== */
.articles-hero {
    padding-top: 150px;
    padding-bottom: 60px;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content h1 .highlight {
    color: var(--yellow-clr);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--muted-clr);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--yellow-clr);
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-item p {
    color: var(--muted-clr);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SEARCH AND FILTER SECTION ===== */
.filter-section {
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.01);
}

.search-filter-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-clr);
    font-size: 1.2rem;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white-clr);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.search-box input:focus {
    outline: none;
    border-color: var(--yellow-clr);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(242, 191, 49, 0.1);
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 12px 24px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--white-clr);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-btn:hover,
.category-btn.active {
    background: linear-gradient(90deg, var(--yellow-clr), var(--hire-clr));
    color: #051417;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(242, 191, 49, 0.3);
}

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title span {
    color: var(--yellow-clr);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--yellow-clr), var(--hire-clr));
    border-radius: 2px;
}

/* ===== FEATURED ARTICLE ===== */
.featured-article-section {
    padding: 60px 0;
}

.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(242, 191, 49, 0.3);
}

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

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.featured-article:hover .featured-image img {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--yellow-clr), #ff9800);
    color: #051417;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(242, 191, 49, 0.4);
}

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

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

.category-tag {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.category-tag.web-dev {
    background: rgba(79, 176, 189, 0.2);
    color: var(--hire-clr);
}

.category-tag.security {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.category-tag.ai {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.category-tag.tutorial {
    background: rgba(46, 156, 112, 0.2);
    color: var(--accent-clr);
}

.category-tag.tech {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.read-time,
.publish-date {
    color: var(--muted-clr);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--white-clr);
}

.article-excerpt {
    color: var(--muted-clr);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.article-tags span {
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted-clr);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
}

.article-tags span:hover {
    background: rgba(242, 191, 49, 0.2);
    border-color: var(--yellow-clr);
    color: var(--yellow-clr);
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(90deg, var(--yellow-clr), var(--hire-clr));
    color: #051417;
    box-shadow: 0 4px 15px rgba(242, 191, 49, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(242, 191, 49, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white-clr);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--yellow-clr);
    transform: translateY(-3px);
}

/* ===== ARTICLES GRID ===== */
.articles-section {
    padding: 60px 0;
}

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

.article-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease forwards;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(242, 191, 49, 0.3);
}

.article-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.article-card:hover .article-overlay {
    opacity: 1;
}

.read-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--yellow-clr);
    color: #051417;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-normal);
}

.read-link:hover {
    transform: scale(1.2) rotate(45deg);
}

.article-content {
    padding: 25px;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--white-clr);
    line-height: 1.4;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.read-more {
    color: var(--yellow-clr);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-normal);
}

.read-more:hover {
    gap: 12px;
}

.read-more i {
    transition: transform var(--transition-normal);
}

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

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results i {
    font-size: 4rem;
    color: var(--muted-clr);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.no-results p {
    color: var(--muted-clr);
    font-size: 1.1rem;
}

/* ===== LOAD MORE ===== */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.01);
}

.newsletter-card {
    background: linear-gradient(135deg, rgba(242, 191, 49, 0.1), rgba(79, 176, 189, 0.1));
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--yellow-clr), var(--hire-clr));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #051417;
}

.newsletter-card h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.newsletter-card > p {
    color: var(--muted-clr);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 24px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white-clr);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--yellow-clr);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-note {
    color: var(--muted-clr);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-dark);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer p {
    color: var(--muted-clr);
    margin-bottom: 15px;
}

.footer p i {
    color: #ff6b6b;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted-clr);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--yellow-clr);
}

/* ===== NOTIFICATION SYSTEM ===== */
#notification-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    max-width: 350px;
}

.notification {
    background: var(--hire-clr);
    color: white;
    padding: 18px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 12px;
    transform: translateX(400px);
    transition: transform var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--accent-clr);
}

.notification.error {
    background: #e74c3c;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LIGHT THEME ===== */
html[data-theme="light"] {
    --white-clr: #0b132b;
    --black-clr: #ffffff;
    --muted-clr: #666666;
    --yellow-clr: #d4a521;
    --accent-clr: #0b9c70;
    --hire-clr: #2e9c70;
    --bg-dark: #f6f8fb;
    --card-bg: rgba(0, 0, 0, 0.03);
}

html[data-theme="light"] body {
    background: linear-gradient(180deg, #f6f8fb 0%, #ffffff 100%);
    color: var(--white-clr);
}

html[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
}

html[data-theme="light"] .mobile-menu {
    background: #ffffff;
}

html[data-theme="light"] .featured-article,
html[data-theme="light"] .article-card,
html[data-theme="light"] .newsletter-card {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .search-box input {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--white-clr);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .navlist {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .category-filters {
        gap: 8px;
    }
    
    .category-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-card {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .articles-hero {
        padding-top: 120px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .featured-content {
        padding: 25px;
    }
    
    .featured-content h2 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    #notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--yellow-clr), var(--hire-clr));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--hire-clr), var(--yellow-clr));
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--yellow-clr);
    color: #051417;
}

::-moz-selection {
    background: var(--yellow-clr);
    color: #051417;
}
