/* ===================================
   ORACNOOS - CATEGORY PAGE (WORLD-CLASS)
   Modern grid layout, featured article, cards
   Inspired by: The Verge, Wired, TechCrunch
   =================================== */

/* ===================================
   Category Hero
   =================================== */

.category-hero {
    position: relative;
    padding: 4rem 0 3rem;
    overflow: hidden;
}

.category-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.category-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.category-icon-wrapper {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(124, 77, 255, 0.1));
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 24px;
    font-size: 3rem;
    color: #00e5ff;
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0, 229, 255, 0.2);
    transition: transform 0.3s ease;
}

.category-icon-wrapper:hover {
    transform: scale(1.05) rotate(5deg);
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.category-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 1.5rem;
    max-width: 600px;
    line-height: 1.6;
}

.category-stats {
    display: flex;
    gap: 1rem;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #00e5ff;
}

/* ===================================
   Featured Article Section
   =================================== */

.featured-article-section {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.featured-article {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-article:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 229, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.featured-article-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.featured-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-article:hover .featured-article-image img {
    transform: scale(1.05);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.8), transparent);
}

.featured-article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(0, 229, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
}

.featured-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.featured-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-title a:hover {
    color: #00e5ff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.featured-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 1.5rem;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(124, 77, 255, 0.15));
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 50px;
    color: #00e5ff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.featured-read-more:hover {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.25), rgba(124, 77, 255, 0.25));
    border-color: rgba(0, 229, 255, 0.5);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}

/* ===================================
   Articles Grid Section
   =================================== */

.articles-grid-section {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ===================================
   Article Card
   =================================== */

.article-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.article-card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.08);
}

.article-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.7), transparent);
}

.article-card-content {
    padding: 1.5rem;
}

.article-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.article-card-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card-title a:hover {
    color: #00e5ff;
}

