/*
Theme Name: The News Gallery
Theme URI: https://thenewsgallery.com
Author: Vincent K
Author URI: https://thenewsgallery.com
Description: Lightweight, Guardian-inspired news theme with optimized ad placements. Zero block editor dependencies, under 3KB JS, optimized for Core Web Vitals and low rendering percentage.
Version: 1.4.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thenewsgallery
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Brand Colors */
    --brand-red: #e53935;

    /* Section Colors */
    --color-world: #c70000;
    --color-us: #0077B6;
    --color-technology: #6B4FA0;
    --color-science: #2E7D32;
    --color-sports: #0084C6;
    --color-entertainment: #A1845C;
    --color-finance: #1B5E20;

    /* Background Colors */
    --bg-page: #ffffff;
    --bg-secondary: #f9f9f9;
    --bg-card: #ffffff;

    /* Text Colors */
    --text-primary: #121212;
    --text-secondary: #707070;
    --text-tertiary: #999999;

    /* Border Colors */
    --border-light: #dcdcdc;
    --border-faint: #ededed;

    /* Typography */
    --font-headline: 'Zilla Slab', Georgia, serif;
    --font-body: 'PT Serif', Georgia, serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Layout */
    --max-width: 100%;
    --content-width: 720px;
    --side-padding: 4%;
}

/* ==========================================================================
   1. Reset & Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-red);
}

a:focus {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headline);
    font-weight: 700;
    line-height: 1.2;
}

button {
    cursor: pointer;
    font-family: inherit;
}

input,
textarea,
button,
select {
    font-family: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
}

figure {
    margin: 0;
}

blockquote {
    margin: 0;
}

/* ==========================================================================
   2. Header
   ========================================================================== */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    z-index: 100;
}

.header-inner {
    width: 100%;
    padding: 20px var(--side-padding);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-branding a {
    text-decoration: none;
    color: inherit;
}

.site-logo {
    font-family: var(--font-headline);
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    text-decoration: none;
}

.site-logo:hover {
    color: var(--text-primary);
}

.site-tagline {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

.custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: absolute;
    right: var(--side-padding);
    top: 50%;
    transform: translateY(-50%);
}

.search-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background 0.2s ease, color 0.2s ease;
}

.search-toggle:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.search-toggle svg {
    width: 20px;
    height: 20px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   3. Top Leaderboard Ad
   ========================================================================== */

.ad-slot-leaderboard {
    text-align: center;
    padding: 8px 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-faint);
}

/* ==========================================================================
   4. Navigation
   ========================================================================== */

.main-nav {
    background: var(--brand-red);
    position: relative;
}

.nav-inner {
    width: 100%;
    padding: 0 var(--side-padding);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-inner::-webkit-scrollbar {
    display: none;
}

.nav-link {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #ffffff;
    padding: 12px 16px;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.1);
    border-bottom-color: #ffffff;
    color: #ffffff;
}

.nav-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.nav-link--active {
    background: rgba(0, 0, 0, 0.15);
    border-bottom-color: #ffffff;
}

/* ==========================================================================
   4b. Breaking/Latest News Bar
   ========================================================================== */

.breaking-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.breaking-bar-inner {
    width: 100%;
    padding: 8px var(--side-padding);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui);
    font-size: 14px;
}

.breaking-label {
    background: var(--brand-red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 2px;
    white-space: nowrap;
}

.breaking-bar-inner a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breaking-bar-inner a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   5. Container
   ========================================================================== */

.container {
    width: 100%;
    padding: 0 var(--side-padding);
}

#main-content > .container:first-child {
    padding-top: 0;
}

/* ==========================================================================
   5b. Latest News Strip
   ========================================================================== */

.latest-strip {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 0;
    margin-bottom: 8px;
}

.latest-strip-header {
    margin-bottom: 16px;
}

.latest-strip-header h2 {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    border-left: 3px solid var(--brand-red);
    padding-left: 10px;
}

.latest-strip-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.latest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-faint);
}

.latest-item:last-child {
    border-bottom: none;
}

.latest-time {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    min-width: 48px;
    flex-shrink: 0;
}

.latest-title {
    font-family: var(--font-headline);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.3;
}

.latest-title:hover {
    color: var(--brand-red);
}

