/*
Theme Name:         Bansta
Theme URI:          https://tsteki.net/bansta
Author:             TSTeki Solutions (TS)
Author URI:         https://tsteki.net/author/tsteki
Description:        Bansta is a lightweight multipurpose theme for blogs, news and magazine sites. Fast, accessible and easy to customize.
Version:            1.0.3
Requires at least:  6.5
Tested up to:       7.1
Requires PHP:       7.4
License:            GNU General Public License v2 or later
License URI:        https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:        bansta
Domain Path:        /languages
Tags:               blog, news, grid-layout, one-column, two-columns, left-sidebar, right-sidebar, custom-menu, featured-images, threaded-comments, custom-background, custom-colors, custom-header, custom-logo, flexible-header, footer-widgets, theme-options
*/


/* ===============================================================
   TABLE OF CONTENTS
   ---------------------------------------------------------------
   1.   Custom Properties
   2.   Reset
   3.   Semantic / Block Elements
   4.   Typography
   5.   Utilities & Helpers
   6.   Site Grids
   7.   HTML Forms & Inputs
   8.   Accessibility
   9.   Global Containers & Body
   10.  Top Bar
   11.  Site Header
   12.  Branding & Logo
   13.  Navigation
   14.  Sub-menus & Dropdowns
   15.  Dark Mode Switch
   16.  Search
   17.  Mobile Menu Icon
   18.  Breadcrumbs
   19.  Main Content Area
   20.  Post Containers (Default / Grid2 / Card1)
   21.  Post Header & Meta
   22.  Featured Images
   23.  Post Excerpt & Read More
   24.  Pagination
   25.  Sidebar & Widgets
   26.  Single Post
   27.  Content Pagination
   28.  Author Box
   29.  Tags & Social Share
   30.  Prev / Next Post
   31.  Related Posts
   32.  Comments
   33.  Go-to-Top Button
   34.  WP Caption & Gallery
   35.  Footer
   36.  Gutenberg Post Content
   37.  Dark Mode
   38.  WordPress Core Classes
   39.  Reduced Motion
   =============================================================== */


/* ---------------------------------------------------------------
   1. Custom Properties
--------------------------------------------------------------- */

:root {
    --bansta-header-min-height: 3rem;
    --bansta-header-height-2:   clamp(5rem, 4.5rem + 1.5vw, 5.625rem);
    --bansta-system-font:       system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Fallbacks. The Customizer overrides these with inline CSS. */
    --bansta-primary-color:     #0d6cbf;
    --bansta-secondary-color:   #282828;
    --bansta-link-color:        #1982e6;
    --bansta-link-hover-color:  #5385f1;
    --bansta-font-weight:       600;
    --bansta-line-height:       1.6;
    --bansta-primary-font:      var(--bansta-system-font);
    --bansta-secondary-font:    var(--bansta-system-font);
    --bansta-site-identity-font: var(--bansta-system-font);
    --bansta-site-header-size:  1100px;
    --bansta-site-content-size: 1100px;
    --bansta-site-grid-size:    1100px;
    --bansta-aspect-ratio:      3 / 2;
}


/* ---------------------------------------------------------------
   2. Reset
--------------------------------------------------------------- */

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
    scrollbar-gutter: stable;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ---------------------------------------------------------------
   3. Semantic / Block Elements
--------------------------------------------------------------- */

article,
aside,
details,
figcaption,
figure,
footer,
header,
main,
menu,
nav,
section,
summary,
picture {
    display: block;
    max-width: 100%;
}

audio,
canvas,
progress,
video {
    display: inline-block;
    vertical-align: baseline;
}

audio:not([controls]) {
    display: none;
    height: 0;
}

img {
    border: 0;
    width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
    object-fit: cover;
    content-visibility: visible;
}

li {
    list-style: none;
}

.is-resizing *,
.is-resizing *::before,
.is-resizing *::after {
    transition: none !important;
    animation: none !important;
}


/* ---------------------------------------------------------------
   4. Typography
--------------------------------------------------------------- */

/* Shared overflow */
a,
b,
strong,
small,
li,
td,
th,
em,
p,
pre,
time,
h1,
h2,
h3,
h4,
h5,
h6 {
    word-break: break-word;
    white-space: normal;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--bansta-secondary-color);
    font-weight: var(--bansta-font-weight);
}

h1 {
    font-size: clamp(1.75rem, 1.4rem + 2vw, 2.25rem);
    margin-block: clamp(0.5rem, 0.5rem + 0.5vw, 0.8rem);
}

h2 {
    font-size: clamp(1.13rem, 1.3rem + 1vw, 2rem);
    margin-block: clamp(0.4rem, 0.6rem + 0.4vw, 1.1rem);
}

h3 {
    font-size: clamp(1.03rem, 1.1rem + 1vw, 1.7rem);
    margin-block: clamp(0.39rem, 0.5rem + 0.4vw, 1rem);
    line-height: 1.4;
}

h4 {
    font-size: clamp(0.98rem, 1.05rem + 1vw, 1.5rem);
    margin-block: 0.8rem;
}

h5 {
    font-size: clamp(0.9rem, 1rem + 1vw, 1.3rem);
    margin-block: 0.7rem;
}

h6 {
    font-size: clamp(0.9rem, 0.94rem + 0.9vw, 1rem);
    margin-block: 0.5rem;
}

/* Body text */
p {
    font-size: clamp(0.9rem, 0.9rem + 0.5vw, 1rem);
    margin-bottom: clamp(1rem, 0.8rem + 0.5vw, 1rem);
    line-height: 1.6;
}

/* Links */
a {
    text-decoration: none;
    color: var(--bansta-link-color);
}

a:active,
a:hover {
    outline: 0;
}

b,
strong {
    font-weight: 700;
}

small {
    font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.8rem);
}

dfn {
    font-style: italic;
}

mark {
    background-color: transparent;
    border-bottom: 1px solid #ffcc00;
}

mark:hover {
    border-bottom: 0;
}

sub,
sup {
    font-size: 0.75rem;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup { 
    top: -0.5rem; 
}
sub { 
    bottom: -0.25rem; 
}


/* ---------------------------------------------------------------
   5. Utilities & Helpers
--------------------------------------------------------------- */

.active,
.current {
    background-color: var(--bansta-link-color);
}

.active a,
.current span {
    color: #ffffff;
}

.clear::after {
    display: table;
    content: "";
    clear: both;
}

/* Legacy column helpers (not used inside .main-area, which is a grid) */
@media (min-width: 48rem) {
    .col-ts-1  { width: 8.33%; }
    .col-ts-2  { width: 16.66% !important; }
    .col-ts-3  { width: 25%; }
    .col-ts-4  { width: 33.33%; }
    .col-ts-5  { width: 41.66%; }
    .col-ts-6  { width: 50%; }
    .col-ts-7  { width: 58.33%; }
    .col-ts-8  { width: 66.66%; }
    .col-ts-9  { width: 75%; }
    .col-ts-10 { width: 83.33%; }
    .col-ts-11 { width: 91.66%; }
    .col-ts-12 { width: 100%; }
}


/* ---------------------------------------------------------------
   6. Site Grids
--------------------------------------------------------------- */

.ts-top-content {
    display: block;
    width: 100%;
    max-width: var(--bansta-site-grid-size);
    margin-inline: auto;
}

body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .ts-top-content {
    padding: 0 0.7rem;
}

/* ---------- Container (mobile first: one column) ---------- */

.big-grid-default,
.big-grid-2,
.big-grid-3,
.big-grid-4 {
    --bansta-grid-gap: 0.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--bansta-grid-gap);
    margin: clamp(1rem, 0.8rem + 0.5vw, 1.25rem) auto;
    padding-inline: clamp(0.5rem, 0.3rem + 0.5vw, 0.625rem);
}

body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-default,
body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-2,
body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-3,
body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-4 {
    padding: 0.6rem;
    background: var(--bansta-panel-bg);
}

/* Big item first on mobile (grid 4 has it in the middle) */
.big-grid-4 .tr-grid-big1 {
    order: -1;
}

/* ---------- Stacks: two slots per column ---------- */

:is(.big-grid-default, .big-grid-2, .big-grid-4) > :is(.tr-grid-big2, .tr-grid-big3) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--bansta-grid-gap);
    min-width: 0;
}

/* ---------- Slots ---------- */

.item-grid-big,
.item-grid-row1,
.item-grid-row2,
.big-grid-3 > .tr-grid-big3 {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    background: linear-gradient(135deg, var(--bansta-secondary-color), #9c9c9c);
}

/* Mobile heights come from aspect ratio */
.item-grid-big,
.big-grid-3 > .tr-grid-big3 {
    aspect-ratio: 16 / 10;
}

.item-grid-row1,
.item-grid-row2 {
    aspect-ratio: 4 / 3;
}

/* Image fills the slot, whatever its natural size */
.item-grid-big .featured-image,
.item-grid-row1 .featured-image,
.item-grid-row2 .featured-image,
.big-grid-3 > .tr-grid-big3 .featured-image {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.item-grid-big .featured-image a,
.item-grid-row1 .featured-image a,
.item-grid-row2 .featured-image a,
.big-grid-3 > .tr-grid-big3 .featured-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.item-grid-big img,
.item-grid-row1 img,
.item-grid-row2 img,
.big-grid-3 > .tr-grid-big3 img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    contain-intrinsic-size: none;
}

/* Dark gradient so white text stays readable */
.item-grid-big .featured-image::before,
.item-grid-row1 .featured-image::before,
.item-grid-row2 .featured-image::before,
.big-grid-3 > .tr-grid-big3 .featured-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* ---------- Text overlay ---------- */

.item-grid-big .ts-post-header,
.item-grid-row1 .ts-post-header,
.item-grid-row2 .ts-post-header,
.big-grid-3 > .tr-grid-big3 .ts-post-header {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 0.625rem 0.9375rem;
}

.big-grid-default a,
.big-grid-2 a,
.big-grid-3 a,
.big-grid-4 a {
    color: #ffffff !important;
}

.big-grid-default .entry-date,
.big-grid-2 .entry-date,
.big-grid-3 .entry-date,
.big-grid-4 .entry-date {
    color: #ccc;
}

.big-grid-default .meta-separator,
.big-grid-2 .meta-separator,
.big-grid-3 .meta-separator,
.big-grid-4 .meta-separator {
    color: #ffffff;
}

[class*="big-grid-"] .entry-post-title {
    font-weight: 700;
}

.item-grid-big .entry-post-title {
    font-size: clamp(0.5rem, 0.9rem + 0.5vw, 1.2rem);
}

[class*="item-grid-"]:not(.item-grid-big) .entry-post-title {
    font-size: clamp(0.5rem, 0.7rem + 0.2vw, 0.9rem);
}

/* Small items: hide category and meta on very small screens */
[class*="item-grid-"]:not(.item-grid-big) .ts-category a,
[class*="item-grid-"]:not(.item-grid-big) .grid-metas {
    display: none;
}

@media (min-width: 30rem) {
    [class*="item-grid-"]:not(.item-grid-big) .ts-category a,
    [class*="item-grid-"]:not(.item-grid-big) .grid-metas {
        display: inline-flex;
    }

    .tr-grid-big2 .ts-category a,
    .tr-grid-big3 .ts-category a {
        font-size: 0.7rem;
        padding: 0.2rem 0.3rem;
    }
}

/* Smaller text in the narrow side columns of grids 2 and 4 */
.big-grid-2 :is(.tr-grid-big2, .tr-grid-big3) .entry-post-title {
    font-size: 0.9rem;
}

:is(.big-grid-2, .big-grid-4) :is(.tr-grid-big2, .tr-grid-big3) :is(.grid-metas a, .entry-date, .meta-separator) {
    font-size: 0.78rem;
}

/* ---------- Desktop: real grid with a fixed height ---------- */

@media (min-width: 48rem) {

    .big-grid-default,
    .big-grid-2,
    .big-grid-3,
    .big-grid-4 {
        grid-template-rows: minmax(0, 1fr);
        height: clamp(24rem, 45vw, 32.5rem);
    }

    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-default,
    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-2,
    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-3,
    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .big-grid-4 {
        padding: 1rem;
    }

    /* Column layouts */
    .big-grid-default {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

    .big-grid-2 {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    }

    .big-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .big-grid-4 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    }

    /* DOM order is already left / centre / right */
    .big-grid-4 .tr-grid-big1 {
        order: 0;
    }

    /* Stacks become two equal rows, so both halves always match the big item */
    :is(.big-grid-default, .big-grid-2, .big-grid-4) > :is(.tr-grid-big2, .tr-grid-big3) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: repeat(2, minmax(0, 1fr));
        height: 100%;
    }

    /* Slots stretch to their grid cell */
    .item-grid-big,
    .item-grid-row1,
    .item-grid-row2,
    .big-grid-3 > .tr-grid-big3 {
        aspect-ratio: auto;
        height: 100%;
    }

    .tr-grid-big2 .ts-post-header,
    .tr-grid-big3 .ts-post-header {
        padding: 0.125rem 0.6375rem;
    }

    /* Narrow side columns: hide category and meta until there is room */
    :is(.big-grid-2, .big-grid-4) :is(.tr-grid-big2, .tr-grid-big3) :is(.grid-metas, .ts-category) {
        display: none;
    }

    [class*="item-grid-"] .featured-image img {
        transition: transform 0.3s ease-in-out;
    }

    [class*="item-grid-"] .featured-image img:hover {
        transform: var(--bansta-img-transform-scale);
    }
}

@media (min-width: 61.9375rem) {
    .tr-grid-big2 .ts-post-header,
    .tr-grid-big3 .ts-post-header {
        padding: 0.625rem 0.9375rem;
    }
}

@media (min-width: 75rem) {
    :is(.big-grid-2, .big-grid-4) :is(.tr-grid-big2, .tr-grid-big3) .grid-metas,
    :is(.big-grid-2, .big-grid-4) :is(.tr-grid-big2, .tr-grid-big3) .ts-category {
        display: inline-flex;
    }
}

@media (min-width: 90rem) {
    .big-grid-default,
    .big-grid-2,
    .big-grid-3,
    .big-grid-4 {
        --bansta-grid-gap: 0.375rem;
    }
}


/* ---------------------------------------------------------------
   7. HTML Forms & Inputs
--------------------------------------------------------------- */

fieldset {
    border: 1px solid #c0c0c0;
    margin: 0 0.125rem;
    padding: 0.35rem 0.625rem 0.75rem;
}

legend {
    border: 0;
    padding: 0 0.625rem;
    width: unset;
}

textarea {
    overflow: auto;
}

optgroup {
    font-weight: 700;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    word-break: break-word;
    table-layout: fixed;
}

td,
th {
    padding: 0.625rem;
    border-top: 1px solid;
    border-left: 1px solid;
}

tr:last-child th,
tr:last-child td {
    border-bottom: 1px solid;
}

td:last-child,
th:last-child {
    border-right: 1px solid;
}

button,
input,
optgroup,
select,
textarea {
    color: inherit;
    font: inherit;
}

button {
    overflow: visible;
    cursor: pointer;
    text-transform: none;
    padding: 0.375rem 0.625rem;
}

button[disabled],
input[disabled] {
    cursor: default;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}

input {
    line-height: normal;
}

input[type="checkbox"],
input[type="radio"] {
    box-sizing: border-box;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

input[type="file"] {
    padding: 0.625rem;
    max-width: 100%;
}

input[type="password"] {
    padding: 0.625rem;
    width: 100%;
    margin: 0.625rem 0;
}

form {
    display: flex;
    flex-direction: column;
}

form input[type="text"],
form input[type="url"],
form input[type="email"],
form input[type="submit"],
form select,
#comment {
    width: 100%;
    padding: 0.375rem;
    margin: 0.75rem 0;
}

form input[type="submit"],
button[type="button"] {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.single-post-wrap form input[type="submit"] {
    background: var(--bansta-primary-color);
}

#ts-search-2-form {
    margin-block-end: 1rem;
}

/* Search form */
.ts-search-form {
    position: relative;
}

