/*
Theme Name: FactsDaily
Theme URI: https://example.com/factsdaily
Author: FactsDaily Team
Author URI: https://example.com
Description: A modern, clean, and fast theme designed for Facts, Science, and History news. Optimized for Google AdSense and readability.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: factsdaily
Tags: blog, news, one-column, two-columns, custom-menu, featured-images, translation-ready
*/

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #1a56db;
    --primary-dark: #1240a8;
    --primary-light: #e8eefb;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
    --max-width: 1280px;
    --content-width: 820px;
    --sidebar-width: 360px;
    --header-height: 64px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-light);
}

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

a:hover {
    color: var(--primary-dark);
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
}

/* ===== LAYOUT ===== */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: 2rem;
    padding: 2rem 0;
}

.content-area.full-width {
    grid-template-columns: 1fr;
}

/* ===== TOP BAR ===== */
.top-bar {
    background: var(--text-primary);
    color: #fff;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-date {
    opacity: 0.8;
}

.top-bar-links a {
    color: rgba(255,255,255,0.8);
    margin-left: 1.25rem;
    font-size: 0.8125rem;
}

.top-bar-links a:hover {
    color: #fff;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
}

.site-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.site-logo .logo-text span {
    color: var(--primary);
}

/* ===== NAVIGATION (desktop) ===== */
.main-navigation {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--primary);
    background: var(--primary-light);
}

/* Dropdown */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 220px;
    padding: 0.5rem;
    flex-direction: column;
    z-index: 100;
    border: 1px solid var(--border);
}

.main-navigation li:hover > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

/* ===== HEADER RIGHT (Search + Menu Toggle) ===== */
.header-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.375rem;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

/* Menu Toggle - hidden on desktop by default */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    border-radius: var(--radius);
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
    margin: auto;
}

.menu-toggle .menu-close-icon { display: none !important; }
.menu-toggle.is-active .menu-open-icon { display: none !important; }
.menu-toggle.is-active .menu-close-icon { display: block !important; }

/* Search Toggle - always visible */
.search-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    border-radius: var(--radius);
    transition: var(--transition);
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.search-toggle:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.search-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.search-overlay-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    width: 92%;
    margin: 15vh auto 0;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.search-overlay.active .search-overlay-content {
    transform: translateY(0);
}

.search-form-overlay {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.search-input-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 1.25rem;
    gap: 0.75rem;
    height: 60px;
}

.search-icon-inside {
    flex-shrink: 0;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.search-input-wrap input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 0;
    height: 100%;
    font-size: 1.125rem;
    font-family: inherit;
    color: var(--text-primary);
    background: transparent;
}

.search-input-wrap input[type="search"]::placeholder {
    color: var(--text-muted);
}

/* Remove browser default X button in search inputs */
.search-input-wrap input[type="search"]::-webkit-search-cancel-button,
.search-input-wrap input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.search-close {
    flex-shrink: 0;
    background: var(--bg-gray);
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-close:hover {
    color: var(--text-primary);
    background: var(--border);
}

.search-close svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}

/* ===== HERO / FEATURED SECTION ===== */
.featured-section {
    padding: 2rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.25rem;
}

.featured-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.featured-card.large {
    grid-row: span 2;
}

.featured-card .card-image {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.featured-card.large .card-image {
    min-height: 100%;
}

.featured-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: white;
}