.article-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00e5ff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-card-link:hover {
    gap: 0.75rem;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* ===================================
   No Articles
   =================================== */

.no-articles {
    max-width: 600px;
    margin: 4rem auto;
    padding: 4rem 2rem;
    text-align: center;
}

.no-articles-content i {
    font-size: 5rem;
    color: rgba(0, 229, 255, 0.3);
    margin-bottom: 1.5rem;
}

.no-articles-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.no-articles-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablet */
@media (max-width: 1023px) {
    .category-hero-content {
        gap: 1.5rem;
    }
    
    .category-icon-wrapper {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .category-title {
        font-size: 2.5rem;
    }
    
    .category-description {
        font-size: 1.1rem;
    }
    
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-article-image {
        aspect-ratio: 16/9;
    }
    
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .category-hero {
        padding: 3rem 0 2rem;
    }
    
    .category-hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 1rem;
    }
    
    .category-icon-wrapper {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .category-description {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .category-stats {
        justify-content: center;
    }
    
    .featured-article-section,
    .articles-grid-section {
        padding: 0 1rem;
    }
    
    .featured-article-content {
        padding: 1.5rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .featured-excerpt {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-card-content {
        padding: 1.25rem;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .category-title {
        font-size: 1.75rem;
    }
    
    .featured-article-content {
        padding: 1.25rem;
    }
    
    .featured-title {
        font-size: 1.25rem;
    }
    
    .article-card-title {
        font-size: 1.1rem;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .category-icon-wrapper,
    .featured-article,
    .featured-article-image img,
    .article-card,
    .article-card-image img,
    .featured-read-more,
    .article-card-link {
        transition: none;
    }
}

/* Focus States */
.featured-title a:focus-visible,
.article-card-title a:focus-visible,
.featured-read-more:focus-visible,
.article-card-link:focus-visible {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}

/* ===================================
   Light Mode Overrides
   =================================== */

body.light-mode .category-hero {
    background: none;
}

body.light-mode .category-hero-bg {
    opacity: 0.6;
}

body.light-mode .category-title {
    background: linear-gradient(135deg, #050505 0%, #1c1e21 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .category-description {
    color: #4a5568;
}

body.light-mode .category-icon-wrapper {
    background: linear-gradient(135deg, rgba(0, 133, 255, 0.08), rgba(107, 62, 239, 0.08));
    border-color: rgba(0, 133, 255, 0.3);
    color: #0085ff;
}

body.light-mode .stat-badge {
    background: rgba(0, 133, 255, 0.12);
    border-color: rgba(0, 133, 255, 0.4);
    color: #0085ff;
}

body.light-mode .section-label {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 165, 0, 0.15));
    border-color: rgba(255, 193, 7, 0.5);
    color: #f57c00;
}

body.light-mode .featured-article,
body.light-mode .article-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .featured-article:hover,
body.light-mode .article-card:hover {
    border-color: rgba(0, 133, 255, 0.4);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

body.light-mode .category-badge {
    background: rgba(0, 133, 255, 0.15);
    color: #0085ff;
}

body.light-mode .featured-date,
body.light-mode .article-date {
    color: #8a8d91;
}

body.light-mode .featured-title,
body.light-mode .article-card-title,
body.light-mode .section-title {
    color: #050505;
}

body.light-mode .featured-title a,
body.light-mode .article-card-title a {
    color: #050505;
}

body.light-mode .featured-title a:hover,
body.light-mode .article-card-title a:hover {
    color: #0085ff;
    text-shadow: none;
}

body.light-mode .featured-excerpt,
body.light-mode .article-card-excerpt,
body.light-mode .section-subtitle {
    color: #4a5568;
}

body.light-mode .featured-read-more,
body.light-mode .article-card-link {
    background: linear-gradient(135deg, rgba(0, 133, 255, 0.12), rgba(107, 62, 239, 0.12));
    border-color: rgba(0, 133, 255, 0.4);
    color: #0085ff;
}

body.light-mode .featured-read-more:hover,
body.light-mode .article-card-link:hover {
    background: linear-gradient(135deg, rgba(0, 133, 255, 0.2), rgba(107, 62, 239, 0.2));
    border-color: rgba(0, 133, 255, 0.6);
}

body.light-mode .no-articles-content i {
    color: rgba(0, 133, 255, 0.4);
}

body.light-mode .no-articles-content h2 {
    color: #050505;
}

body.light-mode .no-articles-content p {
    color: #4a5568;
}

/* ===================================
   CATEGORY SIDEBAR (The Verge Style)
   =================================== */

.category-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.category-main-content {
    min-width: 0;
}

.category-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Sidebar Widgets */
.sidebar-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.widget-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.widget-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-header .fire-icon {
    font-size: 1.3rem;
    animation: pulse 2s ease-in-out infinite;
}

/* Trending Widget */
.trending-widget-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-widget-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.trending-widget-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.3);
    transform: translateX(4px);
}

.trending-widget-rank {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.trending-widget-item[data-rank="1"] .trending-widget-rank,
.trending-widget-item[data-rank="2"] .trending-widget-rank,
.trending-widget-item[data-rank="3"] .trending-widget-rank {
    background: linear-gradient(135deg, #ff4081, #ff6b6b);
}

.trending-widget-content {
    flex: 1;
    min-width: 0;
}

.trending-widget-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0 0 0.35rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-widget-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Newsletter Widget */
.newsletter-widget-content {
    text-align: center;
}

.newsletter-widget-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.newsletter-widget-btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.newsletter-widget-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 229, 255, 0.3);
}

/* Tags Widget */
.tags-widget-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-widget-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-widget-badge:hover {
    background: rgba(0, 229, 255, 0.2);
    transform: translateY(-2px);
}

.tag-widget-count {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Sidebar Ad Widget */
.sidebar-ad-widget {
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sidebar-ad-zone {
    width: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mid-Page Ad */
.category-mid-ad {
    margin: 3rem 0;
    text-align: center;
}

/* ===================================
   RESPONSIVE: Category Sidebar
   =================================== */

@media (max-width: 1024px) {
    .category-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .category-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .category-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad-widget {
        min-height: 250px;
    }
    
    .sidebar-ad-zone {
        min-height: 250px;
    }
}

/* Light Mode */
body.light-mode .category-sidebar .sidebar-widget {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .category-sidebar .sidebar-widget:hover {
    border-color: rgba(0, 133, 255, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.light-mode .widget-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .trending-widget-item {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .trending-widget-item:hover {
    background: #ffffff;
    border-color: rgba(0, 133, 255, 0.3);
}

body.light-mode .tag-widget-badge {
    background: rgba(0, 133, 255, 0.1);
    border-color: rgba(0, 133, 255, 0.3);
    color: #0085ff;
}

body.light-mode .newsletter-widget-btn {
    background: linear-gradient(135deg, #0085ff, #6b3eef);
}

body.light-mode .newsletter-widget-btn:hover {
    box-shadow: 0 8px 24px rgba(0, 133, 255, 0.3);
}
