/*
Theme Name: Oldschool Gazette
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A classic WordPress theme styled after old-school newspapers: serif typography, multi-column layout, drop caps, rule lines and a restrained black-and-white design. Fully customizable via the WordPress Customizer (masthead title, tagline, motto, edition line).
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oldschool-gazette
*/

/* ==========================================================================
   1. Base / Fonts
   ========================================================================== */

:root {
    --og-ink: #1a1a1a;
    --og-paper: #f4f1ea;
    --og-paper-2: #ece7db;
    --og-rule: #1a1a1a;
    --og-rule-light: #999;
    --og-red: #7a1f1f;
    --og-max-width: 1180px;
    --og-serif: "Playfair Display", "Old Standard TT", Georgia, "Times New Roman", serif;
    --og-serif-body: "Old Standard TT", "PT Serif", Georgia, "Times New Roman", serif;
    --og-sans: "Special Elite", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--og-paper-2);
}

body {
    background: var(--og-paper);
    background-image:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.015) 0px, rgba(0,0,0,0.015) 1px, transparent 1px, transparent 2px);
    color: var(--og-ink);
    font-family: var(--og-serif-body);
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    filter: grayscale(85%) contrast(1.08);
}

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

a:hover {
    color: var(--og-red);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--og-serif);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

.og-wrap {
    max-width: var(--og-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

hr.og-rule,
.og-rule {
    border: none;
    border-top: 3px double var(--og-ink);
    margin: 18px 0;
}

.og-rule-thin {
    border: none;
    border-top: 1px solid var(--og-ink);
    margin: 10px 0;
}

/* ==========================================================================
   2. Masthead / Header
   ========================================================================== */

.og-topbar {
    font-family: var(--og-sans);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--og-ink);
    padding: 6px 0;
}

.og-topbar .og-wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.og-masthead {
    text-align: center;
    padding: 28px 0 10px;
}

.og-masthead .site-title {
    font-family: var(--og-serif);
    font-size: clamp(48px, 9vw, 96px);
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0;
}

.og-masthead .site-title a {
    color: var(--og-ink);
    border-bottom: none;
}

.og-masthead .site-description {
    font-family: var(--og-sans);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 6px;
}

.og-masthead-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--og-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 0;
    border-top: 3px double var(--og-ink);
    border-bottom: 3px double var(--og-ink);
}

/* ==========================================================================
   3. Navigation
   ========================================================================== */

.og-nav {
    border-bottom: 1px solid var(--og-ink);
    background: var(--og-paper);
}

.og-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.og-nav li {
    border-left: 1px solid var(--og-rule-light);
}
.og-nav li:first-child {
    border-left: none;
}

.og-nav a {
    display: block;
    padding: 10px 18px;
    font-family: var(--og-sans);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: none;
}

.og-nav a:hover {
    background: var(--og-ink);
    color: var(--og-paper);
}

.og-mobile-toggle {
    display: none;
}

/* ==========================================================================
   4. Layout: Content + Sidebar
   ========================================================================== */

.og-content-wrap {
    display: grid;
    grid-template-columns: 2.4fr 1fr;
    gap: 48px;
    padding: 32px 0 60px;
    align-items: start;
}

.og-content-wrap.no-sidebar {
    grid-template-columns: 1fr;
}

.og-main {
    min-width: 0;
}

/* Leitartikel / Featured Post auf der Startseite */
.og-lead {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    border-bottom: 3px double var(--og-ink);
    padding-bottom: 26px;
    margin-bottom: 26px;
}

/* No featured image: let the text use the full available width instead
   of being squeezed into the left column next to an empty image slot. */
.og-lead.no-image {
    grid-template-columns: 1fr;
}

.og-lead.no-image .og-excerpt {
    column-count: 2;
    column-gap: 30px;
}

.og-lead .og-kicker {
    color: var(--og-red);
}

.og-lead h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.og-lead img {
    border: 1px solid var(--og-ink);
}

.og-lead .og-excerpt {
    font-size: 16px;
    column-count: 1;
}

