/*
Theme Name: TroxTheme
Description: Very Fast, SEO Full compatible, Full Schema Support.
Author: TroxTheme Team For Programming and Design
Theme URI: https://troxtheme.org
Author URI: https://troxtheme.org
Version: 3.6.4
*/

/* ========================================
   1. CSS Variables & Theme System
   ======================================== */

:root {
    --container: 1200px;
    --gap: 1.25rem;
    --radius: 8px;
    --radius-sm: 5px;
    --transition: 0.25s ease;
    --font: 'troxtheme', 'Segoe UI', Arial, sans-serif, tahoma;
    --header-h: 56px;
}

/* Light Theme (default) */
[data-theme="light"],
body:not([data-theme]) {
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #fafbfc;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: rgba(0,0,0,0.04);
    --border: #e4e6eb;
    --border-light: rgba(0,0,0,0.06);
    --text-1: #1a1a2e;
    --text-2: #65676b;
    --text-3: #8a8d91;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    color-scheme: light;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-hover: #22223a;
    --bg-secondary: #16162a;
    --bg-tertiary: rgba(255,255,255,0.06);
    --border: #2a2a40;
    --border-light: rgba(255,255,255,0.08);
    --text-1: #e4e6eb;
    --text-2: #b0b3b8;
    --text-3: #8a8d91;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.35);
    color-scheme: dark;
}

/* ========================================
   2. Reset & Base
   ======================================== */

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

html {
    font-size: var(--main-font-size, 16px);
    line-height: 1.65;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg-body);
    font-family: var(--font);
    color: var(--text-1);
    overflow-y: scroll;
    min-height: 100vh;
}

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

a:hover {
    color: var(--main-color);
}

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

iframe { max-width: 100%; }
textarea { width: 100%; }
ul, ol { list-style: none; }

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: var(--gap) 0;
}

::selection {
    background: var(--main-color);
    color: #fff;
}

/* ========================================
   3. Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-1);
    line-height: 1.4;
    font-weight: 700;
}

h1 {
    font-size: 1.55em;
    margin: 0 0 0.8rem 0;
}

h2 {
    font-size: 1.15em;
    margin: 1.5rem 0 0.8rem 0;
}

/* Decorative h2 only inside article body */
.article-body h2 {
    padding: 0.6em 1em;
    background: var(--bg-secondary);
    border-right: 3px solid var(--main-color);
    border-radius: var(--radius-sm);
}

h3 {
    font-size: 1.08em;
    margin: 1.2rem 0 0.5rem 0;
}

h4, h5, h6 {
    font-size: 1em;
    margin: 1rem 0 0.5rem 0;
}

p { margin-bottom: 1em; }

/* ========================================
   4. Layout
   ======================================== */

main {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--gap);
    min-height: 60vh;
    word-break: break-word;
}

/* ========================================
   5. Buttons
   ======================================== */

.submit, .button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6em 1.8em;
    background: var(--main-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    gap: 0.4em;
}

.submit:hover, .button:hover, .btn:hover {
    filter: brightness(1.1);
    box-shadow: var(--shadow-md);
    color: #fff;
    transform: translateY(-1px);
}

.add-comment {
    margin: 1.5rem 0;
    text-align: center;
}

/* ========================================
   6. Header
   ======================================== */

.header {
    background: var(--main-color);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
    display: flex;
    align-items: center;
    gap: 0;
    height: 56px;
}

/* Logo */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding-left: 1.2em;
    border-left: 1px solid rgba(255,255,255,0.2);
    margin-left: 0.8em;
}

.logo a {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.4em;
    color: #fff;
    line-height: 1;
}

.logo .img {
    max-height: 40px;
    width: auto;
}

.logo .img:hover {
    opacity: 0.85;
}

.logo-desc {
    font-size: 0.52em;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    line-height: 1.3;
    max-width: 120px;
    display: block;
}

/* Header Nav (inline next to logo) */
.header-nav {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}

.header-nav > ul {
    display: flex;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.header-nav li {
    position: relative;
}

.header-nav > ul > li > a,
.nav-more-btn {
    display: flex;
    align-items: center;
    gap: 0.25em;
    padding: 0 0.75em;
    height: 56px;
    font-size: 0.88em;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    transition: color var(--transition);
    border-bottom: 3px solid transparent;
}

.header-nav > ul > li > a:hover,
.nav-more-btn:hover {
    color: #fff;
}

.header-nav .current-menu-item > a,
.header-nav .current-menu-ancestor > a {
    color: #fff;
    border-bottom-color: #fff;
}

/* Dropdown */
.header-nav ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s;
    z-index: 100;
    padding: 0.3em;
    overflow: visible;
    list-style: none;
    margin: 0;
}

