/*
Theme Name: SEO Master Blog Modular
Theme URI: https://profpaul.icu
Author: Paolo Galbiati
Author URI: https://profpaul.icu
Description: Custom WordPress theme ottimizzato per SEO, AI Overview e performance. Zero plugin, massima sostanza.
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: seo-master
*/

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --max-width: 800px;
    --spacing: 1.5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text);
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 2rem; margin-top: 2.5rem; }
h3 { font-size: 1.5rem; margin-top: 2rem; }

p {
    margin-bottom: 1.5rem;
}

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

a:hover {
    text-decoration: underline;
}

/* Layout */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: var(--spacing) 0;
    margin-bottom: 3rem;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
}

.site-title a {
    color: var(--text);
}

.site-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation {
    margin-top: 1rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

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

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: var(--text-light);
}

/* Article */
article {
    margin-bottom: 4rem;
}

.entry-header {
    margin-bottom: 2rem;
}

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.entry-meta time {
    font-weight: 500;
}

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

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

.entry-content pre {
    background: var(--bg-alt);
    padding: 1.5rem;
    overflow-x: auto;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin: 2rem 0;
}

.entry-content code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background: var(--bg-alt);
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* Table of Contents */
.toc {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin: 2rem 0;
}

.toc h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: var(--text);
}

/* FAQ Schema */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
}

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

.faq-question {
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.faq-answer {
    color: var(--text-light);
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border);
}

.related-posts h3 {
    margin-top: 0;
}

.related-posts-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-post-item {
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 4px;
    border: 1px solid var(--border);
}

.related-post-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.related-post-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Performance: prevent layout shift */
img {
    display: block;
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Print styles */
@media print {
    .main-navigation,
    .related-posts,
    .site-footer {
        display: none;
    }
}

/* Fix Contrasto Accessibilità */
.entry-meta .reading-time { color: #b84a15 !important; }

