/*
Theme Name: Discover FLX
Theme URI: https://discoverflx.com
Author: FLX Local Media
Author URI: https://flxlocalmedia.com
Description: A visitor-focused Finger Lakes discovery and tourism theme featuring FLX Finest community-voted recommendations, business directory, guides, events, and itineraries.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor-flavor
Tags: custom-post-types, tourism, directory, finger-lakes

Discover FLX — Here's what the locals actually love.
*/

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

:root {
    /* Colors — editorial palette */
    --color-primary: #1a4f6e;
    --color-primary-dark: #0d3348;
    --color-primary-light: #e8f1f7;
    --color-accent: #c08f3a;
    --color-accent-dark: #9e7430;
    --color-accent-light: #faf4e8;
    --color-text: #1a1a1a;
    --color-text-secondary: #3d3d3d;
    --color-text-light: #636363;
    --color-text-muted: #8f8f8f;
    --color-bg: #ffffff;
    --color-bg-warm: #faf9f6;
    --color-bg-alt: #f3f2ee;
    --color-border: #dddbd5;
    --color-border-light: #eeece6;
    --color-success: #2d7a4e;
    --color-hero-start: #0d3348;
    --color-hero-end: #1a4f6e;

    /* Typography */
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-accent: 'Source Sans 3', -apple-system, sans-serif;

    /* Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.25rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 5rem;
    --space-5xl: 7rem;

    /* Layout */
    --content-width: 1180px;
    --content-narrow: 720px;
    --sidebar-width: 300px;
    --border-radius: 6px;
    --border-radius-sm: 4px;
    --border-radius-lg: 8px;

    /* Shadows — subtle and editorial */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-top: 0;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.015em;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
    margin-top: 0;
}

::selection {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--narrow {
    max-width: var(--content-narrow);
}

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

.site-header {
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.92);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.site-title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.025em;
}

.site-title a {
    color: var(--color-text);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--color-primary);
}

.site-tagline {
    display: none;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.main-navigation a,
.main-navigation li > a {
    color: var(--color-text-secondary);
    font-family: var(--font-accent);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: var(--space-sm) 14px;
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast);
    letter-spacing: 0.005em;
}

.main-navigation a:hover,
.main-navigation li > a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-lg);
    color: var(--color-text);
    transition: all var(--transition-fast);
    line-height: 1;
}

.menu-toggle:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-muted);
}

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

.site-footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-4xl) 0 var(--space-2xl);
    margin-top: var(--space-5xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer-section h3 {
    color: rgba(255, 255, 255, 0.9);
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-lg);
}

.footer-section p {
    line-height: 1.6;
    font-size: var(--text-sm);
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: var(--space-xl);
    font-size: var(--text-xs);
    text-align: center;
    color: rgba(255, 255, 255, 0.35);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs {
    margin-bottom: var(--space-lg);
}

.breadcrumbs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    font-family: var(--font-accent);
    font-size: var(--text-sm);
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
}

.breadcrumbs__item + .breadcrumbs__item::before {
    content: '/';
    margin: 0 var(--space-sm);
    color: var(--color-text-muted);
}

.breadcrumbs__item a {
    color: var(--color-text-light);
    transition: color var(--transition-fast);
}

.breadcrumbs__item a:hover {
    color: var(--color-primary);
}

.breadcrumbs__item--current {
    color: var(--color-text-muted);
}

/* Breadcrumbs on hero headers */
.page-header--hero .breadcrumbs__item a {
    color: rgba(255, 255, 255, 0.6);
}

.page-header--hero .breadcrumbs__item a:hover {
    color: #fff;
}

.page-header--hero .breadcrumbs__item + .breadcrumbs__item::before {
    color: rgba(255, 255, 255, 0.35);
}

.page-header--hero .breadcrumbs__item--current {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Cards — editorial style
   ========================================================================== */

.card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card__image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--color-bg-alt);
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card__image img {
    transform: scale(1.03);
}

.card__body {
    padding: var(--space-lg);
}

.card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
    line-height: 1.25;
}

.card__title a {
    color: var(--color-text);
    transition: color var(--transition-fast);
}

.card__title a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.card__meta {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

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

.card-grid--compact {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* Featured first card — spans two columns, horizontal layout */
.card-grid--featured .card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    box-shadow: none;
    border-radius: 0;
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-md);
}

.card-grid--featured .card:first-child .card__image {
    aspect-ratio: 4 / 3;
    border-radius: var(--border-radius);
}

