/*
Theme Name: Times Media
Theme URI: https://timesmedia.ca
Author: Times Media
Description: A clean, editorial WordPress theme for city news sites. BlogTO-inspired layout with support for business directory and events. Designed for totimes.ca, otttimes.ca, and mtltimes.ca.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: times-media
Tags: news, magazine, blog, responsive, custom-logo, custom-menu, featured-images, custom-colors
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --accent:          #111111;
    --accent-hover:    #444444;
    --bg-page:         #ebebeb;
    --bg-content:      #ffffff;
    --bg-footer:       #1a1a1a;
    --text-primary:    #1a1a1a;
    --text-secondary:  #555555;
    --text-headline:   #111111;
    --text-meta:       #888888;
    --text-light:      #aaaaaa;
    --border:          #e0e0e0;
    --border-dark:     #cccccc;
    --font-head:       'Barlow', sans-serif;
    --font-body:       'Inter', sans-serif;
    --radius:          4px;
    --content-width:   1150px;
    --rail-width:      160px;
    --header-height:   81px;
    --sticky-offset:   20px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: var(--font-body);
}

input, textarea, select {
    font-family: var(--font-body);
}

/* ==========================================================================
   Page Layout Shell (BlogTO: gray sides, white center, ad rails)
   ========================================================================== */

.site-wrapper {
    background: var(--bg-page);
    min-height: 100vh;
}

/* The outer container provides the gray side rails for ads */
.site-rail-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.site-rail-left,
.site-rail-right {
    flex: 1 1 0;
    max-width: var(--rail-width);
    min-width: 0;
    padding-top: 20px;
}

.site-rail-left .ad-slot,
.site-rail-right .ad-slot {
    position: sticky;
    top: var(--sticky-offset);
}

.site-content-column {
    flex: 0 1 var(--content-width);
    max-width: var(--content-width);
    min-width: 0;
    background: var(--bg-content);
    min-height: 60vh;
}

/* For pages that don't use rails (header, footer) */
.site-full-width {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
}

/* Inner content max-width */
.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header-wrap {
    position: relative;
    z-index: 100;
}

.site-header-wrap.is-sticky {
    position: sticky;
    top: 0;
}

.site-header {
    background: var(--bg-content);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 80px;
    padding: 12px 20px;
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
}

.site-logo {
    grid-column: 2;
    justify-self: center;
}

.header-actions {
    grid-column: 3;
    justify-self: end;
}

/* Logo */
.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 72px;
    width: auto;
}

.nav-overlay-header .site-logo img {
    height: auto;
    max-height: 60px;
    width: auto;
}

.site-logo .text-logo {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--accent);
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Header left slot (col 1) */
.header-left {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
}

/* Header Actions (right side) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Header weather widget */
.header-weather {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: .82rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: background .15s;
    white-space: nowrap;
}
.header-weather:hover { background: var(--bg-page); }
.header-weather .weather-icon { flex-shrink: 0; }

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: background 0.15s;
}

.header-btn:hover {
    background: var(--bg-page);
}

.header-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Search overlay */
.search-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 150;
}

.search-overlay.is-open {
    display: block;
}

.search-overlay-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 32px 20px 0;
    position: relative;
}

.search-overlay .search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}

.search-overlay .search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 1.7rem;
    font-family: var(--font-body);
    color: #fff;
    outline: none;
}

.search-overlay .search-form input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-overlay .search-form button[type="submit"] {
    background: none;
    border: none;
    color: #fff;
    padding: 10px 0 10px 16px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.search-overlay .search-form button[type="submit"]:hover {
    opacity: 1;
}

.search-overlay .search-form button[type="submit"] svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.search-close {
    position: absolute;
    top: 36px;
    right: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.15s;
}

.search-close:hover {
    color: #fff;
}

/* Mobile nav panel */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    background: var(--bg-content);
    z-index: 190;
    overflow-y: auto;
    padding: 20px;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}

.nav-overlay.is-open {
    display: block;
}

.nav-overlay-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 189;
}

.nav-overlay-backdrop.is-open {
    display: block;
}

.nav-overlay-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.nav-overlay-header .nav-close {
    position: absolute;
    right: 0;
}

.nav-close {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.nav-overlay .menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
}

.nav-overlay .menu li {
    width: 100%;
    text-align: left;
}

.nav-overlay .menu li a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.nav-overlay .menu li a:hover {
    color: var(--accent);
}

.nav-overlay-signup {
    margin-top: 24px;
    padding-top: 20px;
    padding-bottom: 16px;
}

.nav-signup-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-meta);
    margin-bottom: 12px;
}

.nav-signup-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-signup-form input[type="email"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: var(--bg-page);
    color: var(--text-primary);
}

.nav-signup-form button {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

/* ==========================================================================
   Ad Leaderboard Zone (below header, above content)
   ========================================================================== */

.ad-leaderboard-wrap {
    background: var(--bg-page);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0;
    min-height: 0;
}

.ad-leaderboard-wrap:empty,
.ad-leaderboard-wrap .widget:empty {
    display: none;
}

.ad-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ==========================================================================
   Homepage: Hero + Trending Sidebar
   ========================================================================== */

.home-hero-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    padding: 20px 20px 0;
    border-bottom: 1px solid var(--border);
}

/* Hero card */
.card-hero {
    padding-bottom: 20px;
}

.card-hero .card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.card-hero .card-image-wrap {
    position: relative;
    margin-bottom: 0;
}

.card-hero .card-image-wrap img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.card-hero .card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.4rem;
    line-height: 1.1;
    color: var(--text-headline);
    margin-top: 12px;
}

.card-hero .card-title a {
    color: inherit;
}

.card-hero .card-title a:hover {
    color: var(--accent);
}

/* Trending sidebar */
.trending-sidebar {
    padding: 20px 24px 20px 24px;
    border-left: 1px solid var(--border);
}

.trending-sidebar-ad {
    margin-top: 16px;
    max-width: 100%;
}

.trending-sidebar-ad ins,
.trending-sidebar-ad iframe,
.trending-sidebar-ad > div {
    max-width: 100% !important;
    width: 100% !important;
}

.trending-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-headline);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.trending-header svg {
    width: 16px;
    height: 13px;
    fill: var(--accent);
    flex-shrink: 0;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.trending-item {
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

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

.trending-rank-icon {
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: flex-end;
}

.trending-rank-icon svg {
    width: 12px;
    height: 10px;
    fill: var(--accent);
    opacity: 0.7;
}

.trending-item a {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--text-primary);
    line-height: 1.35;
    display: block;
}

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

/* Ad below trending */
.trending-ad {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   Article Cards (BlogTO style)
   ========================================================================== */

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.card-category {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--accent);
}

.card-category a {
    color: inherit;
}

.card-category a:hover {
    opacity: 0.75;
}

.card-time {
    font-size: 0.8rem;
    color: var(--text-meta);
}

.card-comments {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-meta);
    font-size: 0.8rem;
}

.card-comments svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.card-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--bg-page);
}

.card-image-wrap img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card-image-wrap:hover img {
    transform: scale(1.02);
}

.card-bookmark {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,0.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 2;
}

.card-bookmark svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--text-headline);
    margin-top: 8px;
}

.card-title a {
    color: inherit;
}

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

/* Standard card (used in grid) */
.post-card {
    display: flex;
    flex-direction: column;
}

.post-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Homepage Stream / Feed Grid
   ========================================================================== */

.feed-section {
    padding: 0 20px;
}

/* Alternating 3-then-4-per-row grid. Period = 7 (3+4). Uses 12 implicit columns. */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 20px;
}

/* 3-per-row: positions 1,2,3 / 8,9,10 / 15,16,17 … (each spans 4 of 12) */
.feed-grid .post-card:nth-child(7n+1),
.feed-grid .post-card:nth-child(7n+2),
.feed-grid .post-card:nth-child(7n+3) {
    grid-column: span 4;
}

/* 4-per-row: positions 4,5,6,7 / 11,12,13,14 … (each spans 3 of 12) */
.feed-grid .post-card:nth-child(7n+4),
.feed-grid .post-card:nth-child(7n+5),
.feed-grid .post-card:nth-child(7n+6),
.feed-grid .post-card:nth-child(7n) {
    grid-column: span 3;
}

.feed-grid .post-card {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    min-width: 0;
}

.feed-grid .post-card:nth-last-child(-n+4) {
    border-bottom: none;
}

/* 2-column wide row variant */
.feed-grid-wide {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.feed-grid-wide .post-card {
    padding: 20px 0;
    padding-right: 20px;
}

.feed-grid-wide .post-card:last-child {
    padding-right: 0;
}

.feed-grid-wide .card-title {
    font-size: 1.45rem;
    -webkit-line-clamp: 2;
}

.feed-grid-wide .card-image-wrap img {
    aspect-ratio: 16/9;
}

/* In-feed ad slot */
.feed-ad-slot {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

/* Load More */
.load-more-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 20px;
}

.load-more-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.load-more-btn {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent);
    color: #fff;
    padding: 10px 28px;
    border-radius: var(--radius);
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.load-more-btn:hover {
    opacity: 0.85;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* ==========================================================================
   Homepage Sections (Community Highlights, Best Of)
   ========================================================================== */

.home-section {
    padding: 48px 20px;
    border-top: 3px solid var(--border);
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.home-section-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: var(--accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.home-section-more {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}

.home-section-more:hover {
    text-decoration: underline;
}

/* Spotlight card (Community Highlights) */
.spotlight-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: center;
}

.spotlight-card-image a {
    display: block;
}

.spotlight-card-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.spotlight-card-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.spotlight-card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.7rem;
    line-height: 1.15;
}

.spotlight-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.spotlight-card-title a:hover {
    color: var(--accent);
}

.spotlight-card-excerpt {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

.spotlight-card-meta {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 700px) {
    .spotlight-card {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Single Post
   ========================================================================== */

/* Full-width post header (above two-column) */
.single-post-header {
    background: var(--bg-content);
    padding: 36px 40px 0;
}

.single-post-header-inner {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
}

.post-header-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}

.post-header-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.post-header-meta-left .card-category {
    font-size: 0.8rem;
}

.post-byline-author {
    font-size: 0.875rem;
    color: var(--text-meta);
}

.post-byline-author a {
    color: var(--text-primary);
    font-weight: 500;
}

.post-byline-author a:hover {
    color: var(--accent);
}

.post-byline-date {
    font-size: 0.875rem;
    color: var(--text-meta);
}

.post-report-link {
    font-size: 0.8rem;
    color: var(--text-meta);
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s;
}

.post-report-link:hover {
    color: var(--accent);
}

.single-post-header .post-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 3.4rem;
    line-height: 1.05;
    color: var(--text-headline);
    margin-bottom: 24px;
}

.post-featured-image {
    margin-bottom: 0;
}

.post-featured-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 680px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Static Pages (About, Contact, Privacy, Terms, Write for Us, Advertise)
   ========================================================================== */

.static-page-wrap {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
    padding: 0 20px 60px;
}

.static-page {
    max-width: 760px;
    margin: 0 auto;
}

.static-page-header {
    padding: 40px 0 32px;
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: 36px;
}

.static-page-header h1 {
    font-family: var(--font-head);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-headline);
    margin: 0 0 10px;
    line-height: 1.15;
}

.static-page-lead {
    font-size: 1.1rem;
    color: var(--text-meta);
    margin: 0;
    line-height: 1.5;
}

.static-page-updated {
    font-size: 0.82rem;
    color: var(--text-meta);
    margin: 8px 0 0;
}

.static-page-body h2 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-headline);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.static-page-body p,
.static-page-body li {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-body);
    margin-bottom: 14px;
}

.static-page-body ul {
    padding-left: 22px;
    margin-bottom: 14px;
}

.static-page-body li {
    margin-bottom: 6px;
}

.static-page-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.static-page-body a:hover {
    color: var(--accent-hover);
}

/* ========================================================================== */

.post-below-fold {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
    padding: 0 20px 48px;
}

/* Two-column content area */
.single-post-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 24px 20px 0;
}

.single-post-main {
    min-width: 0;
}

.single-post-sidebar {
    padding-top: 0;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.4em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    font-family: var(--font-head);
    font-weight: 800;
    margin: 1.6em 0 0.6em;
    line-height: 1.2;
    color: var(--text-headline);
}

.post-content h2 { font-size: 1.8rem; }
.post-content h3 { font-size: 1.4rem; }
.post-content h4 { font-size: 1.15rem; }

.post-content a {
    color: var(--accent);
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    list-style: disc;
    padding-left: 1.6em;
    margin-bottom: 1.4em;
}

.post-content ol {
    list-style: decimal;
}

.post-content li {
    margin-bottom: 0.4em;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding: 10px 20px;
    margin: 1.6em 0;
    background: var(--bg-page);
    font-style: italic;
    color: var(--text-meta);
}

.post-content img {
    width: 100%;
    height: auto;
    margin: 1em 0;
}

.post-content figcaption {
    font-size: 0.8rem;
    color: var(--text-meta);
    margin-top: 6px;
}

/* Post tags */
.post-tags {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border: 1px solid var(--border-dark);
    border-radius: 100px;
    color: var(--text-primary);
    transition: border-color 0.15s, color 0.15s;
}

.post-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Sponsored / partner content */
.sponsored-label {
    font-size: 0.75rem;
    color: var(--text-meta);
    margin-top: 20px;
}

.sponsored-label a {
    color: var(--accent);
    text-decoration: underline;
}

/* ==========================================================================
   Single Post Sidebar
   ========================================================================== */

.single-sidebar-sticky {
    position: sticky;
    top: var(--sticky-offset);
    max-height: calc(100vh - var(--sticky-offset));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Sidebar newsletter */
.sidebar-newsletter {
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 18px;
}

.sidebar-newsletter-heading {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-meta);
    margin-bottom: 8px;
}

.sidebar-newsletter-desc {
    font-size: 0.85rem;
    color: var(--text-meta);
    line-height: 1.5;
    margin-bottom: 12px;
}

.sidebar-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-newsletter-form input[type="email"] {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}

.sidebar-newsletter-form input[type="email"]:focus {
    border-color: var(--accent);
}

.sidebar-newsletter-form button {
    padding: 9px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.sidebar-newsletter-form button:hover {
    opacity: 0.85;
}

.sidebar-widget {
    margin-bottom: 0;
}

.sidebar-widget-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    color: var(--text-headline);
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 14px;
}

/* ==========================================================================
   Archive / Category pages
   ========================================================================== */

.archive-wrap {
    padding: 20px;
}

.archive-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.archive-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-headline);
}

.archive-description {
    font-size: 0.95rem;
    color: var(--text-meta);
    margin-top: 6px;
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-wrap {
    padding: 20px;
}

.search-results-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.search-results-header h1 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-headline);
}

.search-results-header .search-count {
    font-size: 0.9rem;
    color: var(--text-meta);
    margin-top: 4px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination-wrap {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: background 0.15s, border-color 0.15s;
}

.pagination .page-numbers:hover {
    background: var(--bg-page);
    border-color: var(--border-dark);
}

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

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404-wrap {
    padding: 60px 20px;
    text-align: center;
}

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

.error-404-wrap h2 {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: var(--text-headline);
}

.error-404-wrap p {
    color: var(--text-meta);
    margin-bottom: 24px;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.comments-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-headline);
}

.comment-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-author img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.comment-author-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-headline);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-meta);
}

.comment-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.comment-reply-link {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-top: 8px;
    display: inline-block;
}

.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--text-headline);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.15s;
}

.comment-form input[type="submit"]:hover {
    opacity: 0.85;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--bg-footer);
    margin-top: 0;
}

.footer-inner {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
    padding: 28px 20px 16px;
}

/* ── Main row: logo + nav + social ── */
.footer-main-row {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-logo-wrap {
    flex-shrink: 0;
}

.footer-logo-wrap img,
.footer-logo-wrap .custom-logo {
    max-height: 36px;
    width: auto;
    opacity: 0.9;
    display: block;
}

.footer-site-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    letter-spacing: -0.3px;
}

/* ── Social icons ── */
.footer-social {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: rgba(255,255,255,0.65);
    transition: color 0.15s, background 0.15s;
}

.footer-social a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.footer-social svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 28px;
    align-items: center;
}

.footer-nav li a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    transition: color 0.15s;
}

.footer-nav li a:hover {
    color: #fff;
}

.footer-newsletter-wrap {
    flex-shrink: 0;
    max-width: 340px;
}

.footer-col-heading {
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}

/* ── Newsletter column ── */
.footer-newsletter-desc {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.55;
    margin-bottom: 14px;
}

.footer-newsletter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 160px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.3);
}

.footer-newsletter-form input[type="email"]:focus {
    border-color: rgba(255,255,255,0.35);
}

.footer-newsletter-form button {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.footer-newsletter-form button:hover {
    opacity: 0.85;
}

/* ── Bottom bar ── */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

.footer-copyright a {
    color: rgba(255,255,255,0.3);
    text-decoration: underline;
}

.footer-legal {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.footer-legal li a {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
    transition: color 0.15s;
}

.footer-legal li a:hover {
    color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   Business Directory — Redesigned
   ========================================================================== */

.directory-page-wrap {
    padding: 20px;
}

.directory-search-bar {
    margin-bottom: 28px;
}

.directory-search-form {
    display: flex;
    background: var(--bg-content);
    border: 2px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 600px;
}

.directory-search-form input[type="text"] {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 1rem;
    outline: none;
}

.directory-search-form button {
    padding: 0 20px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.15s;
}

.directory-search-form button:hover {
    opacity: 0.85;
}

.directory-section-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-headline);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
}

.directory-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}

.directory-category-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-page);
}

.directory-category-card img {
    width: 100%;
    aspect-ratio: 2/1;
    object-fit: cover;
    transition: transform 0.3s;
}

.directory-category-card:hover img {
    transform: scale(1.04);
}

.directory-category-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
}

.directory-category-card-label .count {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
}

.directory-all-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.directory-cat-pill {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 14px;
    border: 1px solid var(--border-dark);
    border-radius: 100px;
    color: var(--text-primary);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.directory-cat-pill:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Directory listing cards */
.directory-listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.directory-listing-card {
    background: var(--bg-content);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.directory-listing-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.directory-listing-card-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.directory-listing-card-img-placeholder {
    width: 100%;
    height: 160px;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.directory-listing-card-body {
    padding: 14px;
}

.directory-listing-card-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-headline);
    margin-bottom: 6px;
    line-height: 1.2;
}

.directory-listing-card-name a {
    color: inherit;
}

.directory-listing-card-name a:hover {
    color: var(--accent);
}

.directory-listing-card-desc {
    font-size: 0.85rem;
    color: var(--text-meta);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.directory-listing-card-actions {
    display: flex;
    gap: 8px;
}

.dir-btn {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 7px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    color: var(--accent);
    transition: background 0.15s, color 0.15s;
}

.dir-btn:hover,
.dir-btn.dir-btn-primary {
    background: var(--accent);
    color: #fff;
}

.dir-btn.dir-btn-primary:hover {
    opacity: 0.85;
}

/* Single directory listing */
.single-directory-wrap {
    padding: 20px;
}

.single-directory-hero {
    margin-bottom: 24px;
}

.single-directory-hero img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
}

.single-directory-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.single-directory-main h1 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.15;
    color: var(--text-headline);
    margin-bottom: 12px;
}

.single-directory-category {
    margin-bottom: 16px;
}

.single-directory-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.single-directory-content p {
    margin-bottom: 1.2em;
}

.single-directory-contact-card {
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 80px;
}

.contact-card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-headline);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.contact-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    stroke: var(--accent);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-item a {
    color: var(--accent);
    word-break: break-all;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Directory search results */
.directory-search-results-wrap {
    padding: 20px;
}

.directory-search-results-header {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.directory-search-results-header h1 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-headline);
}

.directory-search-results-header .result-count {
    font-size: 0.9rem;
    color: var(--text-meta);
    margin-top: 4px;
}

/* Forms (submission) */
.times-form-wrap {
    padding: 20px;
    max-width: 680px;
}

.times-form-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--text-headline);
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--accent);
}

.times-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-headline);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--accent);
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--bg-content);
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-group .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group .form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-error {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 4px;
}

.form-error-banner {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #c0392b;
    font-size: 0.9rem;
}

.form-error-banner ul {
    list-style: disc;
    padding-left: 1.2em;
    margin-top: 6px;
}

.form-submit-btn {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent);
    color: #fff;
    padding: 13px 32px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: opacity 0.15s;
    border: none;
    width: 100%;
}

.form-submit-btn:hover {
    opacity: 0.85;
}

/* Thank you pages */
.thank-you-wrap {
    padding: 60px 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.thank-you-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.thank-you-wrap h1 {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-headline);
    margin-bottom: 12px;
}

.thank-you-wrap p {
    color: var(--text-meta);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ==========================================================================
   Events — Redesigned
   ========================================================================== */

.events-page-wrap {
    padding: 20px;
}

.events-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--accent);
}

.events-page-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-headline);
}

.events-submit-link {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 8px 18px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    transition: opacity 0.15s;
}

.events-submit-link:hover {
    opacity: 0.85;
    color: #fff;
}

.events-date-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    background: var(--bg-page);
    padding: 12px 16px;
    border-radius: var(--radius);
}

.events-selected-date {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-headline);
    flex: 1;
}

.events-nav-btn {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 7px 14px;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    color: var(--text-primary);
    background: var(--bg-content);
    transition: background 0.15s, border-color 0.15s;
}

.events-nav-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.events-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: start;
}

.events-main-col {
    min-width: 0;
}

.events-sidebar-col {
    position: sticky;
    top: 80px;
}

.events-section-heading {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.events-section-heading:first-child {
    margin-top: 0;
}

.event-card {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.event-card-img {
    flex-shrink: 0;
    width: 130px;
}

.event-card-img img {
    width: 130px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius);
}

.event-card-img-placeholder {
    width: 130px;
    height: 90px;
    background: var(--bg-page);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.75rem;
}

.event-card-body {
    flex: 1;
    min-width: 0;
}

.event-card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-headline);
    line-height: 1.2;
    margin-bottom: 6px;
}

.event-card-title a {
    color: inherit;
}

.event-card-title a:hover {
    color: var(--accent);
}