.header-nav li:hover > ul {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.header-nav ul ul a {
    padding: 0.5em 1em;
    font-size: 0.86em;
    color: var(--text-1);
    border-radius: var(--radius-sm);
    font-weight: 500;
    display: block;
}

.header-nav ul ul a:hover {
    background: var(--bg-tertiary);
    color: var(--main-color);
}

.header-nav ul ul ul {
    top: 0;
    right: 100%;
}

/* Nav arrow icon */
.nav-arrow {
    font-size: 0.7em;
    margin-right: 0.15em;
    opacity: 0.5;
}

/* Nav More dropdown */
.nav-more {
    position: relative;
    flex-shrink: 0;
}

.nav-more-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 0.3em;
    visibility: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.2s;
    z-index: 100;
}

.nav-more.open .nav-more-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-more-dropdown li {
    list-style: none;
}

.nav-more-dropdown > li > a {
    display: block;
    padding: 0.5em 1em;
    font-size: 0.86em;
    color: var(--text-1);
    font-weight: 500;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.nav-more-dropdown > li > a:hover {
    background: var(--bg-tertiary);
    color: var(--main-color);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
    margin-right: auto;
    padding-right: 0.5em;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    color: rgba(255,255,255,0.85);
    font-size: 0.95em;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
}

.header-icon-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.header-icon-btn .icon-sun { display: none; }
[data-theme="dark"] .header-icon-btn .icon-sun { display: inline; }
[data-theme="dark"] .header-icon-btn .icon-moon { display: none; }

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    color: rgba(255,255,255,0.85);
    font-size: 1.1em;
    padding: 0;
    line-height: 1;
}

.menu-toggle:hover {
    color: #fff;
}

/* Search Overlay */
.search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    padding: 0.8em var(--gap);
}

.search-overlay.active {
    display: block;
}

.search-overlay-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.search-overlay .search-form {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    overflow: hidden;
    transition: all var(--transition);
}

.search-overlay .search-form:focus-within {
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(62,114,192,0.12);
}

.search-overlay .search-field {
    flex: 1;
    border: none;
    padding: 0.6em 1.1em;
    font-family: var(--font);
    font-size: 0.92em;
    background: transparent;
    outline: none;
    color: var(--text-1);
    min-width: 0;
}

.search-overlay .search-field::placeholder {
    color: var(--text-3);
}

.search-submit {
    width: 40px;
    height: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-3);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-submit:hover {
    color: var(--main-color);
}

.search-close {
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.4em;
    color: var(--text-3);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.search-close:hover {
    color: var(--main-color);
    background: var(--bg-tertiary);
}

.nav-more-dropdown .sub-menu {
    position: static;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    padding-right: 1em;
    padding-left: 0;
    min-width: auto;
    background: none;
}

.nav-more-dropdown .sub-menu a {
    padding: 0.4em 1em;
    font-size: 0.82em;
    color: var(--text-2);
}

.nav-more-dropdown .sub-menu a:hover {
    color: var(--main-color);
}

/* 6.4 Mobile Menu */
@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }

    body {
        padding-top: 56px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-nav {
        display: none;
    }

    .header-nav.mobile-open {
        display: block;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--bg-card);
        box-shadow: var(--shadow-lg);
        z-index: 99;
        padding: 0.5em;
        overflow: visible;
    }

    .header-nav.mobile-open > ul {
        flex-direction: column;
    }

    .header-nav.mobile-open > ul > li > a {
        height: auto;
        padding: 0.65em 1em;
        color: var(--text-1);
        border-radius: var(--radius-sm);
        border-bottom: none;
    }

    .header-nav.mobile-open > ul > li > a:hover {
        background: var(--bg-tertiary);
        color: var(--main-color);
    }

    .header-nav.mobile-open ul ul {
        position: static;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        padding-right: 1.5em;
        padding-left: 0;
    }

    .header-nav.mobile-open .nav-more {
        display: none;
    }

    .header-nav.mobile-open .nav-cat-item {
        display: list-item !important;
    }

    .logo {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
    }

    .logo-desc {
        display: none;
    }

    .search-overlay {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
    }
}

/* ========================================
   7. Hero Section
   ======================================== */

.hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 6px;
    height: 400px;
}

.hero-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    grid-row: span 2;
}

.hero-main > a {
    display: block;
    height: 100%;
    position: relative;
}

.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-main:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 3em 1.5em 1.5em;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.35) 65%, transparent 100%);
    color: #fff;
}

.cat-badge {
    display: inline-block;
    padding: 0.2em 0.75em;
    background: var(--main-color);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5em;
}

.hero-title {
    font-size: 1.2em;
    font-weight: 800;
    line-height: 1.45;
    color: #fff;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-side-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}

.hero-side-item > a {
    display: block;
    height: 100%;
    position: relative;
}

.hero-side-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-side-item:hover img {
    transform: scale(1.05);
}

.hero-side-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 2em 1em 0.8em;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
    color: #fff;
}

.hero-side-overlay .cat-badge {
    font-size: 0.7em;
    margin-bottom: 0.35em;
}

.hero-side-title {
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

/* Hero text-only mode */
.hero-text {
    grid-template-columns: 1.4fr 1fr 1fr;
}

.hero-text .hero-main {
    min-height: auto;
    border: 2px solid var(--border);
}

.hero-text .hero-main > a {
    padding: 1.5em;
}

.hero-text .hero-overlay {
    position: static;
    background: none;
    color: var(--text-1);
    padding: 0;
}

.hero-text .hero-title {
    color: var(--text-1);
    font-size: 1.3em;
    text-shadow: none;
}

.hero-text .hero-side-item {
    border: 2px solid var(--border);
}

.hero-text .hero-side-item > a {
    padding: 1.2em;
}

.hero-text .hero-side-overlay {
    position: static;
    background: none;
    color: var(--text-1);
    padding: 0;
}

.hero-text .hero-side-title {
    color: var(--text-1);
}

.hero-text .hero-main:hover,
.hero-text .hero-side-item:hover {
    border-color: var(--main-color);
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .hero-main {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 200px;
    }

    .hero-side-item {
        min-height: 120px;
    }

    .hero-text {
        grid-template-columns: 1fr;
    }

    .hero-text .hero-main {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-main {
        grid-column: 1;
    }

    .hero-content .hero-title {
        font-size: 1.15em;
    }
}

/* ========================================
   7.5 Hero Slider
   ======================================== */

.hero-slider {
    position: relative;
    margin-bottom: var(--gap);
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: var(--gap);
}

/* Fade transition on content swap */
.hero-slider .hero {
    transition: opacity 0.45s ease;
}

.hero-slider .hero.hero-fading {
    opacity: 0;
}

/* Progress bar */
.hero-slider::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: var(--main-color);
    z-index: 11;
    width: 0;
}

.hero-slider.has-slider::after {
    animation: sliderProgress var(--slider-speed, 5000ms) linear infinite;
}

@keyframes sliderProgress {
    from { width: 0; right: 0; left: auto; }
    to   { width: 100%; }
}

body.ltr .hero-slider::after,
html[dir="ltr"] .hero-slider::after {
    right: auto;
    left: 0;
}

/* ========================================
   8. Category Bar (Pills)
   ======================================== */

.cat-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: calc(var(--gap) * 1.5);
    padding: 0;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    padding: 0.4em 1.1em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.86em;
    font-weight: 600;
    color: var(--text-1);
    transition: all var(--transition);
    white-space: nowrap;
}

.cat-pill:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.cat-pill .cat-icon {
    font-size: 0.85em;
}

/* ========================================
   9. Section Headers
   ======================================== */

.latest-articles-box {
    margin-bottom: var(--gap);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap);
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--main-color);
}

.section-title {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    font-size: 1.15em;
    font-weight: 800;
    color: var(--text-1);
}

.section-more {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--main-color);
    transition: opacity var(--transition);
}

.section-more:hover {
    opacity: 0.7;
}

/* ========================================
   9.5 Homepage Category Sections
   ======================================== */

.home-section {
    margin-bottom: var(--gap);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap);
    padding-bottom: 0.5em;
    border-bottom: 3px solid var(--main-color);
}

.home-section-name {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.home-section-name .section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    font-size: 0.85em;
}

.home-section-name a {
    color: var(--text-1);
    transition: color var(--transition);
}

.home-section-name a:hover {
    color: var(--main-color);
}

.home-section-more {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--main-color);
    transition: opacity var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.home-section-more:hover {
    opacity: 0.7;
}

.home-section-grid {
    display: grid;
    grid-template-columns: repeat(var(--sec-cols, 4), 1fr);
    gap: var(--gap);
}

.home-section-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-tertiary);
    transition: box-shadow var(--transition), transform var(--transition);
}

.home-section-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.home-section-card a {
    display: block;
    color: inherit;
}

.home-section-img {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
}

.home-section-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.home-section-card:hover .home-section-img img {
    transform: scale(1.04);
}