.card-grid--featured .card:first-child .card__body {
    padding: var(--space-md) var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-grid--featured .card:first-child .card__title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
}

.card-grid--featured .card:first-child .card__excerpt {
    font-size: var(--text-base);
    -webkit-line-clamp: 4;
    color: var(--color-text-secondary);
}

.card-grid--featured .card:first-child:hover {
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-family: var(--font-accent);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: opacity var(--transition-fast);
    margin-right: var(--space-xs);
    margin-bottom: var(--space-xs);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge:hover {
    text-decoration: none;
    opacity: 0.85;
}

.badge--category {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.badge--region {
    background: #edf4e7;
    color: #3a6e22;
}

.badge--flx-finest,
.badge--flx-finest--gold,
a.badge--flx-finest,
a.badge--flx-finest--gold,
.entry-content a.badge--flx-finest,
.entry-content a.badge--flx-finest--gold {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(192, 143, 58, 0.3);
    text-decoration: none;
}

.badge--flx-finest--gold:hover,
a.badge--flx-finest--gold:hover,
.entry-content a.badge--flx-finest--gold:hover {
    background: linear-gradient(135deg, var(--color-accent-dark) 0%, #865f22 100%);
    color: #fff;
    opacity: 1;
    text-decoration: none;
}

.badge--flx-finest--silver,
a.badge--flx-finest--silver,
.entry-content a.badge--flx-finest--silver {
    background: linear-gradient(135deg, #8a8a8a 0%, #6e6e6e 100%);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(140, 140, 140, 0.3);
    text-decoration: none;
}

.badge--flx-finest--silver:hover,
a.badge--flx-finest--silver:hover,
.entry-content a.badge--flx-finest--silver:hover {
    background: linear-gradient(135deg, #6e6e6e 0%, #5a5a5a 100%);
    color: #fff;
    opacity: 1;
    text-decoration: none;
}

.badge--guide-type {
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}

.badge--status {
    font-weight: 700;
}

.badge--status-closed {
    background: #fde8e8;
    color: #991b1b;
}

.badge--status-likely_closed {
    background: #fef3cd;
    color: #856404;
}

.badge--status-unverified {
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
}

/* Closed business card — desaturated */
.card--closed {
    opacity: 0.7;
}

.card--closed .card__image img {
    filter: grayscale(50%);
}

/* ==========================================================================
   Place Card — [dflx_place] inline editorial card
   ========================================================================== */

.dflx-place {
    margin: var(--space-xl) 0;
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    background: var(--color-bg);
}

/* Header: name + metadata on one dense line */
.dflx-place__header {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-warm);
}

.dflx-place__name {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    display: inline;
}

.dflx-place__name a {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.dflx-place__name a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Metadata line: city · category · price */
.dflx-place__meta {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-top: 2px;
}

/* Editorial content */
.dflx-place__content {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
    line-height: 1.7;
    color: var(--color-text-secondary, var(--color-text));
}

.dflx-place__content p:last-child {
    margin-bottom: 0;
}

/* Footer: compact contact links + address */
.dflx-place__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm) var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    font-family: var(--font-accent);
    font-size: var(--text-xs);
}

.dflx-place__link {
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.dflx-place__link:hover {
    color: var(--color-accent);
}

.dflx-place__address {
    color: var(--color-text-muted);
}

.dflx-place__link--listing {
    margin-left: auto;
}

/* --- Closed state: collapsible details --- */
.dflx-place--closed {
    border-left-color: var(--color-text-muted);
    opacity: 0.6;
    margin: var(--space-md) 0;
}

.dflx-place__closed-summary {
    padding: var(--space-sm) var(--space-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    list-style: none;
}

.dflx-place__closed-summary::-webkit-details-marker {
    display: none;
}

.dflx-place__closed-summary::before {
    content: '\25B6';
    font-size: 0.6em;
    color: var(--color-text-muted);
    transition: transform 0.15s ease;
}

.dflx-place--closed[open] .dflx-place__closed-summary::before {
    transform: rotate(90deg);
}

.dflx-place--closed .dflx-place__name {
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: line-through;
    color: var(--color-text-muted);
}

.dflx-place--closed .dflx-place__location {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.dflx-place__meta-sep {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.dflx-place--closed .dflx-place__content {
    padding: var(--space-sm) var(--space-lg) var(--space-md);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --- Error state (editor only) --- */
.dflx-place--error {
    margin: var(--space-md) 0;
    padding: var(--space-md) var(--space-lg);
    border: 2px dashed #991b1b;
    border-radius: var(--border-radius);
    background: #fde8e8;
    color: #991b1b;
    font-size: var(--text-sm);
}

.dflx-place--error p {
    margin: 0;
}

@media (max-width: 768px) {
    .dflx-place__header,
    .dflx-place__content {
        padding: var(--space-sm) var(--space-md);
    }

    .dflx-place__footer {
        padding: var(--space-sm) var(--space-md);
    }

    .dflx-place__link--listing {
        margin-left: 0;
    }
}

/* ==========================================================================
   Business Details
   ========================================================================== */

.business-details {
    background: var(--color-bg-warm);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.business-details dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-sm) var(--space-xl);
    margin: 0;
    align-items: baseline;
}

.business-details dt {
    font-family: var(--font-accent);
    font-weight: 600;
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.business-details dd {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.business-details dd a {
    color: var(--color-primary);
}

/* ==========================================================================
   Page Headers
   ========================================================================== */

.page-header {
    padding: var(--space-4xl) 0 var(--space-3xl);
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
    max-width: 800px;
}

.page-header--hero {
    background: linear-gradient(165deg, var(--color-hero-start) 0%, var(--color-hero-end) 55%, #2a6b8f 100%);
    color: #fff;
    padding: var(--space-5xl) 0 var(--space-4xl);
    position: relative;
    overflow: hidden;
}

.page-header--hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.page-header--hero h1 {
    color: #fff;
    font-size: var(--text-5xl);
}

.page-header__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-light);
    margin-top: var(--space-sm);
    max-width: 600px;
    line-height: 1.6;
}

.page-header--hero .page-header__subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-xl);
}

.page-header__updated {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

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

.search-form {
    display: flex;
    gap: 0;
    max-width: 520px;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--color-border);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: var(--text-base);
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color var(--transition-fast);
    outline: none;
}

.search-form input[type="search"]:focus {
    border-color: var(--color-primary);
}

.search-form button {
    padding: 12px 24px;
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font-accent);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-form button:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Search — No Results */
.search-no-results {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
    max-width: 600px;
    margin: 0 auto;
}

.search-no-results h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-md);
}

.search-no-results p {
    color: var(--color-text-light);
    margin-bottom: var(--space-xl);
}

.search-no-results .search-form {
    margin: 0 auto var(--space-2xl);
}

.search-no-results__links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.search-no-results__links a {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.search-no-results__links a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    margin-bottom: var(--space-xl);
}

.filter-bar form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.filter-bar select {
    padding: 9px 32px 9px 16px;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-family: var(--font-body);
    color: var(--color-text-secondary);
    background: var(--color-bg);
    cursor: pointer;
    transition: border-color var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-bar select:hover {
    border-color: var(--color-primary);
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Filter button */
.btn--filter {
    padding: 9px 20px;
    border: 1px solid var(--color-primary);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-family: var(--font-accent);
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
}

.btn--filter:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* ==========================================================================
   Content — Editorial Typography
   ========================================================================== */

.entry-content {
    max-width: var(--content-narrow);
    font-size: var(--text-lg);
    line-height: 1.78;
    color: var(--color-text-secondary);
}

.entry-content p {
    margin-bottom: var(--space-xl);
}

.entry-content > p:first-of-type {
    font-size: var(--text-xl);
    line-height: 1.65;
    color: var(--color-text);
}

.entry-content > p:first-of-type::first-letter {
    font-family: var(--font-heading);
    float: left;
    font-size: 3.5em;
    line-height: 0.85;
    padding-right: 0.08em;
    padding-top: 0.05em;
    font-weight: 700;
    color: var(--color-primary);
}

.entry-content h2 {
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-lg);
    color: var(--color-text);
    font-size: var(--text-2xl);
}

.entry-content h3 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    color: var(--color-text);
    font-size: var(--text-xl);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--space-xl);
    padding-left: var(--space-xl);
}

.entry-content li {
    margin-bottom: var(--space-sm);
}

.entry-content blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-lg) var(--space-xl);
    border-left: 3px solid var(--color-accent);
    background: var(--color-accent-light);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    font-style: italic;
    color: var(--color-text-secondary);
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(26, 79, 110, 0.25);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--transition-fast);
}

.entry-content a:hover {
    text-decoration-color: var(--color-primary);
}

/* Featured Image */
.entry-featured-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.entry-featured-image img {
    width: 100%;
    height: auto;
}

.dflx-photo-credit {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
    text-align: right;
}

.dflx-photo-credit a {
    color: var(--color-text-muted);
    text-decoration: underline;
    text-decoration-color: var(--color-border-light);
    text-underline-offset: 2px;
}

.dflx-photo-credit a:hover {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    max-width: var(--content-narrow);
    margin-top: var(--space-3xl);
}

.faq-section h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xl);
}

.faq-item {
    border-bottom: 1px solid var(--color-border-light);
}

.faq-item__question {
    padding: var(--space-lg) 0;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__question::after {
    content: '+';
    font-size: var(--text-xl);
    font-weight: 300;
    color: var(--color-text-light);
    transition: transform var(--transition-fast);
    flex-shrink: 0;
    margin-left: var(--space-md);
}

.faq-item[open] .faq-item__question::after {
    content: '\2212';
}

.faq-item__answer {
    padding: 0 0 var(--space-lg);
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Inline Content Images (Unsplash)
   ========================================================================== */

.dflx-inline-image {
    margin: var(--space-2xl) 0;
    padding: 0;
}

.dflx-inline-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    display: block;
}

.dflx-inline-image figcaption {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-top: var(--space-sm);
    text-align: right;
}

.dflx-inline-image figcaption a {
    color: var(--color-text-light);
    text-decoration: underline;
    text-decoration-color: var(--color-border-light);
    text-underline-offset: 2px;
}

.dflx-inline-image figcaption a:hover {
    color: var(--color-primary);
    text-decoration-color: var(--color-primary);
}

/* ==========================================================================
   Article Hero — Full-Bleed (CN Traveler style)
   ========================================================================== */

.article-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-bottom: var(--space-3xl);
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    max-height: 70vh;
}