.featured-card .card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.featured-card .card-category.science { background: #059669; }
.featured-card .card-category.history { background: #7c3aed; }
.featured-card .card-category.facts { background: var(--primary); }

.featured-card .card-title {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.featured-card.large .card-title {
    font-size: 1.5rem;
}

.featured-card .card-meta {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ===== POST CARDS ===== */
.posts-section {
    padding-bottom: 2rem;
}

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

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
}

.view-all {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

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

.post-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-card .card-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

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

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

.post-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card .card-category {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 0.625rem;
    width: fit-content;
}

.cat-facts {
    background: var(--primary-light);
    color: var(--primary);
}

.cat-science {
    background: #ecfdf5;
    color: #059669;
}

.cat-history {
    background: #f3f0ff;
    color: #7c3aed;
}

.cat-nature {
    background: #fef3c7;
    color: #b45309;
}

.cat-technology {
    background: #fce4ec;
    color: #c62828;
}

.post-card .card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.post-card .card-title a {
    color: var(--text-primary);
}

.post-card .card-title a:hover {
    color: var(--primary);
}

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

.post-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.post-card .card-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-card .card-readtime {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ===== LIST POST (Sidebar / Small) ===== */
.post-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.post-list-item .list-thumb {
    width: 100px;
    min-width: 100px;
    height: 75px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-list-item .list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-list-item .list-content {
    flex: 1;
}

.post-list-item .list-category {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.post-list-item .list-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.post-list-item .list-title a {
    color: var(--text-primary);
}

.post-list-item .list-title a:hover {
    color: var(--primary);
}

.post-list-item .list-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    align-self: start;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Category Widget */
.widget-categories ul {
    list-style: none;
}

.widget-categories li {
    margin-bottom: 0.25rem;
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    color: var(--text-secondary);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.widget-categories a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.widget-categories .count {
    background: var(--bg-gray);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Ad placeholder widget */
.widget-ad {
    background: var(--bg-gray);
    border: 2px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Hide widget ad containers when empty */
.widget-ad:empty {
    display: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    border: none;
}

/* ===== SINGLE POST ===== */
.single-post-header {
    padding: 2rem 0 1rem;
}

.single-post-header .post-category {
    display: inline-block;
    padding: 0.25rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.single-post-header h1 {
    font-size: 2.25rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: var(--content-width);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.8125rem;
}

.post-featured-image {
    margin: 1.5rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
}

/* Post Content */
.post-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.post-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.post-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.625rem;
}

.post-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.post-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-tags a {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: var(--bg-gray);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.8125rem;
    transition: var(--transition);
}

.post-tags a:hover {
    background: var(--primary);
    color: white;
}

/* Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.post-share span {
    font-weight: 600;
    font-size: 0.9375rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.share-btn:hover {
    transform: scale(1.1);
    color: white;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #000; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }

/* Related Posts */
.related-posts {
    margin-top: 2rem;
}

.related-posts .section-header {
    border-bottom-color: var(--primary);
}

/* Author Box */
.author-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-box .author-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    font-weight: 700;
    min-width: 80px;
}

.author-box .author-info h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.author-box .author-info p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===== PAGE TEMPLATE ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header .breadcrumbs {
    font-size: 0.875rem;
    opacity: 0.8;
}

.page-header .breadcrumbs a {
    color: rgba(255,255,255,0.8);
}

.page-header .breadcrumbs a:hover {
    color: white;
}

.page-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    max-width: var(--content-width);
}

.page-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.page-content ul, .page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* ===== ARCHIVE / CATEGORY PAGE ===== */
.archive-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.archive-header h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.archive-header .archive-description {
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.archive-header .post-count {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.pagination a {
    background: var(--bg-white);
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .current {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text-primary);
    color: rgba(255,255,255,0.7);
    margin-top: auto;
}

.footer-main {
    padding: 3rem 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-about .footer-logo {
    font-size: 1.375rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    display: block;
}

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

.footer-about p {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

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

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
    padding-left: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8125rem;
}

/* ===== SEARCH RESULTS ===== */
.search-results-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.search-results-header h1 {
    color: white;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.no-results h2 {
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== 404 PAGE ===== */
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 3rem auto;
}

.error-404 .error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.error-404 h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== COMMENTS ===== */
.comments-area {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.comments-title {
    font-size: 1.375rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.comment-list {
    list-style: none;
}

.comment-body {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-light);
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-author .fn {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-metadata {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.comment-content p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.comment-respond {
    margin-top: 2rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form .form-submit input {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
}

.comment-form .form-submit input:hover {
    background: var(--primary-dark);
}

/* ===== CONTACT FORM ===== */
.contact-form {
    max-width: 600px;
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* ===== RESPONSIVE ===== */
/* Desktop: show nav, hide hamburger */
@media (min-width: 769px) {
    .main-navigation {
        display: flex !important;
    }
    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-card.large {
        grid-row: span 1;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    
    /* Show hamburger on mobile, inline with search */
    .menu-toggle {
        display: flex !important;
    }
    
    /* Hide desktop nav on mobile */
    .main-navigation {
        display: none !important;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        border-top: 2px solid var(--primary);
        overflow-y: auto;
        z-index: 999;
        flex: none;
    }
    
    .main-navigation.active {
        display: block !important;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.25rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .main-navigation li {
        margin: 0;
    }
    
    .main-navigation a {
        padding: 0.875rem 1rem;
        font-size: 1.0625rem;
        border-radius: var(--radius);
        display: block;
    }
    
    .main-navigation a:hover,
    .main-navigation .current-menu-item > a {
        background: var(--primary-light);
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        border: none;
        margin-top: 0.25rem;
        background: var(--bg-light);
        border-radius: var(--radius);
        padding: 0.5rem;
        display: flex;
    }
    
    .main-navigation ul ul a {
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
    
    /* Logo shrinks a bit on mobile */
    .site-logo .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .site-logo .logo-text {
        font-size: 1.25rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        display: none;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
    }
    
    .single-post-header h1 {
        font-size: 1.625rem;
    }
    
    .post-content,
    .page-content {
        padding: 1.5rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .posts-grid {
        gap: 1rem;
    }
    
    .post-card .card-body {
        padding: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Ad containers - ready for AdSense */
.ad-container {
    margin: 1.5rem 0;
    text-align: center;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-gray);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Hide empty ad containers (when no AdSense code is added) */
.ad-container:empty {
    display: none;
    margin: 0;
    min-height: 0;
    padding: 0;
}

.ad-container.ad-header {
    min-height: 90px;
    margin: 1rem 0;
}

.ad-container.ad-header:empty {
    display: none;
    margin: 0;
}

.ad-container.ad-sidebar {
    min-height: 250px;
}

.ad-container.ad-sidebar:empty {
    display: none;
    margin: 0;
}

.ad-container.ad-in-content {
    min-height: 250px;
    margin: 2rem 0;
}

.ad-container.ad-in-content:empty {
    display: none;
    margin: 0;
}

.ad-container.ad-footer {
    min-height: 90px;
    margin: 1.5rem 0;
}

.ad-container.ad-footer:empty {
    display: none;
    margin: 0;
}

/* Cookie consent placeholder styles */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-primary);
    color: white;
    padding: 1rem;
    z-index: 9999;
    display: none;
}

.cookie-notice.active {
    display: block;
}

.cookie-notice .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-notice p {
    margin: 0;
    font-size: 0.875rem;
    flex: 1;
}

.cookie-notice .btn {
    background: var(--accent);
    white-space: nowrap;
}

.cookie-notice .btn:hover {
    background: var(--accent-dark);
}
