/* ============================================================
   TechTruthSeeker Content Template — template.css v1.0
   ============================================================ */


/* ===== CUSTOM FONTS ===== */
@font-face {
    font-family: 'Aspal';
    src: url('../fonts/Aspal.woff2') format('woff2'),
         url('../fonts/Aspal.otf') format('opentype'),
         url('../fonts/Aspal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-VariableFont_wght.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


/* ── DESIGN TOKENS ── */
:root {
    --gold:     #C9A84C;
    --gold-lt:  #E8C97A;
    --gold-dk:  #A07830;
    --cream:    #F8F5EE;
    --dark:     #0E0C09;
    --black:    #1A1710;
    --text:     #2A2520;
    --white:    #FDFBF6;

    --display:  'Aspal', Georgia, serif;
    --body:     'Montserrat', system-ui, sans-serif;
    --mono:     'Fira Code', 'Consolas', monospace;

    --max-w:    68ch;
    --container: min(90rem, 100% - 3rem);
    --header-h: 72px;

    --shadow-sm: 0 1px 4px rgba(14,12,9,0.04);
    --shadow-md: 0 2px 20px rgba(14,12,9,0.06);
    --shadow-lg: 0 8px 32px rgba(14,12,9,0.1);

    --radius:   6px;
    --gold-border: 1px solid rgba(201,168,76,0.2);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--body);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.7;
    color: #F0ECE4;                    /* світлий текст */
    background-color: var(--dark);     /* темний фон */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Dark marble overlay — darker than landing page for readability */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);  /* 55% — темніше ніж на лендінгу (52%) */
    pointer-events: none;
    z-index: 0;
}

body > *:not(canvas) {
    position: relative;
    z-index: 1;
}

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

a {
    color: var(--gold-lt);
    text-decoration: none;
    text-underline-offset: 0.2em;
    transition: color var(--transition), text-decoration-color var(--transition);
}
a:hover {
    text-decoration: underline;
    color: var(--gold);
    text-decoration-thickness: 1px;
}
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection {
    background: rgba(201,168,76,0.3);
    color: #FAF8F3;
}

/* ── CONTAINER ── */
.container {
    width: var(--container);
    margin-inline: auto;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
    font-family: var(--display);
    color: #FAF8F3;
    line-height: 1.15;
    text-wrap: balance;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: geometricPrecision;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 0.4em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 400;
    letter-spacing: -0.005em;
    margin-top: 2.5rem;
    margin-bottom: 0.6em;
    padding-left: 1.25rem;
    position: relative;
    text-shadow:
    0 0 1px rgba(250,248,243,0.3),
    0 1px 2px rgba(0,0,0,0.5);
}
h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.001em;
    width: 3px;
    height: 1.15em;
    background: var(--gold);
    border-radius: 2px;
}

h3 {
    font-family: var(--body);
    font-size: 1.35rem;
    font-weight: 600;
    color: #F0ECE4;
    margin-top: 2rem;
    margin-bottom: 0.5em;
}

