/* ============================================
   WiredTechBlog - Dark Mode Only Stylesheet
   MOBILE OPTIMIZED VERSION
   ============================================ */

:root {
    /* Dark Theme Colors */
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-tertiary: #1a1a3a;
    --bg-card: #0f0f24;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --accent-cyan: #00d4ff;
    --accent-purple: #7c3aed;
    --accent-pink: #f472b6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7c3aed 50%, #f472b6 100%);
    --accent-gradient-hover: linear-gradient(135deg, #00e5ff 0%, #8b5cf6 50%, #f687c0 100%);
    --border-color: #2d2d5a;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.25);
    --card-shadow-hover: 0 8px 30px rgba(0, 212, 255, 0.2), 0 4px 12px rgba(124, 58, 237, 0.15);
    --header-bg: rgba(10,10,26,0.95);
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Crimson Pro', Georgia, serif;
    
    /* Mobile-specific spacing */
    --spacing-mobile: 1rem;
    --spacing-mobile-sm: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

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

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 5px;
}

::selection {
    background: var(--accent-purple);
    color: white;
}

/* ============================================
   Header
   ============================================ */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

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

.logo-icon::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--bg-primary);
    border-radius: 9px;
}

.logo-icon svg {
    position: relative;
    width: 28px;
    height: 28px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-wired {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

.logo-techblog {
    font-family: var(--font-display);
    font-size: 0.85rem;
    display: flex;
    gap: 0.25rem;
}

.logo-tech {
    font-weight: 300;
    color: var(--text-muted);
}

.logo-blog {
    font-weight: 700;
    color: var(--accent-pink);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 16px; /* Prevents iOS zoom */
    color: var(--text-primary);
    width: 200px;
    font-family: var(--font-display);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:active {
    border-color: var(--accent-cyan);
    background: var(--bg-tertiary);
}

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   Navigation
   ============================================ */

nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

nav::-webkit-scrollbar {
    display: none;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0.25rem;
}

.nav-item {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--accent-cyan);
}

.nav-item.active {
    color: var(--accent-purple);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px 3px 0 0;
}

/* Mobile Nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 998;
    padding: 80px 1.5rem 2rem;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    transform: translateX(0);
    opacity: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--accent-cyan);
    padding-left: 0.5rem;
}

.mobile-nav-link.active::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent-cyan);
    border-radius: 50%;
    margin-right: 0.75rem;
}

/* ============================================
   Main Content
   ============================================ */

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* ============================================
   Featured Section
   ============================================ */

.featured-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.featured-main {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
    box-shadow: var(--card-shadow);
}

.featured-main::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.featured-main:hover::before {
    opacity: 1;
}

.featured-main a {
    display: block;
    height: 100%;
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(10,10,26,0.95));
    z-index: 1;
}

.featured-category {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    background: var(--accent-gradient);
    color: white;
    margin-bottom: 0.75rem;
}

/* Category Colors */
.cat-ai { background: linear-gradient(135deg, #00d4ff, #0891b2); }
.cat-smartphones { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.cat-wearables { background: linear-gradient(135deg, #f472b6, #ec4899); }
.cat-hardware { background: linear-gradient(135deg, #f59e0b, #d97706); }
.cat-software { background: linear-gradient(135deg, #10b981, #059669); }
.cat-gaming { background: linear-gradient(135deg, #ef4444, #dc2626); }
.cat-security { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.cat-reviews { background: linear-gradient(135deg, #f472b6, #7c3aed); }
.cat-gadgets { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.cat-deals { background: linear-gradient(135deg, #22c55e, #16a34a); }

.featured-main .featured-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    flex-wrap: wrap;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-gradient);
    flex-shrink: 0;
}

/* Featured Sidebar */
.featured-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-small {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.featured-small a {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.featured-small:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
    box-shadow: var(--card-shadow-hover);
}

.featured-small-img {
    width: 120px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.featured-small-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Allows text truncation */
}

.featured-small .featured-category {
    font-size: 0.6rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.featured-small-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-small-meta {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* ============================================
   Section Headers
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    gap: 1rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--accent-gradient);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s ease;
    white-space: nowrap;
}

.section-link:hover {
    gap: 0.5rem;
}

/* ============================================
   News Grid
   ============================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.news-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.news-card:hover::before {
    opacity: 1;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.news-card a {
    display: block;
}

.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.news-card:hover .news-card-img {
    transform: scale(1.03);
}

.news-card-content {
    padding: 1.25rem;
}

.news-card .featured-category {
    margin-bottom: 0.75rem;
}

.news-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.news-card-meta {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-count {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-count svg {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    fill: none;
}

/* ============================================
   Two Column Layout
   ============================================ */

.two-column {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-list-item {
    display: flex;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.news-list-item a {
    display: flex;
    gap: 1.25rem;
    width: 100%;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-img {
    width: 200px;
    height: 130px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.news-list-item:hover .news-list-img {
    transform: scale(1.03);
}

.news-list-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.news-list-content .featured-category {
    width: fit-content;
    margin-bottom: 0.5rem;
}

.news-list-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.news-list-item:hover .news-list-title {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-list-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent-gradient);
}

/* Trending Widget */
.trending-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trending-item {
    display: flex;
    gap: 1rem;
    cursor: pointer;
}

.trending-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
    width: 32px;
    flex-shrink: 0;
}

.trending-content {
    flex: 1;
    min-width: 0;
}

.trending-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    transition: color 0.2s ease;
}

.trending-item:hover .trending-title {
    color: var(--accent-cyan);
}

.trending-meta {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Poll Widget */
.poll-question {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.poll-option {
    position: relative;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.poll-option:hover {
    background: var(--bg-primary);
}

.poll-option-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0.15;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.poll-option-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-display);
    font-size: 0.85rem;
}

.poll-option-text {
    color: var(--text-primary);
}

.poll-option-percent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Newsletter Widget */
.newsletter-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 16px; /* Prevents iOS zoom */
    outline: none;
    transition: all 0.2s ease;
}

.newsletter-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-btn {
    padding: 0.85rem 1.5rem;
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.newsletter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-btn:hover::before {
    opacity: 1;
}

.newsletter-btn span {
    position: relative;
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

/* ============================================
   Footer
   ============================================ */

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
}

.footer-brand {
    padding-right: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-text {
    font-family: var(--font-display);
}

.footer-logo-wired {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.footer-logo-sub {
    font-size: 0.75rem;
    display: flex;
    gap: 0.2rem;
}

.footer-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    padding: 0.25rem 0;
    display: inline-block;
}

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

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-social a:hover::before {
    opacity: 1;
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
    transition: fill 0.3s ease;
    position: relative;
}

.footer-social a:hover svg {
    fill: white;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-height: 48px; /* Touch target */
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.35);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

/* ============================================
   Pagination
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-item:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.pagination-item.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.pagination-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

/* ============================================
   Notifications
   ============================================ */

.notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    z-index: 9999;
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-left: auto;
}

/* ============================================
   Animations
   ============================================ */

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.news-card, .news-list-item, .featured-small {
    animation: fadeInUp 0.5s ease forwards;
}

.news-card:nth-child(1), .news-list-item:nth-child(1), .featured-small:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2), .news-list-item:nth-child(2), .featured-small:nth-child(2) { animation-delay: 0.2s; }
.news-card:nth-child(3), .news-list-item:nth-child(3), .featured-small:nth-child(3) { animation-delay: 0.3s; }
.news-card:nth-child(4), .news-list-item:nth-child(4) { animation-delay: 0.4s; }
.news-card:nth-child(5), .news-list-item:nth-child(5) { animation-delay: 0.5s; }
.news-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */

@media (max-width: 1200px) {
    .featured-section {
        grid-template-columns: 1fr;
    }

    .featured-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .featured-small {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 280px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (768px and below)
   ============================================ */

@media (max-width: 768px) {
    /* Header Mobile */
    .header-top {
        padding: 0.75rem 1rem;
    }

    .logo-icon {
        width: 42px;
        height: 42px;
    }

    .logo-icon svg {
        width: 24px;
        height: 24px;
    }

    .logo-wired {
        font-size: 1.2rem;
    }

    .logo-techblog {
        font-size: 0.75rem;
    }

    .search-box {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Hide desktop nav, show mobile */
    nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    /* Main Content */
    main {
        padding: 1.25rem 1rem;
    }

    /* Featured Section */
    .featured-section {
        margin-bottom: 2rem;
    }

    .featured-main {
        aspect-ratio: 4/3;
        min-height: 280px;
        border-radius: 16px;
    }

    .featured-overlay {
        padding: 1.25rem;
    }

    .featured-main .featured-title {
        font-size: 1.35rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .featured-category {
        font-size: 0.65rem;
        padding: 0.35rem 0.7rem;
        margin-bottom: 0.5rem;
    }

    .featured-meta {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .author-avatar {
        width: 24px;
        height: 24px;
    }

    /* Featured Sidebar - Stack on mobile */
    .featured-sidebar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .featured-small {
        flex: 1 1 100%;
        padding: 0.875rem;
        border-radius: 12px;
    }

    .featured-small a {
        gap: 0.875rem;
    }

    .featured-small-img {
        width: 100px;
        height: 70px;
        border-radius: 8px;
    }

    .featured-small-title {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .featured-small-meta {
        font-size: 0.7rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 1.25rem;
        padding-bottom: 0.75rem;
    }

    .section-title {
        font-size: 1.15rem;
    }

    .section-link {
        font-size: 0.8rem;
    }

    /* News Grid - Single column */
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-bottom: 2rem;
    }

    .news-card {
        border-radius: 14px;
    }

    .news-card-img {
        height: 180px;
    }

    .news-card-content {
        padding: 1rem;
    }

    .news-card-title {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 3;
    }

    .news-card-excerpt {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .news-card-meta {
        font-size: 0.7rem;
    }

    /* News List - Stack on mobile */
    .news-list {
        gap: 1rem;
    }

    .news-list-item {
        padding-bottom: 1rem;
    }

    .news-list-item a {
        flex-direction: column;
        gap: 0.75rem;
    }

    .news-list-img {
        width: 100%;
        height: 180px;
        border-radius: 12px;
    }

    .news-list-title {
        font-size: 1.05rem;
    }

    .news-list-excerpt {
        font-size: 0.9rem;
    }

    /* Sidebar - Single column on mobile */
    .sidebar {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .sidebar-widget {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .widget-title {
        font-size: 0.95rem;
    }

    .trending-title {
        font-size: 0.85rem;
    }

    .poll-option {
        padding: 0.875rem 1rem;
    }

    .poll-option-content {
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-brand {
        padding-right: 0;
    }

    .footer-description {
        font-size: 0.9rem;
    }

    .footer-column h4 {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 0.35rem 0;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    /* Pagination */
    .pagination {
        gap: 0.35rem;
    }

    .pagination-item {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    /* Notifications */
    .notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        font-size: 0.85rem;
        padding: 0.875rem 1rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE (480px and below)
   ============================================ */

@media (max-width: 480px) {
    .header-top {
        padding: 0.625rem 0.75rem;
    }

    .logo-icon {
        width: 38px;
        height: 38px;
    }

    .logo-wired {
        font-size: 1.1rem;
    }

    .mobile-menu-btn {
        width: 44px;
        height: 44px;
    }

    main {
        padding: 1rem 0.75rem;
    }

    .featured-main {
        aspect-ratio: 1/1;
        min-height: 260px;
    }

    .featured-main .featured-title {
        font-size: 1.2rem;
    }

    .featured-small-img {
        width: 85px;
        height: 60px;
    }

    .featured-small-title {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .news-card-img {
        height: 160px;
    }

    .news-card-title {
        font-size: 1rem;
    }

    .news-card-content {
        padding: 0.875rem;
    }

    .news-list-img {
        height: 160px;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .trending-number {
        font-size: 1.25rem;
        width: 28px;
    }

    .trending-title {
        font-size: 0.8rem;
    }

    .footer-logo-wired {
        font-size: 1.1rem;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .news-card:hover {
        transform: none;
    }

    .featured-small:hover {
        transform: none;
    }

    .news-card:hover .news-card-img,
    .featured-main:hover img,
    .news-list-item:hover .news-list-img {
        transform: none;
    }

    /* Ensure proper touch targets */
    .nav-item,
    .mobile-nav-link,
    .btn,
    .footer-links a,
    .trending-item,
    .poll-option {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Active states for touch */
    .news-card:active {
        transform: scale(0.98);
    }

    .btn:active {
        transform: scale(0.95);
    }
}

/* ============================================
   SAFE AREA INSETS (iPhone X+)
   ============================================ */

@supports (padding: max(0px)) {
    .header-top {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    main {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    footer {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .mobile-nav {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .notification {
        bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* ============================================
   LANDSCAPE MOBILE
   ============================================ */

@media (max-width: 900px) and (orientation: landscape) {
    .featured-main {
        aspect-ratio: 16/7;
        min-height: auto;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-nav {
        padding-top: 70px;
    }
}

/* ============================================
   REDUCE MOTION FOR ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    header,
    nav,
    .mobile-nav,
    .sidebar,
    footer,
    .notification {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    main {
        max-width: 100%;
        padding: 0;
    }

    .news-card,
    .featured-main {
        break-inside: avoid;
    }
}