.ts-search-form input[type="search"] {
    width: 100%;
    outline: none;
    margin-block-start: 0.7rem;
    padding: 0.625rem 4.5rem 0.625rem 0.625rem;
}

.ts-search-form input[type="search"]:focus {
    border: 2px solid;
}

.ts-search-form button {
    width: 4.375rem;
    position: absolute;
    right: 0;
    background-color: var(--bansta-primary-color);
    border: none;
    height: 2.5rem;
    padding: 0.3125rem;
}

#ts-search-2-form.ts-search-form button {
    height: 2.68rem;
}

.ts-search-form button .fa {
    color: #fff;
}

.search-icon .ts-search-form::before {
    content: "\f107";
    position: absolute;
    font-family: FontAwesome;
    font-size: 2rem;
    right: 0;
    top: 1.1rem;
}

.ts-search-wrap .ts-search-form::before,
.search-no-results .ts-search-form::before {
    display: none;
}

.ts-search-wrap .ts-search-form input[type="submit"] {
    height: 2.4375rem;
    border: 1px solid;
}

.ts-search-wrap .ts-search-form input[type="search"] {
    width: 94%;
}

.search-form-wrap button,
.no-results button {
    top: 0.76rem;
}

.search-container form {
    max-width: 80%;
}

.search-icon .ts-search-form input[type="search"] {
    position: absolute;
    top: 2.44rem;
    right: 0;
    width: 12.5rem;
    height: 2.583rem;
    transition: width 0.4s ease-in-out;
}

.search-icon .ts-search-form input[type="search"]:focus {
    width: 22rem;
}

.search-icon .ts-search-form button {
    position: absolute;
    right: 0;
    width: 4.375rem;
    height: 2.55rem;
    background-color: var(--bansta-primary-color);
    color: white;
    padding: 0.125rem;
    top: 3.12rem;
}

.search-no-results .ts-search-form:not(:first-child) button {
    top: 0.75rem;
}

@media (max-width: 26.25rem) {
    .search-icon .ts-search-form input[type="text"]:focus {
        width: 18.75rem;
    }
}


/* ---------------------------------------------------------------
   8. Accessibility
--------------------------------------------------------------- */

.screen-reader-text {
    border: 0;
    clip: rect(0.0625rem, 0.0625rem, 0.0625rem, 0.0625rem);
    clip-path: inset(50%);
    height: 0.0625rem;
    margin: -0.0625rem;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 0.0625rem;
    word-wrap: normal !important;
}

.screen-reader-text:focus,
.skip-link:focus {
    background-color: #f1f1f1;
    border: 2px solid #21759b;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.3);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 0.625rem;
    line-height: normal;
    margin: 0;
    overflow: visible;
    padding: 0.9375rem 1.4375rem;
    position: fixed !important;
    text-decoration: none;
    top: 0.625rem;
    width: auto;
    z-index: 100000;
}

#main-content[tabindex="-1"]:focus,
#ts-top-content[tabindex="-1"]:focus,
#ts-elem-content[tabindex="-1"]:focus {
    outline: 0;
}


/* ---------------------------------------------------------------
   9. Global Containers & Body
--------------------------------------------------------------- */

.main-wrapper,
.top-bar,
.top-container,
.container,
.main-area {
    max-width: 100%;
    display: block;
}

body {
    line-height: var(--bansta-line-height);
    font-family: var(--bansta-system-font);
    font-weight: 400;
    overflow-x: clip;
}

body.custom-background:not(.boxed-container) {
    --bansta-panel-bg: #ffffff;
}

body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .main-content,
body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .sidebars,
body.custom-background:not(.boxed-container) .breadcrumbs-wrap {
    background: var(--bansta-panel-bg);
}

body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .main-content,
body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .sidebars {
    padding: 0.7rem;
}

.container {
    position: relative;
    width: 100%;
    display: flex;
    margin-inline: auto;
    padding-inline: 0.625rem;
    align-items: inherit;
}

@media (min-width: 48rem) {
    .container {
        align-items: center;
        width: 100%;
        max-width: var(--bansta-site-header-size);
    }

    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .main-content,
    body.custom-background:not(.boxed-container) > .main-wrapper:not([class*="card"]) .sidebars {
        padding: 0.9rem;
    }

    .main-wrapper {
        margin-left: 0;
        transition: margin-left 0.5s ease;
    }
}


/* ---------------------------------------------------------------
   10. Top Bar
--------------------------------------------------------------- */

.top-bar,
.top-bar-2 {
    height: 2.1875rem;
    position: relative;
}

[class*="top-bar"] {
    background-color: var(--bansta-top-bar-back-color);
    display: flex;
}

[class*="top-bar"] .fa {
    color: var(--bansta-top-bar-icon-color);
    cursor: pointer;
}

[class*="top-bar"] svg {
    fill: var(--bansta-top-bar-icon-color);
}

.top-bar svg,
.top-bar .fa {
    font-size: 1.3rem;
}

.top-extras {
    display: inline-flex;
    align-self: center;
}

.topbar-left-extras {
    font-family: var(--bansta-system-font);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: inline-flex;
    white-space: nowrap;
    color: var(--bansta-top-bar-icon-color);
}

.top-social {
    display: inline-flex;
    justify-content: flex-end;
    width: 100%;
}

.top-social a {
    display: inline-block;
    padding: 0.3125rem 0.5rem;
}


/* ---------------------------------------------------------------
   11. Site Header
--------------------------------------------------------------- */

.search-no-results header {
    padding: 0;
}

/* Single-row wrapper (styles 1, 4, 5) */
.header-wrapper {
    display: flex;
    border-bottom: 1px solid #ccc;
}

/* Two-row wrapper (styles 2, 3) */
.header-wrapper-2 {
    display: block;
    border-bottom: 1px solid #ccc;
}

.header,
.header-2 {
    background-color: var(--bansta-header-back-color);
    padding: unset;
}

.header {
    min-height: var(--bansta-header-min-height);
    max-width: 100%;
    position: relative;
}

/* Branding row for styles 2 & 3 */
.header-2 {
    height: auto;
    min-height: var(--bansta-header-height-2);
    display: flex;
    align-items: center;
    border-bottom: none;
}

.header-2 .container {
    align-items: center;
    flex-wrap: nowrap;
}

/* Nav row for styles 2 & 3 */
.main-nav-2 {
    min-height: 3rem;
    display: flex;
    align-items: center;
}

.main-nav-2 .container {
    align-items: center;
    flex-wrap: nowrap;
}

/* Sticky */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.main-nav-2.sticky-header ~ .header-2 {
    padding-top: 3rem;
}

body.has-sticky-nav .header-wrapper-2 {
    padding-top: 3rem;
}

/* Hidden inputs */
#menu-toggle {
    display: none;
}

@media (min-width: 48rem) {
    .sticky-header {
        transition: left 0.5s ease, width 0.5s ease;
    }
}


/* ---------------------------------------------------------------
   12. Branding & Logo
--------------------------------------------------------------- */

.header .site-branding {
    overflow: hidden;
}

.header .site-branding,
.header .site-branding a,
.primary-navigation,
.dark-mode-switch,
.search-icon {
    min-height: var(--bansta-header-min-height);
}

.site-branding {
    min-width: 0;
}

/* Single-row headers */
.header .site-branding {
    display: flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
}

/* Two-row headers */
.header-2 .site-branding {
    max-height: none;
    flex: 0 1 auto;
    width: 100%;
}

.ts-site-title {
    display: inline-block;
    padding: 0;
    margin: 0;
    line-height: 1.2;
    font-size: var(--bansta-site-identity-font-size);
    font-family: var(--bansta-site-identity-font);
    font-weight: var(--bansta-font-weight);
    max-width: 100%;
}

.header-2 .ts-site-title {
    white-space: normal;
    overflow: visible;
    text-align: left;
}

.ts-site-title a {
    color: var(--bansta-site-title-color);
    display: inline;
    min-width: 0;
}

/* Logo */
.ts-image-logo {
    vertical-align: middle;
}

.ts-image-logo,
.ts-image-logo img,
.header .ts-image-logo img {
    max-width: 100%;
}

