/*
 * Tingler Advisory — template.css  v3.0
 * Joomla 6 | 1:1 match with preview HTML
 */

/* ============================================================
   CSS VARIABLES — DARK (default, matches preview exactly)
   ============================================================ */
:root {
    --ta-accent:        #C8A96E;
    --ta-accent-rgb:    200, 169, 110;
    --ta-accent-dark:   #A8893E;
    --ta-accent-muted:  rgba(200, 169, 110, 0.12);

    /* HOVER — emerald turquoise to distinguish from gold active state */
    --ta-hover:         #14B8A6;
    --ta-hover-rgb:     20, 184, 166;
    --ta-hover-muted:   rgba(20, 184, 166, 0.12);

    --ta-bg:            #0C0E11;
    --ta-bg-surface:    #111418;
    --ta-bg-card:       #161B22;
    --ta-border:        rgba(200, 169, 110, 0.15);
    --ta-border-subtle: rgba(255, 255, 255, 0.06);

    --ta-text-primary:   #E8EDF2;
    --ta-text-secondary: #8A96A8;
    --ta-text-muted:     #5A6475;

    --ta-header-bg:     rgba(12, 14, 17, 0.96);
    --ta-topbar-bg:     #090B0E;
    --ta-footer-bg:     #090B0E;
    --ta-sidebar-bg:    #111418;

    --ta-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
    --ta-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);

    --ta-font-display: 'Playfair Display', Georgia, serif;
    --ta-font-body:    'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    --ta-font-mono:    'DM Mono', 'Courier New', monospace;

    --ta-ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --ta-dur-base:  250ms;
    --ta-dur-slow:  400ms;

    --ta-header-height: 72px;
}

/* LIGHT THEME */
[data-color-scheme="light"] {
    --ta-bg:            #F5F3EE;
    --ta-bg-surface:    #FAFAF8;
    --ta-bg-card:       #FFFFFF;
    --ta-border:        rgba(160, 130, 80, 0.2);
    --ta-border-subtle: rgba(0, 0, 0, 0.06);
    --ta-text-primary:  #1A1A1A;
    --ta-text-secondary:#5A5040;
    --ta-text-muted:    #9A8E7A;
    --ta-header-bg:     rgba(250, 250, 248, 0.96);
    --ta-topbar-bg:     #EDEBE5;
    --ta-sidebar-bg:    #FFFFFF;
    --ta-footer-bg:     #EDEBE5;
    --ta-shadow-md:     0 4px 20px rgba(0, 0, 0, 0.1);
    /* Slightly darker emerald for better contrast on light bg */
    --ta-hover:         #0D9488;
    --ta-hover-rgb:     13, 148, 136;
    --ta-hover-muted:   rgba(13, 148, 136, 0.12);
}

/* Default for [data-color-scheme="auto"] = dark (JS handles user preference) */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body.ta-body {
    font-family: var(--ta-font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--ta-text-primary);
    background-color: var(--ta-bg);
    transition:
        background-color var(--ta-dur-slow) var(--ta-ease),
        color var(--ta-dur-slow) var(--ta-ease);
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport — accounts for mobile browser chrome */
    /* Flex column layout — footer naturally sticks to bottom on short pages */
    display: flex;
    flex-direction: column;
}

/* Footer is now a normal block element — pushed to bottom by main growing */
.ta-footer {
    position: relative;
    width: 100%;
    z-index: 1;
    flex-shrink: 0;
    margin-top: auto;
}

/* Back-to-top is fixed-positioned — but as a flex child it can still take up
   a "slot" in the column. Forcing position:fixed removes it from the flex flow. */
.ta-back-to-top {
    position: fixed !important;
}

/* Hide any empty module wrappers Joomla may inject at the body end via jdoc include.
   <jdoc:include name="debug" /> renders nothing when position is empty, but some
   modules render an empty <div>. Force them to take zero layout space. */
body > div:empty {
    display: none !important;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.ta-container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: 2rem;
}

.ta-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    align-items: start;
}
.ta-col    { grid-column: span 12; }
.ta-col-4  { grid-column: span 4; }
.ta-col-6  { grid-column: span 6; }
.ta-col-8  { grid-column: span 8; }
.ta-col-12 { grid-column: span 12; }

/* When a sidebar (.ta-sidebar) sits next to the main component column,
   give the sidebar enough room so long country names in the visitor
   counter (e.g. "Vereinigte Staaten von Amerika") fit on one line. */
.ta-content-row .ta-sidebar.ta-col-4 {
    grid-column: span 6;
}
.ta-content-row .ta-component-col.ta-col-8 {
    grid-column: span 6;
}

/* ============================================================
   TOPBAR — exact preview match
   ============================================================ */
.ta-topbar {
    background: var(--ta-topbar-bg);
    border-bottom: 1px solid var(--ta-border-subtle);
    font-family: var(--ta-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--ta-text-muted);
    padding: 0.4rem 0;
    transition: background var(--ta-dur-slow) var(--ta-ease);
}
.ta-topbar__inner {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    align-items: center;
}