.badge-sm {
    font-size: 10px;
    padding: 2px 6px;
    flex-shrink: 0;
}

/* ==========================================================================
   5c. Story List (More Stories section)
   ========================================================================== */

.stories-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.story-list-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-faint);
}

.story-list-item:last-child {
    border-bottom: none;
}

.story-list-thumb {
    flex-shrink: 0;
    width: 140px;
    height: 90px;
    overflow: hidden;
    border-radius: 3px;
}

.story-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-list-content {
    flex: 1;
    min-width: 0;
}

.story-list-content h3 {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
}

.story-list-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.story-list-content h3 a:hover {
    color: var(--brand-red);
}

.story-list-excerpt {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 4px;
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */

.hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1px;
    background: var(--border-light);
    margin-top: 24px;
    margin-bottom: 32px;
}

.hero-main {
    background: var(--bg-card);
    padding: 24px;
}

.hero-main img {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 627;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 16px;
}

.hero-main h1 {
    font-family: var(--font-headline);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}

.hero-main h1 a {
    color: inherit;
    text-decoration: none;
}

.hero-main h1 a:hover {
    color: var(--brand-red);
}

.standfirst {
    font-family: var(--font-body);
    font-size: 18px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.hero-meta {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-tertiary);
}

.hero-meta a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.hero-meta a:hover {
    color: var(--brand-red);
}

.hero-meta time {
    color: var(--text-tertiary);
}

.hero-side {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
}

.hero-side-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-faint);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-side-item:last-child {
    border-bottom: none;
}

.hero-side-item h2 {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
}

.hero-side-item h2 a {
    color: inherit;
    text-decoration: none;
}

.hero-side-item h2 a:hover {
    color: var(--brand-red);
}

.hero-side-item .hero-meta {
    margin-top: auto;
}

.hero-side-item .standfirst {
    font-size: 15px;
    margin-bottom: 8px;
}

.hero-side-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 12px;
}

/* ==========================================================================
   7. Badges
   ========================================================================== */

.badge {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 2px;
    line-height: 1.2;
    margin-bottom: 8px;
    text-decoration: none;
}

.badge:hover {
    color: #ffffff;
    opacity: 0.9;
}

.badge-world {
    background: var(--color-world);
}

.badge-us {
    background: var(--color-us);
}

.badge-technology {
    background: var(--color-technology);
}

.badge-science {
    background: var(--color-science);
}

.badge-sports {
    background: var(--color-sports);
}

.badge-entertainment {
    background: var(--color-entertainment);
}

.badge-finance {
    background: var(--color-finance);
}

/* ==========================================================================
   8. Section Dividers
   ========================================================================== */

.section-block {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.section-block:first-child {
    border-top: none;
    padding-top: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: var(--font-headline);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    border-left: 3px solid;
    padding-left: 10px;
}

.section-header h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.section-header h2 a:hover {
    color: var(--brand-red);
}

.section-header .see-all {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-tertiary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.section-header .see-all:hover {
    color: var(--brand-red);
}

/* Section-specific border-left colors (on h2) */
.section-header.world h2 {
    border-color: var(--color-world);
}

.section-header.us h2 {
    border-color: var(--color-us);
}

.section-header.technology h2 {
    border-color: var(--color-technology);
}

.section-header.science h2 {
    border-color: var(--color-science);
}

.section-header.sports h2 {
    border-color: var(--color-sports);
}

.section-header.entertainment h2 {
    border-color: var(--color-entertainment);
}

.section-header.finance h2 {
    border-color: var(--color-finance);
}

/* ==========================================================================
   9. Post Grid
   ========================================================================== */

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-light);
}

.post-card {
    background: var(--bg-card);
    padding: 16px;
    transition: background 0.2s ease;
}

.post-card:hover {
    background: #fafafa;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 1200 / 627;
    overflow: hidden;
    border-radius: 2px;
    margin-bottom: 8px;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.03);
}

.post-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-card h3 {
    font-family: var(--font-headline);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 6px;
}

.post-card h3 a {
    color: inherit;
    text-decoration: none;
}

.post-card h3 a:hover {
    color: var(--brand-red);
}