.ts-image-logo img {
    margin: 0;
    width: var(--bansta-logo-size);
    display: inline-block;
    vertical-align: middle;
}

/* Desktop branding adjustments */
@media (min-width: 48rem) {
    .site-branding {
        position: initial;
        justify-content: flex-start;
    }

    .header .site-branding {
        justify-content: flex-start;
    }
}


/* ---------------------------------------------------------------
   13. Navigation
--------------------------------------------------------------- */

[class*="main-nav"] {
    background-color: var(--bansta-mainnav-back-color);
}

.primary-navigation {
    display: flex;
    align-items: center;
}

.container button {
    border: none;
}

.navigation {
    position: absolute;
    top: 3.1rem;
    left: 0;
    width: 100%;
    background: #454545;
    display: block;
    z-index: 3;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    height: 0;
    transition: height 0.25s ease, opacity 0.25s ease, visibility 0s linear 0.25s;
}

body.mobile-menu-open .navigation {
    visibility: visible;
    opacity: 1;
    height: calc(100vh - 3.125rem);
    overflow-y: auto;
    transition: height 0.25s ease, opacity 0.25s ease, visibility 0s;
}

.main-nav-2 .navigation {
    top: 3rem;
}

.navigation > li {
    position: relative;
}

.select-menu {
    display: none;
}

.navigation li a {
    display: block;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 0.4s ease;
    padding: 0.875rem 0.75rem;
    font-size: clamp(0.7rem, 0.8rem + 0.5vw, 0.92rem);
    font-weight: var(--bansta-font-weight);
    font-family: var(--bansta-secondary-font);
    color: #fff;
    white-space: nowrap;
}

.main-nav-2 .navigation li a {
    padding: 0.7875rem;
}

/* Desktop navigation */
@media (min-width: 48rem) {
    .navigation {
        position: inherit;
        flex-wrap: wrap;
        display: inline-flex;
        background-color: initial;
        overflow: unset;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
    }

    .navigation li a {
        color: var(--bansta-menu-link-color);
        padding: 0.9375rem 0.5625rem;
        text-wrap: nowrap;
    }

    .navigation-menu {
        margin-block: auto;
        white-space: nowrap;
    }

    .select-menu {
        display: block;
    }

    .select-menu a {
        color: var(--bansta-secondary-color);
        font-weight: 500;
    }
}


/* ---------------------------------------------------------------
   14. Sub-menus & Dropdowns
--------------------------------------------------------------- */

.sub-menu,
.children {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-top: 1px solid black;
    background-color: var(--bansta-secondary-color);
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    pointer-events: none;
}

ul .sub-menu,
ul .children {
    width: 100%;
}

ul .sub-menu li a,
ul .children li a {
    padding: 0.75rem 1.5rem;
    color: #fff;
}

ul .sub-menu .sub-menu,
ul .children .children {
    left: 100%;
    top: -0.03rem;
}

.menu-item-has-children,
.page_item_has_children {
    position: relative;
}