.home-section-title {
    padding: 0.7em 0.5em 0.3em 0.7em;
    font-size: 0.92em;
    font-weight: 700;
    line-height: 1.7;
    color: var(--text-1);
    /* Limit to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Legacy fieldset/legend */
fieldset {
    border: 0;
    padding: 0;
    margin: 0 0 var(--gap) 0;
    border-bottom: 2px solid var(--main-color);
    font-weight: bold;
}

legend {
    color: var(--text-1);
    margin: 0;
    padding: 0 0 0.5em 0;
    float: none;
    width: auto;
    font-size: 1.15em;
    font-weight: 800;
}

/* ========================================
   10. Post Cards Grid
   ======================================== */

.columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--gap);
}

.column {
    display: flex;
}

.column a {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.column a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.column a:hover img {
    transform: scale(1.06);
}

.ratio {
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%;
    background: var(--bg-tertiary);
}

.ratio img,
.column img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.column .title {
    padding: 0.7em 0.7em 0.3em 0.7em;
    color: var(--text-1);
    font-weight: 700;
    font-size: 0.9em;
    line-height: 1.7;
    /* Limit to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.column .card-cat {
    padding: 0.4em 1em 0;
}

.column .card-cat .cat-badge {
    font-size: 0.68em;
}

.column .card-meta {
    padding: 0 1em 0.7em;
    font-size: 0.73em;
    color: var(--text-3);
    margin-top: auto;
}

/* ========================================
   11. Category Grid (Subcategories)
   ======================================== */

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gap);
    margin-bottom: calc(var(--gap) * 1.5);
}

.cat-grid-box {
    width: 100%;
}

.cat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    height: 100%;
}

.cat-box:hover {
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.cat-box h2 {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}

.cat-icon {
    font-size: 1.2em;
    vertical-align: middle;
    opacity: 0.8;
}

.cat-title-box {
    font-weight: 700;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}

.cat-title-box:hover {
    background: var(--main-color);
    color: #fff;
}

.cat-title-box a {
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.7em 1em;
    color: var(--main-color);
}

.cat-title-box:hover a {
    color: #fff;
}

.cat-title {
    vertical-align: middle;
}

.category-subs {
    padding: 0.6em 1em;
    margin: 0;
}

.category-subs li {
    padding: 0.25em 0;
    list-style: none;
    font-size: 0.88em;
}

.category-subs a {
    color: var(--text-2);
    transition: color var(--transition);
}

.category-subs a:hover {
    color: var(--main-color);
}

/* ========================================
   12. Breadcrumbs
   ======================================== */

.breadcrumbs {
    padding: 0.55em 1.1em;
    font-size: 0.83em;
    margin: 0 0 var(--gap) 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
    color: var(--text-2);
}

.breadcrumbs li {
    display: inline;
}

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

.breadcrumbs a:hover {
    color: var(--main-color);
}

.breadcrumbs .spec {
    margin: 0 0.5em;
    opacity: 0.4;
    font-size: 0.8em;
}

.bread {
    font-size: 0.83em;
    font-weight: normal;
    margin-bottom: var(--gap);
    padding: 0.55em 1.1em;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-2);
}

.bread ul {
    margin: 0;
    padding: 0;
}

.bread ul li {
    display: inline;
    margin-left: 0.5em;
}

.bread ul li a {
    color: var(--text-2);
}

.bread ul li a:hover {
    color: var(--main-color);
}

/* ========================================
   13. Article Page
   ======================================== */

.main-in {
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: var(--gap);
}

.article {
    padding-bottom: 1rem;
}

.article h1 {
    font-size: 1.5em;
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.article-body {
    line-height: 1.9;
    font-size: 1em;
}

.article-body p {
    margin-bottom: 1.2em;
}

.article-body a {
    color: var(--main-color);
    text-decoration: underline;
    text-decoration-color: rgba(62,114,192,0.3);
    text-underline-offset: 0.25em;
    text-decoration-thickness: 1px;
}

.article-body a:hover {
    text-decoration-thickness: 2px;
    text-decoration-color: var(--main-color);
}

/* Article lists */
.article-body ul,
.article-body ol {
    padding-right: 1.6em;
    padding-left: 0;
    margin-bottom: 1.2em;
}

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li {
    margin-bottom: 0.45em;
    line-height: 1.85;
    padding-right: 0.3em;
}

.article-body li::marker {
    color: var(--main-color);
    font-weight: 700;
}

.article-body ul ul {
    list-style: circle;
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

.article-body ul ul ul {
    list-style: square;
}

.article-body ol ol {
    list-style: lower-alpha;
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

/* Article blockquote */
.article-body blockquote {
    border-right: 4px solid var(--main-color);
    border-left: none;
    margin: 1.5em 0;
    padding: 1em 1.5em;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-2);
}

/* Article table */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2em;
}

.article-body th,
.article-body td {
    border: 1px solid var(--border);
    padding: 0.6em 0.8em;
    text-align: right;
}

.article-body th {
    background: var(--bg-secondary);
    font-weight: 700;
}

.article-body img {
    border-radius: var(--radius);
    margin: 1em auto;
}

/* ========================================
   14. Article Meta & Share
   ======================================== */

.author-link {
    color: var(--text-1);
    font-weight: 700;
    transition: color var(--transition);
}

.author-link:hover {
    color: var(--main-color);
}

.by {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 1em;
    color: var(--text-2);
    margin-bottom: 1.2rem;
    font-size: 0.83em;
    padding: 0.7em 0;
    border-bottom: 1px solid var(--border);
    border-right: none;
}

.by-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    float: none;
    margin: 0;
}