.og-lead .og-excerpt::first-letter {
    font-family: var(--og-serif);
    font-size: 3.2em;
    float: left;
    line-height: 0.8;
    padding: 6px 8px 0 0;
    font-weight: 900;
}

/* Artikel-Grid darunter, 3 Spalten wie Zeitungsspalten */
.og-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.og-grid article {
    border-left: 1px solid var(--og-rule-light);
    padding: 0 20px;
}
.og-grid article:last-child {
    padding-right: 0;
}

.og-kicker {
    font-family: var(--og-sans);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: block;
}

.og-grid h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.og-byline,
.entry-meta {
    font-family: var(--og-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
    margin-bottom: 10px;
}

.og-grid p,
.entry-summary {
    font-size: 15px;
    margin: 0 0 8px;
}

/* Listenansicht (Archiv/Blog) */
.og-post-list article {
    padding: 26px 0;
    border-bottom: 1px solid var(--og-rule-light);
    display: grid;
    grid-template-columns: 1fr;
}

.og-post-list article.has-thumb {
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.og-post-list h2 {
    font-size: 26px;
}

/* Einzelartikel */
.single .entry-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 20px;
}

.single .entry-title {
    font-size: clamp(30px, 5vw, 48px);
}

.single .entry-summary.deck {
    font-family: var(--og-serif);
    font-style: italic;
    font-size: 19px;
    color: #333;
    margin: 10px 0;
}

.single .entry-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 18px;
    column-count: 1;
}

.single .entry-content > p:first-of-type::first-letter {
    font-family: var(--og-serif);
    font-size: 4.4em;
    float: left;
    line-height: 0.78;
    padding: 4px 10px 0 0;
    font-weight: 900;
}

.single .entry-content img {
    border: 1px solid var(--og-ink);
    margin: 20px auto;
}

.single .entry-content figcaption,
.wp-caption-text {
    font-family: var(--og-sans);
    font-size: 12px;
    text-align: center;
    color: #555;
    margin-top: 6px;
}

.single .entry-content blockquote {
    font-family: var(--og-serif);
    font-style: italic;
    font-size: 22px;
    border-top: 1px solid var(--og-ink);
    border-bottom: 1px solid var(--og-ink);
    padding: 16px 0;
    margin: 24px 0;
    text-align: center;
}

/* ==========================================================================
   5. Sidebar
   ========================================================================== */

.og-sidebar .widget {
    margin-bottom: 34px;
}

/* Applies to both the classic widget title markup (<h3 class="widget-title">,
   used by widgets like "Categories"/"Archive") AND any heading block a user
   places inside a widget area - even nested inside a Group block, as with
   a "List of Pages" heading added via the block Widgets editor - so every
   widget heading looks and spaces identically regardless of how deep it
   sits or how it was added. */
.og-sidebar .widget-title,
.og-sidebar .widget h1,
.og-sidebar .widget h2,
.og-sidebar .widget h3,
.og-sidebar .widget h4,
.og-sidebar .widget h5,
.og-sidebar .widget h6 {
    font-family: var(--og-serif);
    font-size: 18px;
    text-transform: uppercase;
    border-bottom: 3px double var(--og-ink);
    padding-bottom: 6px;
    margin: 0 0 14px;
}

/* The block Widgets editor sometimes leaves a stray empty heading (no
   text) behind, which would otherwise render as a phantom extra divider
   line and throw off the spacing of whatever comes after it. */
.og-sidebar .widget h1:empty,
.og-sidebar .widget h2:empty,
.og-sidebar .widget h3:empty,
.og-sidebar .widget h4:empty,
.og-sidebar .widget h5:empty,
.og-sidebar .widget h6:empty {
    display: none;
}

/* Neutralize any default top margin on whatever immediately follows a
   widget heading, so the gap under the divider line is always identical. */
.og-sidebar .widget-title + *,
.og-sidebar .widget h1 + *,
.og-sidebar .widget h2 + *,
.og-sidebar .widget h3 + *,
.og-sidebar .widget h4 + *,
.og-sidebar .widget h5 + *,
.og-sidebar .widget h6 + * {
    margin-top: 0;
}

