/*
Theme Name: Flavor
Theme URI:
Author:
Description: Latvian News Theme — Editorial Style (Navy & Amber)
Version: 2.1
License: GNU General Public License v2 or later
Text Domain: flavor
*/

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

:root {
    /* Navy palette */
    --navy-900:  #0f1923;
    --navy-800:  #162636;
    --navy-700:  #1a3a5c;
    --navy-600:  #1e3348;
    --navy-400:  #5a7085;
    --navy-300:  #8a9eb0;
    --navy-200:  #9ab0c6;
    --navy-100:  #c2d0db;
    --navy-50:   #eef2f6;

    /* Amber accent */
    --amber:      #d4820a;
    --amber-dark: #b86d08;
    --amber-soft: #fdf0db;

    /* Semantic tokens */
    --accent:       var(--amber);
    --accent-dark:  var(--amber-dark);
    --accent-soft:  var(--amber-soft);

    --bg:           #ffffff;
    --bg-alt:       var(--navy-50);
    --bg-card:      #ffffff;

    --text:         var(--navy-900);
    --text-sec:     #3d4e5c;
    --text-muted:   var(--navy-400);

    --border:       #c5d3de;
    --border-light: #e8edf2;

    --radius:    4px;
    --radius-lg: 10px;

    --shadow-sm: 0 1px 4px rgba(15,25,35,0.07);
    --shadow-md: 0 4px 16px rgba(15,25,35,0.10);

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Source Sans 3', '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.55;
    min-height: 100vh;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

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

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;
    color: var(--text);
    letter-spacing: -0.02em;
}

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);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212,130,10,0.12);
}

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

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

/* ===== 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(--navy-700);
    color: var(--navy-700);
}

.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-light);
    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.65;
    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(--navy-700);
}

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

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

.comment-author { font-weight: 700; color: var(--navy-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: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px; font-weight: 700;
    color: var(--navy-700);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pagination a:hover { border-color: var(--navy-700); background: var(--navy-50); }
.pagination .current { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

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

.archive-title {
    font-size: 2rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: -0.01em;
    color: var(--navy-700);
}

.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(--navy-700); 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(--navy-700); 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: var(--navy-900);
    color: #8a9eb0;
    border-top: none;
    padding: 0;
    margin-top: 60px;
}

.site-footer a { color: var(--navy-100); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }