/*
Theme Name: Flavor Core
Theme URI:
Description: Uniwersalny FSE block theme dla sieci portali informacyjnych. Metro kafelki z gradientami per kategoria, dark/light mode, sloty reklamowe z CLS=0.
Version: 4.0.6
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Author: S
Text Domain: flavor-core
Tags: full-site-editing, block-patterns, news, portal
License: Proprietary
*/

/* ==========================================================================
   0. Self-hosted Fonts (RODO-safe, zero external requests)
   ========================================================================== */

@font-face {
    font-family: 'Roboto Mono';
    src: url('./assets/fonts/RobotoMono-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto Mono';
    src: url('./assets/fonts/RobotoMono-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./assets/fonts/Montserrat-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./assets/fonts/Montserrat-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./assets/fonts/Montserrat-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   1. CSS Custom Properties
   ========================================================================== */

:root {
    /* Brand — set dynamically from settings panel via fc_dynamic_font_css() */
    --fc-brand-primary: #1a1a2e;
    /* --fc-brand-accent set in <head> by PHP */

    /* Typography */
    --fc-font-heading: 'Roboto Mono', ui-monospace, 'Cascadia Code', monospace;
    --fc-font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fc-font-mono: 'Roboto Mono', ui-monospace, monospace;

    /* Light mode (default) */
    --fc-bg: #ffffff;
    --fc-bg-alt: #ffffff;
    --fc-text: #1a1a1a;
    --fc-text-secondary: #555555;
    --fc-text-muted: #888888;
    --fc-border: #e0e0e0;
    --fc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);

    /* Tile text — light mode */
    --fc-tile-text: #1a1a1a;
    --fc-tile-meta: #555555;
    --fc-tile-cat: #333333;

    /* Ad slots */
    --fc-ad-bg: rgba(0, 0, 0, 0.03);
    --fc-ad-border: #e0e0e0;
    --fc-ad-text: #cccccc;

    /* Label colors */
    --fc-label-pilne: #dc2626;
    --fc-label-spon: #7c3aed;
    --fc-label-ekskl: #d97706;
    --fc-label-custom: #6b7280;

    /* Spacing & shape */
    --fc-gap: 12px;
    --fc-radius: 8px;
    --fc-content-width: 1200px;
    --fc-article-width: 740px;

    /* Toggle button */
    --fc-toggle-bg: #e0e0e0;
    --fc-toggle-icon: "☀️";
}

/* ==========================================================================
   2. Dark Mode — auto (prefers-color-scheme)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --fc-bg: #1a1a1a;
        --fc-bg-alt: #1a1a1a;
        --fc-text: #e8e8e8;
        --fc-text-secondary: #b0b0b0;
        --fc-text-muted: #666666;
        --fc-border: #333333;
        --fc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

        --fc-tile-text: #f0f0f0;
        --fc-tile-meta: #b0b0b0;
        --fc-tile-cat: #d0d0d0;

        --fc-ad-bg: rgba(255, 255, 255, 0.03);
        --fc-ad-border: #333333;
        --fc-ad-text: #444444;

        --fc-toggle-bg: #333333;
        --fc-toggle-icon: "🌙";
    }

    /* Dark tiles use gradient */
    :root:not([data-theme="light"]) .fc-tile {
        background: linear-gradient(135deg, var(--fc-tile-grad-start, #333), var(--fc-tile-grad-end, #1a1a1a));
    }
}

/* ==========================================================================
   3. Dark Mode — manual override [data-theme="dark"]
   ========================================================================== */

[data-theme="dark"] {
    --fc-bg: #1a1a1a;
    --fc-bg-alt: #1a1a1a;
    --fc-text: #e8e8e8;
    --fc-text-secondary: #b0b0b0;
    --fc-text-muted: #666666;
    --fc-border: #333333;
    --fc-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);

    --fc-tile-text: #f0f0f0;
    --fc-tile-meta: #b0b0b0;
    --fc-tile-cat: #d0d0d0;

    --fc-ad-bg: rgba(255, 255, 255, 0.03);
    --fc-ad-border: #333333;
    --fc-ad-text: #444444;

    --fc-toggle-bg: #333333;
    --fc-toggle-icon: "🌙";
}

[data-theme="dark"] .fc-tile {
    background: linear-gradient(135deg, var(--fc-tile-grad-start, #333), var(--fc-tile-grad-end, #1a1a1a));
}

/* ==========================================================================
   4. Base / Reset
   ========================================================================== */

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

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

/* Let WP blocks inherit body background naturally */

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

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

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

/* ==========================================================================
   5. Header (PHP-rendered, no WP blocks)
   ========================================================================== */

.fc-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--fc-bg);
    width: 100%;
}

/* Ensure nav overlay positions relative to header */
@media (max-width: 768px) {
    .fc-header {
        position: sticky;
        /* position: relative is implicit for sticky */
    }
}

.fc-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    max-width: var(--fc-content-width);
    margin: 0 auto;
    height: 52px;
}

.fc-header__logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.fc-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

/* Hamburger — hidden on desktop */
.fc-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.fc-hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--fc-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.fc-hamburger.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.fc-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.fc-hamburger.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Logo */
.fc-site-logo { display: block; line-height: 1; }
.fc-site-logo--text {
    font-family: var(--fc-font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fc-text);
    text-decoration: none;
    white-space: nowrap;
}
.fc-site-logo--text:hover { color: var(--fc-text); }
.fc-site-logo--svg { display: inline-flex; align-items: center; }
.fc-site-logo--svg svg { height: 26px; width: auto; max-width: 220px; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .fc-site-logo--svg svg .logo-text {
        fill: #e8e8e8 !important;
    }
}
[data-theme="dark"] .fc-site-logo--svg svg .logo-text { fill: #e8e8e8 !important; }
.fc-site-logo--svg svg .logo-dot { fill: #ad004b; }

/* Navigation — Newspaper-style bordered box */
.fc-nav {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    border: 1px solid var(--fc-brand-accent);
    border-left: 3px solid var(--fc-brand-accent);
    padding: 0 12px;
}

/* Handle both wp_nav_menu (<ul>) and wp_page_menu (<div><ul>) */
.fc-nav > ul,
.fc-nav > .fc-nav__list,
.fc-nav > div > ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    gap: 0;
    overflow: visible;
}

/* Sub-menus must NOT inherit flex/overflow */
.fc-nav .sub-menu,
.fc-nav .children {
    flex-direction: column;
    overflow: visible;
}

.fc-nav ul::-webkit-scrollbar,
.fc-nav__list::-webkit-scrollbar { display: none; }

.fc-nav li,
.fc-nav__list li {
    flex: 0 0 auto;
    list-style: none !important;
    position: relative;
}

.fc-nav a,
.fc-nav__list a {
    display: block;
    padding: 10px 16px;
    font-family: var(--fc-font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fc-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s;
}

.fc-nav__list a:hover {
    color: var(--fc-brand-accent);
}

/* Submenu dropdown */
.fc-nav__list .sub-menu,
.fc-nav__list .children,
.fc-nav ul .sub-menu,
.fc-nav ul .children {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: var(--fc-bg);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 500;
    min-width: 200px;
}

.fc-nav__list li:hover > .sub-menu,
.fc-nav__list li:hover > .children,
.fc-nav ul li:hover > .sub-menu,
.fc-nav ul li:hover > .children {
    display: block;
}

.fc-nav__list .sub-menu a,
.fc-nav__list .children a,
.fc-nav ul .sub-menu a,
.fc-nav ul .children a {
    padding: 8px 20px;
    font-size: 0.8rem;
    text-transform: none;
    white-space: nowrap;
}

/* Sitewide ad — moved outside header */

/* ==========================================================================
   6. Metro Grid
   ========================================================================== */

.fc-metro {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 150px;
    gap: var(--fc-gap);
    max-width: var(--fc-content-width);
    margin: 0 auto;
    padding: 20px 16px 0;
}

.fc-metro--empty {
    display: block;
    text-align: center;
    padding: 60px 20px;
    color: var(--fc-text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   7. Tiles
   ========================================================================== */

.fc-tile {
    position: relative;
    border-radius: var(--fc-radius);
    overflow: hidden;
    background: var(--fc-tile-light-bg, #f0f0f0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fc-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.fc-tile--large {
    grid-column: span 2;
}

.fc-tile__link {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    padding: 10px 14px;
    color: var(--fc-tile-text);
    text-decoration: none;
}

.fc-tile__link:hover {
    color: var(--fc-tile-text);
}

.fc-tile--large .fc-tile__link {
    padding: 14px 20px;
}

.fc-tile__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fc-tile__category {
    font-family: var(--fc-font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--fc-tile-cat);
    opacity: 0.85;
}

.fc-tile__title {
    margin: 0;
    font-family: var(--fc-font-heading);
    font-weight: 700;
    line-height: 1.3;
    font-size: 1rem;
}

.fc-tile--large .fc-tile__title {
    font-size: 1.35rem;
}

.fc-tile__time {
    font-size: 0.75rem;
    color: var(--fc-tile-meta);
    opacity: 0.7;
}

/* ==========================================================================
   8. Tile Labels (Pilne, Art. spon., etc.)
   ========================================================================== */

.fc-label {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    color: #ffffff;
}

.fc-tile__label {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.fc-label--pilne {
    background: var(--fc-label-pilne);
}

.fc-label--spon {
    background: var(--fc-label-spon);
}

.fc-label--ekskl {
    background: var(--fc-label-ekskl);
}

.fc-label--custom {
    background: var(--fc-label-custom);
}

/* ==========================================================================
   9. Ad Slots (CLS = 0)
   ========================================================================== */

.fc-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--fc-ad-border);
    border-radius: var(--fc-radius);
    overflow: hidden;
    width: 100%;
    background: var(--fc-ad-bg);
}

.fc-zone__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fc-text-muted);
    opacity: 0.5;
}

.fc-zone--leaderboard {
    min-height: 90px;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

.fc-zone--rectangle {
    min-height: 250px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.fc-zone--mobile {
    min-height: 100px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.fc-zone--inline {
    min-height: 250px;
    margin: 24px auto;
}

.fc-zone--billboard {
    min-height: 300px;
    max-width: 900px;
    margin: 0 auto;
}

/* Sitewide ad — below sticky header, not sticky itself */
.fc-section-featured {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    padding: 16px 20px;
}

/* Before footer container */
.fc-section-bottom {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    padding: 16px 20px;
}

/* Sidebar — tall vertical */
.fc-zone--sidebar {
    min-height: 600px;
    max-width: 300px;
}

/* Metro separator */
.fc-zone--metro {
    min-height: 90px;
    max-width: 728px;
    margin: 0 auto;
}

/* After article */
.fc-zone--after_article {
    min-height: 250px;
    max-width: 728px;
    margin: 16px auto;
}

/* Before footer zone */
.fc-zone--before_footer {
    min-height: 90px;
    max-width: 728px;
    margin: 0 auto;
}

/* Placeholder for empty zones */
.fc-zone--empty {
    border: 1px dashed var(--fc-border);
    border-radius: var(--fc-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Affiliate disclaimer (events) */
.fc-affiliate-notice {
    margin: 24px 0 0;
    padding: 14px 18px;
    border-radius: var(--fc-radius);
    background: var(--fc-bg);
    border: 1px solid var(--fc-border);
    font-size: 0.8rem;
    color: var(--fc-text-muted);
    line-height: 1.5;
}

.fc-affiliate-notice p {
    margin: 0;
}

/* Featured image under title card */
.fc-single-featured {
    margin: 0 0 4px;
    border-radius: 0 0 var(--fc-radius) var(--fc-radius);
    overflow: hidden;
}

.fc-single-featured__img {
    display: block;
    width: 100%;
    height: auto;
}

.fc-single-featured__caption {
    padding: 8px 16px;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--fc-text-muted);
    background: var(--fc-bg);
    line-height: 1.4;
}

/* ==========================================================================
   Social Share Buttons
   ========================================================================== */

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

.fc-share__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fc-text-muted);
    margin-right: 4px;
}

.fc-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.fc-share__btn:hover {
    opacity: 0.8;
    color: #ffffff;
}

.fc-share__btn--fb { background: #1877F2; }
.fc-share__btn--x { background: #000000; }
.fc-share__btn--wykop { background: #367DA2; }
.fc-share__btn--reddit { background: #CC3700; }
.fc-share__btn--linkedin { background: #0A66C2; }

/* Fallback text when no ad loaded */
.fc-zone:empty::after {
    content: "";
    display: block;
}

/* Ad in metro grid — span full width */
.fc-metro__break {
    grid-column: 1 / -1;
    padding: 8px 0;
}

/* Ad loaded — remove dashed border */
.fc-zone:not(:empty) {
    border: none;
    background: transparent;
}

/* ==========================================================================
   10. Single Post
   ========================================================================== */

.fc-single-layout {
    gap: 32px !important;
}

.fc-single-header {
    border-radius: var(--fc-radius);
    padding: 24px 28px 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    /* Light mode: pastel bg, dark text (like tiles) */
    background: var(--fch-light, #f0f0f0);
    color: var(--fc-text);
}

/* Dark mode: gradient bg, white text */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .fc-single-header {
        background: var(--fch-grad);
        color: #ffffff;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }
}

[data-theme="dark"] .fc-single-header {
    background: var(--fch-grad);
    color: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.fc-single-header__cat {
    display: inline-block;
    font-family: var(--fc-font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: inherit;
    opacity: 0.7;
    margin-bottom: 8px;
}

.fc-single-title {
    font-family: var(--fc-font-heading);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    letter-spacing: -0.02em;
    color: inherit;
}

.fc-single-title a {
    color: inherit;
    text-decoration: none;
}

.fc-single-title a:hover {
    opacity: 0.85;
}

.fc-single-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 10px 0 0;
    color: inherit;
    opacity: 0.6;
    font-size: 0.82rem;
}

/* Infinite scroll headers — same style */
.fc-infinite-post .fc-single-header {
    margin-top: 0;
}

/* Post content — larger font, more breathing room */
.fc-single-content {
    padding: 24px 0;
    font-size: 1.12rem;
    line-height: 1.85;
}

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

.fc-single-content h2,
.fc-single-content h3,
.fc-single-content h4 {
    margin-top: 1.8em;
    margin-bottom: 0.6em;
    font-family: var(--fc-font-heading);
    font-weight: 700;
    line-height: 1.3;
}

.fc-single-content a {
    color: var(--fc-brand-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.fc-single-content blockquote {
    border-left: 3px solid var(--fc-brand-accent);
    margin: 1.5em 0;
    padding: 0.5em 0 0.5em 1.5em;
    color: var(--fc-text-secondary);
    font-style: italic;
}

.fc-single-content figure {
    margin: 1.5em 0;
}

.fc-single-content figcaption,
.fc-single-content .wp-caption-text,
.fc-single-content .wp-element-caption {
    font-size: 0.8rem;
    color: var(--fc-text-muted);
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

.fc-single-content .wp-block-image {
    margin: 1.5em 0;
}

.fc-single-content .wp-block-image img {
    border-radius: var(--fc-radius);
}

/* Sidebar */
.fc-single-sidebar {
    padding-top: 24px;
}

.fc-sidebar-ad {
    position: sticky;
    top: 20px;
}

.fc-single-category a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--fc-brand-accent);
    color: #ffffff;
}

/* ==========================================================================
   11. Breadcrumbs
   ========================================================================== */

.fc-breadcrumbs {
    font-size: 0.8rem;
    color: var(--fc-text-muted);
    margin-bottom: 16px;
}

.fc-breadcrumbs a {
    color: var(--fc-text-secondary);
}

.fc-breadcrumbs a:hover {
    color: var(--fc-brand-accent);
}

.fc-breadcrumbs .fc-breadcrumbs__sep {
    margin: 0 6px;
    opacity: 0.5;
}

/* ==========================================================================
   12. Reading Time
   ========================================================================== */

.fc-reading-time {
    color: var(--fc-text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   13. Related Posts
   ========================================================================== */

.fc-single-footer {
    padding: 16px 0 32px;
}

.fc-related {
    padding: 32px 0 16px;
    border-top: 1px solid var(--fc-border);
}

.fc-related__heading {
    font-family: var(--fc-font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--fc-text);
}

.fc-related__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fc-related__item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--fc-border);
}

.fc-related__item:last-child {
    border-bottom: none;
}

.fc-related__item-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--fc-text);
    flex: 1;
}

.fc-related__item-title:hover {
    color: var(--fc-brand-accent);
}

.fc-related__item-date {
    font-size: 0.75rem;
    color: var(--fc-text-muted);
    white-space: nowrap;
}

/* ==========================================================================
   14. Archive / Category
   ========================================================================== */

.fc-archive-header {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    padding: 32px 16px 0;
}

.fc-archive-header__title {
    font-family: var(--fc-font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.fc-archive-header__desc {
    color: var(--fc-text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================================================
   15. 404 / Search
   ========================================================================== */

.fc-404,
.fc-search-none {
    text-align: center;
    padding: 80px 20px;
    max-width: var(--fc-article-width);
    margin: 0 auto;
}

.fc-404__code {
    font-size: 4rem;
    font-weight: 800;
    color: var(--fc-text-muted);
    line-height: 1;
    margin-bottom: 12px;
}

.fc-404__text,
.fc-search-none__text {
    font-size: 1.1rem;
    color: var(--fc-text-secondary);
}

.fc-search-header {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    padding: 32px 16px 0;
}

/* ==========================================================================
   16. Footer
   ========================================================================== */

.fc-footer {
    background: transparent;
    border-top: 1px solid var(--fc-border);
    padding: 24px 16px;
    margin-top: 48px;
}

.fc-footer__inner {
    max-width: var(--fc-content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.fc-footer__copy {
    font-size: 0.8rem;
    color: var(--fc-text-muted);
    margin: 0;
}

.fc-footer__links {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
}

.fc-footer__links a {
    color: var(--fc-text-secondary);
}

.fc-footer__links a:hover {
    color: var(--fc-brand-accent);
}

/* ==========================================================================
   17. Dark Mode Toggle
   ========================================================================== */

.fc-theme-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--fc-text-muted);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.fc-theme-toggle:hover {
    color: var(--fc-text);
}

.fc-theme-toggle__icon {
    font-size: 1.1rem;
}

/* ==========================================================================
   18. Pagination
   ========================================================================== */

.fc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 32px 16px;
    max-width: var(--fc-content-width);
    margin: 0 auto;
}

.fc-pagination a,
.fc-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fc-text-secondary);
    background: var(--fc-bg-alt);
    border: 1px solid var(--fc-border);
    transition: background 0.2s, color 0.2s;
}

.fc-pagination a:hover {
    background: var(--fc-brand-accent);
    color: #ffffff;
    border-color: var(--fc-brand-accent);
}

.fc-pagination .current {
    background: var(--fc-brand-accent);
    color: #ffffff;
    border-color: var(--fc-brand-accent);
}

/* ==========================================================================
   18b. Infinite Scroll
   ========================================================================== */

.fc-infinite-container {
    width: 100%;
}

.fc-infinite-separator {
    height: 1px;
    background: var(--fc-border);
    margin: 48px 16px 32px;
}

.fc-infinite-loader {
    text-align: center;
    padding: 24px;
    color: var(--fc-text-muted);
    font-size: 0.9rem;
}

.fc-infinite-sentinel {
    height: 1px;
}

/* ==========================================================================
   18c. Events
   ========================================================================== */

.fc-events-list {
    max-width: var(--fc-content-width);
    margin: 20px auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fc-events-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--fc-text-muted);
}

.fc-event-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--fc-bg-alt);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    transition: box-shadow 0.2s;
}

.fc-event-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fc-event-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 60px;
    text-align: center;
}

.fc-event-card__day {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--fc-brand-accent);
}

.fc-event-card__time {
    font-size: 0.75rem;
    color: var(--fc-text-muted);
}

.fc-event-card__body {
    flex: 1;
}

.fc-event-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.fc-event-card__title a {
    color: var(--fc-text);
}

.fc-event-card__title a:hover {
    color: var(--fc-brand-accent);
}

.fc-event-card__location {
    font-size: 0.8rem;
    color: var(--fc-text-muted);
    margin-top: 2px;
    display: block;
}

.fc-event-card__btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--fc-brand-accent);
    color: #ffffff;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.fc-event-card__btn:hover {
    opacity: 0.85;
    color: #ffffff;
}

/* Single event meta */
.fc-event-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 0;
    padding: 16px 20px;
    background: var(--fc-bg-alt);
    border: 1px solid var(--fc-border);
    border-radius: var(--fc-radius);
    font-size: 0.9rem;
    color: var(--fc-text-secondary);
}

.fc-event-meta strong {
    color: var(--fc-text);
}

.fc-event-ticket {
    text-align: center;
    margin: 32px 0;
}

.fc-event-ticket__btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--fc-radius);
    font-size: 1rem;
    font-weight: 700;
    background: var(--fc-brand-accent);
    color: #ffffff;
    transition: opacity 0.2s, transform 0.2s;
}

.fc-event-ticket__btn:hover {
    opacity: 0.9;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==========================================================================
   19. Utility
   ========================================================================== */

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

/* ==========================================================================
   20. Responsive — Tablet (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
    .fc-metro {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 125px;
    }

    .fc-tile--large {
        grid-column: span 2;
    }

    .fc-tile--large .fc-tile__title {
        font-size: 1.1rem;
    }

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

    .fc-header__top {
        padding: 0 12px;
        height: 46px;
    }

    .fc-header {
        border-bottom: 2px solid var(--fc-brand-accent);
    }

    .fc-site-logo--text {
        font-size: 1.3rem;
    }

    .fc-site-logo--svg svg {
        height: 22px;
    }

    .fc-theme-toggle__icon {
        font-size: 0.95rem;
    }

    .fc-hamburger {
        width: 26px;
        height: 26px;
        gap: 4px;
    }

    .fc-hamburger span {
        height: 2px;
    }

    /* Show hamburger, hide nav */
    .fc-hamburger {
        display: flex !important;
    }

    .fc-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--fc-bg);
        border: none;
        border-top: 2px solid var(--fc-brand-accent);
        padding: 8px 16px;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

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

    .fc-nav ul,
    .fc-nav__list,
    .fc-nav__list ul {
        flex-direction: column;
    }

    .fc-nav a,
    .fc-nav__list a {
        padding: 10px 0;
        border-bottom: 1px solid var(--fc-border);
    }

    .fc-site-logo--text {
        font-size: 1.4rem;
    }

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

    .fc-single-layout {
        flex-direction: column !important;
    }

    .fc-single-main {
        flex-basis: 100% !important;
    }
}

/* ==========================================================================
   21. Responsive — Mobile (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {
    :root {
        --fc-gap: 8px;
    }

    .fc-metro {
        grid-template-columns: 1fr;
        grid-auto-rows: 115px;
        padding: 12px 10px 0;
    }

    .fc-tile--large {
        grid-column: span 1;
    }

    .fc-tile--large .fc-tile__title {
        font-size: 1rem;
    }

    .fc-tile__title {
        font-size: 0.9rem;
    }

    .fc-tile__link {
        padding: 12px 14px;
    }

    .fc-tile--large .fc-tile__link {
        padding: 10px 14px;
    }

    .fc-single-title {
        font-size: 1.35rem;
    }

    .fc-single-content {
        font-size: 1.05rem;
        line-height: 1.85;
        padding: 16px 10px;
    }

    .fc-site-logo--text {
        font-size: 1.2rem;
    }

    .fc-nav__list a {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .fc-zone--leaderboard {
        min-height: 100px;
        max-width: 320px;
    }

    .fc-footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .fc-event-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   22. Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .fc-tile {
        transition: none;
    }

    .fc-tile:hover {
        transform: none;
    }
}

/* ==========================================================================
   23. WordPress Block Overrides (FSE compatibility)
   ========================================================================== */

/* Remove default padding from wp-site-blocks */
.wp-site-blocks {
    padding: 0 !important;
    margin: 0 !important;
    padding-top: 0 !important;
}

.wp-site-blocks > *:first-child {
    margin-top: 0 !important;
}

/* Hide empty header template part (rendered via wp_body_open instead) */
.wp-site-blocks > header.wp-block-template-part:first-child {
    display: none !important;
}

/* Ensure no background differences between sections */
.wp-site-blocks,
.wp-site-blocks > .wp-block-group,
.wp-site-blocks > .wp-block-template-part {
    background: transparent;
}

/* Query loop in archive — reuse metro tile styles */
.fc-archive-grid .wp-block-post {
    margin-bottom: 0;
}