/* ============================================================
   HEADER — with more top padding as requested
   ============================================================ */
.ta-header {
    position: relative;
    z-index: 200;
    background: var(--ta-header-bg);
    border-bottom: 1px solid var(--ta-border);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    transition:
        background var(--ta-dur-slow) var(--ta-ease),
        border-color var(--ta-dur-slow) var(--ta-ease);
    /* MORE BREATHING ROOM */
    padding: 0.5rem 0;
}

.sticky-header .ta-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
}
/* When sticky header is active, push body content down to compensate */
body.sticky-header {
    padding-top: var(--ta-header-height);
}
/* If topbar exists above, account for it too */
body.sticky-header:has(.ta-topbar) {
    padding-top: calc(var(--ta-header-height) + 40px);
}
.ta-header.scrolled {
    box-shadow: var(--ta-shadow-md);
}

.ta-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--ta-header-height);
    gap: 1.5rem;
    /* MORE OUTER PADDING ON CONTAINER LEVEL via .ta-container,
       and extra horizontal breathing here */
    padding-inline: 0.5rem;
}

/* ── LOGO ── */
.ta-header__logo { flex-shrink: 0; }

.ta-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}
.ta-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--ta-accent), var(--ta-accent-dark));
    border-radius: 4px;
    font-family: var(--ta-font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: #0C0E11;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(200, 169, 110, 0.35);
    transition:
        transform var(--ta-dur-base) var(--ta-ease),
        box-shadow var(--ta-dur-base) var(--ta-ease);
}
.ta-logo-link:hover .ta-logo-mark {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(200, 169, 110, 0.5);
}
.ta-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.ta-logo-name {
    font-family: var(--ta-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ta-text-primary);
    letter-spacing: 0.02em;
    transition: color var(--ta-dur-slow) var(--ta-ease);
}
.ta-logo-tagline {
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    color: var(--ta-accent);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ============================================================
   NAVIGATION — CRITICAL: only ACTIVE gets gold, not other links
   ============================================================ */
.ta-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.ta-header__nav ul,
.ta-header__nav .nav,
.ta-header__nav .nav-pills,
.ta-header__nav .mod-menu {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
    margin: 0;
    padding: 0;
}
.ta-header__nav li {
    position: relative;
    list-style: none;
}
/* Ensure nested submenu li also has no list style */
.ta-header__nav li::marker { content: ''; }

.ta-header__nav li > a,
.ta-header__nav li > span {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-family: var(--ta-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--ta-text-secondary);
    border-radius: 4px;
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    transition:
        color var(--ta-dur-base) var(--ta-ease),
        background var(--ta-dur-base) var(--ta-ease);
    position: relative;
}

/* Underline indicator under links — gold (matches active state) */
.ta-header__nav li > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 14px;
    height: 1.5px;
    background: var(--ta-accent);
    transition: transform var(--ta-dur-base) var(--ta-ease),
                background var(--ta-dur-base) var(--ta-ease);
}

/* HOVER: emerald turquoise — distinguishes from active gold */
.ta-header__nav li > a:hover {
    color: var(--ta-hover);
    background: var(--ta-hover-muted);
}
.ta-header__nav li > a:hover::after {
    transform: translateX(-50%) scaleX(1);
    background: var(--ta-hover);
}

/* ACTIVE STATE — gold, ONLY the truly current page (li.current). */
.ta-header__nav li.current.active > a,
.ta-header__nav li.current > a {
    color: var(--ta-accent);
    background: var(--ta-accent-muted);
}
.ta-header__nav li.current.active > a::after,
.ta-header__nav li.current > a::after {
    transform: translateX(-50%) scaleX(1);
    background: var(--ta-accent);
}
/* Even the active link gets emerald hover so the change is visible */
.ta-header__nav li.current > a:hover {
    color: var(--ta-hover);
    background: var(--ta-hover-muted);
}
.ta-header__nav li.current > a:hover::after {
    background: var(--ta-hover);
}

/* ============================================================
   SUBMENU DROPDOWNS — matched to main nav aesthetic
   ============================================================ */

/* Caret indicator on parent items that have a submenu */
.ta-header__nav li.parent > a::before,
.ta-header__nav li.deeper > a::before,
.ta-header__nav li:has(> ul) > a::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-right: 0.5rem;
    opacity: 0.5;
    transition: transform var(--ta-dur-base) var(--ta-ease),
                opacity var(--ta-dur-base) var(--ta-ease);
}
.ta-header__nav li.parent:hover > a::before,
.ta-header__nav li.deeper:hover > a::before,
.ta-header__nav li:has(> ul):hover > a::before {
    transform: rotate(225deg);
    opacity: 1;
}

