/* ========================================================================
   IGN-STYLE ENTERTAINMENT BLOG DESIGN
   ======================================================================== */

   :root {
    /* Dark Theme Colors */
    --bg-primary: #0A0A0A;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --bg-card: #1E1E1E;
    --bg-hover: #252525;
    --bg-accent: #2A2A2A;
    
    /* Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8B8;
    --text-muted: #7A7A7A;
    --text-dim: #5A5A5A;
    
    /* Brand Colors */
    --brand-red: #E60012;
    --brand-red-hover: #FF1A2C;
    --brand-blue: #0087FF;
    --brand-green: #00D46A;
    --brand-yellow: #FFB800;
    --brand-purple: #7B61FF;
    
    /* Category Colors */
    --cat-gaming: #00D46A;
    --cat-movies: #E60012;
    --cat-travel: #0087FF;
    --cat-news: #FFB800;
    --cat-tech: #7B61FF;
    
    /* Typography */
    --font-primary: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-condensed: 'Barlow Condensed', sans-serif;
    
    /* Layout */
    --max-width: 1400px;
    --header-height: 64px;
    
    /* Borders */
    --border-color: #2A2A2A;
    --border-hover: #3A3A3A;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Light Mode */
body.light-mode {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F8F8;
    --bg-tertiary: #F0F0F0;
    --bg-card: #FFFFFF;
    --bg-hover: #F5F5F5;
    --bg-accent: #E8E8E8;
    
    --text-primary: #000000;
    --text-secondary: #4A4A4A;
    --text-muted: #7A7A7A;
    --text-dim: #9A9A9A;
    
    --border-color: #E0E0E0;
    --border-hover: #D0D0D0;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-condensed);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================================================
   HEADER - IGN STYLE
   ======================================================================== */

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-condensed);
    font-size: 1.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.logo-icon {
    width: 36px;
    height: 36px;
    
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon img {
    width: 28px;
    height: 28px;
    border-radius: 30px;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 420px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    font-family: var(--font-condensed);
    font-size: 1.0625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--brand-red);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--brand-red);
    border-radius: 2px;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-button,
.theme-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-button:hover,
.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mobile-toggle {
    display: none;
}

/* ========================================================================
   HERO SECTION - IGN STYLE
   ======================================================================== */

.hero-section {
    margin-top: var(--header-height);
    padding: 24px 0;
    background: var(--bg-primary);
}

/* Hero Grid Layout */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
    align-items: start; /* This is the key fix */
}

/* Main Featured */
.hero-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    height: 500px;
}

.hero-main-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--brand-red);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.hero-main-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    color: white;
    text-transform: none;
}

.hero-main-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.hero-main-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Hero Sidebar */
.hero-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 500px; /* Match hero-main height */
    overflow-y: auto; /* Add scrolling if needed */
    scrollbar-width: thin;
}

.hero-card {
    display: block;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
    border: 1px solid var(--border-color);
}

.hero-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.hero-card-content {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.hero-card-image {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-card-info {
    flex: 1;
    min-width: 0;
}

.hero-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.cat-gaming { color: var(--cat-gaming); }
.cat-movies { color: var(--cat-movies); }
.cat-travel { color: var(--cat-travel); }
.cat-news { color: var(--cat-news); }

.hero-card-title {
    font-family: var(--font-condensed);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================================================================
   CONTENT SECTIONS - IGN STYLE
   ======================================================================== */

.content-section {
    padding: 40px 0;
    background: var(--bg-primary);
}

.content-section.alt-bg {
    background: var(--bg-secondary);
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--border-color);
}

.section-title {
    font-family: var(--font-condensed);
    font-size: 1.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    position: relative;
}

.section-title span {
    color: var(--brand-red);
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: var(--brand-red);
}

/* Latest News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.news-card {
    display: block;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.news-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.news-card-content {
    padding: 16px;
}

.news-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.news-card-title {
    font-family: var(--font-condensed);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

    /* Reviews Section */
.reviews-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
}

.reviews-main {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.review-card {
    display: block;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.review-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}



.review-card-content {
    padding: 20px;
}

.review-card-title {
    font-family: var(--font-condensed);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.review-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.review-card-author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Fix for Reviews Sidebar */
.reviews-sidebar {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid var(--border-color);
    height: 1500px !important; /* Set exact height for desktop */
     /* Scrollable if needed */
    scrollbar-width: thin;
}

/* Thin scrollbar styling for WebKit browsers */
.reviews-sidebar::-webkit-scrollbar {
    width: 5px;
}

.reviews-sidebar::-webkit-scrollbar-track {
    background: var(--bg-card);
}

.reviews-sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 6px;
}

.sidebar-title {
    font-family: var(--font-condensed);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.score-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.score-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.score-badge {
    width: 48px;
    height: 48px;
    background: var(--brand-red);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 900;
    flex-shrink: 0;
}

.score-info {
    flex: 1;
}

.score-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.score-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Trending Section */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.trending-card {
    display: block;
    text-align: center;
    transition: transform 0.2s ease;
}

.trending-card:hover {
    transform: translateY(-4px);
}

.trending-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-dim);
    line-height: 1;
    margin-bottom: 12px;
}

.trending-card:hover .trending-number {
    color: var(--brand-red);
}

.trending-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.trending-title {
    font-family: var(--font-condensed);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Video Section */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    display: block;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(230, 0, 18, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.video-card:hover .play-icon {
    background: rgba(230, 0, 18, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-content {
    padding: 16px;
}

.video-title {
    font-family: var(--font-condensed);
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.video-views {
    font-size: 0.75rem;
    color: var(--text-muted);
}



/* ========================================================================
   FOOTER
   ======================================================================== */

.site-footer {
    background: var(--bg-secondary);
    border-top: 3px solid var(--brand-red);
    padding: 48px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-column h4 {
    font-family: var(--font-condensed);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--brand-red);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--bg-accent);
    color: var(--text-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--brand-red);
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========================================================================
   MOBILE RESPONSIVE
   ======================================================================== */

@media (max-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        max-height: none; /* Remove height restriction on mobile */
        overflow-y: visible; /* Prevent scrolling */
        padding-bottom: 10px; /* Add some spacing at bottom */
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .infinite-scroll-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    
    .header-nav {
        display: none;
    }
    #mobileThemeToggle {
        display: none !important;
    }
    .mobile-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        border: none;
        background: var(--bg-accent);
        color: var(--text-secondary);
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    .reviews-sidebar {
        height: auto !important; /* Override any inline styles */
        max-height: none !important; /* Ensure no height restriction */
        overflow-y: visible !important; /* Prevent scrolling */
    }

    .site-header {
        transition: transform 0.3s ease;
    }
    
    .site-header.header-hidden {
        transform: translateY(-100%);
    }
    
    .hero-main {
        height: 300px;
    }
    
    .hero-main-title {
        font-size: 1.75rem;
    }
    
    .hero-main-content {
        padding: 24px;
    }
    
    .hero-sidebar {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .reviews-container {
        grid-template-columns: 1fr;
    }
    
    .reviews-main {
        grid-template-columns: 1fr;
    }
    
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .infinite-scroll-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav {
    padding: 24px;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    font-family: var(--font-condensed);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.mobile-nav-link.active {
    color: var(--brand-red);
}
   d Posts Sidebar Styling */


.sidebar-title {
    font-family: var(--font-condensed);
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    position: relative;
}

.sidebar-title:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--brand-red);
    border-radius: 2px;
}

.recommended-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommended-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.2s ease;
}

.recommended-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recommended-item:hover {
    transform: translateY(-2px);
}

.recommended-image-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.recommended-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommended-item:hover .recommended-image {
    transform: scale(1.05);
}

.recommended-category {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.7);
}

.cat-gaming { color: var(--cat-gaming); }
.cat-movies { color: var(--cat-movies); }
.cat-travel { color: var(--cat-travel); }
.cat-news { color: var(--cat-news); }

.recommended-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recommended-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.recommended-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.recommended-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Media Queries */
@media (max-width: 768px) {
    .recommended-image {
        height: 140px;
    }
}