.event-card-meta {
    font-size: 0.82rem;
    color: var(--text-meta);
    margin-bottom: 4px;
}

.event-card-venue {
    font-size: 0.82rem;
    color: var(--text-meta);
}

.event-card-time {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.events-no-events {
    padding: 40px 0;
    text-align: center;
    color: var(--text-meta);
    font-size: 1rem;
}

/* Events calendar widget */
.events-calendar {
    background: var(--bg-content);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
}

.events-calendar-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-headline);
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.calendar-nav button {
    padding: 4px 10px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    background: var(--bg-content);
}

.calendar-nav button:hover {
    background: var(--bg-page);
}

.calendar-month-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-headline);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-name {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-meta);
    padding: 4px 0;
    text-transform: uppercase;
}

.calendar-day {
    text-align: center;
    font-size: 0.8rem;
    padding: 5px 2px;
    border-radius: var(--radius);
    cursor: default;
    color: var(--text-meta);
}

.calendar-day.has-events {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 600;
}

.calendar-day.has-events:hover {
    background: var(--bg-page);
}

.calendar-day.is-selected {
    background: var(--accent);
    color: #fff;
}

.calendar-day.is-today {
    border: 1px solid var(--accent);
    color: var(--accent);
}

.calendar-day.is-today.is-selected {
    color: #fff;
}

/* Single event */
.single-event-wrap {
    padding: 20px;
}

.single-event-category {
    margin-bottom: 10px;
}

.single-event-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text-headline);
    margin-bottom: 20px;
}

/* Two-column layout: main content + info sidebar */
.single-event-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

.single-event-sidebar {
    position: sticky;
    top: 80px;
}

.single-event-hero {
    margin-bottom: 24px;
}

.single-event-hero img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: var(--radius);
}

.single-event-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary);
}

.single-event-content p {
    margin-bottom: 1.3em;
}

/* Sidebar info blocks */
.single-event-meta-block {
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.single-event-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.single-event-meta-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    font-weight: 600;
}

.single-event-meta-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.single-event-meta-value a {
    color: var(--accent);
    text-decoration: underline;
}

.single-event-venue,
.single-event-address,
.single-event-links {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.single-event-venue-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-headline);
    margin-top: 4px;
}

.single-event-address a {
    color: var(--accent);
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 4px;
    display: block;
}

.single-event-address a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Widgets (WP default overrides)
   ========================================================================== */

.widget {
    margin-bottom: 24px;
}

.widget-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-headline);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

/* ==========================================================================
   Utility
   ========================================================================== */

.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;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 9999;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.2s;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.back-to-top:hover {
    opacity: 0.85;
}

/* Alignment classes (Gutenberg / classic) */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin: 0 auto; display: block; }
.alignwide { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: 100vw; }

/* ==========================================================================
   Primary Nav Bar (desktop category/section nav)
   ========================================================================== */

.primary-nav {
    display: none;
    background: var(--bg-content);
    border-bottom: 1px solid var(--border);
}

@media (min-width: 1025px) {
    .primary-nav {
        display: block;
    }
}

.primary-nav-inner {
    max-width: calc(var(--content-width) + (var(--rail-width) * 2));
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.primary-nav .primary-menu {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.primary-nav .primary-menu li {
    flex-shrink: 0;
}

.primary-nav .primary-menu li a {
    display: block;
    padding: 12px 16px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.primary-nav .primary-menu li a:hover,
.primary-nav .primary-menu li.current-menu-item > a,
.primary-nav .primary-menu li.current-menu-ancestor > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Desktop dropdown submenus */
.primary-nav .primary-menu li.menu-item-has-children {
    position: relative;
}
.primary-nav .primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-content);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    min-width: 200px;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.primary-nav .primary-menu li.menu-item-has-children:hover > .sub-menu {
    display: block;
}
.primary-nav .primary-menu .sub-menu li {
    display: block;
}
.primary-nav .primary-menu .sub-menu li a {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    white-space: nowrap;
    border-bottom-width: 0;
}
.primary-nav .primary-menu .sub-menu li + li a {
    border-top: 1px solid var(--border);
}

/* Mobile nav accordion submenus */
.nav-overlay .menu li.menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.nav-overlay .menu li.menu-item-has-children > a {
    flex: 1;
}
.nav-overlay .menu .sub-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 8px;
    color: var(--text-primary);
    font-size: 1.4rem;
    line-height: 1;
    font-family: var(--font-body);
}
.nav-overlay .menu .sub-menu {
    display: none;
    width: 100%;
    padding-left: 16px;
}
.nav-overlay .menu li.is-open > .sub-menu {
    display: block;
}
.nav-overlay .menu .sub-menu li a {
    font-size: 1rem;
    padding: 10px 0;
}

/* ==========================================================================
   Social Sharing Bar
   ========================================================================== */

.post-share {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin-bottom: 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.post-share-label {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-meta);
    margin-right: 4px;
    flex-shrink: 0;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    cursor: pointer;
}

.post-share-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.post-share-btn svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.post-share-copy.copied {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

/* ── Trending Carousel ───────────────────────────────────────────────────── */
.trending-carousel-section {
    padding: 28px 0 0;
    border-top: 2px solid var(--border-dark);
    margin-top: 8px;
    margin-bottom: 40px;
}

.trending-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.trending-carousel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-headline);
}

.trending-carousel-title svg {
    width: 16px;
    height: 12px;
    fill: var(--accent);
    flex-shrink: 0;
}

.trending-carousel-nav {
    display: flex;
    gap: 6px;
}

.tcar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1.5px solid var(--border-dark);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    padding: 0;
}

.tcar-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tcar-btn svg {
    width: 16px;
    height: 16px;
}