/* Submenu container — strict :scope target to only pick the actual UL, not other elements Joomla might inject */
.ta-header__nav li > ul {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: 220px;
    flex-direction: column;
    gap: 0;
    background: var(--ta-header-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--ta-border);
    border-radius: 10px;
    box-shadow: var(--ta-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity var(--ta-dur-base) var(--ta-ease),
        visibility var(--ta-dur-base) var(--ta-ease),
        transform var(--ta-dur-base) var(--ta-ease);
    z-index: 100;
    padding: 0.4rem;
    margin: 4px 0 0 0;
    /* Force standalone block — ignore any sibling elements Joomla injects */
    list-style: none;
}
.ta-header__nav li > ul::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--ta-accent), transparent);
    border-radius: 2px;
}

/* Open state */
.ta-header__nav li:hover > ul,
.ta-header__nav li:focus-within > ul {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Submenu items reset list */
.ta-header__nav li ul li {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Submenu links — matches main nav style but adapted to vertical layout */
.ta-header__nav li ul li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 6px;
    border: none;
    font-family: var(--ta-font-body);
    font-size: 0.825rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--ta-text-secondary);
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color var(--ta-dur-fast) var(--ta-ease),
        background var(--ta-dur-fast) var(--ta-ease),
        padding-left var(--ta-dur-fast) var(--ta-ease);
}

/* Subtle bullet appears on hover, indicating selection */
.ta-header__nav li ul li > a::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transform: scale(0);
    transition:
        opacity var(--ta-dur-fast) var(--ta-ease),
        transform var(--ta-dur-fast) var(--ta-ease);
}

/* Submenu link hover — emerald, just like main nav */
.ta-header__nav li ul li > a:hover {
    color: var(--ta-hover);
    background: var(--ta-hover-muted);
    padding-left: 1.25rem;
}
.ta-header__nav li ul li > a:hover::before {
    opacity: 1;
    transform: scale(1);
}
/* The underline indicator from main nav is NOT used in submenu */
.ta-header__nav li ul li > a::after { display: none; }

/* Active submenu item — gold */
.ta-header__nav li ul li.current > a,
.ta-header__nav li ul li.current.active > a {
    color: var(--ta-accent);
    background: var(--ta-accent-muted);
}
.ta-header__nav li ul li.current > a::before,
.ta-header__nav li ul li.current.active > a::before {
    opacity: 1;
    transform: scale(1);
    background: var(--ta-accent);
}
/* Even active item hovers emerald */
.ta-header__nav li ul li.current > a:hover {
    color: var(--ta-hover);
    background: var(--ta-hover-muted);
}

/* Nested submenus (third level) — open to the right */
.ta-header__nav li ul ul {
    top: 0;
    left: calc(100% + 4px);
    transform: translateX(-8px) translateY(0);
    margin-top: 0;
}
.ta-header__nav li ul li:hover > ul,
.ta-header__nav li ul li:focus-within > ul {
    transform: translateX(0) translateY(0);
}

/* HEADER ACTIONS */
.ta-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.ta-header__search { display: flex; align-items: center; }

/* ============================================================
   DARK MODE TOGGLE — preview exact
   ============================================================ */
.ta-darkmode-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--ta-border);
    border-radius: 999px;
    padding: 0.4rem 0.875rem;
    cursor: pointer;
    color: var(--ta-text-secondary);
    font-family: var(--ta-font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: all var(--ta-dur-base) var(--ta-ease);
}
.ta-darkmode-toggle:hover {
    border-color: var(--ta-hover);
    color: var(--ta-hover);
    background: var(--ta-hover-muted);
}
.ta-toggle-icon { display: inline-flex; align-items: center; justify-content: center; }
.ta-toggle-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

[data-color-scheme="dark"]  .ta-toggle-icon--moon { display: none; }
[data-color-scheme="dark"]  .ta-toggle-icon--sun  { display: inline-flex; }
[data-color-scheme="light"] .ta-toggle-icon--sun  { display: none; }
[data-color-scheme="light"] .ta-toggle-icon--moon { display: inline-flex; }

.ta-toggle-track {
    position: relative;
    display: inline-flex;
    width: 34px;
    height: 18px;
    background: rgba(200, 169, 110, 0.25);
    border-radius: 999px;
    transition: background var(--ta-dur-base) var(--ta-ease);
}
[data-color-scheme="light"] .ta-toggle-track { background: #D8D0C0; }

.ta-toggle-thumb {
    position: absolute;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
                background var(--ta-dur-base) var(--ta-ease);
}
[data-color-scheme="dark"]  .ta-toggle-thumb { transform: translateX(16px); background: var(--ta-accent); }
[data-color-scheme="light"] .ta-toggle-thumb { transform: translateX(2px);  background: #9A8E7A; }

/* ============================================================
   MOBILE MENU TRIGGER
   ============================================================ */
.ta-mobile-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--ta-border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--ta-text-primary);
    transition: all 150ms var(--ta-ease);
}
.ta-mobile-trigger:hover { border-color: var(--ta-hover); color: var(--ta-hover); }
.ta-burger { display: flex; flex-direction: column; gap: 4px; }
.ta-burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition:
        transform var(--ta-dur-base) var(--ta-ease),
        opacity var(--ta-dur-base) var(--ta-ease);
    transform-origin: center;
}
[aria-expanded="true"] .ta-burger span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
[aria-expanded="true"] .ta-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
[aria-expanded="true"] .ta-burger span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ============================================================
   HERO
   ============================================================ */
