/*
Theme Name: The Garden Commuter
Theme URI: https://thegardencommuter.co.uk
Author: The Garden Commuter Team
Description: A custom digital magazine theme for The Garden Commuter.
Version: 1.0.0
Text Domain: the-garden-commuter
*/

/* CSS Reset & Variables */
html {
    font-size: 16px;
    /* rem baseline */
}

:root {
    /* Color Palette (HSL) */
    --baltic-blue: hsla(197, 93%, 29%, 1);
    --rich-cerulean: hsla(205, 42%, 45%, 1);
    --alice-blue: hsla(212, 60%, 95%, 1);
    --sage-green: hsla(89, 47%, 40%, 1);
    --lime-moss: hsla(68, 100%, 37%, 1);
    --text-dark: #222;
    --text-light: #fefefe;
    --bg-white: #ffffff;

    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'National Park', 'Arial', sans-serif;
    /* Fallback to Arial if National Park not loaded */

    /* Spacing */
    --container-width: 1020px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    background-color: var(--alice-blue);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    margin-bottom: 0.5em;
    color: var(--baltic-blue);
}

/* Base Body Text */
p {
    font-size: 1rem;
    line-height: 1.5;
}

/* Heading Scale: Base=1rem(16px) */
h1 {
    font-size: 2.5rem;
    /* 40px */
    line-height: 1.1;
}

h2 {
    font-size: 2rem;
    /* 32px */
    line-height: 1.2;
}

h3 {
    font-size: 1.625rem;
    /* 26px */
    line-height: 1.2;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.3;
}

h5 {
    font-size: 1.25rem;
    line-height: 1.4;
}

h6 {
    font-size: 1rem;
    line-height: 1.5;
}

/* Global Table Settings Override */
table th,
table td {
    text-align: left !important;
}