/* Social Share */
.share {
    display: inline-flex;
    gap: 0.4em;
    margin-right: auto;
}

.icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-size: 15px !important;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
    float: none;
    margin: 0;
}

.icon:hover {
    transform: scale(1.15);
    border-color: var(--main-color);
}

.twitter {
    background: url(assets/images/twitter.svg) center no-repeat;
    background-size: 15px;
}

.facebook {
    background: url(assets/images/facebook.svg) center no-repeat;
    background-size: 15px;
}

.whatsapp {
    background: url(assets/images/whatsapp.svg) center no-repeat;
    background-size: 15px;
}

/* Featured Image */
.post_thumbnail {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    object-fit: cover;
    max-height: 480px;
}

.wp-caption, .figure {
    margin: 0 0 1.5rem 0;
    max-width: 100%;
    width: auto;
}

.wp-caption img, .figure img {
    width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
}

.post-caption, .wp-caption-text, .figcaption {
    margin: 0;
    text-align: center;
    background: var(--bg-secondary);
    font-size: 0.76em;
    color: var(--text-2);
    padding: 0.5em 1em;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Blockquote */
blockquote {
    background: var(--bg-secondary);
    margin: 1.2em 0;
    padding: 1.2em 1.5em;
    position: relative;
    border-radius: var(--radius);
    border-right: 3px solid var(--main-color);
    font-style: italic;
}

blockquote::before {
    content: "";
    background: url(assets/images/blockquote.svg) center no-repeat;
    background-size: contain;
    position: absolute;
    right: 0.8em;
    width: 22px;
    height: 22px;
    top: -6px;
    opacity: 0.12;
}

blockquote p:last-of-type {
    margin-bottom: 0;
}

/* Tables */
table {
    max-width: 100%;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

td, th {
    border: 1px solid var(--border);
    padding: 0.45em 1em;
}

tr:nth-child(even) {
    background: var(--bg-secondary);
}

th {
    background: var(--bg-secondary);
    font-weight: 700;
}

/* ========================================
   15. Sidebar & Article Layout
   ======================================== */

.main-in-art {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

@media (min-width: 860px) {
    .main-in-art {
        flex-direction: row;
    }

    .main-in-art .article {
        flex: 1;
        min-width: 0;
    }

    .main-in-art aside {
        width: 300px;
        flex-shrink: 0;
    }
}

aside h2.section-heading {
    margin: 0 0 0.8rem 0;
}

/* ========================================
   16. Related & More Posts
   ======================================== */

.more-posts, .related-posts {
    margin-bottom: var(--gap);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--gap);
}

.more-posts-inline {
    margin: 1.5em 0;
}

/* Table of Contents */
.np-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 0 0 1.8em 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border-right: 4px solid var(--main-color);
}
.np-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--main-color) 6%, var(--bg-card)), var(--bg-card));
    border-bottom: 1px solid var(--border);
    cursor: default;
    user-select: none;
}
.np-toc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--main-color);
    color: #fff;
    border-radius: 8px;
    font-size: 0.85em;
    flex-shrink: 0;
}
.np-toc-title {
    font-weight: 700;
    font-size: 1em;
    color: var(--text-1);
    flex: 1;
    letter-spacing: -0.01em;
}
.np-toc-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    border-radius: 50%;
    transition: all 0.2s;
}
.np-toc-toggle:hover {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #fff;
}
.np-toc-body {
    padding: 6px 14px 10px;
    transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
    max-height: 800px;
    opacity: 1;
    overflow: hidden;
}
.np-toc-body.np-toc-closed {
    max-height: 0;
    padding: 0 14px;
    opacity: 0;
}
.np-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc-counter;
}
.np-toc-list li {
    counter-increment: toc-counter;
    padding: 0;
    margin: 0;
    border-bottom: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
    list-style: none;
}
.np-toc-list li:last-child {
    border-bottom: none;
}
.np-toc-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    color: var(--text-1);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 1.6;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
}
.np-toc-list li a::before {
    content: counter(toc-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    background: color-mix(in srgb, var(--main-color) 12%, transparent);
    color: var(--main-color);
    border-radius: 8px;
    font-size: 0.78em;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
}
.np-toc-list li a:hover {
    background: color-mix(in srgb, var(--main-color) 6%, transparent);
    color: var(--main-color);
    padding-right: 14px;
}
.np-toc-list li a:hover::before {
    background: var(--main-color);
    color: #fff;
}
[data-theme="dark"] .np-toc {
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
[data-theme="dark"] .np-toc-header {
    background: linear-gradient(135deg, color-mix(in srgb, var(--main-color) 10%, var(--bg-card)), var(--bg-card));
}
[data-theme="dark"] .np-toc-list li a:hover {
    background: color-mix(in srgb, var(--main-color) 12%, transparent);
}

.see-also-inline {
    margin: 1.5em 0;
}

.see-also-inline .section-heading {
    font-size: 1.1em;
    margin-bottom: 0.6em;
}

.see-also-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.see-also-list li {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.6em 0.8em;
    border-bottom: 1px solid var(--border);
    font-size: 0.95em;
    transition: background 0.2s ease;
}

.see-also-list li:last-child {
    border-bottom: none;
}

.see-also-list li:hover {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

.see-also-list li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--main-color);
    color: #fff;
    font-size: 0.55em;
    flex-shrink: 0;
    border-radius: 50%;
}

.see-also-list li a {
    color: var(--text-1);
    font-weight: 600;
    transition: color var(--transition);
    text-decoration: none;
}

.see-also-list li a:hover {
    color: var(--main-color);
}

.related-posts .columns {
    grid-template-columns: repeat(4, 1fr);
}

h2.section-heading {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-1);
    padding: 0 0 0.6em 0;
    margin: 0 0 0.8em 0;
    border-bottom: 3px solid var(--main-color);
    border-right: none;
    border-left: none;
    border-top: none;
    background: none;
    border-radius: 0;
    line-height: 1.5;
}