.post-card .post-meta {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.post-card .post-meta a {
    color: var(--text-tertiary);
}

.post-card .post-meta a:hover {
    color: var(--brand-red);
}

.post-card .post-excerpt,
.post-card .post-card-excerpt {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

/* ==========================================================================
   10. Content + Sidebar Layout
   ========================================================================== */

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 32px;
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

.content-with-sidebar .main-content {
    min-width: 0;
    padding-top: 8px;
}

.main-content {
    min-width: 0;
}

/* ==========================================================================
   11. Sidebar Widgets
   ========================================================================== */

.sidebar-widget {
    background: var(--bg-card);
    padding: 24px;
    margin-bottom: 16px;
    border-top: 3px solid var(--brand-red);
}

.sidebar-widget h3 {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.popular-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-faint);
    align-items: flex-start;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-number {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    color: var(--border-light);
    line-height: 1;
    min-width: 32px;
    flex-shrink: 0;
}

.popular-item-content {
    flex: 1;
    min-width: 0;
}

.popular-title {
    font-family: var(--font-headline);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.popular-title a {
    color: inherit;
    text-decoration: none;
}

.popular-title a:hover {
    color: var(--brand-red);
}

.popular-meta {
    font-family: var(--font-ui);
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.3;
}

/* Widget: Recent Posts */
.widget-recent-post {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-faint);
}

.widget-recent-post:last-child {
    border-bottom: none;
}

.widget-recent-post h4 {
    font-family: var(--font-headline);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.widget-recent-post h4 a {
    color: inherit;
    text-decoration: none;
}

.widget-recent-post h4 a:hover {
    color: var(--brand-red);
}

.widget-recent-post .post-meta {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Widget: Tag Cloud */
.widget-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-tags a {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-page);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.widget-tags a:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

/* Widget: Newsletter Signup */
.newsletter-widget p {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsletter-form input[type="email"] {
    font-family: var(--font-ui);
    font-size: 14px;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--brand-red);
}

.newsletter-form button {
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
    background: var(--brand-red);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.newsletter-form button:hover {
    background: #c62828;
}

.sidebar-widget-title {
    font-family: var(--font-headline);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.widget-icon {
    margin-right: 4px;
}

/* Ad Label */
.ad-label {
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
    text-align: center;
    margin-bottom: 4px;
}

/* ==========================================================================
   12. Sidebar Search
   ========================================================================== */

.sidebar-search {
    display: flex;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 24px;
    background: var(--bg-card);
}

.sidebar-search input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    font-family: var(--font-ui);
    font-size: 14px;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    min-width: 0;
}

.sidebar-search input::placeholder {
    color: var(--text-tertiary);
}

.sidebar-search button {
    background: var(--brand-red);
    border: none;
    color: #ffffff;
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.sidebar-search button:hover {
    background: #d32f2f;
}

.sidebar-search button svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   13. Ad Slots (All Positions)
   ========================================================================== */

.ad-slot {
    text-align: center;
    margin: 16px 0;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-slot:empty::before,
.ad-slot--loading::before {
    content: 'Advertisement';
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Leaderboard - already defined above in section 3 */

.ad-slot-sidebar {
    margin-bottom: 16px;
    text-align: center;
    min-height: 250px;
}

.ad-slot-sticky {
    position: sticky;
    top: 24px;
    text-align: center;
}

.ad-slot-in-article {
    margin: 32px auto;
    max-width: var(--content-width);
    text-align: center;
}

.ad-slot-between-sections {
    text-align: center;
    padding: 16px 0;
    margin: 24px 0;
}

.ad-slot-between-sections:empty::before,
.ad-slot-between-sections.ad-slot--loading::before {
    content: 'Advertisement';
    display: block;
    font-family: var(--font-ui);
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Ad label for filled slots */
.ad-label {
    font-family: var(--font-ui);
    font-size: 10px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}

/* ==========================================================================
   14. Single Post
   ========================================================================== */

.breadcrumbs {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.4;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--brand-red);
}

.breadcrumbs span {
    margin: 0 4px;
    color: var(--text-tertiary);
}

.breadcrumbs .current {
    color: var(--text-primary);
    background: transparent;
    border: none;
    padding: 0;
}

.article-header {
    max-width: 700px;
    margin-bottom: 32px;
}

.article-header h1 {
    font-family: var(--font-headline);
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 16px 0;
    color: var(--text-primary);
}

.article-header .standfirst {
    font-size: 20px;
    line-height: 1.5;
    margin-bottom: 0;
}

.article-header .badge {
    margin-bottom: 0;
}

/* ==========================================================================
   15. Byline Row
   ========================================================================== */

.byline-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 32px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.byline-text {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.author-name a {
    color: inherit;
    text-decoration: none;
}

.author-name a:hover {
    color: var(--brand-red);
}

.publish-date {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ==========================================================================
   16. Share Buttons
   ========================================================================== */

.share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-page);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
}

.share-btn:hover {
    background: var(--brand-red);
    color: #ffffff;
}

.share-btn:focus {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

.share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==========================================================================
   17. Featured Image
   ========================================================================== */

.featured-image {
    width: 100%;
    margin-bottom: 4px;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 2px;
}

.image-credit {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 32px;
    line-height: 1.4;
}

/* ==========================================================================
   18. Article Body
   ========================================================================== */

.article-body {
    max-width: 700px;
}

.article-body > p:first-of-type::first-letter {
    font-family: var(--font-headline);
    font-size: 3.5em;
    float: left;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 4px;
    color: var(--text-primary);
    font-weight: 700;
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h2 {
    font-family: var(--font-headline);
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 16px;
    line-height: 1.2;
}

.article-body h3 {
    font-family: var(--font-headline);
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 12px;
    line-height: 1.25;
}

.article-body h4 {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px;
    line-height: 1.3;
}

.article-body blockquote {
    border-left: 4px solid var(--brand-red);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 20px;
    line-height: 1.6;
}

.article-body blockquote p {
    margin-bottom: 12px;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body blockquote cite {
    display: block;
    font-size: 14px;
    font-style: normal;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    margin: 16px 0;
}

.article-body a {
    color: var(--brand-red);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.article-body a:hover {
    color: #c62828;
}

.article-body figure {
    margin: 32px 0;
}

.article-body figcaption {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
    line-height: 1.4;
}

.article-body pre {
    background: var(--text-primary);
    color: #f8f8f2;
    padding: 24px;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

.article-body code {
    background: var(--bg-page);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-body pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 32px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.article-body th,
.article-body td {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    text-align: left;
    font-size: 16px;
}

.article-body th {
    background: var(--bg-page);
    font-family: var(--font-ui);
    font-weight: 600;
}

/* ==========================================================================
   19. Post Tags
   ========================================================================== */

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

.post-tag {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-page);
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-block;
    line-height: 1.4;
}

.post-tag:hover {
    background: var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
}

/* ==========================================================================
   20. Author Box
   ========================================================================== */

.author-box {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--bg-card);
    border-top: 3px solid var(--brand-red);
    margin: 48px 0;
}

.author-box-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-box-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-box-info {
    flex: 1;
    min-width: 0;
}

.author-box-name {
    font-family: var(--font-headline);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
}

.author-box-name a {
    color: inherit;
    text-decoration: none;
}

.author-box-name a:hover {
    color: var(--brand-red);
}

.author-box-bio {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.author-box-bio p {
    margin-bottom: 0;
}

.author-box-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.author-box-links a {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--brand-red);
    text-decoration: none;
}

.author-box-links a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   21. Related Posts
   ========================================================================== */

.related-section {
    margin-top: 48px;
}

.related-section .section-header {
    margin-bottom: 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-light);
}

.related-grid .post-card {
    background: var(--bg-card);
}

/* ==========================================================================
   22. Comments
   ========================================================================== */

.comments-area {
    margin-top: 48px;
}

.comments-area .section-header {
    margin-bottom: 0;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list .comment {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-faint);
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-author {
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    width: 32px;
    height: 32px;
}

.comment-author a {
    color: inherit;
    text-decoration: none;
}

.comment-author a:hover {
    color: var(--brand-red);
}

.comment-meta {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.comment-meta a {
    color: var(--text-secondary);
    text-decoration: none;
}

.comment-meta a:hover {
    color: var(--brand-red);
}

.comment-content {
    font-size: 16px;
    line-height: 1.6;
}

.comment-content p {
    margin-bottom: 12px;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-reply-link {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
}

.comment-reply-link:hover {
    color: var(--brand-red);
}

/* Nested comments */
.comment-list .children {
    list-style: none;
    padding-left: 32px;
}

/* Comment Form */
.comment-form {
    margin-top: 32px;
}

.comment-form label {
    display: block;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color 0.2s ease;
    outline: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--brand-red);
}

.comment-form input[type="text"]::placeholder,
.comment-form input[type="email"]::placeholder,
.comment-form input[type="url"]::placeholder,
.comment-form textarea::placeholder {
    color: var(--text-tertiary);
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.comment-form .submit {
    background: var(--brand-red);
    color: #ffffff;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-form .submit:hover {
    background: #d32f2f;
}

.comment-form .submit:focus {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

.comment-form .comment-notes {
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.comment-form .required {
    color: var(--brand-red);
}

/* ==========================================================================
   23. Footer
   ========================================================================== */

.site-footer {
    background: var(--text-primary);
    color: #ffffff;
    margin-top: 48px;
}

.footer-top {
    width: 100%;
    padding: 48px var(--side-padding) 32px;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-family: var(--font-headline);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-red);
}

.footer-col-about p {
    font-family: var(--font-ui);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-family: var(--font-ui);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    transition: background 0.15s;
}

.footer-social a:hover {
    background: var(--brand-red);
}

.footer-rss {
    font-family: var(--font-ui);
    font-size: 13px;
}

.footer-rss a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0,0,0,0.15);
}

.footer-bottom-inner {
    width: 100%;
    padding: 16px var(--side-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-ui);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.footer-legal a:hover {
    color: #ffffff;
}

/* ==========================================================================
   24. Cookie Banner
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-primary);
    color: #ffffff;
    z-index: 999;
    padding: 16px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner-inner {
    width: 100%;
    padding: 0 var(--side-padding);
    display: flex;
    align-items: center;
    gap: 24px;
}

.cookie-banner p {
    flex: 1;
    font-family: var(--font-ui);
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-banner a {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner a:hover {
    color: #ffffff;
    opacity: 0.8;
}

.cookie-accept {
    background: var(--brand-red);
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.cookie-accept:hover {
    background: #d32f2f;
}

.cookie-accept:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Hidden state for cookie banner */
.cookie-banner.hidden {
    display: none;
}

/* ==========================================================================
   25. Search Overlay (Dropdown Style)
   ========================================================================== */

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 80px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-inner {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.search-icon {
    flex-shrink: 0;
    color: var(--text-tertiary);
}

.search-input-wrap input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 18px;
    background: transparent;
}

.search-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.search-close:hover {
    color: var(--text-primary);
}

.search-suggestions {
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestion {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    border-bottom: 1px solid var(--border-faint);
    transition: background 0.1s;
}

.search-suggestion:hover,
.search-suggestion--focused {
    background: var(--bg-secondary);
}

.suggestion-title {
    display: block;
    font-family: var(--font-headline);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.suggestion-excerpt {
    display: block;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.search-no-results {
    padding: 24px 20px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--text-tertiary);
}

.search-view-all {
    display: block;
    padding: 14px 20px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-red);
    text-decoration: none;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

.search-view-all:hover {
    background: var(--border-light);
}

/* ==========================================================================
   26. WordPress Alignments
   ========================================================================== */

.alignleft {
    float: left;
    margin: 0 24px 24px 0;
}

.alignright {
    float: right;
    margin: 0 0 24px 24px;
}

.aligncenter {
    display: block;
    margin: 0 auto 24px;
}

.alignwide {
    margin-left: -80px;
    margin-right: -80px;
    max-width: calc(var(--content-width) + 160px);
}

.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 24px;
}

.wp-caption img {
    display: block;
    width: 100%;
    height: auto;
}

.wp-caption-text {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    line-height: 1.4;
}

.wp-block-image figcaption {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
    text-align: center;
}

/* ==========================================================================
   27. Screen Reader Text
   ========================================================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-card);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: var(--text-primary);
    display: block;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Skip link */
.skip-link {
    left: -9999rem;
    top: 2.5rem;
    z-index: 999999999;
    text-decoration-line: none;
}

.skip-link:focus {
    display: block;
    left: 6px;
    top: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration-line: none;
    padding: 15px 23px 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    z-index: 100000;
}

/* ==========================================================================
   28. Pagination
   ========================================================================== */

.pagination {
    margin: 32px 0;
    font-family: var(--font-ui);
    font-size: 14px;
}

.nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a,
.nav-links span {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    display: inline-block;
    line-height: 1.2;
}

.nav-links a:hover {
    background: var(--bg-page);
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.nav-links .current {
    background: var(--brand-red);
    color: #ffffff;
    border-color: var(--brand-red);
}

.nav-links .prev,
.nav-links .next {
    font-weight: 600;
}

.nav-links .dots {
    border: none;
    background: transparent;
    padding: 8px 6px;
    color: var(--text-tertiary);
}

/* Post navigation (single post prev/next) */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-light);
    margin: 48px 0;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    background: var(--bg-card);
    padding: 24px;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-label {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

.post-navigation a {
    font-family: var(--font-headline);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    text-decoration: none;
}

.post-navigation a:hover {
    color: var(--brand-red);
}

/* ==========================================================================
   29. Gallery
   ========================================================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 24px 0;
}

.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 2px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item a:hover img {
    transform: scale(1.05);
}

.gallery-item .gallery-caption {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--text-tertiary);
    padding: 4px 0;
}

/* Gallery columns */
.gallery-columns-1 {
    grid-template-columns: 1fr;
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* ==========================================================================
   30. Responsive Breakpoints
   ========================================================================== */

/* ---------- Tablet and below (1024px) ---------- */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .ad-slot-sticky {
        position: static;
    }

    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .alignwide {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1px;
    }

    .post-navigation .nav-next {
        text-align: left;
    }
}

/* ---------- Tablet portrait and phones (768px) ---------- */
@media (max-width: 768px) {
    /* Latest strip */
    .latest-item {
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .latest-title {
        font-size: 15px;
    }

    /* Story list */
    .story-list-thumb {
        width: 100px;
        height: 66px;
    }

    .story-list-content h3 {
        font-size: 16px;
    }

    /* Footer columns stack */
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    /* Breaking bar */
    .breaking-bar-inner {
        font-size: 13px;
    }

    /* Hero side loses left border on mobile */
    .hero-side {
        border-left: none;
        border-top: 1px solid var(--border-light);
    }

    /* Hamburger nav toggle */
    .hamburger {
        display: flex;
    }

    .nav-inner {
        display: none;
    }

    .nav-inner.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--brand-red);
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .nav-inner.open .nav-link {
        padding: 14px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Hero responsive */
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-main h1 {
        font-size: 26px;
    }

    .hero-main {
        padding: 16px;
    }

    .hero-side-item {
        padding: 16px;
    }

    .standfirst {
        font-size: 16px;
    }

    /* Post grid responsive */
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Single article responsive */
    .article-header h1 {
        font-size: 28px;
        letter-spacing: -0.3px;
    }

    .article-header .standfirst {
        font-size: 17px;
    }

    .article-body h2 {
        font-size: 24px;
        margin-top: 32px;
    }

    .article-body h3 {
        font-size: 20px;
        margin-top: 24px;
    }

    .article-body blockquote {
        font-size: 18px;
        padding-left: 16px;
        margin: 24px 0;
    }

    /* Related grid responsive */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Logo responsive */
    .site-logo {
        font-size: 22px;
    }

    .site-tagline {
        font-size: 11px;
    }

    .custom-logo {
        max-height: 44px;
    }

    /* Byline responsive */
    .byline-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .share-buttons {
        width: 100%;
    }

    /* Author box responsive */
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px;
        gap: 16px;
    }

    .author-box-links {
        justify-content: center;
    }

    /* Ad slot leaderboard responsive */
    .ad-slot-leaderboard {
        padding: 4px 0;
    }

    /* Cookie banner responsive */
    .cookie-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .cookie-banner p {
        text-align: center;
    }

    /* Footer responsive */
    .footer-columns {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-links {
        gap: 12px 24px;
        justify-content: center;
    }

    .footer-copyright {
        text-align: center;
    }

    /* Search overlay responsive */
    .search-overlay {
        padding-top: 60px;
    }

    .search-input-wrap input[type="search"] {
        font-size: 16px;
    }

    /* Gallery responsive */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Section header responsive */
    .section-header h2 {
        font-size: 20px;
    }

    /* Comments responsive */
    .comment-list .children {
        padding-left: 16px;
    }

    /* Pagination responsive */
    .nav-links {
        gap: 4px;
    }

    .nav-links a,
    .nav-links span {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ---------- Small phones (480px) ---------- */
@media (max-width: 480px) {
    /* Post grid single column */
    .post-grid {
        grid-template-columns: 1fr;
    }

    /* Header padding */
    .header-inner {
        padding: 8px 16px;
    }

    .header-right {
        right: 16px;
    }

    /* Footer single column on small phones */
    .footer-columns {
        grid-template-columns: 1fr;
    }

    /* Drop cap smaller on mobile */
    .article-body > p:first-of-type::first-letter {
        font-size: 2.8em;
    }

    /* Container padding */
    .container {
        padding: 0 16px;
    }

    /* Further reductions */
    .hero-main {
        padding: 12px;
    }

    .hero-main h1 {
        font-size: 22px;
    }

    .hero-side-item {
        padding: 12px;
    }

    .hero-side-item h2 {
        font-size: 17px;
    }

    .article-header h1 {
        font-size: 24px;
    }

    .article-header .standfirst {
        font-size: 16px;
    }

    .post-card {
        padding: 12px;
    }

    .post-card h3 {
        font-size: 16px;
    }

    .section-block {
        margin-top: 24px;
    }

    .section-header {
        margin-bottom: 16px;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .sidebar-widget {
        padding: 16px;
    }

    .author-box {
        padding: 16px;
    }

    .author-box-avatar {
        width: 64px;
        height: 64px;
    }

    .author-box-name {
        font-size: 18px;
    }

    .article-body {
        font-size: 17px;
    }

    .article-body h2 {
        font-size: 22px;
    }

    .article-body h3 {
        font-size: 18px;
    }

    .site-footer {
        padding: 32px 0 16px;
    }

    .footer-inner {
        padding: 0 16px;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-brand {
        font-size: 20px;
    }

    .footer-links {
        gap: 8px 16px;
    }

    .search-overlay {
        padding-top: 40px;
    }

    .search-overlay-inner {
        width: 95%;
        border-radius: 8px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery-columns-2,
    .gallery-columns-3,
    .gallery-columns-4,
    .gallery-columns-5,
    .gallery-columns-6 {
        grid-template-columns: 1fr;
    }

    .related-grid .post-card {
        padding: 12px;
    }

    .comments-area {
        margin-top: 32px;
    }

    .comment-list .comment {
        padding: 16px 0;
    }

    .comment-list .children {
        padding-left: 12px;
    }

    .cookie-banner {
        padding: 12px 0;
    }

    .cookie-banner-inner {
        padding: 0 16px;
        gap: 8px;
    }

    .cookie-banner p {
        font-size: 13px;
    }

    .cookie-accept {
        padding: 8px 20px;
        font-size: 13px;
    }

    .nav-links a,
    .nav-links span {
        padding: 6px 8px;
        font-size: 12px;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .byline-row {
        padding: 12px 0;
        margin-bottom: 24px;
    }

    .featured-image {
        margin-left: -16px;
        margin-right: -16px;
        width: calc(100% + 32px);
    }

    .featured-image img {
        border-radius: 0;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* No JS fallback */
.no-js .search-overlay {
    display: none;
}

.no-js .hamburger {
    display: none;
}

.no-js .nav-inner {
    display: flex !important;
}

/* Print styles */
@media print {
    .site-header,
    .main-nav,
    .site-footer,
    .cookie-banner,
    .search-overlay,
    .share-buttons,
    .ad-slot,
    .ad-slot-leaderboard,
    .ad-slot-sidebar,
    .ad-slot-sticky,
    .ad-slot-in-article,
    .ad-slot-between-sections,
    .sidebar,
    .comments-area,
    .related-section,
    .post-navigation,
    .pagination {
        display: none !important;
    }

    body {
        background: #ffffff;
        color: #000000;
        font-size: 12pt;
        line-height: 1.5;
    }

    .article-header h1 {
        font-size: 24pt;
    }

    .article-body {
        max-width: 100%;
    }

    .article-body a {
        color: #000000;
        text-decoration: underline;
    }

    .article-body a::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #666666;
    }

    img {
        max-width: 100% !important;
    }

    .featured-image {
        margin-bottom: 16px;
    }
}
