/*
Theme Name: NeonWave
Theme URI: https://www.neonwave.com/
Author: NeonWave Team
Author URI: https://www.neonwave.com/
Description: Modern Technology & Lifestyle Blog Theme for WordPress
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: neonwave
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Book/Reading Mode Palette */
    --bg-color: #fcfbf6; /* Extremely light, almost white paper */
    --surface-color: #ffffff;
    --surface-color-hover: #faf9f6;
    --surface-border: #e6e2d8;
    --text-primary: #000000; /* Pure black for maximum bold contrast */
    --text-secondary: #1a1a1a; /* Very dark gray for high legibility */
    --accent-color: #d04f00; /* Deep orange */
    --header-bg: #ffffff;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Effects */
    --transition: all 0.3s ease;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    /* Wrinkled and stained paper texture */
    background-image: 
        url("https://www.transparenttextures.com/patterns/aged-paper.png"), 
        url("https://www.transparenttextures.com/patterns/crumpled-paper.png"), 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.12'/%3E%3C/svg%3E");
    color: var(--text-primary);
    font-size: 20px; /* Increased base font size for seniors */
    line-height: 1.8; /* Increased line height for legibility */
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0; /* Made thinner */
    background: #1f2328; /* Changed from white to dark */
    border-bottom: none;
    transition: var(--transition);
}

.header .container {
    max-width: 100%;
    padding: 0 8px; /* Reduced to bring items closer to edge */
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff; /* Changed to white for dark header */
}

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

.icon-btn {
    background: transparent;
    border: none;
    color: #ffffff; /* Changed to white for dark header */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

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

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.sidebar {
    position: fixed;
    top: 0;
    right: -320px; /* Changed from left to right */
    width: 320px;
    height: 100%;
    background: #1f2328; /* Dark sidebar as per screenshot */
    color: #fff;
    z-index: 1002;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Transition on right */
    overflow-y: auto;
}

.sidebar.active {
    right: 0; /* Slide in to right 0 */
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.sidebar-header .icon-btn {
    color: #a0aab2;
}

.sidebar-header .icon-btn:hover {
    color: #fff;
}

.sidebar-search {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box svg {
    color: #a0aab2;
    margin-right: 12px;
}

.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    width: 100%;
    font-size: 15px;
    outline: none;
}

.search-box input::placeholder {
    color: #a0aab2;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: #e6edf3;
    font-size: 16px;
    font-weight: 500;
    gap: 16px;
    transition: var(--transition);
}

.sidebar-menu li a svg {
    color: #8b949e;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-color);
}

.sidebar-menu li a:hover svg,
.sidebar-menu li a.active svg {
    color: var(--accent-color);
}

/* Category Tags (Customized Design) */
.pill-categories {
    padding: 70px 0 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.pill-categories::-webkit-scrollbar {
    display: none;
}

.pills-wrapper {
    display: flex;
    gap: 8px; /* Reduced gap */
    padding: 0 12px; /* Matches container padding */
}

.pill {
    background: #ffffff;
    color: var(--text-primary); /* Made text darker */
    padding: 8px 18px;
    border-radius: 8px; /* Less rounded for unique look */
    font-size: 14px;
    font-weight: 700; /* Made text even bolder */
    transition: var(--transition);
    border: 1px solid var(--surface-border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.pill:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(234, 88, 12, 0.1);
}

.pill.active {
    background: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    font-weight: 600;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

.articles-section {
    padding-top: 40px;
    padding-bottom: 80px;
}

.section-header {
    margin-bottom: 32px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* Article Card */
.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    overflow: hidden;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: #d1d5db;
}

.card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 16px 16px 0 0;
}

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

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-category {
    color: var(--accent-color);
    font-weight: 600;
}

.card-title {
    font-size: 26px; /* Larger title */
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-excerpt {
    font-size: 18px; /* Larger excerpt */
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Article Detail Page */
.article-detail-container {
    padding-top: 100px;
}

.article-header {
    margin: 0 auto 40px;
    max-width: 800px;
}

.article-header h1 {
    font-size: 40px;
    margin: 16px 0 24px;
    line-height: 1.3;
}

.article-meta-large {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 15px;
}

.article-featured-img {
    margin: 0 auto 40px;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
}

.article-featured-img img {
    width: 100%;
    border-radius: 16px;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 24px; /* Huge text for the main article reading */
    color: var(--text-primary);
    line-height: 2; /* Very airy line height */
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
}

/* Dark Footer */
.footer {
    background-color: #2b2b2b;
    color: #ffffff;
    padding: 60px 0 30px;
    font-family: var(--font-sans);
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px; /* Matches article grid gap exactly */
    margin-bottom: 40px;
}

.footer-brand {
    padding: 0 20px;
}

.footer-col {
    justify-self: center;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    font-family: 'Brush Script MT', 'Dancing Script', cursive, sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    display: inline-block;
    letter-spacing: -0.5px;
}

.footer-logo:hover {
    color: #ffffff;
}

.footer-desc {
    color: #e5e7eb;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn-privacy {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-privacy:hover {
    background: rgba(255, 255, 255, 0.1);
}

.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.footer-col {
    margin-bottom: 24px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    color: #e5e7eb;
    font-size: 15px;
    transition: var(--transition);
}

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

.footer-bottom-wrapper {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.footer-copyright {
    color: #9ca3af;
    font-size: 14px;
}

.back-to-top {
    background-color: var(--accent-color);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 10px;
    font-weight: 700;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
}

.back-to-top:hover {
    background-color: var(--accent-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 32px;
    }
    
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        padding: 0;
    }

    .footer-col {
        justify-self: start;
        padding: 0;
    }

    .footer-bottom-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .home-layout {
        grid-template-columns: 1fr; /* Stack sidebar below content on mobile */
    }
}

/* =========================================
   Home Layout & Sidebar
   ========================================= */

.home-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.home-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 20px; /* Larger widget title */
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 2px solid #170d5e;
    display: inline-block;
}

/* Search Widget */
.sidebar-search-form {
    display: flex;
}

.sidebar-search-form .search-field {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--surface-border);
    border-right: none;
    font-size: 14px;
    font-style: italic;
    outline: none;
}

.sidebar-search-form .search-field:focus {
    border-color: #170d5e;
}

.sidebar-search-form .search-submit {
    background-color: #170d5e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-search-form .search-submit:hover {
    background-color: var(--accent-color);
}

/* About Widget */
.about-widget p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Tabs Widget */
.tabs-header {
    display: flex;
    background-color: #f1f3f4;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 10px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    border-top: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: #fff;
    border-top-color: #170d5e;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Sidebar Post List */
.sidebar-post-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-post-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sidebar-post-list li:last-child {
    margin-bottom: 0;
}

.sidebar-post-img {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    background-color: #eee;
}

.sidebar-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sidebar-post-img:hover img {
    transform: scale(1.05);
}

.sidebar-post-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
}

.sidebar-post-title {
    font-size: 18px; /* Larger title */
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    text-decoration: none;
}

.sidebar-post-title:hover {
    color: var(--accent-color);
}

.sidebar-post-date {
    font-size: 15px; /* Larger date */
    color: var(--text-secondary);
}

/* Tag Cloud */
.tag-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--surface-color);
    color: var(--text-primary);
    font-size: 16px; /* Larger tags */
    text-decoration: none;
    margin: 0 5px 5px 0;
    border-radius: 3px;
    transition: var(--transition);
}
.tag-link:hover {
    background-color: #170d5e;
    color: #fff;
}
    .back-to-top {
        position: absolute;
        top: 24px;
        right: 0;
    }