.ta-hero {
    position: relative;
    overflow: hidden;
    background: var(--ta-bg-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background var(--ta-dur-slow) var(--ta-ease);
}
.ta-hero--fullheight { min-height: calc(100vh - var(--ta-header-height)); }
.ta-hero--banner     { min-height: 380px; }

.ta-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.ta-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: taGlowPulse 8s ease-in-out infinite alternate;
}
.ta-hero__glow--1 {
    width: 700px; height: 450px;
    top: -80px; right: -80px;
    background: radial-gradient(circle, rgba(200, 169, 110, 0.12) 0%, transparent 70%);
}
.ta-hero__glow--2 {
    width: 450px; height: 350px;
    bottom: -60px; left: 8%;
    background: radial-gradient(circle, rgba(200, 169, 110, 0.06) 0%, transparent 70%);
    animation-delay: -4s;
}
@keyframes taGlowPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 1;   transform: scale(1.15); }
}

.ta-hero__content-wrap,
.ta-hero__modules {
    position: relative;
    z-index: 1;
    width: 100%;
}

.ta-hero__scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 1;
    animation: taScrollFade 2s ease-in-out infinite;
}
.ta-scroll-line {
    display: block;
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--ta-accent), transparent);
}
.ta-scroll-label {
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ta-text-muted);
}
@keyframes taScrollFade {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50%       { opacity: 1;   transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.ta-breadcrumbs-wrap {
    border-bottom: 1px solid var(--ta-border-subtle);
    padding: 0.6rem 0;
    background: var(--ta-bg-surface);
    transition: background var(--ta-dur-slow) var(--ta-ease);
}
.ta-breadcrumbs-wrap ol,
.ta-breadcrumbs-wrap .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0;
    font-family: var(--ta-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    color: var(--ta-text-muted);
}
.ta-breadcrumbs-wrap li + li::before {
    content: '/';
    margin: 0 0.5rem;
    color: var(--ta-border);
}
.ta-breadcrumbs-wrap a { color: var(--ta-accent); text-decoration: none; transition: color 150ms; }
.ta-breadcrumbs-wrap a:hover { color: var(--ta-hover); text-decoration: underline; }

/* ============================================================
   MAIN
   ============================================================ */
.ta-main {
    padding: 4rem 0;
    min-height: 60vh;
    /* Grow to fill available space — pushes footer to bottom on short pages */
    flex: 1 0 auto;
}

/* ============================================================
   COMPONENT TYPOGRAPHY — preview match, no gold years, no lines
   ============================================================ */
.ta-component-col {
    font-family: var(--ta-font-body);
    color: var(--ta-text-secondary);
    line-height: 1.8;
}

/* Headings */
.ta-component-col h1 {
    font-family: var(--ta-font-display);
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--ta-text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.ta-component-col h2 {
    font-family: var(--ta-font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--ta-text-primary);
    letter-spacing: -0.02em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.ta-component-col h3 {
    font-family: var(--ta-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--ta-text-primary);
    margin-top: 2rem;
    margin-bottom: 0.875rem;
}
.ta-component-col h4,
.ta-component-col h5,
.ta-component-col h6 {
    font-family: var(--ta-font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ta-accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Page header — divider line under titles */
.page-header {
    margin-bottom: 2.5rem;
    position: relative;
}
.page-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background: linear-gradient(to right, var(--ta-accent), transparent);
    margin-top: 1.5rem;
}
.page-header h1,
.page-header h2 {
    margin-bottom: 0;
}

/* Paragraph */
.ta-component-col p {
    font-family: var(--ta-font-body);
    color: var(--ta-text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

/* Links */
.ta-component-col a {
    color: var(--ta-accent);
    text-decoration: underline;
    text-decoration-color: rgba(200, 169, 110, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color var(--ta-dur-base);
}
.ta-component-col a:hover { text-decoration-color: var(--ta-hover); color: var(--ta-hover); }

/* Bold */
.ta-component-col strong,
.ta-component-col b {
    color: var(--ta-text-primary);
    font-weight: 600;
}

/* Italic */
.ta-component-col em,
.ta-component-col i {
    color: var(--ta-accent);
    font-style: italic;
}

/* LISTS — clean, no gold years, no dividing lines */
.ta-component-col ul,
.ta-component-col ol {
    color: var(--ta-text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.85;
    font-family: var(--ta-font-body);
    font-size: 0.95rem;
}
.ta-component-col ul {
    list-style: disc;
}
.ta-component-col ol {
    list-style: decimal;
}
.ta-component-col li {
    margin-bottom: 0.625rem;
    padding: 0;
    border: none;
    color: var(--ta-text-secondary);
}
.ta-component-col ul li::marker {
    color: var(--ta-accent);
    font-size: 0.9em;
}
.ta-component-col ol li::marker {
    color: var(--ta-accent);
    font-family: var(--ta-font-mono);
    font-weight: 500;
}

/* Images — no borders, left-aligned by default, respect alignment classes */
.ta-component-col img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: none;
    margin: 1.5rem 0;
}
/* Inline images (inside paragraphs) flow naturally */
.ta-component-col p img,
.ta-component-col em img,
.ta-component-col span img {
    display: inline-block;
    vertical-align: middle;
    margin: 0.25rem 0;
}
/* Joomla alignment classes (TinyMCE / JCE editors) */
.ta-component-col img.float-start,
.ta-component-col img.pull-left,
.ta-component-col img[align="left"] {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}
.ta-component-col img.float-end,
.ta-component-col img.pull-right,
.ta-component-col img[align="right"] {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}
.ta-component-col img.mx-auto,
.ta-component-col img.d-block.mx-auto,
.ta-component-col img[align="center"],
.ta-component-col p[style*="text-align: center"] img,
.ta-component-col p[style*="text-align:center"] img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/* Clear floats after blocks that contain floated images */
.ta-component-col p::after,
.ta-component-col article::after {
    content: '';
    display: table;
    clear: both;
}

/* Global safety: no borders on any image anywhere */
img { border: none; }

/* Tables */
.ta-component-col table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-family: var(--ta-font-body);
}
.ta-component-col td,
.ta-component-col th {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--ta-border-subtle);
    color: var(--ta-text-secondary);
    vertical-align: top;
}
.ta-component-col th {
    background: var(--ta-bg-card);
    color: var(--ta-accent);
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* HR */
.ta-component-col hr {
    border: none;
    border-top: 1px solid var(--ta-border);
    margin: 2rem 0;
}

/* Article wrapper */
.ta-component-col article {
    border-bottom: 1px solid var(--ta-border-subtle);
    padding-bottom: 3rem;
    margin-bottom: 3rem;
}
.ta-component-col article:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* ============================================================
   SIDEBAR + MODULE BOX
   ============================================================ */
.ta-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: sticky;
    top: calc(var(--ta-header-height) + 2rem);
}

.ta-mod-sidebar {
    background: var(--ta-sidebar-bg);
    border: 1px solid var(--ta-border);
    border-radius: 12px;
    overflow: hidden;
    transition:
        background var(--ta-dur-slow) var(--ta-ease),
        border-color var(--ta-dur-slow) var(--ta-ease);
}
.ta-mod-sidebar__header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--ta-border-subtle);
    background: rgba(200, 169, 110, 0.04);
}
.ta-mod-sidebar__title {
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ta-accent);
    margin: 0;
    line-height: 1;
}
.ta-mod-sidebar__content {
    padding: 1.25rem;
    font-family: var(--ta-font-body);
    font-size: 0.875rem;
    color: var(--ta-text-secondary);
}

/* Nav links inside sidebar */
.ta-mod-sidebar__content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ta-mod-sidebar__content li {
    border-bottom: 1px solid var(--ta-border-subtle);
    padding: 0;
    margin: 0;
}
.ta-mod-sidebar__content li:last-child { border-bottom: none; }
.ta-mod-sidebar__content li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    color: var(--ta-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--ta-dur-base) var(--ta-ease);
}
.ta-mod-sidebar__content li a::before {
    content: '→';
    color: var(--ta-border);
    font-size: 0.7rem;
    transition: color var(--ta-dur-base) var(--ta-ease);
}
.ta-mod-sidebar__content li a:hover { color: var(--ta-hover); }
.ta-mod-sidebar__content li a:hover::before { color: var(--ta-hover); }

/* Visitor counter inside sidebar — prevent line breaks on country names */
.ta-mod-sidebar__content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ta-font-body);
    font-size: 0.75rem;
    /* fixed layout lets us control column widths precisely */
    table-layout: fixed;
}
.ta-mod-sidebar__content table td {
    padding: 0.45rem 0.25rem;
    border: none;
    border-bottom: 1px solid var(--ta-border-subtle);
    color: var(--ta-text-secondary);
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* First column (flag) — narrow fixed */
.ta-mod-sidebar__content table td:first-child {
    width: 32px;
    padding-right: 0.4rem;
}
/* Second column (country name) — TAKES ALL REMAINING SPACE */
.ta-mod-sidebar__content table td:nth-child(2) {
    width: auto;
}
/* Last column (counter number) — only as wide as content */
.ta-mod-sidebar__content table td:last-child {
    width: 50px;
    text-align: right;
    padding-left: 0.5rem;
    font-family: var(--ta-font-mono);
    color: var(--ta-accent);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}
/* Edge case: when there are only 2 columns (flag + country), let country take everything */
.ta-mod-sidebar__content table tr:has(td:nth-child(2):last-child) td:nth-child(2) {
    width: auto;
}
.ta-mod-sidebar__content table tr:last-child td { border-bottom: none; }
.ta-mod-sidebar__content table img {
    border: none;
    border-radius: 2px;
    width: 22px;
    height: 14px;
    object-fit: cover;
    margin: 0;
    display: inline-block;
    vertical-align: middle;
    max-width: none;
}
/* Counter total — gold mono numbers */
.ta-mod-sidebar__content b,
.ta-mod-sidebar__content strong {
    font-family: var(--ta-font-mono);
    color: var(--ta-accent);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}
/* Tighter padding inside visitor counter widget */
.ta-sidebar--right .ta-mod-sidebar:has(table) .ta-mod-sidebar__content {
    padding: 0.5rem 0.75rem;
}

/* ============================================================
   SYSTEM MESSAGES
   ============================================================ */
.system-message, .alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-family: var(--ta-font-body);
    border-left: 3px solid;
}
.alert-info    { background: rgba(45, 125, 210, 0.1);  border-color: #2D7DD2; color: var(--ta-text-primary); }
.alert-success { background: rgba(46, 166, 111, 0.1);  border-color: #2EA66F; color: var(--ta-text-primary); }
.alert-warning { background: rgba(212, 160, 23, 0.1);  border-color: #D4A017; color: var(--ta-text-primary); }
.alert-danger  { background: rgba(192, 57, 43, 0.1);   border-color: #C0392B; color: var(--ta-text-primary); }

/* ============================================================
   FORMS
   ============================================================ */
.ta-component-col input[type="text"],
.ta-component-col input[type="email"],
.ta-component-col input[type="password"],
.ta-component-col textarea,
.ta-component-col select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--ta-bg-card);
    border: 1px solid var(--ta-border);
    border-radius: 4px;
    color: var(--ta-text-primary);
    font-family: var(--ta-font-body);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: border-color 150ms var(--ta-ease), box-shadow 150ms var(--ta-ease);
}
.ta-component-col input:focus,
.ta-component-col textarea:focus,
.ta-component-col select:focus {
    outline: none;
    border-color: var(--ta-accent);
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
}
.ta-component-col label {
    display: block;
    font-family: var(--ta-font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ta-text-secondary);
    margin-bottom: 0.5rem;
}
.ta-component-col button[type="submit"],
.ta-component-col input[type="submit"],
.ta-component-col .btn-primary,
.ta-component-col button.btn {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--ta-accent), var(--ta-accent-dark));
    color: #0C0E11;
    border: none;
    border-radius: 4px;
    font-family: var(--ta-font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 150ms, transform 150ms;
}
.ta-component-col button[type="submit"]:hover { opacity: 0.9; transform: translateY(-1px); }

/* ============================================================
   SEARCH BOX in header
   ============================================================ */
.ta-header__search input[type="text"],
.ta-header__search input[type="search"] {
    background: var(--ta-bg-card);
    border: 1px solid var(--ta-border);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    color: var(--ta-text-primary);
    font-family: var(--ta-font-body);
    font-size: 0.85rem;
    width: 160px;
    transition: all var(--ta-dur-base) var(--ta-ease);
}
.ta-header__search input:focus {
    outline: none;
    border-color: var(--ta-accent);
    width: 220px;
    box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.12);
}