h2.section-heading .section-icon {
    color: var(--main-color);
    font-size: 0.9em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rp, .mp {
    float: none;
}

.list-posts {
    margin-bottom: var(--gap);
}

.list-posts-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.list-post-item {
    display: flex;
    align-items: center;
    gap: 0.7em;
    padding: 0.65em 0.5em;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.list-post-item:last-child {
    border-bottom: none;
}

.list-post-item:hover {
    background: var(--bg-secondary);
}

.list-post-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color);
    font-size: 0.85em;
    opacity: 0.6;
    transition: all var(--transition);
}

.list-post-item:hover .list-post-icon {
    opacity: 1;
    transform: scale(1.15);
}

.list-post-title {
    flex: 1;
    min-width: 0;
    font-size: 0.88em;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.list-post-item:hover .list-post-title {
    color: var(--main-color);
}

/* ========================================
   17. Tags
   ======================================== */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 1rem 0;
}

.tags div {
    margin: 0;
    font-size: 0.82em;
    padding: 0.25em 0.8em;
    float: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    transition: all var(--transition);
}

.tags div:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.tags a {
    color: var(--text-1);
}

.tags div:hover a {
    color: #fff;
}

/* ========================================
   18. Comments
   ======================================== */

.comments-area {
    margin-top: var(--gap);
}

.comments-area > h2 {
    font-size: 1.05em;
    margin-bottom: 1rem;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    border-bottom: 2px solid var(--main-color);
    padding-bottom: 0.5em;
}

.comment-list {
    margin: 0;
    padding: 0;
}

.comment-list .comment-body {
    margin: 0.6em 0;
    background: var(--bg-secondary);
    padding: 1em;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.comment-list .comment-meta {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0 0 0.6em 0;
    overflow: visible;
    position: relative;
}

.comment-list li {
    display: block;
}

.comment-list .children {
    padding-right: 2em;
}

.comment-list .comment-author {
    display: flex;
    align-items: center;
    gap: 0.5em;
    float: none;
}

.comment-list .comment-metadata {
    float: none;
    font-size: 0.78em;
    color: var(--text-3);
    margin-right: auto;
}

.comment-list .comment-author img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin: 0;
    float: none;
}

.comment-list .comment-author .fn {
    font-weight: 700;
    margin: 0;
}

.comment-awaiting-moderation {
    display: block;
    margin-top: 0.5em;
    color: var(--text-3);
    font-size: 0.83em;
}

.comment-list .comment-content,
.comment-list .pingback .comment-body {
    padding: 0;
    line-height: 1.6;
}

.comment-list .reply {
    padding: 0.5em 0 0;
    text-align: left;
}

.comment-list .says {
    display: none;
}