.article-hero figcaption {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.article-hero figcaption a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 2px;
}

.article-hero figcaption a:hover {
    color: #fff;
    text-decoration-color: #fff;
}

/* Gradient overlay for readability when title overlaps hero */
.article-hero--overlay::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    pointer-events: none;
}

/* ==========================================================================
   Breakout Images — Wider than text column
   ========================================================================== */

.dflx-inline-image--wide {
    max-width: var(--content-width);
    margin-left: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-right: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.dflx-inline-image--wide img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Full-bleed inline image */
.dflx-inline-image--full {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
    padding: 0;
    border-radius: 0;
}

.dflx-inline-image--full img {
    border-radius: 0;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    max-height: 60vh;
}

/* ==========================================================================
   Image Pairs — Two images side by side
   ========================================================================== */

.dflx-image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    max-width: var(--content-width);
    margin-left: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-right: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.dflx-image-pair .dflx-inline-image {
    margin: 0;
}

.dflx-image-pair .dflx-inline-image img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* ==========================================================================
   Pull Quotes — Visual break between sections
   ========================================================================== */

.dflx-pullquote {
    max-width: var(--content-width);
    margin: var(--space-3xl) auto;
    margin-left: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-right: calc((var(--content-narrow) - var(--content-width)) / 2);
    padding: var(--space-3xl) var(--space-4xl);
    border-left: none;
    background: transparent;
    text-align: center;
}

.dflx-pullquote p {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
    letter-spacing: -0.015em;
    margin: 0;
    font-style: normal;
}

.dflx-pullquote cite {
    display: block;
    margin-top: var(--space-lg);
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    font-style: normal;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ==========================================================================
   Maps — Stadia Maps via MapLibre GL
   ========================================================================== */

.dflx-map {
    margin: var(--space-2xl) 0;
    padding: 0;
}

.dflx-map__canvas {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.dflx-map__canvas.is-loaded {
    opacity: 1;
}

.dflx-map__caption {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-top: var(--space-sm);
    text-align: center;
}

/* Map in sidebar */
.dflx-map--sidebar {
    margin: 0 0 var(--space-xl);
}

.dflx-map--sidebar .dflx-map__canvas {
    border-radius: var(--border-radius);
}

/* Breakout map (wider than text column) */
.dflx-map--wide {
    max-width: var(--content-width);
    margin-left: calc((var(--content-narrow) - var(--content-width)) / 2);
    margin-right: calc((var(--content-narrow) - var(--content-width)) / 2);
}

/* Full-bleed map */
.dflx-map--full {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.dflx-map--full .dflx-map__canvas {
    border-radius: 0;
}

/* Map popup styling */
.dflx-map-popup .maplibregl-popup-content {
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    color: var(--color-text);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
}

.dflx-map-popup .maplibregl-popup-tip {
    border-top-color: #fff;
}

/* Map card — sidebar map wrapped in a polished card with actions */
.dflx-map-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--space-xl);
}

.dflx-map-card .dflx-map {
    margin: 0;
}

.dflx-map-card .dflx-map__canvas {
    border-radius: 0;
}

.dflx-map-card__actions {
    display: flex;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-warm);
    border-top: 1px solid var(--color-border-light);
}

.dflx-map-card__directions {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.dflx-map-card__directions:hover {
    color: var(--color-accent);
}

/* Rich map popups */
.dflx-map-popup__inner {
    line-height: 1.4;
}

.dflx-map-popup__title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--color-text);
    text-decoration: none;
}