h4 {
    font-family: var(--body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.4em;
}

p { margin-bottom: 1em; max-width: var(--max-w); color: #E8E4DC;}
strong { font-weight: 600; color: #FAF8F3;}

ul, ol { padding-left: 1.5rem; margin-bottom: 1em; max-width: var(--max-w); }
li { margin-bottom: 0.35em; color: #E8E4DC;}
li::marker { color: var(--gold); }

/* ── BLOCKQUOTES ── */
blockquote {
    border-left: 3px solid var(--gold);
    padding: 0.75rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(201,168,76,0.06);
    font-style: italic;
    max-width: var(--max-w);
    border-radius: 0 var(--radius) var(--radius) 0;
    border-left-color: var(--gold);
    color: #E8E4DC;
}
blockquote p:last-child { margin-bottom: 0; }

/* ── CODE ── */
pre {
    background: var(--black);
    color: var(--cream);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: var(--mono);
    font-size: 0.9rem;
    line-height: 1.6;
    border: var(--gold-border);
}
code {
    font-family: var(--mono);
    font-size: 0.9em;
    background: rgba(26,23,16,0.06);
    padding: 0.15em 0.4em;
    border-radius: 3px;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* ── HORIZONTAL RULES ── */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
    margin: 3rem 0;
}

/* ── TABLES ── */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}
th {
    font-weight: 600;
    color: var(--dark);
    border-bottom-color: var(--gold);
    border-bottom-width: 2px;
}
tr:hover td { background: rgba(201,168,76,0.03); }

/* ═══════════ HEADER ═══════════ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    background: rgba(14,12,9,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(201,168,76,0.15);
    transition: box-shadow var(--transition);
}



.site-header.is-scrolled {
    box-shadow: 0 2px 20px rgba(14,12,9,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: var(--container);
    margin-inline: auto;
}

.header-gold-line {
    height: 1px;
    background: var(--gold);
    opacity: 0.4;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}
.site-logo img {
    width: 40px; height: 40px;
}
.logo-text {
    font-family: var(--body);  /* Montserrat, не Aspal */
    font-size: 0.80rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* Navigation */
.site-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

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

.site-nav li::before,
.site-nav li::marker {
    display: none;
    content: none;
}

.site-nav a {
    font-family: var(--body);
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245,242,236,0.45);
    text-decoration: none;
    padding: 0.25rem 0;
    position: relative;
    transition: color 0.2s;
}

.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}

.site-nav a:hover {
    color: var(--gold-lt);
    text-decoration: none;
}

.site-nav a:hover::after,
.site-nav a.active::after {
    width: 100%;
}

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

/* Mobile hamburger — світлі смужки на темному фоні */
.nav-toggle-bar {
    display: block;
    width: 24px; height: 2px;
    background: var(--gold-lt);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}



/* ═══════════ MAIN CONTENT ═══════════ */
.site-main {
    padding: 2rem 0 4rem;
    min-height: calc(100vh - var(--header-h) - 200px);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* With sidebar */
.content-grid:has(.content-sidebar) {
    grid-template-columns: 1fr 280px;
}

/* Glass card — blurred dark backdrop over marble */
.content-body {
    background: rgba(0,0,0,0.30);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(201,168,76,0.20);
    border-radius: var(--radius);
    padding: 3rem 2.5rem;
    max-width: 780px;
    margin: 0 auto;
}

.content-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
}

/* ═══════════ BREADCRUMBS ═══════════ */
.breadcrumbs-bar {
    padding: 0.75rem 0;
    font-size: 0.85rem;
    color: rgba(42,37,32,0.5);
}
.breadcrumbs-bar a {
    color: rgba(42,37,32,0.5);
}
.breadcrumbs-bar a:hover {
    color: var(--gold);
}

/* ═══════════ HERO SECTION ═══════════ */
.hero-section {
    padding: 4rem 0 3rem;
    text-align: center;
}
.hero-section h1 {
    max-width: 20ch;
    margin-inline: auto;
}
.hero-section p {
    max-width: 50ch;
    margin-inline: auto;
    font-size: 1.15rem;
    color: rgba(42,37,32,0.7);
}

/* ═══════════ FOOTER ═══════════ */
.site-footer {
    border-top: 1px solid rgba(201,168,76,0.15);
    background: var(--dark);
    color: rgba(248,245,238,0.6);
    padding: 2.5rem 0;
}

.footer-gold-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.3;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: rgba(248,245,238,0.6);
    font-family: var(--display);
    font-size: 0.95rem;
}
.footer-logo:hover { color: var(--gold-lt); }

.footer-copy {
    font-size: 0.85rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: var(--gold);
    font-size: 0.85rem;
    opacity: 0.7;
}
.footer-links a:hover { opacity: 1; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
    :root { --container: min(90rem, 100% - 2rem); }

    .nav-toggle { display: flex !important; }

    .site-nav ul {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        background: rgba(14,12,9,0.98);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0;
        border-bottom: 1px solid rgba(201,168,76,0.2);
        box-shadow: var(--shadow-md);
    }
    .site-nav ul.is-open { display: flex; }
    .site-nav li { padding: 0.6rem 0; }
    .site-nav a { font-size: 0.78rem; color: rgba(245,242,236,0.85); }

    /* Hamburger animation */
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .content-grid:has(.content-sidebar) {
        grid-template-columns: 1fr;
    }

    .content-sidebar {
        position: static;
        max-height: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .hero-section { padding: 2.5rem 0 2rem; }
}

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

/* ── MARBLE BACKGROUND LAYER ── */
.marble-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
}

/* ═══════════ ABOUT PAGE ═══════════ */

.about-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.about-cta {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(201,168,76,0.3);
}

.about-cta h2 {
    padding-left: 0;
}
.about-cta h2::before {
    display: none;
}

.about-cta .btn {
    margin-top: 1.5rem;
}

/* ── HIDE JOOMLA ARTICLE META ── */
.com-content-article .article-info,
.com-content-article dl.article-info,
.com-content-article .article-info-term,
nav[aria-label="Breadcrumbs"],
.breadcrumb,
.com-content-article__navigation,
.item-page .pager {
    display: none;
}