/* When several "sections" (heading + list) are placed inside one shared
   block/widget - e.g. a "Categories" list followed by a "List of Pages"
   heading in the same Group block - the browser has no built-in gap
   between them like it does between two separate widgets. Give any
   heading that follows a list or paragraph the same generous spacing a
   new widget would normally get, so stacked sections look consistent
   with standalone ones. Headings that are NOT preceded by list/paragraph
   content (i.e. sit at the very start of a widget) are left untouched. */
.og-sidebar .widget ul ~ h1,
.og-sidebar .widget ul ~ h2,
.og-sidebar .widget ul ~ h3,
.og-sidebar .widget ul ~ h4,
.og-sidebar .widget ul ~ h5,
.og-sidebar .widget ul ~ h6,
.og-sidebar .widget ol ~ h1,
.og-sidebar .widget ol ~ h2,
.og-sidebar .widget ol ~ h3,
.og-sidebar .widget ol ~ h4,
.og-sidebar .widget ol ~ h5,
.og-sidebar .widget ol ~ h6,
.og-sidebar .widget p ~ h1,
.og-sidebar .widget p ~ h2,
.og-sidebar .widget p ~ h3,
.og-sidebar .widget p ~ h4,
.og-sidebar .widget p ~ h5,
.og-sidebar .widget p ~ h6 {
    margin-top: 34px;
}

.og-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.og-sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid var(--og-rule-light);
    font-size: 14px;
}

.og-ad-box {
    border: 2px solid var(--og-ink);
    padding: 16px;
    text-align: center;
    font-family: var(--og-sans);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #555;
}

/* ==========================================================================
   6. Pagination
   ========================================================================== */

.og-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    font-family: var(--og-sans);
    font-size: 12px;
    text-transform: uppercase;
}

.og-pagination a,
.og-pagination span {
    border: 1px solid var(--og-ink);
    padding: 8px 14px;
}

.og-pagination .current {
    background: var(--og-ink);
    color: var(--og-paper);
}

.og-btn {
    display: inline-block;
    font-family: var(--og-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--og-ink);
    color: var(--og-paper);
    border: 1px solid var(--og-ink);
    padding: 10px 22px;
    cursor: pointer;
}

.og-btn:hover {
    background: var(--og-red);
    border-color: var(--og-red);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */

.og-footer {
    border-top: 3px double var(--og-ink);
    background: var(--og-paper-2);
    padding: 34px 0;
    margin-top: 40px;
}

.og-footer .og-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.og-footer h4 {
    font-family: var(--og-sans);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--og-ink);
    padding-bottom: 6px;
}

.og-footer-bottom {
    text-align: center;
    font-family: var(--og-sans);
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 14px 0;
    border-top: 1px solid var(--og-rule-light);
}

/* ==========================================================================
   8. Utilities / Screenreader
   ========================================================================== */

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

/* Comments are disabled theme-wide: hide any Recent/Latest Comments
   widget or block a user might still add manually via Widgets/blocks. */
.widget_recent_comments,
.wp-block-latest-comments,
.wp-block-latest-comments__comment {
    display: none !important;
}

.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 0 auto 10px; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .og-content-wrap {
        grid-template-columns: 1fr;
    }
    .og-lead.no-image .og-excerpt {
        column-count: 1;
    }
    .og-grid {
        grid-template-columns: 1fr;
    }
    .og-grid article {
        border-left: none;
        padding: 20px 0 !important;
        border-bottom: 1px solid var(--og-rule-light);
    }
    .og-lead {
        grid-template-columns: 1fr;
    }
    .og-footer .og-wrap {
        grid-template-columns: 1fr;
    }
    /* (footer now has 2 columns; single-column stacking above still applies) */
    .og-post-list article.has-thumb {
        grid-template-columns: 1fr;
    }
    .og-nav ul {
        flex-direction: column;
        text-align: center;
    }
    .og-nav li {
        border-left: none;
        border-top: 1px solid var(--og-rule-light);
    }
}