a.dflx-map-popup__title:hover {
    color: var(--color-primary);
}

.dflx-map-popup__meta {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.dflx-map-popup__desc {
    font-size: var(--text-xs);
    color: var(--color-text-light);
    margin-top: 4px;
}

/* ==========================================================================
   Ad Zones
   ========================================================================== */

.ad-zone {
    text-align: center;
    margin: var(--space-xl) 0;
}

.ad-zone--header {
    padding: var(--space-sm) 0;
    background: var(--color-bg-alt);
}

.ad-zone--sidebar {
    margin-bottom: var(--space-xl);
}

.ad-zone--in-content {
    margin: var(--space-3xl) 0;
    padding: var(--space-xl) 0;
}

/* ==========================================================================
   Homepage — Hero
   ========================================================================== */

.hero {
    background: linear-gradient(165deg, var(--color-hero-start) 0%, var(--color-hero-end) 50%, #2a6b8f 100%);
    color: #fff;
    padding: var(--space-5xl) 0;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.hero .container {
    position: relative;
}

.hero__label {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: var(--space-lg);
    display: block;
}

.hero h1 {
    color: #fff;
    font-size: var(--text-5xl);
    margin-bottom: var(--space-lg);
    letter-spacing: -0.025em;
    line-height: 1.08;
    max-width: 700px;
}

.hero p {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.7);
    max-width: 560px;
    margin: 0 0 var(--space-2xl);
    line-height: 1.6;
}

.hero .search-form {
    margin: 0;
}

.hero .search-form input[type="search"] {
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    background: rgba(255, 255, 255, 0.95);
}

.hero .search-form input[type="search"]:focus {
    background: #fff;
}

.hero .search-form button {
    background: var(--color-accent);
    border-color: var(--color-accent);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.hero .search-form button:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

/* ==========================================================================
   Homepage — Sections
   ========================================================================== */

.home-section {
    padding: var(--space-4xl) 0;
}

.home-section:nth-child(even) {
    background: var(--color-bg-warm);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding-left: calc(50vw - 50%);
    padding-right: calc(50vw - 50%);
}

.home-section + .home-section {
    border-top: none;
}

.home-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.home-section__header h2 {
    margin: 0;
    font-size: var(--text-3xl);
}

.home-section__header a {
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    white-space: nowrap;
}

.home-section__header a:hover {
    color: var(--color-primary-dark);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.category-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: all var(--transition-base);
}

.category-card:hover {
    border-color: var(--color-border);
    border-left-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
}

.category-card__icon {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
}

.category-card__label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: 2px;
}

.category-card .card__meta {
    margin-bottom: 0;
}

/* ==========================================================================
   Sidebar Layout
   ========================================================================== */

.layout-sidebar {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--space-3xl);
    padding: var(--space-xl) 0;
}

.sidebar {
    font-size: var(--text-sm);
    position: sticky;
    top: 80px;
    align-self: start;
}

.sidebar-widget {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
}

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

.sidebar-widget h3 {
    font-family: var(--font-accent);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.sidebar-widget a {
    color: var(--color-text-secondary);
}

.sidebar-widget a:hover {
    color: var(--color-primary);
}

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

.nav-links {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-3xl);
    font-family: var(--font-accent);
}

.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.nav-links .page-numbers:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ==========================================================================
   Responsive — Mobile First Refinements
   ========================================================================== */

@media (max-width: 1024px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .card-grid--featured .card:first-child {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --text-4xl: 2rem;
        --text-5xl: 2.5rem;
        --text-3xl: 1.5rem;
        --space-4xl: 3rem;
        --space-5xl: 4rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .main-navigation ul {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation.is-open ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border-light);
        padding: var(--space-sm) var(--space-md);
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    .main-navigation.is-open li > a {
        display: block;
        padding: 12px var(--space-md);
        border-radius: var(--border-radius-sm);
        font-size: var(--text-base);
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .card-grid--compact {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .card-grid--featured .card:first-child {
        grid-template-columns: 1fr;
    }

    .card-grid--featured .card:first-child .card__image {
        aspect-ratio: 16 / 9;
    }

    .card-grid--featured .card:first-child .card__body {
        padding: var(--space-lg);
    }

    .card-grid--featured .card:first-child .card__title {
        font-size: var(--text-xl);
    }

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

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar form {
        flex-direction: column;
    }

    .filter-bar select {
        width: 100%;
    }

    .search-form {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .search-form input[type="search"] {
        border-right: 1px solid var(--color-border);
        border-radius: var(--border-radius);
    }

    .search-form button {
        border-radius: var(--border-radius);
    }

    .hero .search-form input[type="search"] {
        border-right: none;
        border-radius: var(--border-radius);
    }

    .hero .search-form button {
        border-radius: var(--border-radius);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .home-section__header {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .entry-content {
        font-size: var(--text-base);
        line-height: 1.7;
    }

    .entry-content > p:first-of-type {
        font-size: var(--text-lg);
    }

    .entry-content h2 {
        font-size: var(--text-xl);
        margin-top: var(--space-2xl);
    }

    /* Breakout images collapse to full width on mobile */
    .dflx-inline-image--wide,
    .dflx-image-pair,
    .dflx-pullquote,
    .dflx-map--wide {
        margin-left: calc(-1 * var(--space-md));
        margin-right: calc(-1 * var(--space-md));
        max-width: none;
    }

    .dflx-inline-image--wide img {
        border-radius: 0;
    }

    .dflx-image-pair {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .dflx-image-pair .dflx-inline-image img {
        border-radius: 0;
    }

    .dflx-pullquote {
        padding: var(--space-2xl) var(--space-lg);
    }

    .dflx-pullquote p {
        font-size: var(--text-2xl);
    }

    .business-details dl {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .business-details dt {
        margin-top: var(--space-sm);
    }
}

@media (max-width: 480px) {
    :root {
        --text-4xl: 1.75rem;
        --text-5xl: 2.125rem;
    }

    .card-grid--compact {
        grid-template-columns: 1fr;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .category-card {
        padding: var(--space-md) var(--space-md);
    }

    .hero p {
        font-size: var(--text-base);
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Skip navigation link — visible only on keyboard focus */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-lg);
    z-index: 9999;
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary-dark);
    color: #fff;
    font-family: var(--font-accent);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    text-decoration: none;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
    outline: none;
    color: #fff;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus-visible — visible keyboard focus ring without mouse focus clutter */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Cards, buttons, and interactive elements get a consistent focus ring */
.card:focus-within {
    box-shadow: var(--shadow-lg);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.card__title a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.badge:focus-visible,
.category-card:focus-visible,
.menu-toggle:focus-visible,
.search-form button:focus-visible,
.filter-bar select:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* FAQ keyboard navigation */
.faq-item__question:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    border-radius: var(--border-radius-sm);
}

/* Minimum touch target 44x44px (WCAG 2.5.8) */
.main-navigation a,
.footer-navigation a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.menu-toggle {
    min-width: 44px;
    min-height: 44px;
}

/* Ensure text-muted still meets WCAG AA contrast (4.5:1) against white */
/* #8f8f8f on white = 3.5:1 — bumping to #717171 = 4.6:1 for AA */
.card__meta,
.card__excerpt {
    color: var(--color-text-light); /* #636363 = 5.7:1 — passes AA and AAA */
}

/* Reduced motion preference — disable animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .card:hover {
        transform: none;
    }

    .category-card:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --color-text-light: #3d3d3d;
        --color-text-muted: #636363;
        --color-border: #999;
        --color-border-light: #bbb;
    }

    .card {
        border: 1px solid var(--color-border);
    }

    .badge {
        border: 1px solid currentColor;
    }

    .hero {
        background: var(--color-primary-dark);
    }

    .hero p {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Larger text preference — respect user font size settings */
@media (min-resolution: 1dppx) {
    html {
        font-size: 100%; /* Respect browser/OS font size preferences */
    }
}
