/*
Theme Name: LightDark SEO
Theme URI: https://example.com/
Author: Antigravity
Author URI: https://example.com/
Description: A lightweight, mobile-optimized, SEO-friendly dark mode only WordPress theme.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lightdark-seo
*/

:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-color: #3b82f6;
    /* Professional Blue */
    --border-color: #333333;
    --card-bg: #1e1e1e;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --container-width: 840px;
    --header-height: 70px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #fff;
    text-decoration: underline;
}

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

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    /* Provides breathing room on mobile */
}

/* Header */
.site-header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.site-branding {
    display: flex;
    align-items: baseline;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.site-title a {
    color: #fff;
}

.site-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 15px;
    display: none;
}

@media (min-width: 768px) {
    .site-description {
        display: block;
    }
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
}

.main-navigation a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Layout */
.site-main {
    padding: 40px 0;
    min-height: calc(100vh - var(--header-height) - 100px);
}

.site-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 1024px) {
    .site-content.has-sidebar {
        grid-template-columns: 2fr 1fr;
    }
}

/* Posts */
.post {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.post-thumbnail {
    margin: -24px -24px 24px -24px;
    border-bottom: 1px solid var(--border-color);
}

.post-thumbnail img {
    border-radius: 8px 8px 0 0;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.entry-title {
    font-size: 1.75rem;
    margin-bottom: 10px;
    color: #fff;
}

.entry-title a {
    color: #fff;
}

.entry-title a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.entry-content {
    font-size: 1.05rem;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    color: #fff;
    margin-top: 25px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

/* Comments */
.comments-area {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comments-area>* {
    margin-left: 20px;
    margin-right: 20px;
}

@media (min-width: 768px) {
    .comments-area>* {
        margin-left: 0;
        margin-right: 0;
    }
}

.comments-title,
.comment-reply-title {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 25px;
    margin-top: 10px;
}

.comment-list,
.comment-list ol,
.comment-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.comment-body {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.comment-author img {
    border-radius: 50%;
    margin-right: 15px;
    vertical-align: middle;
}

/* Forms & Inputs */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    /* Slightly larger padding for touch targets */
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    /* Slightly softer corners */
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 20px;
    /* Increased margin between inputs */
    box-sizing: border-box;
    /* Crucial: prevents width:100% + padding from overflowing the container */
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    /* Subtle glow on focus */
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-block;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: #2563eb;
    color: #ffffff;
}

/* Footer */
.site-footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }

    .main-navigation.toggled ul {
        display: flex;
    }
}

/* SEO Utilities */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.pagination .page-numbers {
    padding: 8px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-weight: 500;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    border-color: var(--accent-color);
}