/*
Theme Name: Flavor
Theme URI:
Author:
Description: Latvian News Theme — Hard News Editorial Style (High Contrast, Flat, Sans-Serif)
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: flavor
*/

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

:root {
    /* Pure white background for high contrast */
    --bg: #ffffff;
    --bg-alt: #f4f4f4;
    --bg-card: #ffffff;
    
    /* Sharper, darker text colors for maximum readability */
    --text: #111111;
    --text-sec: #333333;
    --text-muted: #777777;
    
    /* Bold, urgent news red */
    --accent: #d32f2f;
    --accent-hover: #b71c1c;
    --accent-soft: rgba(211, 47, 47, 0.08);
    --danger: #d32f2f;
    
    /* Crisper borders */
    --border: #e0e0e0;
    --border-light: #eeeeee;
    
    /* Flattened design: sharper corners, zero shadow on standard elements */
    --radius: 2px;
    --shadow-sm: none; 
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06); /* Only kept for dropdowns/menus */
    
    /* Unified robust sans-serif stack for serious news impact */
    --font-display: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --max-w: 1080px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5; /* Tighter baseline for news density */
    min-height: 100vh;
}

a {
    color: var(--text); /* Default links to dark text */
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

a:hover {
    color: var(--accent); /* Hover brings out the news red */
}

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

/* ===== UTILITY ===== */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15; /* Tight line height for punchy headlines */
    color: var(--text);
    letter-spacing: -0.02em; /* Slightly tighter kerning for impact */
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
}

/* ===== FORMS ===== */
input, textarea, select, button {
    font-family: var(--font-body);
    font-size: inherit;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
textarea {
    background: var(--bg-alt); /* Light grey background for forms instead of white */
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius);
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--accent);
}

button,
input[type="submit"] {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    text-transform: uppercase; /* Uppercase buttons look more authoritative */
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    transition: background 0.2s;
}

button:hover,
input[type="submit"]:hover {
    background: var(--accent-hover);
}

/* ===== SEARCH FORM ===== */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form .search-field {
    flex: 1;
    padding: 8px 14px;
    font-size: 14px;
}

.search-form .search-submit {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== WIDGETS ===== */
.widget {
    margin-bottom: 32px;
}

.widget .title,
.widget-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--text); /* Thicker, bolder border for section titles */
    color: var(--text);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.widget ul li:last-child {
    border-bottom: none;
}

/* ===== SINGLE POST ===== */
.single-post .entry-header {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.single-post .entry-title {
    font-size: 2.75rem;
    margin-bottom: 16px;
    font-weight: 800;
}

.single-post .entry-meta {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.single-post .entry-content {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-sec);
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

/* ===== COMMENTS ===== */
.comments-area {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 2px solid var(--text);
}

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

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

.comment-author {
    font-weight: 700;
}

.comment-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    background: var(--bg-alt);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    transition: background 0.2s, color 0.2s;
}

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

.pagination .current {
    background: var(--accent);
    color: #fff;
}

/* ===== ARCHIVE ===== */
.archive-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--text);
}

.archive-title {
    font-size: 2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.archive-description {
    color: var(--text-sec);
    margin-top: 8px;
    font-size: 1.125rem;
}

/* ===== 404 ===== */
.error-404 {
    text-align: center;
    padding: 80px 20px;
}

.error-404 h1 {
    font-size: 6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
}

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

/* ===== WP BLOCKS ===== */
.wp-block-image img {
    max-width: 100%;
    border-radius: var(--radius);
}

.wp-block-quote {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin: 32px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 600;
}

.wp-block-code {
    background: var(--bg-alt);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
}

/* ===== FOOTER ===== */
.site-footer {
    background: #111111; /* Deeper black for footer */
    color: #dddddd;
    border-top: none;
    padding: 0;
    margin-top: 60px;
}

.site-footer a {
    color: #ffffff;
    text-decoration: none;
}

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