.comment-list .comment-reply-link {
    display: inline-block;
    padding: 0.2em 1em;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82em;
    transition: all var(--transition);
}

.comment-list .comment-reply-link:hover {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

.comment-list .comment-metadata,
.comment-list .comment-metadata a {
    color: var(--text-3);
}

.comment-form {
    width: 100%;
    max-width: 600px;
    margin: 1.5em auto;
}

.comment-form input[type="text"],
.comment-form textarea {
    -webkit-appearance: none;
    appearance: none;
    padding: 0.6em 1em;
    font-weight: 400;
    line-height: 1.5;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    background: var(--bg-card);
    width: 100%;
    font-family: var(--font);
    transition: border-color var(--transition);
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    border-color: var(--main-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(62,114,192,0.12);
}

.form-submit, .comment-reply-title {
    text-align: center;
}

.comment-reply-title {
    font-weight: 700;
    margin-bottom: 1em;
}

/* ========================================
   19. Pagination
   ======================================== */

.comment-navigation {
    text-align: center;
    margin: var(--gap) 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3em;
}

.comment-navigation .page-numbers,
.page-numbers {
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.45em 1em;
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-1);
    border: 1px solid var(--border);
    transition: all var(--transition);
    font-weight: 600;
    font-size: 0.88em;
}

.comment-navigation .page-numbers:hover,
.page-numbers:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

.comment-navigation .current,
.page-numbers.current {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* ========================================
   19.5 Author Page
   ======================================== */

.author-page {
    max-width: var(--container);
    margin: 0 auto;
}

.author-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2em;
    margin-bottom: calc(var(--gap) * 1.5);
    box-shadow: var(--shadow-sm);
}

.author-card-inner {
    display: flex;
    gap: 2em;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--main-color);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.author-info {
    flex: 1;
    min-width: 0;
}

.author-name {
    margin: 0 0 0.4em;
    font-size: 1.5em;
    font-weight: 800;
    color: var(--text-1);
    border: none;
    padding: 0;
    background: none;
}

.author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em 1.5em;
    margin-bottom: 1em;
    font-size: 0.85em;
    color: var(--text-2);
}

.author-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}

.author-meta-item i {
    color: var(--main-color);
    font-size: 0.9em;
}

.author-bio {
    line-height: 1.85;
    color: var(--text-2);
    margin-bottom: 1em;
    font-size: 0.95em;
}

.author-website {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--main-color);
    font-size: 0.88em;
    font-weight: 600;
    margin-bottom: 1em;
    transition: opacity var(--transition);
}

.author-website:hover {
    opacity: 0.7;
}

.author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    margin-top: 0.5em;
}

.author-social-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 1em;
    transition: all var(--transition);
}

.author-social-link:hover {
    background: var(--social-color, var(--main-color));
    color: #fff;
    border-color: var(--social-color, var(--main-color));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.no-posts {
    text-align: center;
    color: var(--text-2);
    padding: 2em;
    font-size: 1.05em;
}

@media (max-width: 576px) {
    .author-card {
        padding: 1.2em;
    }

    .author-card-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-meta {
        justify-content: center;
    }

    .author-socials {
        justify-content: center;
    }

    .author-avatar img {
        width: 100px;
        height: 100px;
    }
}

/* ========================================
   20. Footer
   ======================================== */

.footer {
    background: var(--text-1);
    color: rgba(255,255,255,0.8);
    overflow: hidden;
    margin-top: calc(var(--gap) * 2);
}

[data-theme="dark"] .footer {
    background: #0a0a14;
    border-top: 1px solid var(--border);
}

.footer-main {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2rem var(--gap);
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.8em;
    flex-shrink: 0;
}

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

.footer-logo-img {
    max-height: 36px;
    width: auto;
    filter: brightness(10);
}

[data-theme="dark"] .footer-logo-img {
    filter: brightness(1.2);
}

.footer-logo-text {
    font-size: 1.2em;
    font-weight: 800;
    color: #fff;
}

.footer-sep {
    color: rgba(255,255,255,0.2);
    font-size: 1.1em;
}

.footer-desc {
    font-size: 0.85em;
    color: rgba(255,255,255,0.45);
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.footer-links li {
    position: relative;
}

.footer-links li:not(:last-child)::after {
    content: '';
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,0.15);
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.2em;
}

.footer-links a {
    display: inline-block;
    padding: 0.4em 0.8em;
    font-size: 0.88em;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
}

.footer-bottom-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 1em var(--gap);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82em;
    color: rgba(255,255,255,0.4);
}

.silver {
    color: rgba(255,255,255,0.45);
}