.menu-item-has-children .fa,
.page_item_has_children .fa {
    color: #eeeeee;
    transform: rotate(-90deg);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.menu-item-has-children > button,
.page_item_has_children > button {
    background: transparent;
    border: none;
}

.menu-item-has-children.focus > .sub-menu,
.page_item_has_children.focus > .children {
    visibility: visible;
    position: static;
    opacity: 1;
    pointer-events: auto;
}

.dropdown-toggle {
    padding: 0.9rem;
    position: absolute;
    right: 0;
    top: 0;
}

.menu-item-has-children.toggled-on > .dropdown-toggle > .fa,
.page_item_has_children.toggled-on > .dropdown-toggle > .fa {
    transform: rotate(0deg);
}

.sub-menu .dropdown-toggle,
.children .dropdown-toggle {
    float: right;
}

.fa-chevron-down {
    font-size: 0.8125rem;
}

body.mobile-menu-open .toggled-on > .sub-menu,
body.mobile-menu-open .toggled-on > .children {
    opacity: 1;
    visibility: visible;
    position: static;
    pointer-events: auto;
}

/* Desktop dropdowns */
@media (min-width: 48rem) {
    .header .sub-menu,
    .header .children,
    .main-nav-2 .sub-menu,
    .main-nav-2 .children {
        min-width: 13.75rem;
    }

    .menu-item-has-children.toggled-on > .sub-menu,
    .page_item_has_children.toggled-on > .children {
        position: absolute;
    }

    .menu-item-has-children.focus > .sub-menu,
    .page_item_has_children.focus > .children {
        position: absolute;
    }

    .header .menu-item-has-children:hover > .sub-menu,
    .header .page_item_has_children:hover > .children,
    .main-nav-2 .menu-item-has-children:hover > .sub-menu,
    .main-nav-2 .page_item_has_children:hover > .children,
    .navigation-menu ul > .focus > .sub-menu,
    .navigation-menu ul > .focus > .children {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .header .menu-item-has-children > a::after,
    .header .page_item_has_children > a::after,
    .main-nav-2 .menu-item-has-children > a::after,
    .main-nav-2 .page_item_has_children > a::after {
        content: "\f078";
        font-family: FontAwesome;
        padding-left: 0.25em;
        font-size: 0.8em;
        font-weight: lighter;
    }

    .header ul.sub-menu .menu-item-has-children > a::after,
    .header ul.children .page_item_has_children > a::after,
    .main-nav-2 ul.sub-menu .menu-item-has-children > a::after,
    .main-nav-2 ul.children .page_item_has_children > a::after {
        content: "\f054";
        position: absolute;
        right: 5%;
        bottom: 22%;
    }

    .header .dropdown-toggle,
    .main-nav-2 .dropdown-toggle {
        display: none;
    }
}


/* ---------------------------------------------------------------
   15. Dark Mode Switch
--------------------------------------------------------------- */

.dark-mode-switch {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.header .dark-mode-switch {
    flex: 0 0 auto;
}

.main-nav-2 .dark-mode-switch {
    flex: 1 1 80%;
    justify-content: flex-end;
}

.dark-mode-switch input[type="checkbox"] {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    margin: -0.0625rem;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.dark-mode-switch label:has(input:focus-visible) {
    outline: 2px solid;
    outline-offset: 2px;
    border-radius: 4px;
}

label .slider {
    width: 2.0625rem;
    height: 1.125rem;
    background: #484848;
    display: inline-block;
    cursor: pointer;
    position: relative;
    border-radius: 15px;
    margin: 0.375rem 0;
}

label .slider::before {
    content: "";
    position: absolute;
    bottom: 0.0625rem;
    left: 0.0625rem;
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s ease-in-out;
}

.fa-moon-o::before {
    color: #fff;
    font-size: 0.9375rem;
    position: absolute;
    top: 0.0625rem;
    left: 1rem;
    transform: rotate(210deg);
}

@media (min-width: 48rem) {
    .main-nav-2 .dark-mode-switch {
        flex: 0 0 auto;
    }
}


/* ---------------------------------------------------------------
   16. Search
--------------------------------------------------------------- */

.search-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.search-icon {
    z-index: 99;
    display: inline-flex;
    justify-content: flex-end;
}

.header .search-icon {
    flex: 0 0 auto;
    margin-left: 0.625rem;
}

.main-nav-2 .search-icon {
    flex: 0 0 20%;
}

.search-icon .fa-search {
    color: var(--bansta-menu-link-color);
    font-size: 1.2rem;
}

#close {
    position: absolute;
    right: 0.625rem;
    top: 2.0625rem;
    font-size: 2.1875rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
}

.search-results .search-form-wrap {
    margin-bottom: 1.5rem;
}

@media (min-width: 48rem) {
    .main-nav-2 .search-icon {
        flex: 0 0 auto;
    }
}


/* ---------------------------------------------------------------
   17. Mobile Menu Icon
--------------------------------------------------------------- */

.header button,
.main-nav-2 button {
    width: auto;
    height: auto;
}

.menu-icon {
    left: 0;
    z-index: 1;
    display: inline-block;
    flex: 0 0 auto;
    height: 35px;
    width: 35px;
}

.header .container {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
}

.menu-icon span {
    display: block;
    width: 30px;
    margin: 6px 0;
    border: 2px solid var(--bansta-menu-icon-color);
    background-color: var(--bansta-menu-link-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation */
.menu-icon.is-active span:first-child {
    transform: rotate(-45deg) translate(-8px, 6px);
}

.menu-icon.is-active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.is-active span:last-child {
    transform: rotate(45deg) translate(-8px, -6px);
}

@media (min-width: 48rem) {
    .menu-icon {
        display: none;
        visibility: hidden;
    }
}


/* ---------------------------------------------------------------
   18. Breadcrumbs
--------------------------------------------------------------- */

.breadcrumbs-wrap {
    width: 100%;
}

.breadcrumbs-container {
    width: 100%;
    max-width: var(--bansta-site-content-size);
    margin: auto;
    padding: 0.625rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
}

.breadcrumbs .separator {
    padding-inline: 0.25rem;
}

.breadcrumbs li,
.breadcrumbs li a {
    font-size: clamp(0.5rem, 0.8rem + 0.2vw, 0.9rem);
}

.breadcrumbs .item-cat a,
.breadcrumbs .item-home a {
    color: var(--bansta-secondary-color);
    word-break: normal;
}

.breadcrumbs .item-current {
    color: #535353;
    display: none;
}

#breadcrumbs .item-home,
#breadcrumbs .item-cat,
#breadcrumbs .bread-current {
    font-family: var(--bansta-primary-font);
    font-size: 0.88rem;
}

#breadcrumbs .fa-chevron-right {
    font-size: 0.8125rem;
    color: #3B3B3B;
}

@media (min-width: 48rem) {
    .breadcrumbs .item-current,
    .breadcrumbs .separator:nth-child(4) {
        display: inline;
    }

    .breadcrumbs .item-current i {
        color: #454545;
    }
}


/* ---------------------------------------------------------------
   19. Main Content Area
--------------------------------------------------------------- */

#site-footer .container {
    flex-direction: column;
}

.content-wrapper,
.single-content-wrapper {
    margin-block: 1.25rem;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* Content + sidebar: one column on mobile, two columns from 48rem.
   Direct children are #main-content and .sidebars. */
.main-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: var(--bansta-site-content-size);
    margin-inline: auto;
    padding-inline: 0.625rem;
    overflow-wrap: break-word;
}

/* col-ts-* widths are for rows; inside a grid they would shrink the cell */
.main-area > [class*="col-ts-"] {
    width: auto;
}

#main-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    margin-block-end: 2rem;
}

@media (min-width: 48rem) {
    .main-area {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        column-gap: 0.9rem;
    }
    
    body.page .main-area {
        grid-template-columns: auto;
    }

    .left-sidebar .main-area {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }

    .left-sidebar .main-area > .sidebars {
        order: -1;
    }

    .no-sidebar .main-area {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ---------------------------------------------------------------
   20. Post Containers (Default / Grid2 / Card1)
--------------------------------------------------------------- */

#main-content .default-container,
#main-content .grid2-container,
#main-content .card1-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

#main-content .default-container,
#main-content .card1-container {
    gap: 1.25rem;
}

#main-content .grid2-container {
    max-width: 100%;
    gap: 1.5625rem 0.9375rem;
}

/* Content entry base
   (float is ignored on grid items; kept for other containers that
   may still rely on it, e.g. related posts / masonry) */
.content-entry {
    background: #fff;
    width: 100%;
    height: auto;
    float: left;
    max-width: 100%;
    overflow: hidden;
}

[class*="content-entry-"] {
    position: relative;
}

/* ---------- Image left, text right (Default + Card1) ---------- */

.default-container .content-entry-default,
.card1-container .content-entry-card1 {
    --bansta-thumb-col: 45%;
    display: grid;
    grid-template-columns: var(--bansta-thumb-col) minmax(0, 1fr);
    align-items: start;
}

.default-container .content-entry-default {
    gap: 0.8rem;
}

.card1-container .content-entry-card1 {
    --bansta-thumb-col: 50%;
    gap: 0.3rem;
}

/* No thumbnail: text takes the full width */
.default-container .content-entry-default:not(:has(.featured-image)),
.card1-container .content-entry-card1:not(:has(.featured-image)) {
    grid-template-columns: minmax(0, 1fr);
}

.no-post-thumb .ts-content-wrap {
    grid-column: 1 / -1;
}

.default-container .ts-content-wrap,
.card1-container .ts-content-wrap {
    min-width: 0; /* long titles wrap instead of overflowing */
}

/* Default container: compact on small screens */
.default-container .ts-post-excerpt,
.default-container .read-more,
.default-container .ts-post-author-name,
.default-container .meta-separator {
    display: none;
}

.default-container .entry-post-title {
    font-size: clamp(1rem, 0.5rem + 1.8vw, 1.1rem);
    line-height: 1.4;
}

.default-container .metas {
    font-family: var(--bansta-secondary-font);
    font-size: clamp(0.7rem, 0.7rem + 0.5vw, 0.9rem);
}

/* Card1 container */
.card1-container .type-post {
    position: relative;
    background: #fff;
}

.card1-container .featured-image img {
    min-height: 10.125rem;
}

.card1-container header {
    padding: 0.375rem;
}

.card1-container .entry-post-title {
    font-size: clamp(0.9rem, 0.5rem + 1.8vw, 1rem);
}

.card1-container .metas {
    font-family: var(--bansta-secondary-font);
    font-size: clamp(0.7rem, 0.7rem + 0.5vw, 0.8rem);
}

.card1-container .ts-post-author-name,
.card1-container .meta-separator {
    display: none;
}

/* ---------- Grid2 container ---------- */

/* Image on top, text fills the rest of the (fixed height) card */
.content-entry-grid_2 {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
}

.content-entry-grid_2 header {
    padding: 0.375rem 0;
}

.content-entry-grid_2 .ts-post-excerpt p {
    font-size: 0.875rem;
}

.content-entry-grid_2 .read-more a {
    border: none;
}

.content-entry-grid_2 .read-more::after {
    content: "...";
    font-size: 0.75rem;
}

.grid2-container .entry-post-title {
    font-size: 1rem;
    line-height: 1.4;
}

/* ---------- Card shadow / panel group ---------- */

.card1-container .content-entry-card1,
.inner-card-container,
.card-wrap .comments,
.inner-card-wrap,
.card1 .sidebar-container .widget,
.card2 .sidebar-container .widget,
.card3 .sidebar-container .widget,
.card4 .sidebar-container .widget,
.single-card1 .widget:not(.card1 .footer-widget .widget) {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.19);
}

.inner-card-container,
.card-wrap .comments,
.inner-card-wrap,
.card1 .widget:not(.footer-widget .widget),
.card2 .widget:not(.footer-widget .widget),
.card3 .widget:not(.footer-widget .widget),
.card4 .widget:not(.footer-widget .widget) {
    background: #fff;
    padding: 0.75rem;
}

.card1 .widget:not(.footer-widget .widget),
.card2 .widget:not(.footer-widget .widget),
.card3 .widget:not(.footer-widget .widget),
.card4 .widget:not(.footer-widget .widget) {
    margin-bottom: 0.625rem;
}

.ts-prev-next-post.inner-card-wrap,
.card-wrap .comments {
    margin-top: 1.24rem;
}

/* Main pagination */
.main-pagination {
    margin-left: 25%;
}

.ts-post-content blockquote {
    border-left: 4px solid var(--bansta-primary-color);
    padding: 0.75rem 1.25rem;
    margin-block: 1.25rem;
    background-color: #f9f9f9;
}

.ts-post-content blockquote p {
    font-style: italic;
    color: #333;
}

.ts-post-content blockquote cite {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bansta-secondary-color);
    margin-top: 0.5rem;
}

/* ---------- Responsive ---------- */

@media (min-width: 30rem) {
    .default-container .ts-post-author-name,
    .default-container .meta-separator:not(:nth-child(4)),
    .card1-container .ts-post-author-name,
    .card1-container .meta-separator {
        display: inline;
    }
}