/* ============================================================
   FOOTER — fixed always at bottom, compact for visibility
   ============================================================ */
.ta-footer {
    background: var(--ta-footer-bg);
    border-top: 1px solid rgba(200, 169, 110, 0.12);
    color: var(--ta-text-secondary);
    font-family: var(--ta-font-body);
    font-size: 0.875rem;
    transition: background-color var(--ta-dur-slow) var(--ta-ease),
                color var(--ta-dur-slow) var(--ta-ease);
}
/* Footer headings use theme-aware primary text */
.ta-footer .ta-logo-name,
.ta-footer h3,
.ta-footer h4 {
    color: var(--ta-text-primary);
}

.ta-footer__top {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(200, 169, 110, 0.08);
}
.ta-footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── FOOTER MODULE CHROME (ta_footer)  ──
   Joomla menu modules dropped into footnav-1/2/3 are wrapped in
   .ta-mod-footer by the chrome — these rules auto-style them like
   the old default blocks (gold heading + thin link list with — bullet). */
.ta-mod-footer {
    /* container — no extra background */
}
.ta-mod-footer__title {
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ta-accent);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

/* All ul lists inside footer modules (mod_menu, mod_custom, etc.) */
.ta-mod-footer ul,
.ta-mod-footer .mod-menu,
.ta-mod-footer .nav,
.ta-mod-footer ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    margin: 0;
}
.ta-mod-footer li {
    list-style: none;
    border: none;
    padding: 0;
    margin: 0;
}
.ta-mod-footer li::marker {
    content: '';
}
.ta-mod-footer a,
.ta-mod-footer li > a,
.ta-mod-footer li > span {
    color: var(--ta-text-secondary);
    text-decoration: none;
    font-family: var(--ta-font-body);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
    transition: color 150ms var(--ta-ease);
}
.ta-mod-footer a::before,
.ta-mod-footer li > a::before {
    content: '—';
    color: rgba(200, 169, 110, 0.25);
    font-size: 0.65rem;
    flex-shrink: 0;
    transition: color 150ms var(--ta-ease);
}
.ta-mod-footer a:hover,
.ta-mod-footer li > a:hover {
    color: var(--ta-hover);
}
.ta-mod-footer a:hover::before,
.ta-mod-footer li > a:hover::before {
    color: var(--ta-hover);
}

