/*
Theme Name: WP DAIZP
Theme URI: https://example.com/wp-daizp
Author: DAIZP V3
Author URI: https://example.com
Description: Un tema de WordPress ultraligero y minimalista para Auto-Blogging con IA (OpenRouter, OpenAI) y optimizado para Google AdSense.
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: wp-daizp
Tags: blog, one-column, custom-background, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* --- Reset & Base Variables (Business Insider Inspired) --- */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #5a5a5a;
    --accent-color: #004d99;
    /* Deep blue often used in serious news */
    --border-color: #e2e2e2;
    --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
    /* Clean, tight sans for UI/nav */
    --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
    /* Authoritative serif for reading */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ui);
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: #003366;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Removed rounded corners for serious news feel */

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    padding: 25px 0;
    border-bottom: 2px solid #000;
    /* Strong border for magazine feel */
    text-align: left;
    /* BI aligns left often */
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.site-title a {
    color: #000;
    text-decoration: none;
}

.site-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* --- Post Grid (Index) --- */
.post-loop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 50px;
}

@media (min-width: 768px) {
    .post-loop {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Make the first post span full width like an Editor's Pick */
    .post-item:first-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 30px;
    }
}

.post-item {
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* For items after the first one, keep image on top */
.post-item:not(:first-child) .featured-image-archive {
    margin-bottom: 15px;
}

.post-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 8px;
    line-height: 1.2;
    font-weight: 700;
}

.post-item:first-child .post-title {
    font-size: 2.2rem;
}

.post-title a {
    color: #000;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

.post-meta {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.post-excerpt {
    font-family: var(--font-serif);
    color: #444;
    font-size: 1rem;
    line-height: 1.5;
}

/* --- Pagination --- */
.pagination {
    margin-top: 40px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.pagination .current {
    background: var(--text-color);
    color: #fff;
    border-color: var(--text-color);
}

/* --- Single Post --- */
.single-post-container {
    max-width: 720px;
    /* Narrower for optimal reading line length */
    margin: 0 auto;
}

.single-post-title {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 15px;
    font-weight: 700;
    color: #000;
}

.single-post-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
}

.single-post-meta span.author {
    font-weight: bold;
    color: #000;
}

.featured-image {
    margin-bottom: 30px;
    width: 100%;
    border: 1px solid #eee;
}

.post-content {
    font-family: var(--font-serif);
    /* Serif for body text */
    font-size: 1.15rem;
    line-height: 1.7;
    color: #222;
}

/* --- Post Content Formatting --- */
.post-content h2 {
    font-family: var(--font-ui);
    font-size: 1.8rem;
    margin: 40px 0 20px;
    font-weight: 800;
    color: #000;
}

.post-content h3 {
    font-family: var(--font-ui);
    font-size: 1.4rem;
    margin: 30px 0 15px;
    font-weight: 700;
    color: #111;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 10px;
}

/* Highlighted Blockquotes (Business Insider Style) */
.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.3rem;
    color: #555;
    background: #f9f9f9;
    padding: 20px;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-family: var(--font-ui);
    font-size: 0.95rem;
}

.post-content th,
.post-content td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.post-content th {
    background: #f4f4f4;
    font-weight: bold;
}

/* --- TOC (Table of Contents) --- */
.toc-container {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin: 30px 0;
    font-family: var(--font-ui);
}

.toc-title {
    font-weight: 800;
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #ccc;
    padding-bottom: 8px;
}

.toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
}

.toc-list li {
    margin-bottom: 8px !important;
}

.toc-list a {
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
}

.toc-list a:hover {
    text-decoration: underline;
}

/* --- AdSense Placeholders --- */
.adsense-placeholder {
    background: #f4f4f4;
    text-align: center;
    color: #999;
    padding: 20px;
    margin: 40px auto;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #ccc;
}

.adsense-header-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.adsense-placeholder.header-ad {
    min-height: 90px;
    width: 728px;
    max-width: 100%;
    margin: 0;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 30px 0;
    border-top: 4px solid #000;
    margin-top: 60px;
    background: #f9f9f9;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-ui);
}