@media (min-width: 37.5rem) {
    #main-content .grid2-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card1-container header {
        padding-top: 0.5rem;
    }

    .default-container .ts-post-excerpt {
        display: block;
    }

    .default-container .read-more {
        display: inline-block;
    }

    .default-container .ts-post-excerpt p {
        font-size: 90%;
    }

    .no-sidebar .content-entry-default .ts-post-excerpt p,
    .no-sidebar .content-entry-grid_2 .ts-post-excerpt p {
        font-size: 0.91rem;
    }

    .no-sidebar .content-entry-default .read-more a,
    .no-sidebar .content-entry-grid_2 .read-more a {
        font-size: 0.9rem;
    }
}

@media (min-width: 48rem) {
    .grid2-container .content-entry {
        height: 23.75rem;
    }

    .entry-post-title,
    .default-container .entry-post-title {
        line-height: var(--bansta-line-height);
    }

    [class*="-container"] .featured-image img:not(.single-container img),
    .related-articles-container .featured-image img {
        transition: transform 0.3s ease-in-out;
    }

    [class*="-container"] .featured-image img:hover:not(.single-container img:hover),
    .related-articles-container .featured-image img:hover {
        transform: var(--bansta-img-transform-scale);
    }

    .no-sidebar .default-container .metas,
    .no-sidebar .grid2-container .metas,
    .no-sidebar .card1-container .metas {
        font-size: 1rem;
    }

    .sidebar-container .post-thumbnail {
        overflow: hidden;
        position: relative;
    }

    .sidebar-container img {
        transition: transform 0.3s ease-in-out;
        content: "";
    }

    .sidebar-container img:hover {
        transform: var(--bansta-img-transform-scale);
    }
}

@media (min-width: 64rem) {
    .entry-post-title {
        font-size: 98%;
    }

    .read-more a {
        font-size: 0.6875rem;
    }
}


/* ---------------------------------------------------------------
   21. Post Header & Meta
--------------------------------------------------------------- */

.ts-post-header {
    padding-bottom: 0.5rem;
}

.ts-content-wrap .entry-post-title {
    margin-top: 0;
}

.entry-post-title {
    padding: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-family: var(--bansta-primary-font);
    font-weight: var(--bansta-font-weight);
}

h1.entry-post-title,
h2.entry-post-title,
h3.entry-post-title,
h4.entry-post-title {
    text-transform: capitalize;
}

.entry-post-title a,
.single-content-wrapper .entry-post-title {
    color: var(--bansta-secondary-color);
}

.ts-category,
.ts-category-2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.12rem;
    margin-left: -0.375rem;
    padding-bottom: 0.25rem;
    z-index: 1;
}

/* Hidden on small screens in list-style cards (must come after the rule above) */
.default-container .ts-category,
.card1-container .ts-category {
    display: none;
}

.ts-category a,
.ts-category-2 a {
    font-size: 0.8rem;
    font-weight: 500;
    color: aliceblue;
    background: var(--bansta-primary-color);
    padding: 0.22rem 0.4rem;
    margin-left: 0.375rem;
}

.ts-category a:hover,
.ts-category-2 a:hover {
    background: var(--bansta-link-hover-color);
}

.ts-meta-info {
    display: inline-flex;
    width: 100%;
    font-family: var(--bansta-secondary-font);
}

.metas {
    padding: 0.25rem 0.5rem 0.25rem 0;
    display: inline-flex;
    font-size: clamp(0.6rem, 0.7rem + 0.2vw, 0.9rem);
    position: relative;
    color: #535353;
}

.metas a,
.metas .fa,
.ts-author-name a {
    overflow-wrap: normal;
    word-break: keep-all;
    color: var(--bansta-secondary-color);
}

.ts-post-author {
    color: #3B3B3B;
}

.ts-post-comments,
.meta-separator:nth-child(4) {
    display: none;
}

.heading-default {
    border-bottom: 4px solid var(--bansta-link-color);
    display: inline;
    padding-bottom: 0.5rem;
}

.heading-default::after {
    content: "";
    display: block;
    width: 100%;
    border-bottom: 1px solid #3B3B3B;
    padding-bottom: 0.5rem;
}

@media (min-width: 37.5rem) {
    .default-container .ts-category,
    .card1-container .ts-category {
        display: flex;
    }

    article .post-thumbnail img {
        height: auto;
    }

    .ts-meta-info {
        height: auto;
    }

    .widget-title {
        color: #282828;
    }

    .ts-post-comments,
    .meta-separator:nth-child(4) {
        display: inline;
    }

    .ts-post-comments .fa {
        font-size: 1.1rem;
    }
}


/* ---------------------------------------------------------------
   22. Featured Images
--------------------------------------------------------------- */

.featured-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    position: relative;
}

[class*="-container"] .featured-image img:not(.masonry-container img) {
    aspect-ratio: var(--bansta-aspect-ratio);
}

#main-content :is(.default-container, .grid2-container, .card1-container) .featured-image img {
    display: block;
    width: 100%;
    height: auto !important;
    max-width: 100%;
    object-fit: cover;
    aspect-ratio: var(--bansta-aspect-ratio, auto);
}

/* The wrapper must never force a height */
:is(.default-container, .grid2-container, .card1-container) .featured-image,
:is(.default-container, .grid2-container, .card1-container) .featured-image a {
    display: block;
    height: auto;
}

/* Grid2 cards have a fixed height, so cap the image and crop instead of growing */
.grid2-container .featured-image img {
    max-height: 14rem;
}

.featured-image-2 img {
    height: 7.5rem;
}


/* ---------------------------------------------------------------
   23. Post Excerpt & Read More
--------------------------------------------------------------- */

.ts-post-excerpt p {
    padding-block: 0.625rem;
    line-height: 1.2;
    font-size: 0.9rem;
    color: #454545;
    font-family: var(--bansta-primary-font);
}

.ts-post-content-entry {
    display: flex;
    flex-direction: column;
}

.read-more a {
    border: 1px solid var(--bansta-secondary-color);
    color: var(--bansta-secondary-color);
    font-weight: 600;
    font-size: 0.8125rem;
}

.default-container .read-more a {
    padding: 0.25rem 0.125rem;
    font-size: 0.75rem;
}

.read-more a:hover {
    border-color: var(--bansta-primary-color);
}

@media (min-width: 37.5rem) {
    .read-more a {
        font-size: 70%;
    }

    .no-sidebar .entry-post-title {
        font-size: 1rem;
    }
}


/* ---------------------------------------------------------------
   24. Pagination
--------------------------------------------------------------- */

.pagination {
    margin-block: 0.625rem;
    display: flex;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    font-weight: bold;
    display: block;
    font-family: var(--bansta-secondary-font);
    color: #222;
    white-space: nowrap;
}

.pagination .active,
.pagination .current {
    color: #fff;
    background-color: var(--bansta-primary-color);
}


/* ---------------------------------------------------------------
   25. Sidebar & Widgets
--------------------------------------------------------------- */

#sidebar {
    max-width: 100%;
    height: auto;
}

.sidebar-container {
    top: 3.125rem;
    margin-bottom: 0.625rem;
}

.widget {
    background: transparent;
}

.widget li {
    margin-block: 0.8125rem;
}

.widget ul {
    flex-direction: column;
}

.widget ul li a {
    line-height: 1.6;
    color: var(--bansta-secondary-color);
    font-family: var(--bansta-primary-font);
    font-weight: var(--bansta-font-weight);
    font-size: clamp(0.98rem, 0.5rem + 1.8vw, 1rem);
}

.widget .entry-header {
    margin: -0.375rem 0 0 0.375rem;
    line-height: 1.3;
}

.widget .metas {
    font-size: 0.75rem;
}

@media (min-width: 48rem) {
    .sidebar-container {
        position: sticky;
    }

    .no-sidebar .sidebars {
        display: none;
    }

    .no-sidebar #main-content {
        width: 100%;
    }
}


/* ---------------------------------------------------------------
   26. Single Post
--------------------------------------------------------------- */

.single-container header {
    padding: 0;
}

.single-container .featured-image img {
    aspect-ratio: 16 / 9 !important;
}