/* Custom HTML / text inside footer modules */
.ta-mod-footer p {
    color: var(--ta-text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0 0 0.5rem 0;
}
.ta-mod-footer strong,
.ta-mod-footer b {
    color: var(--ta-text-primary);
    font-weight: 600;
}

/* Footer bottom bar */
.ta-footer__bottom { padding: 0.5rem 0; }
.ta-footer__bottom-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.ta-footer__copyright {
    font-family: var(--ta-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    color: var(--ta-text-muted);
    margin: 0;
    text-align: center;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.ta-back-to-top {
    position: fixed;
    /* Sit above the fixed footer */
    bottom: 2rem;
    right: 2rem;
    z-index: 500;
    width: 44px;
    height: 44px;
    background: var(--ta-bg-card);
    border: 1px solid var(--ta-border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--ta-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--ta-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--ta-dur-base) var(--ta-ease);
}
.ta-back-to-top svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none; stroke-width: 2.5;
}
.ta-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ta-back-to-top:hover {
    background: var(--ta-hover-muted);
    border-color: var(--ta-hover);
    color: var(--ta-hover);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes taFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes taFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.ta-header { animation: taFadeIn var(--ta-dur-slow) ease both; }
.ta-main   { animation: taFadeUp var(--ta-dur-slow) ease 80ms both; }
.ta-footer { animation: taFadeIn var(--ta-dur-slow) ease 160ms both; }

.ta-will-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ta-ease), transform 0.5s var(--ta-ease);
    transition-delay: var(--ta-reveal-delay, 0ms);
}
.ta-revealed { opacity: 1 !important; transform: translateY(0) !important; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--ta-accent);
    outline-offset: 3px;
    border-radius: 2px;
}
.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;
}