@media (max-width: 768px) {
    .footer-row {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
        gap: 0.4em;
    }

    .footer-sep {
        display: none;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   21. Scroll to Top
   ======================================== */

.scroll {
    position: fixed;
    bottom: 1.5em;
    cursor: pointer;
    width: 42px;
    height: 42px;
    background: var(--main-color) url(assets/images/arrow-up.svg) center/50% no-repeat;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    z-index: 50;
    transition: all 0.3s ease;
    right: -60px;
    border: none;
}

.scroll.visible {
    right: 1.5em;
}

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

/* ========================================
   22. Utility
   ======================================== */

.center {
    text-align: center;
    margin: 0 auto;
    margin-bottom: var(--gap);
}

/* ========================================
   23. Responsive
   ======================================== */

@media (max-width: 768px) {
    .search {
        display: none;
    }

    h1 {
        font-size: 1.25em;
    }

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

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

@media (max-width: 576px) {
    :root {
        --gap: 1rem;
    }

    main {
        padding: var(--gap) 0.8rem;
    }

    .main-in {
        border-radius: 0;
        margin-right: -0.8rem;
        margin-left: -0.8rem;
        border-left: none;
        border-right: none;
    }

    .breadcrumbs, .bread {
        border-radius: 0;
        margin-right: -0.8rem;
        margin-left: -0.8rem;
        border-left: none;
        border-right: none;
    }

    .columns {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .home-section-grid {
        grid-template-columns: 1fr;
    }

    .home-section-title {
        padding: 0.5em 0.5em 0.3em 0.5em;
    }

    /* Hero slider mobile optimization */
    .hero-overlay {
        padding: 2em 1em 1em;
    }
    .hero-title {
        font-size: 1em;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Admin bar fix */
.admin-bar .header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .header {
        top: 46px;
    }
}

/* ========================================
   24. Dark Mode Extras
   ======================================== */

[data-theme="dark"] .icon {
    filter: brightness(1.4);
}

[data-theme="dark"] blockquote::before {
    filter: invert(1);
    opacity: 0.08;
}

[data-theme="dark"] .hero-text .hero-title,
[data-theme="dark"] .hero-text .hero-side-title {
    color: var(--text-1);
}

/* ========================================
   25. LTR Overrides
   ======================================== */

body.ltr h2,
html[dir="ltr"] h2 {
    border-right: none;
}

body.ltr .article-body h2,
html[dir="ltr"] .article-body h2 {
    border-right: none;
    border-left: 3px solid var(--main-color);
}

body.ltr blockquote,
html[dir="ltr"] blockquote {
    border-right: none;
    border-left: 3px solid var(--main-color);
}

body.ltr .article-body ul,
html[dir="ltr"] .article-body ul,
body.ltr .article-body ol,
html[dir="ltr"] .article-body ol {
    padding-right: 0;
    padding-left: 1.6em;
}

body.ltr .article-body li,
html[dir="ltr"] .article-body li {
    padding-right: 0;
    padding-left: 0.3em;
}

body.ltr .article-body blockquote,
html[dir="ltr"] .article-body blockquote {
    border-right: none;
    border-left: 4px solid var(--main-color);
    border-radius: var(--radius) 0 0 var(--radius);
}

body.ltr .article-body th,
html[dir="ltr"] .article-body th,
body.ltr .article-body td,
html[dir="ltr"] .article-body td {
    text-align: left;
}

body.ltr blockquote::before,
html[dir="ltr"] blockquote::before {
    right: auto;
    left: 0.8em;
}

body.ltr .scroll.visible,
html[dir="ltr"] .scroll.visible {
    right: auto;
    left: 1.5em;
}

body.ltr .comment-list .children,
html[dir="ltr"] .comment-list .children {
    padding-right: 0;
    padding-left: 2em;
}

body.ltr .share,
html[dir="ltr"] .share {
    margin-right: 0;
    margin-left: auto;
}

html[dir="ltr"] .logo {
    border-left: none;
    border-right: 1px solid var(--border);
    padding-left: 0;
    padding-right: 1.2em;
    margin-left: 0;
    margin-right: 0.8em;
}

html[dir="ltr"] .header-actions {
    margin-right: 0;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0.5em;
}

/* ========================================
   26. Print
   ======================================== */

@media print {
    .header, .topbar, .footer, .scroll, .breadcrumbs, .bread,
    .share, .tags, .add-comment, .more-posts, .related-posts,
    .list-posts, aside, .hero, .hero-slider, .cat-bar, .cat-grid, .home-section, .comment-navigation {
        display: none !important;
    }

    main { margin-top: 0; }
    .main-in { box-shadow: none; border: none; }
    body { background: #fff; color: #000; }
}

@media (max-width: 900px) {
    .related-posts .columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .related-posts .columns {
        grid-template-columns: 1fr;
    }
}