.single-container .ts-post-header {
    padding-bottom: 0.375rem;
    position: relative;
}

.single-container .entry-post-title {
    font-size: clamp(1.2rem, 1.1rem + 1vw, 1.4rem);
}

.single-container h2.wp-block-heading {
    font-size: clamp(1.13rem, 1.15rem + 1vw, 1.3rem);
}

.single-container h3.wp-block-heading {
    font-size: clamp(1.03rem, 1.1rem + 1vw, 1.2rem);
}

.single-container h4.wp-block-heading {
    font-size: clamp(1rem, 1.05rem + 1vw, 1.1rem);
}

.single-container h5.wp-block-heading {
    font-size: clamp(0.94rem, 1rem + 1vw, 1.07rem);
}

.single-container h6.wp-block-heading {
    font-size: clamp(0.9rem, 0.94rem + 0.9vw, 1rem);
}

.single-post-wrap .ts-small-box {
    position: static;
    padding-block: 0.625rem;
}

.single-container .ts-post-comments,
.single-container .meta-separator:nth-child(4) {
    display: inline;
}

.single-container .ts-post-comments .fa {
    font-size: 1rem;
}

.single-page-wrap h2 {
    margin-left: -0.625rem;
}

.inner-card-wrap header {
    padding: 0.5rem 0;
}


/* ---------------------------------------------------------------
   27. Content Pagination
--------------------------------------------------------------- */

.page-nav-post {
    display: flex;
    margin: 2rem 0;
    gap: 0.4rem;
}

.page-nav-post .post-page-numbers {
    padding: 0.2rem 0.8rem;
    font-weight: 500;
    border: 1px solid var(--bansta-primary-color);
}

.page-nav-post .post-page-numbers.current {
    color: #eeeeee;
    background: var(--bansta-primary-color);
}


/* ---------------------------------------------------------------
   28. Author Box
--------------------------------------------------------------- */

.author-box-wrap {
    display: grid;
    grid-template-columns: 3.75rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    border: 1px solid #ccc;
    padding: 1.25rem 0.625rem;
    margin: 1.24rem 0;
}

.author-box-wrap img.avatar {
    width: 3.75rem;
    height: auto;
    border-radius: 50%;
}

.ts-author-url {
    display: none;
}

.desc > div {
    padding: 0.1875rem 0.375rem;
}


/* ---------------------------------------------------------------
   29. Tags & Social Share
--------------------------------------------------------------- */

.ts-post-tags {
    margin-bottom: 2rem;
    width: 100%;
    margin-top: 1rem;
}

.ts-tags {
    width: 100%;
    display: inline-flex;
    flex-wrap: wrap;
}

.ts-tags li:not(:first-child) {
    padding-right: 0.125rem;
}

.ts-tags a {
    color: #121212;
}

.ts-tags a:hover {
    color: #E91E21;
}

.ts-tags-label {
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bansta-primary-color);
    padding: 0.2rem 0.3rem;
    color: #fefefe;
    margin-right: 0.2rem;
}

.ts-tags-links a {
    font-size: 0.84rem;
    font-weight: 500;
    color: #0c0c0c;
    text-decoration: none !important;
}

.ts-tags-links a:hover {
    color: var(--bansta-link-hover-color);
}

.ts-post-tags ul {
    padding-block: 0.25rem;
    display: inline-flex;
}

.ts-post-tags li {
    margin-left: 0 !important;
    list-style: none !important;
    padding-block: 0.25rem !important;
    font-size: 1rem;
    font-weight: 500;
}

.social-share {
    margin-bottom: 10px;
}


/* ---------------------------------------------------------------
   30. Prev / Next Post
--------------------------------------------------------------- */

.ts-prev-next-post {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr);
    position: relative;
    margin-block-start: 2rem;
}

.ts-prev-post {
    grid-column: 1;
}

.ts-next-post {
    grid-column: 3;
}

.inner-container-default .ts-prev-next-post {
    margin-bottom: 0.625rem;
}

.ts-prev-next-content {
    display: flex;
    flex-direction: column;
}

.ts-prev-next-content span {
    font-weight: var(--bansta-font-weight);
    margin-bottom: 0.5rem;
}

.ts-prev-next-content a {
    color: var(--bansta-secondary-color);
    font-weight: var(--bansta-font-weight);
    font-size: clamp(0.4rem, 0.7rem + 0.5vw, 0.85rem);
    line-height: 1.5;
}

.ts-prev-next-content a:hover {
    color: var(--bansta-link-hover-color);
}


/* ---------------------------------------------------------------
   31. Related Posts
--------------------------------------------------------------- */

.related-articles {
    width: 100%;
    content-visibility: auto;
    contain-intrinsic-size: auto 18rem;
}

.related-post-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.related-articles-container {
    display: grid;
    align-content: start;
    min-width: 0;
}

.related-articles-container .featured-image img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.related-articles-container .entry-post-title {
    font-size: clamp(0.7rem, 0.8rem + 0.3vw, 0.96rem);
}

.related-articles-container .metas {
    font-size: clamp(0.5rem, 0.7rem + 0.2vw, 0.9rem);
}

@media (min-width: 37.5rem) {
    .related-post-container {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr); /* equal columns for any number of posts */
        gap: 0.75rem;
    }
}


/* ---------------------------------------------------------------
   32. Comments
--------------------------------------------------------------- */

#comments,
.comments-area {
    content-visibility: auto;
    contain-intrinsic-size: auto 30rem;
}

.bypostauthor {
    display: block;
}

.comment-navigation {
    margin: 2rem auto;
    font-weight: bold;
}

.fn a,
.comment-content a,
.reply a {
    color: #0c0c0c;
    font-weight: var(--bansta-font-weight);
}

.comment-form .widget-title {
    padding: 0.625rem 0 0.625rem 0.625rem;
}

.comment-content p {
    font-size: 1rem;
    margin-left: 2.5rem;
    margin-top: 0.625rem;
}

.comment-metadata time {
    margin-left: 2.5rem;
    color: #0c0c0c;
}

.comment-edit-link {
    color: var(--bansta-link-color);
}

.comment-metadata a {
    font-size: 0.8125rem;
}

.reply {
    margin: 0.625rem 0;
}

.comment-reply-title + .comment-form {
    margin-top: 1.45rem;
}

.comment-reply-title a {
    color: #212121;
    margin-left: 0.5rem;
}

.comment-author {
    display: inline-flex;
    padding: 0.5rem;
    gap: 0.5rem;
}

.comment-author img {
    width: 1.5625rem;
    border-radius: 50%;
}

.comment-form input[type="submit"] {
    background-color: var(--bansta-primary-color);
    cursor: pointer;
    border-color: var(--bansta-primary-color);
}


/* ---------------------------------------------------------------
   33. Go-to-Top Button
--------------------------------------------------------------- */

#go-to-top {
    position: fixed;
    bottom: 1.25rem;
    right: 0.625rem;
    z-index: 99;
    background-color: var(--bansta-primary-color);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.625rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#go-to-top:hover {
    background-color: #535353;
}

#go-to-top .fa {
    font-size: 1.875rem;
    color: #fefefe;
}

#go-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ---------------------------------------------------------------
   34. WP Caption & Gallery
--------------------------------------------------------------- */