.trending-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.trending-carousel-track::-webkit-scrollbar {
    display: none;
}

.trending-carousel-track .post-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    border-top: none;
    padding-top: 0;
}

/* ── Related Posts ───────────────────────────────────────────────────────── */
.related-posts {
    padding: 28px 0 0;
    border-top: 2px solid var(--border-dark);
    margin-top: 8px;
}

.related-posts-heading {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-headline);
    margin-bottom: 20px;
}

.related-posts-heading span {
    color: var(--accent);
}

.feed-grid-4col {
    grid-template-columns: repeat(4, 1fr);
}

.feed-grid-4col .post-card:nth-child(3n) {
    padding-right: 0;
}

.feed-grid-4col .post-card:nth-last-child(-n+3) {
    border-bottom: 1px solid var(--border);
}

.feed-grid-4col .post-card:nth-child(4n) {
    padding-right: 0;
}

.feed-grid-4col .post-card:nth-last-child(-n+4) {
    border-bottom: none;
}

.feed-grid-related {
    border-top: none;
}

.feed-grid-related .post-card {
    padding-top: 0;
}

/* Alternating 4-then-3-per-row grid for related posts (4 rows = 13 posts + 1 ad) */
/* Row 1 (1-4): span 3 | Row 2 (5-7): span 4 | Row 3 (8-11): span 3 | Row 4 (12-14): span 4 */
.feed-grid.feed-grid-alt .post-card {
    grid-column: span 3;
}

.feed-grid.feed-grid-alt .post-card:nth-child(n+5):nth-child(-n+7),
.feed-grid.feed-grid-alt .post-card:nth-child(n+12):nth-child(-n+14) {
    grid-column: span 4;
}

/* Restore border on 4th-from-last item (overrides base feed-grid rule) */
.feed-grid.feed-grid-alt .post-card:nth-last-child(4) {
    border-bottom: 1px solid var(--border);
}

/* Remove border on last row (items 12-14) */
.feed-grid.feed-grid-alt .post-card:nth-last-child(-n+3) {
    border-bottom: none;
}

.trending-grid-section {
    padding: 28px 0 0;
    border-top: 2px solid var(--border-dark);
    margin-top: 8px;
    margin-bottom: 40px;
}

.below-fold-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-headline);
    margin-bottom: 20px;
}

.below-fold-heading svg {
    width: 16px;
    height: 12px;
    fill: var(--accent);
    flex-shrink: 0;
}

/* ==========================================================================
   Author Archive Page
   ========================================================================== */

.author-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 20px 24px;
    border-bottom: 1px solid var(--border);
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-headline);
    margin-bottom: 8px;
    line-height: 1.1;
}

.author-bio {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 8px;
    max-width: 600px;
}