/* Layout Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 0.9375rem;
}


.site-content {
    margin-top: 10px;
}

/* Header Styles */
.site-header {
    background: var(--bg-white);
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
    position: relative;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

/* Sidebar Menu Toggle */
.sidebar-menu-toggle {
    display: flex;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.sidebar-hamburger-icon {
    display: block;
    width: 24px;
    height: 18px;
    position: relative;
}

.sidebar-hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    position: absolute;
    left: 0;
    transition: all 0.3s ease;
}

.sidebar-hamburger-icon span:nth-child(1) {
    top: 0;
}

.sidebar-hamburger-icon span:nth-child(2) {
    top: 8px;
}

.sidebar-hamburger-icon span:nth-child(3) {
    top: 16px;
}

.site-header.is-stuck {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Top Bar */
.top-bar {
    background-color: var(--sage-green);
    color: #fff;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 1001;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.9375rem;
}

.social-icons {
    display: flex;
    gap: 0.9375rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.social-icon:hover {
    opacity: 1;
}

.header-utilities {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.utility-link {
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.utility-link:hover {
    text-decoration: underline;
}

/* Top Bar Nav Menu (Appearance > Menus > Top Bar Menu) */
.topbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-nav li {
    margin: 0;
    padding: 0;
}

.topbar-nav a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.topbar-nav a:hover {
    text-decoration: underline;
}

/* Header Main Row */
.header-main-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9375rem;
    gap: 1.25rem;
}

.logo-area {
    /* Logo size handled by image, but ensure container doesn't shrink */
    flex-shrink: 0;
}

.header-ads {
    margin: 0;
    /* Ad alignment handled by flex parent */
}

/* Archive Header Bar */
.container-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.archive-header-bar .page-title,
.archive-header-bar .archive-description {
    margin-left: 0.625rem;
}

.archive-header-bar .banner-ad-small {
    margin-right: 0.625rem;
}

/* Navigation */
.main-navigation {
    background: var(--baltic-blue);
    padding: 0;
    /* Remove padding to let buttons fill */
}

.main-navigation .container {
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.main-navigation li {
    position: relative;
    margin: 0;
    /* Removing margins between buttons */
}

.main-navigation a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    /* Slightly reduced weight */
    display: block;
    padding: 0.75rem 1.5625rem;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.main-navigation li:last-child a {
    border-right: none;
}

/* Rounded Corners for First and Last items */
.main-navigation>.container>ul>li:first-child>a {
    border-top-left-radius: 15px;
}

.main-navigation>.container>ul>li:last-child>a {
    border-top-right-radius: 15px;
}

.main-navigation a:hover {
    background-color: var(--rich-cerulean);
    /* Light blue hover */
}

/* Submenu Styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--rich-cerulean);
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    flex-direction: column;
}

.main-navigation li:hover>ul {
    display: flex;
}

.main-navigation ul ul li {
    margin: 0;
    width: 100%;
}

.main-navigation ul ul a {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-navigation ul ul a:hover {
    background-color: var(--lime-moss);
}

/* Third level submenus */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
}

/* Footer Grid */
.site-footer {
    background: #e8f5e0;
    color: var(--text-dark);
    padding: 3.75rem 0;
    margin-top: 2.5rem;
    border-top: 0.3125rem solid var(--sage-green);
}

.footer-grid-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    row-gap: 2.5rem;
}

.footer-item h3 {
    color: var(--baltic-blue);
    border-bottom: 2px solid var(--sage-green);
    padding-bottom: 0.625rem;
    margin-top: 0;
    font-size: 1.25rem;
}

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

.footer-menu li {
    margin-bottom: 0.625rem;
}

.footer-menu a {
    text-decoration: none;
    color: var(--text-dark);
    transition: color 0.2s;
}

.footer-menu a:hover {
    color: var(--sage-green);
    padding-left: 0.3125rem;
}

.footer-copyright {
    font-size: 0.9rem;
    color: #666;
    grid-column: 1 / -1;
    text-align: center;
}

.footer-copyright p {
    margin: 0 0 0.25rem 0;
}

.theme-credit {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.25rem;
    display: block;
}

/* Footer Social Pills */
.footer-social-pills {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #ffffff;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.footer-pill:hover {
    background: var(--sage-green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.footer-pill svg {
    flex-shrink: 0;
}

.footer-extra-links {
    margin-top: 0.625rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-grid-layout {
        grid-template-columns: 1fr;
    }

    .footer-logo-area {
        text-align: center;
    }

    .footer-logo-area .footer-logo {
        margin: 0 auto;
    }

    .footer-logo-area .footer-slogan {
        text-align: center;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links .footer-menu {
        text-align: center;
    }

    .footer-social-feed {
        text-align: center;
    }

    .footer-social-pills {
        justify-content: center;
    }

    .social-feed-placeholder {
        text-align: center;
    }
}

/* ========================================
   GLOBAL BUTTON STANDARDS
   ======================================== */

/* Base navigation/action button — Sage Green */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--sage-green);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.btn:hover {
    background: var(--lime-moss);
    color: white;
}

/* CTA button variant — Baltic Blue */
.btn-cta {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--baltic-blue);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box;
}

.btn-cta:hover {
    background: var(--rich-cerulean);
    color: white;
}

/* Newsletter Subscribe button */
.tgc-newsletter-form button[type="submit"],
.tgc-newsletter-form .submit-button {
    background: var(--baltic-blue) !important;
    color: #fff !important;
    border-radius: 6px !important;
    font-family: var(--font-body);
    font-weight: 600;
    transition: background 0.2s ease !important;
}

.tgc-newsletter-form button[type="submit"]:hover,
.tgc-newsletter-form .submit-button:hover {
    background: var(--rich-cerulean) !important;
}

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

/* Review Hero Image */
.review-hero-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-hero-image img {
    width: 100%;
    object-fit: cover;
}

/* Job Board Styles */
.tgc-jobs-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.job-card {
    background: var(--bg-white);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.job-card.featured-job {
    border-left: 5px solid var(--lime-moss);
    background: linear-gradient(to right, #f9fff0, #ffffff);
}

.job-card h3 {
    margin-top: 0;
    color: var(--baltic-blue);
    font-size: 1.25rem;
}

.job-card .apply-btn {
    display: inline-block;
    margin-top: 0.9375rem;
    background: var(--sage-green);
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

.job-card .apply-btn:hover {
    background: var(--lime-moss);
}

/* Supplier Directory Styles */
.supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.supplier-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.supplier-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.supplier-card img {
    width: 100%;
    height: 11.25rem;
    object-fit: cover;
}

.supplier-content {
    padding: 0.9375rem;
}

.supplier-content h3 {
    margin: 0 0 0.625rem 0;
    font-size: 1.125rem;
}

.supplier-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.625rem;
}

/* 2-Column Layout System */
.site-content-split {
    display: flex;
    gap: 1.875rem;
}

.col-70 {
    flex: 7;
}

.col-30 {
    flex: 3;
}

.widget-area {
    background: #fff;
    padding: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
}

/* Responsive Layout */
/* ========================================
   TOPIC HUB STYLES
   ======================================== */

/* Topic Hub Layout */
.topic-hub-layout {
    margin-top: 30px;
}

.topic-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--sage-green);
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: var(--baltic-blue);
}

/* Featured Header Grid */
.featured-grid {
    display: flex;
    gap: 30px;
}

.feature-hero {
    flex: 2;
}

.hub-hero-card .hub-hero-image img {
    border-radius: 8px;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.hub-hero-content {
    margin-top: 15px;
}

.hub-hero-content h3 {
    font-size: 1.8rem;
    margin: 0 0 10px;
}

.feature-sub-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hub-small-card {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hub-small-image img {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
}

.hub-small-content h4 {
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.3;
}

.hub-small-content .date {
    font-size: 0.8rem;
    color: #888;
}

/* Review & Lifestyle Split */
.review-lifestyle-split {
    display: flex;
    gap: 40px;
}

.split-col {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--baltic-blue);
}

.col-title {
    font-size: 1.3rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-Highlight-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    margin: 15px 0;
}

.view-more-link {
    display: inline-block;
    margin-top: 15px;
    font-weight: bold;
    color: var(--sage-green);
    text-decoration: none;
}

/* Resources Grid */
.resource-cards-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.hub-resource-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #eee;
    transition: transform 0.2s;
}

.hub-resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.res-icon {
    font-size: 32px;
    color: var(--sage-green);
    display: block;
    margin: 0 auto 10px;
    width: 32px;
    height: 32px;
}

.hub-resource-card h5 {
    margin: 0 0 5px;
    font-size: 1.1rem;
}

.res-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
}

/* Stream List */
.stream-item-row {
    display: flex;
    align-items: baseline;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.stream-date {
    color: #999;
    font-size: 0.9rem;
    width: 50px;
}

.stream-type-badge {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #555;
    width: 80px;
    text-align: center;
}

.stream-title {
    margin: 0;
    font-size: 1.1rem;
}

/* Topic Hub Mobile Overrides */
@media (max-width: 768px) {

    .featured-grid,
    .review-lifestyle-split {
        flex-direction: column;
    }

    .resource-cards-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Read More Button Adjustments */
.news-list-content {
    position: relative;
    padding-bottom: 40px;
}

.btn-read-more {
    font-size: 0.875rem !important;
    padding: 0.5rem 1.25rem !important;
    position: absolute;
    bottom: 0;
    right: 0;
    border-radius: 6px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Archive Image Adjustments */
.news-list-image img {
    max-width: 250px;
    height: 180px;
    object-fit: cover;
    object-position: top center;
}

/* Single Page Image Adjustment */
.single-review-layout .review-hero-image img,
.single-post .news-feature-image img {
    max-height: 550px;
    width: auto;
    object-fit: cover;
}

/* Sidebar container: transparent, shows body background */
#secondary.widget-area {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Individual widget box */
.widget {
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 1.25rem;
    box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.05);
}

/* Fix widget input styling */
.tgc-newsletter-form input[type='text'],
.tgc-newsletter-form input[type='email'] {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem;
    border: 1px solid #ccc;
    border-radius: 0.25rem;
}

.tgc-newsletter-form button {
    width: 100%;
    margin-top: 0.625rem;
    box-sizing: border-box;
}

/* Base article padding — overridden per-template by class selectors */
article {
    padding: 0.9375rem;
    background-color: white;
}

.entry-content {
    padding: 0;
}

.site-main {
    padding: 0;
}

.site-content-split {
    gap: 0.9375rem;
    flex-wrap: nowrap;
}

.col-70,
.col-30 {
    min-width: 0;
}


/* ========================================
   MOBILE & RESPONSIVE UPDATES
   ======================================== */

/* Hide dropdown toggles on desktop — shown via mobile media query */
.main-navigation .dropdown-toggle {
    display: none;
}

/* ========================================
   TOP BAR SEARCH OVERLAY
   ======================================== */

.topbar-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.topbar-search-overlay.is-active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.topbar-search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.topbar-search-bar {
    position: relative;
    z-index: 2;
    background: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 35px;
    width: 100%;
    max-width: 650px;
}

.topbar-search-form {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.topbar-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--sage-green);
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 1rem;
    outline: none;
    max-width: 50ch;
    transition: border-color 0.2s;
}

.topbar-search-input:focus {
    border-color: var(--lime-moss);
    box-shadow: 0 0 0 2px rgba(107, 142, 35, 0.15);
}

.topbar-search-submit {
    padding: 10px 15px;
    background: var(--sage-green);
    color: #fff;
    border: 1px solid var(--sage-green);
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
}

.topbar-search-submit:hover {
    background: var(--lime-moss);
    border-color: var(--lime-moss);
}

/* (Duplicate block removed — originals above at lines 842-1024) */

/* ========================================
   SIDEBAR MENU STYLES
   ======================================== */

.sidebar-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* Explicitly block touch/click events when invisible */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -80%;
    width: 75%;
    max-width: none;
    height: 100dvh;
    background: #ffffff;
    z-index: 9999;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.is-open {
    left: 0;
}

.sidebar-menu-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-menu-close {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--baltic-blue);
    padding: 0.25rem 0;
}

.sidebar-menu-close:hover {
    color: var(--sage-green);
}

.sidebar-menu-search {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-menu-search .search-form,
.sidebar-menu-search .tgc-search-form {
    display: flex;
    width: 100%;
    max-width: 100%;
}

.sidebar-menu-search .search-field {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
    max-width: 50ch;
}

.sidebar-menu-search .search-submit {
    padding: 0.5rem 0.75rem;
    background: var(--sage-green);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.sidebar-menu-items {
    list-style: none;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

.sidebar-menu-items li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-menu-items a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar-menu-items a:hover {
    background-color: var(--alice-blue);
    color: var(--sage-green);
}

.sidebar-menu-items svg {
    flex-shrink: 0;
    color: var(--sage-green);
}

.sidebar-menu-footer {
    padding: 1.25rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    margin-top: auto;
}

.sidebar-menu-logo {
    margin-bottom: 0.75rem;
}

.sidebar-menu-logo img {
    margin: 0 auto;
}

.sidebar-menu-social {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
    margin-bottom: 0.75rem;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--alice-blue);
    border-radius: 50%;
    color: var(--baltic-blue);
    transition: all 0.2s ease;
}

.social-pill:hover {
    background: var(--sage-green);
    color: #fff;
}

.sidebar-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--baltic-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-contact-link:hover {
    color: var(--sage-green);
}

/* Table Responsive Cards Layout (Option 3) */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
}

@media screen and (max-width: 768px) {

    .entry-content table,
    .entry-content thead,
    .entry-content tbody,
    .entry-content th,
    .entry-content td,
    .entry-content tr {
        display: block;
        width: 100%;
    }

    .entry-content thead tr {
        display: none;
    }

    .entry-content tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .entry-content td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 8px 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .entry-content td:last-child {
        border-bottom: none;
    }

    .entry-content td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--baltic-blue);
        text-align: left;
        margin-right: 10px;
    }
}


/* ========================================
   ENHANCED MOBILE LAYOUT (Viewport <= 1206px)
   iPhone 16/17 (1206px) & Pixel 9/10 (1080px)
   ======================================== */
@media screen and (max-width: 1206px) {

    /* Header: remove sticky from full header, only top-bar sticks */
    .site-header {
        position: relative;
        top: auto;
    }

    .top-bar {
        position: sticky;
        top: 0;
        z-index: 1001;
    }

    /* H1 headings for mobile scaling */
    h1 {
        font-size: 2.375rem;
        font-weight: 900;
    }

    /* Show mobile sidebar hamburger, hide desktop social icons */
    .sidebar-menu-toggle {
        display: flex;
    }

    .desktop-social-icons {
        display: none;
    }

    /* Main nav: horizontal scroll instead of hamburger dropdown */
    .main-navigation .container {
        overflow-x: auto;
        overflow-y: hidden;
        /* -webkit-overflow-scrolling: touch removed — it causes phantom taps on iOS
           where a scroll gesture is later processed as a click on the wrong element */
        scrollbar-width: none;
        /* Firefox */
        justify-content: flex-start;
    }

    .main-navigation .container::-webkit-scrollbar {
        display: none;
    }

    .main-navigation ul {
        flex-wrap: nowrap;
        white-space: nowrap;
        width: auto;
        min-width: 100%;
        justify-content: flex-start;
    }

    .main-navigation li {
        flex-shrink: 0;
    }

    .main-navigation a {
        padding: 0.625rem 0.9375rem;
        font-size: 0.85rem;
    }

    /* Parent nav items: flex row so the <a> and sibling toggle button sit inline.
       The dropdown-toggle button is now a sibling of <a>, NOT nested inside it —
       nesting a <button> in an <a> is invalid HTML and breaks mobile tap events. */
    .main-navigation .menu-item-has-children,
    .main-navigation .page_item_has_children {
        display: flex;
        align-items: stretch;
        flex-shrink: 0;
    }

    /* Show dropdown toggles on mobile */
    .main-navigation .dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        padding: 0 0.625rem;
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Submenu on mobile: fixed panel below the nav bar.
       top is set to the nav bar's bottom by JavaScript; the 0 fallback avoids
       the broken 'top: auto' behaviour on position:fixed elements in some browsers. */
    .main-navigation ul ul {
        display: none !important;
    }

    .main-navigation li.focus>ul {
        display: flex !important;
        position: fixed;
        left: 0;
        top: 0;
        /* JS overrides this with navBar.getBoundingClientRect().bottom */
        width: 100vw;
        max-height: 50vh;
        overflow-y: auto;
        z-index: 10000;
        background: var(--baltic-blue);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .main-navigation ul ul a {
        white-space: normal;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Remove rounding on mobile nav */
    .main-navigation>.container>ul>li:first-child>a,
    .main-navigation>.container>ul>li:last-child>a {
        border-radius: 0;
    }

    /* Table responsive: scale down or scroll */
    .entry-content table {
        font-size: 0.8rem;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 0.375rem 0.5rem;
    }
}

/* Leaderboard and Logo Layout (Viewport <= 700px) */
@media screen and (max-width: 700px) {
    .header-main-row {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }

    .logo-area {
        margin: 0 auto;
    }

    .header-ads {
        width: 100%;
        display: flex;
        justify-content: center;
        overflow: hidden;
        /* Prevent horizontal scrolling */
    }

    .header-ads img,
    .header-ads iframe,
    .header-ads ins {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }
}

/* Archive Titles and Ad Banners (Mobile) */
@media screen and (max-width: 985px) {

    .container-title-bar,
    .archive-header-bar {
        flex-direction: column;
        text-align: left;
        border-radius: 8px;
    }

    .archive-header-bar {
        padding: 1.25rem 0.9375rem;
        border-radius: 8px;
        overflow: hidden;
    }

    .header-content-left {
        align-items: flex-start;
        width: 100%;
        margin-bottom: 1.25rem;
    }

    .page-title {
        text-align: left;
    }

    .archive-description {
        text-align: left;
        max-width: 100%;
    }

    .title-bar-ad {
        margin-left: 0;
        padding-left: 0;
        width: 100%;
        justify-content: center;
    }

    .banner-ad-small {
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
        border-radius: 8px;
        overflow: hidden;
        text-align: center;
        margin: 0 auto;
    }

    .archive-header-bar .banner-ad-small {
        margin: 0 auto;
        margin-right: 0;
    }

    .banner-ad-small img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain;
        border-radius: 8px;
    }
}

/* Global Meta Text Fallback */
.news-meta,
.post-meta,
.news-meta-header {
    font-size: 0.7rem !important;
}

.archive-card-meta,
.archive-date,
.entry-meta {
    font-size: 0.7rem !important;
}

/* ========================================
   GLOBAL HEADING FONT ENFORCEMENT
   ======================================== */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
.page-title,
.section-title,
.widget-title,
.card-title-bar h2,
.card-title-bar h3,
.card-title-bar h4 {
    font-family: var(--font-heading) !important;
}

/* ========================================
   MOBILE BUTTON RESPONSIVE FIXES
   ======================================== */
@media (max-width: 768px) {

    /* Prevent all buttons from overflowing on mobile */
    .btn,
    .btn-cta,
    button,
    input[type="submit"],
    input[type="button"],
    .btn-read-more,
    .btn-login,
    .btn-register,
    .btn-signup,
    .tgc-newsletter-form .submit-button,
    .button-primary,
    .button-contact,
    .button-search,
    .button-reset {
        max-width: 100%;
        box-sizing: border-box;
        word-break: normal;
        white-space: normal;
    }

    /* Archive card meta: stack vertically on very small screens */
    .archive-card-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    /* Archive/article Read More buttons: comfortable tap target on mobile */
    .archive-card-meta .btn-read-more,
    .archive-card-new .archive-card-meta .btn-read-more,
    a.btn-read-more {
        font-size: 0.875rem !important;
        padding: 10px 20px !important;
    }

    /* Event meta row: stack on mobile */
    .event-meta-row {
        flex-wrap: wrap;
    }

    .event-meta-row .btn-read-more {
        margin-left: 0;
        margin-top: 8px;
    }
}