.wp-caption {
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.wp-caption img[class*="wp-image-"] {
    display: block;
    margin-inline: auto;
}

.wp-caption .wp-caption-text {
    margin: 0.8rem 0;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9rem;
}

.gallery {
    display: grid;
    gap: 0.625rem;
    margin: 0;
}

.gallery-item {
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.gallery-columns-1 { grid-template-columns: minmax(0, 1fr); }
.gallery-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery-columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gallery-columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gallery-columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gallery-columns-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gallery-columns-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.gallery-columns-9 { grid-template-columns: repeat(9, minmax(0, 1fr)); }

.gallery-caption {
    display: block;
}

@media (max-width: 30rem) {
    .gallery[class*="gallery-columns-"]:not(.gallery-columns-1) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ---------------------------------------------------------------
   35. Footer
--------------------------------------------------------------- */

#site-footer {
    width: 100%;
    margin-top: 1.5rem;
    background: var(--bansta-footer-back-color);
    content-visibility: auto;
    contain-intrinsic-size: auto 25rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(13.75rem, 100%), 1fr));
    gap: 1.5rem 2rem;
    width: min(var(--bansta-site-header-size), 100%);
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.footer-widget {
    min-width: 0;
}

.footer-widgets .widget-title,
.footer-widget .wp-block-heading {
    color: var(--bansta-link-color) !important;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer-widgets .widget ul li a {
    color: var(--bansta-footer-color);
    transition: color 0.2s ease;
}

.footer-widgets a:hover {
    color: var(--bansta-link-color);
}

.copyright {
    background: var(--bansta-copy-back-color);
    color: var(--bansta-copy-content-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    text-align: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.copyright h3,
.copyright p {
    font-size: 0.9rem;
    margin: 0;
}

.copyright a {
    color: var(--bansta-copy-link-color);
}


/* ---------------------------------------------------------------
   36. Gutenberg Post Content
--------------------------------------------------------------- */

.ts-post-content {
    padding-block: 0.5rem;
}

.ts-post-content button {
    padding: 0.4rem 1rem;
    border-color: var(--bansta-primary-color);
}

.ts-post-content ul,
.ts-post-content ol {
    margin-bottom: 0.5rem;
    margin-left: 1.1rem;
}

p + ul,
p + ol {
    margin-left: 1.8rem !important;
    margin-block-start: -0.7rem;
}

.ts-post-content ul li,
.ts-post-content ol li {
    padding: 0.25rem 0;
    list-style: inherit;
    line-height: 1.6;
    font-size: 1rem;
    font-family: var(--bansta-primary-font);
    color: #252525;
}

.ts-post-content ul li:not(:last-child) p,
.ts-post-content ol li:not(:last-child) p {
    margin-bottom: 0;
}

.ts-post-content p > a,
.comment-content p > a {
    border-bottom: 2px solid;
}


/* ---------------------------------------------------------------
   37. Dark Mode
--------------------------------------------------------------- */

.dark-mode,
.dark-mode #site-header:not(.header-2) {
    background: #000;
}

.dark-mode.custom-background:not(.boxed-container) {
    --bansta-panel-bg: #121212;
}

/* Text */
.dark-mode,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode p,
.dark-mode input[type="submit"],
.dark-mode button,
.dark-mode .ts-site-title,
.dark-mode .ts-site-title a,
.dark-mode .entry-post-title,
.dark-mode .entry-post-title a,
.dark-mode #main-nav a,
.dark-mode .wp-block-latest-posts:not(.is-grid) li a,
.dark-mode .wp-block-latest-comments .wp-block-latest-comments__comment a,
.dark-mode .widget ul li a,
.dark-mode .pagination li a,
.dark-mode #site-header .fa,
.dark-mode .ts-post-content li,
.dark-mode .read-more a,
.dark-mode .share-nodes .fa,
.dark-mode .search-icon .fa-search,
.dark-mode #breadcrumbs .fa-chevron-right,
.dark-mode .ts-post-comments .fa,
.dark-mode .metas,
.dark-mode .ts-prev-next-content span,
.dark-mode .ts-related-article-title {
    color: #fff;
}

.dark-mode a {
    color: var(--bansta-link-color);
}

/* Transparent backgrounds */
.dark-mode [class*="main-nav"],
.dark-mode .content-wrapper,
.dark-mode .single-content-wrapper {
    background: transparent;
}

/* Primary color backgrounds */
.dark-mode .ts-search-form input[type="submit"],
.dark-mode input[type="submit"],
.dark-mode button,
.dark-mode .top-bar,
.dark-mode .navigation-menu li.current-menu-item > a,
.dark-mode .navigation-menu .navigation > li:hover > a,
.dark-mode .navigation-menu .navigation > li.focus > a,
.dark-mode .navigation-menu .navigation > li > a:hover,
.dark-mode .navigation-menu .navigation > li > a:focus,
.dark-mode .menu-item-has-children:hover,
.dark-mode .page_item_has_children:hover,
.dark-mode .ts-search-form button {
    background: var(--bansta-link-color);
}

/* Form inputs */
.dark-mode input[type="text"],
.dark-mode input[type="email"],
.dark-mode input[type="search"],
.dark-mode input[type="password"],
.dark-mode textarea {
    background: #252525;
    border: 1px solid;
}

.dark-mode select {
    background: #454545;
}

.dark-mode input[type="submit"],
.dark-mode button,
.dark-mode .ts-search-form input[type="text"] {
    border: 1px solid #ccc;
    font-weight: 700;
}

/* Transparent controls */
.dark-mode .dropdown-toggle,
.dark-mode .menu-icon,
.dark-mode .search-toggle {
    border: none;
    background: transparent;
}

/* Muted text */
.dark-mode .comment-metadata time,
.dark-mode .ts-post-excerpt p,
.dark-mode .comment-ajaxified-placeholder .fa {
    color: #ccc !important;
}

.dark-mode .comment-reply-title a {
    color: orangered;
}

/* Structural backgrounds */
.dark-mode .main-wrapper {
    background: #222;
}

.dark-mode .top-bar-2,
.dark-mode .header-2 {
    background: var(--bansta-primary-color);
}

.dark-mode .sticky-header {
    background: var(--bansta-secondary-color);
}

/* Menu icon borders */
.dark-mode #menu-icon label span,
.dark-mode .menu-icon span {
    border: 2px solid;
}

/* Dark mode switch */
.dark-mode .slider,
.dark-mode .ajaxified-comments-container {
    background: #484848;
}

.dark-mode .slider::before {
    transform: translateX(0.9375rem);
    box-shadow: 0 2px 8px 0;
}

.dark-mode .slider::after {
    content: "\263C";
    font-size: 0.9375rem;
    position: absolute;
    top: -0.25rem;
    left: 0;
}

.dark-mode .fa-moon-o::before {
    display: none;
}

/* Categories */
.dark-mode .ts-category a,
.dark-mode .ts-category-2 a {
    background: var(--bansta-link-color);
    color: #fff;
}

/* Cards */
.dark-mode .card1-container .type-post,
.dark-mode .card2-container header,
.dark-mode .card3-container header,
.dark-mode .content-entry,
.dark-mode .inner-card-container,
.dark-mode .card1 .widget:not(.footer-widget .widget),
.dark-mode .card2 .widget:not(.footer-widget .widget),
.dark-mode .card3 .widget:not(.footer-widget .widget),
.dark-mode .card4 .widget:not(.footer-widget .widget),
.dark-mode .inner-card-wrap,
.dark-mode .card-wrap .comments {
    background: #0c0c0c !important;
    box-shadow:
        0 4px 8px rgba(250, 250, 250, 0.2),
        0 6px 20px rgba(250, 250, 250, 0.19);
}

/* Accent links */
.dark-mode .entry-post-title a:hover,
.dark-mode .ts-post-author-name a,
.dark-mode .widget ul li a:hover,
.dark-mode .ts-tags a,
.dark-mode .ts-prev-next-content a,
.dark-mode .fn a,
.dark-mode .comment-metadata a,
.dark-mode .comment-content a,
.dark-mode .reply a,
.dark-mode .breadcrumbs .item-cat a,
.dark-mode .breadcrumbs .item-home a,
.dark-mode .comment-ajaxified-placeholder {
    color: var(--bansta-link-color) !important;
}

@media (min-width: 48rem) {
    .dark-mode .breadcrumbs .item-current {
        color: #ccc;
    }
}


/* ---------------------------------------------------------------
   38. WordPress Core Classes
--------------------------------------------------------------- */

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    clear: both;
    margin-inline: auto;
}

img.alignleft,
img.alignright,
.alignleft img,
.alignright img {
    width: auto;
    max-width: 50%;
}

.alignwide,
.alignfull {
    max-width: 100%;
    margin-inline: auto;
}

.alignfull {
    width: 100%;
}

.sticky {
    display: block;
}

.sticky .entry-post-title a::before {
    content: "\2605\00a0";
    color: var(--bansta-primary-color);
}


/* ---------------------------------------------------------------
   39. Reduced Motion
--------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}