.author-post-count {
    font-size: 0.8rem;
    color: var(--text-meta);
    font-family: var(--font-head);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ==========================================================================
   Responsive — Tablet (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .site-rail-left,
    .site-rail-right {
        display: none;
    }

    .primary-nav {
        display: none;
    }

    .home-hero-wrap {
        grid-template-columns: 1fr 260px;
        gap: 20px;
    }

    .card-hero .card-title {
        font-size: 1.8rem;
    }

    .directory-category-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .directory-listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .single-post-wrap {
        grid-template-columns: 1fr 260px;
        gap: 28px;
    }

    .events-layout {
        grid-template-columns: 1fr 240px;
    }

    .single-directory-layout {
        grid-template-columns: 1fr 260px;
    }

    .single-event-layout {
        grid-template-columns: 1fr 220px;
    }
}

/* ==========================================================================
   Responsive — Mobile (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .primary-nav {
        display: none;
    }

    .home-hero-wrap {
        grid-template-columns: 1fr;
    }

    .trending-sidebar {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 16px;
    }

    .card-hero .card-title {
        font-size: 1.6rem;
    }

    .feed-grid {
        grid-template-columns: 1fr;
    }

    /* Reset alternating column spans on mobile */
    .feed-grid .post-card {
        grid-column: span 1;
        padding-right: 0;
        padding-bottom: 16px;
    }

    .feed-grid.feed-grid-alt .post-card {
        grid-column: span 1;
    }

    .feed-grid .post-card:nth-last-child(-n+4) {
        border-bottom: 1px solid var(--border);
    }

    .feed-grid .post-card:last-child {
        border-bottom: none;
    }

    .feed-grid-wide {
        grid-template-columns: 1fr;
    }

    .feed-grid-wide .post-card {
        padding-right: 0;
    }

    .single-post-wrap {
        grid-template-columns: 1fr;
    }

    .single-post-sidebar {
        display: none;
    }

    .single-post-header .post-title {
        font-size: 1.8rem;
    }

    .post-header-meta-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .directory-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .directory-listings-grid {
        grid-template-columns: 1fr;
    }

    .single-directory-layout {
        grid-template-columns: 1fr;
    }

    .single-directory-contact-card {
        position: static;
    }

    .events-layout {
        grid-template-columns: 1fr;
    }

    .events-sidebar-col {
        display: none;
    }

    .single-event-layout {
        grid-template-columns: 1fr;
    }

    .single-event-sidebar {
        position: static;
    }

    .single-event-title {
        font-size: 1.6rem;
    }

    .footer-main-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .footer-social {
        margin-left: 0;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   Responsive — Small Mobile (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {
    .primary-nav {
        display: none;
    }

    .footer-nav {
        gap: 8px 20px;
    }

    .header-inner {
        padding: 0 14px;
    }

    .site-logo img {
        height: 72px;
        max-height: 72px;
    }

    .feed-section,
    .home-hero-wrap,
    .archive-wrap,
    .search-wrap,
    .directory-page-wrap,
    .directory-search-results-wrap,
    .single-directory-wrap,
    .events-page-wrap,
    .single-event-wrap,
    .single-post-wrap,
    .times-form-wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

    .card-hero .card-title {
        font-size: 1.35rem;
    }

    .directory-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .archive-title {
        font-size: 1.5rem;
    }

    .events-page-title {
        font-size: 1.5rem;
    }

    .events-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .ad-leaderboard-wrap,
    .site-rail-left,
    .site-rail-right,
    .back-to-top {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    a {
        text-decoration: underline;
    }
}

/* ─── Ad Tiles & Placement Slots ────────────────────────────────────────────── */

/* Section tile ad — 7th item in .feed-grid, occupies last slot of row of 4 */
.post-card.post-card-ad {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.post-card.post-card-ad ins,
.post-card.post-card-ad iframe,
.post-card.post-card-ad > div {
    max-width: 100%;
    max-height: 100%;
}

/* Between-section ad break */
.home-section-ad-break {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-content);
    border-top: 1px solid var(--border);
}

/* Mobile ad visibility controls */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* ─── Weather Page ───────────────────────────────────────────────────────────── */

.weather-page {
    padding: 24px 20px 40px;
}

/* City search */
.weather-search-wrap {
    margin-bottom: 20px;
}

.weather-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.weather-search-input {
    flex: 1;
    min-width: 200px;
    max-width: 420px;
    height: 42px;
    padding: 0 14px;
    border: 2px solid var(--border-dark);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .95rem;
    background: var(--bg-content);
    color: var(--text-primary);
    transition: border-color .15s;
}

.weather-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.weather-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.weather-search-btn:hover { background: var(--accent-hover); }

.weather-search-clear {
    font-size: .85rem;
    color: var(--text-meta);
    text-decoration: none;
    padding: 4px 8px;
}

.weather-search-clear:hover { color: var(--text-primary); }

.weather-search-error {
    margin-top: 8px;
    color: #dc2626;
    font-size: .88rem;
}

/* Section wrapper for consistent spacing */
.weather-section {
    margin-bottom: 32px;
}

/* Current conditions */
.weather-current {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.weather-current-inner {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.weather-current-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 140px;
}

.weather-current-temp {
    font-family: var(--font-head);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.weather-current-label {
    font-size: 1rem;
    opacity: .85;
}

.weather-current-city {
    font-size: .85rem;
    opacity: .7;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.weather-current-right {
    flex: 1;
}

.weather-current-hl {
    display: flex;
    gap: 16px;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.weather-high { color: #fde68a; }
.weather-low  { opacity: .75; }

.weather-details-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.weather-details-list li {
    display: flex;
    justify-content: space-between;
    font-size: .9rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    padding-bottom: 6px;
}

.weather-detail-label { opacity: .75; }
.weather-detail-value { font-weight: 600; }

.weather-updated {
    margin-top: 14px;
    font-size: .78rem;
    opacity: .55;
}

/* Section titles */
.weather-section-title {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Hourly forecast */
.weather-hourly {
    margin-bottom: 30px;
}

.weather-hourly-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Desktop: 12 equal columns fill the full width */
.weather-hourly-track {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 6px;
    padding-bottom: 8px;
}

.weather-hour-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 14px 8px;
    font-size: .85rem;
}

.weather-hour-time   { color: var(--text-meta); font-size: .8rem; }
.weather-hour-temp   { font-weight: 600; font-size: .9rem; }
.weather-hour-precip { color: #3B82F6; font-size: .78rem; }

/* Mobile: show ~6 boxes, scroll for the rest */
@media (max-width: 700px) {
    .weather-hourly-track {
        grid-template-columns: repeat(12, calc((100vw - 52px) / 6));
    }
}

/* 10-day list */
.weather-tenday {
    margin-bottom: 30px;
}

.weather-tenday-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.weather-day-row {
    display: grid;
    grid-template-columns: 120px 36px 1fr auto 160px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.weather-day-row:last-child { border-bottom: none; }

.weather-day-name  { font-weight: 600; font-size: .95rem; }
.weather-day-label { color: var(--text-meta); font-size: .88rem; }
.weather-day-precip { color: #3B82F6; font-size: .85rem; text-align: right; }

.weather-day-temps {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    font-size: .92rem;
    font-weight: 600;
}

/* Weather icon colors */
.weather-icon { display: block; flex-shrink: 0; }

/* Weather posts section */
.weather-posts { margin-top: 10px; }

/* ── Detail Widgets ── */
.weather-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.wx-widget {
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 110px;
}

.wx-widget-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.wx-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: .55;
}

.wx-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-meta);
}

.wx-value {
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-primary);
}

.wx-moon-emoji {
    font-size: 2.2rem;
}

.wx-unit {
    font-size: 1rem;
    font-weight: 400;
    opacity: .7;
}

.wx-sub {
    font-size: .78rem;
    color: var(--text-meta);
    line-height: 1.3;
    margin-top: 2px;
}

/* UV bar */
.wx-uv-bar {
    height: 5px;
    background: linear-gradient(to right, #3CB371 0%, #FFD700 30%, #FF8C00 60%, #DC143C 85%, #9B30FF 100%);
    border-radius: 3px;
    position: relative;
    margin-top: auto;
    overflow: hidden;
}
.wx-uv-fill {
    position: absolute;
    inset: 0 0 0 0;
    background: transparent;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.15);
}

/* Generic bar (humidity etc.) */
.wx-bar {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    margin-top: auto;
    overflow: hidden;
}
.wx-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .weather-widgets { grid-template-columns: repeat(2, 1fr); }
}

/* ── Air Quality card on weather page ── */
.weather-aq-card {
    background: var(--bg-page);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    position: relative;
}

.weather-aq-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

.weather-aq-number {
    font-family: var(--font-head);
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.weather-aq-scale {
    font-size: .72rem;
    color: var(--text-meta);
    margin-top: 2px;
}

.weather-aq-right {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.weather-aq-advice {
    font-size: .88rem;
    color: var(--text-secondary);
    margin: 0;
}

.weather-aq-bar {
    margin-top: 4px;
}
.weather-aq-bar .aq-bar-marker {
    background: #333;
}

.weather-aq-link {
    display: block;
    width: 100%;
    text-align: right;
    font-size: .85rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
}
.weather-aq-link:hover { text-decoration: underline; }

/* ── SEO editorial section ── */
.weather-editorial p,
.weather-editorial ul {
    font-size: .92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.weather-editorial-list {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.weather-faq-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.weather-faq-item:last-child { border-bottom: none; }

.weather-faq-item h3 {
    font-size: .95rem;
    font-weight: 600;
    margin: 0 0 6px;
}

.weather-faq-item p {
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .weather-current-inner {
        flex-direction: column;
        gap: 20px;
    }

    .weather-current-left { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
    .weather-current-temp { font-size: 2.8rem; }

    .weather-details-list { grid-template-columns: 1fr; }

    .weather-day-row {
        grid-template-columns: 90px 32px 1fr 100px;
    }

    .weather-day-label { display: none; }
}

@media (max-width: 480px) {
    .weather-day-row {
        grid-template-columns: 80px 28px 1fr;
    }
    .weather-day-precip { display: none; }
    .weather-day-temps { font-size: .82rem; gap: 8px; }
}

/* ==========================================================================
   Air Quality Page
   ========================================================================== */

.aq-page {
    padding: 24px 20px 40px;
}

/* Hero */
.aq-hero {
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    color: #fff;
}
.aq-hero.aqhi-low      { background: #3CB371; }
.aq-hero.aqhi-moderate { background: #D4A000; }
.aq-hero.aqhi-high     { background: #FF8C00; }
.aq-hero.aqhi-veryhigh { background: #DC143C; }

.aq-hero-inner {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.aq-hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
}

.aq-hero-number {
    font-family: var(--font-head);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.aq-hero-scale {
    font-size: .9rem;
    opacity: .75;
    margin-top: 2px;
}

.aq-hero-right {
    flex: 1;
}

.aq-hero-city {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.aq-hero-label {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: .9;
}

.aq-hero-advice {
    font-size: .9rem;
    opacity: .85;
    margin-bottom: 16px;
}

/* AQHI scale bar */
.aq-bar {
    position: relative;
    height: 20px;
    border-radius: 10px;
    overflow: visible;
    display: flex;
    margin-top: 8px;
}

.aq-bar-seg {
    height: 100%;
    flex: 1;
}
.aq-bar-seg:first-child { border-radius: 10px 0 0 10px; }
.aq-bar-seg:nth-child(3) { flex: 1.2; }
.aq-bar-seg:last-child  { border-radius: 0 10px 10px 0; flex: .6; }

.aq-bar-low      { background: #3CB371; }
.aq-bar-moderate { background: #FFD700; }
.aq-bar-high     { background: #FF8C00; }
.aq-bar-veryhigh { background: #DC143C; }

.aq-bar-marker {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 28px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 0 4px rgba(0,0,0,.4);
    transform: translateX(-50%);
}

.aq-hero .aq-bar-marker { background: #fff; }

.aq-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    opacity: .75;
    margin-top: 4px;
}

/* Section */
.aq-section {
    margin-bottom: 32px;
}

.aq-section-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 16px;
}

/* Station list */
.aq-stations {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aq-station {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.aq-station:last-child { border-bottom: none; }

.aq-station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.aq-station-name {
    font-weight: 600;
    font-size: .95rem;
}

.aq-station-time {
    font-size: .8rem;
    color: var(--text-meta);
    margin-bottom: 8px;
}

/* AQHI badge */
.aq-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.aqhi-low      { background: #3CB371; }
.aqhi-moderate { background: #D4A000; color: #fff; }
.aqhi-high     { background: #FF8C00; }
.aqhi-veryhigh { background: #DC143C; }

/* Legend */
.aq-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aq-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
}

/* Tips */
.aq-tips {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: .92rem;
    color: var(--text-secondary);
}

/* FAQ */
.aq-faq-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.aq-faq-item:last-child { border-bottom: none; }

.aq-faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px;
}

.aq-faq-item p {
    font-size: .9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Station bar (non-hero) */
.aq-station .aq-bar {
    margin-top: 4px;
}
.aq-station .aq-bar-marker {
    background: #333;
}

/* Responsive */
@media (max-width: 600px) {
    .aq-hero-inner {
        flex-direction: column;
        gap: 16px;
    }
    .aq-hero-left {
        flex-direction: row;
        gap: 8px;
        align-items: baseline;
        min-width: auto;
    }
    .aq-hero-number { font-size: 3rem; }
}

/* ─── Mobile Homepage Overrides ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    /* Hide trending sidebar — mobile shows hero post only */
    .trending-sidebar {
        display: none !important;
    }

    /* Hide category and time meta on all cards — image + title only */
    .card-category,
    .card-time {
        display: none;
    }

    /* Padding so sticky bottom ad doesn't overlap last post */
    body.home {
        padding-bottom: 64px;
    }
}

/* ─── Mobile Sticky Bottom Banner ───────────────────────────────────────────── */

.mobile-sticky-bottom-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #fff;
    text-align: center;
    padding: 4px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .12);
    min-height: 52px;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .mobile-sticky-bottom-ad {
        display: flex;
    }
}