/* ============================================================
   RESPONSIVE — TABLET ≤1024px
   ============================================================ */
@media (max-width: 1024px) {
    .ta-col-4 { grid-column: span 12; }
    .ta-col-8 { grid-column: span 12; }
    .ta-sidebar { position: static; }

    /* Mobile nav — full-screen overlay above ALL page content */
    .ta-header__nav {
        display: none;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important; /* dynamic viewport — accounts for mobile browser chrome */
        max-width: none !important;
        /* More transparent so the blur effect behind it is actually visible */
        background: rgba(12, 14, 17, 0.65) !important;
        backdrop-filter: blur(24px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
        /* Force own stacking context for the blur to work */
        isolation: isolate !important;
        will-change: backdrop-filter !important;
        z-index: 9999 !important; /* above header, content, everything */
        padding: calc(var(--ta-header-height) + 1rem) 1.5rem 2rem 1.5rem !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 !important;
    }
    [data-color-scheme="light"] .ta-header__nav {
        background: rgba(250, 250, 248, 0.55) !important;
    }
    /* Fallback for browsers WITHOUT backdrop-filter support — solid background */
    @supports not (backdrop-filter: blur(1px)) {
        .ta-header__nav {
            background: rgba(12, 14, 17, 0.97) !important;
        }
        [data-color-scheme="light"] .ta-header__nav {
            background: rgba(250, 250, 248, 0.98) !important;
        }
    }
    .ta-header__nav.is-open {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    /* Top-level ul */
    .ta-header__nav > ul,
    .ta-header__nav .mod-menu {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.4rem !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .ta-header__nav li {
        width: 100% !important;
        position: relative !important;
        list-style: none !important;
    }
    .ta-header__nav li > a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        padding: 0.95rem 1.1rem !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        border: 1px solid var(--ta-border-subtle) !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.02) !important;
        color: var(--ta-text-primary) !important;
        text-decoration: none !important;
        line-height: 1.3 !important;
        min-height: 48px !important;
    }
    [data-color-scheme="light"] .ta-header__nav li > a {
        background: rgba(0, 0, 0, 0.02) !important;
    }
    .ta-header__nav li > a:hover,
    .ta-header__nav li.current > a {
        border-color: var(--ta-accent) !important;
        background: rgba(200, 169, 110, 0.08) !important;
        color: var(--ta-accent) !important;
    }
    /* Hide the underline animation on mobile (not needed) */
    .ta-header__nav li > a::after {
        display: none !important;
    }

    /* Submenu on mobile — nested inside parent, collapsed by default */
    .ta-header__nav li ul {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        opacity: 0 !important;
        visibility: hidden !important;
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        gap: 0 !important;
        z-index: auto !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }
    /* When parent has .is-expanded class (toggled by JS) */
    .ta-header__nav li.is-expanded > ul {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin: 0.4rem 0 0 0 !important;
        padding: 0.4rem 0 0 1rem !important;
        border-left: 2px solid var(--ta-border) !important;
        gap: 0.3rem !important;
        max-height: 2000px !important;
    }
    .ta-header__nav li ul::before {
        display: none !important;
    }
    .ta-header__nav li ul li > a {
        padding: 0.75rem 0.9rem !important;
        font-size: 0.875rem !important;
        min-height: 42px !important;
    }
    .ta-header__nav li ul li > a::before {
        display: none !important;
    }

    /* Hide the desktop CSS caret on mobile — Joomla's toggle button replaces it */
    .ta-header__nav li.parent > a::before,
    .ta-header__nav li.deeper > a::before,
    .ta-header__nav li:has(> ul) > a::before {
        display: none !important;
        content: none !important;
    }

    /* Right-align all menu link text on mobile */
    .ta-header__nav li > a {
        justify-content: flex-end !important;
        text-align: right !important;
    }
    .ta-header__nav li ul li > a {
        justify-content: flex-end !important;
        text-align: right !important;
    }

    /* Make the parent link a flex container so the toggle button sits next to it */
    .ta-header__nav li:has(> ul) {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        align-items: stretch !important;
        gap: 0 !important;
    }
    .ta-header__nav li:has(> ul) > a {
        grid-column: 1 !important;
    }
    .ta-header__nav li:has(> ul) > ul {
        grid-column: 1 / -1 !important;
    }

    /* Show & style the Joomla submenu toggle button as a tappable caret */
    .ta-header__nav .mod-menu__toggle-sub {
        display: inline-flex !important;
        grid-column: 2 !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        min-height: 48px !important;
        margin: 0 0 0 0.4rem !important;
        padding: 0 !important;
        background: rgba(255, 255, 255, 0.02) !important;
        border: 1px solid var(--ta-border-subtle) !important;
        border-radius: 8px !important;
        color: var(--ta-text-secondary) !important;
        cursor: pointer !important;
        transition: background 150ms ease, border-color 150ms ease, color 150ms ease !important;
    }
    [data-color-scheme="light"] .ta-header__nav .mod-menu__toggle-sub {
        background: rgba(0, 0, 0, 0.02) !important;
    }
    .ta-header__nav .mod-menu__toggle-sub:hover,
    .ta-header__nav .mod-menu__toggle-sub:focus {
        border-color: var(--ta-accent) !important;
        color: var(--ta-accent) !important;
        background: rgba(200, 169, 110, 0.08) !important;
        outline: none !important;
    }

    /* Replace the icon-chevron-down span with an SVG via CSS mask */
    .ta-header__nav .mod-menu__toggle-sub .icon-chevron-down {
        display: inline-block !important;
        width: 14px !important;
        height: 14px !important;
        background: currentColor !important;
        -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat !important;
                mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat !important;
        transition: transform 200ms var(--ta-ease) !important;
    }
    .ta-header__nav .mod-menu__toggle-sub[aria-expanded="true"] .icon-chevron-down,
    .ta-header__nav li.is-expanded > .mod-menu__toggle-sub .icon-chevron-down {
        transform: rotate(180deg) !important;
    }

    /* Mobile burger trigger needs to stay ABOVE the open nav drawer */
    .ta-mobile-trigger {
        display: flex !important;
        position: relative !important;
        z-index: 10000 !important; /* above .ta-header__nav (9999) */
    }
    .ta-header {
        z-index: 9998 !important;
    }
    /* When nav is open, raise header itself just below nav so burger stays visible */
    body:has(.ta-header__nav.is-open) .ta-header {
        z-index: 10000 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom-color: transparent !important;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE ≤640px
   ============================================================ */
@media (max-width: 640px) {
    :root { --ta-header-height: 60px; }
    .ta-container { padding-inline: 1.25rem; }
    .ta-row { gap: 0.75rem; }
    .ta-logo-tagline { display: none; }
    .ta-footer__top { padding: 1rem 0; }
    .ta-hero--fullheight { min-height: 80vh; }

    .ta-back-to-top { bottom: 1rem; right: 1.25rem; }
}

/* PRINT */
@media print {
    .ta-header, .ta-topbar, .ta-footer, .ta-back-to-top,
    .ta-sidebar, .ta-darkmode-toggle, .ta-mobile-trigger,
    .ta-hero { display: none !important; }
    body {
        background: white !important;
        background-image: none !important;
        color: black !important;
    }
    .ta-main { padding: 0; }
    .ta-col-8 { grid-column: span 12 !important; }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   Joomla accessibility helper class
   ============================================================ */
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Hide the Joomla submenu toggle button globally; mobile breakpoint un-hides it */
.mod-menu__toggle-sub {
    display: none;
}
