/*
Theme Name: Kreativ Core
Theme URI: https://kreativwp.com/themes/kreativ-core/
Author: Kreativ WP
Author URI: https://kreativwp.com/
Description: A lightweight, responsive WordPress theme for editorial sites, blogs, portfolios, and content-driven websites.
Version: 1.0.22
Requires at least: 6.4
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: kreativ-core
Domain Path: /languages
Tags: blog, portfolio, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

@charset "UTF-8";

/* --- Theme Color Variables --- */
:root {
  --color-brand: #c7184d; /* Accessible brand crimson */
  --color-accent: #007aa3; /* Accessible accent blue */
  --color-success: #00d084;
  --color-text: #212529;
  --color-bg: #ffffff;
  --color-muted: #6c757d;

  /* Buttons, links, and highlights */
  --color-btn-primary: var(--color-brand);
  --color-btn-hover: var(--color-accent);
}

/* --- Dark Mode Variables --- */
html.kreativ-dark-mode,
html.kreativ-dark-mode body,
body.dark-mode {
  background-color: #0e0e10;
}

html.kreativ-dark-mode body,
body.dark-mode {
  --color-bg: #0e0e10;
  --color-text: #f5f5f7;
  --color-muted: #a1a1aa;
  --color-brand: #ff8aac;
  --color-accent: #5bd5ff;
  --color-btn-primary: var(--color-accent);
  --color-btn-hover: var(--color-brand);
}

/* --- Base Styles --- */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(100% - 2rem, 1320px);
  margin-right: auto;
  margin-left: auto;
}

.row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.row > [class*="col-"] {
  min-width: 0;
}

/* Theme-owned navigation and grid primitives replace the former framework layer. */
.kreativ-header {
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

.kreativ-site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 96px;
}

.kreativ-site-navigation {
  display: grid;
  grid-template-columns: minmax(12rem, 25rem) minmax(0, 1fr);
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2rem;
}

.kreativ-hdr-right {
  display: flex;
  align-items: center;
  min-width: 0;
}

.kreativ-logo {
  margin: 0;
  min-width: 0;
}

.kreativ-search {
  width: 100%;
}

.kreativ-search-form {
  display: flex;
  gap: 0.5rem;
}

.kreativ-search-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0.45rem 0.65rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-text) 30%, transparent);
}

.kreativ-search-submit {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  color: var(--color-bg);
  background: var(--color-text);
  border: 1px solid var(--color-text);
  cursor: pointer;
}

.kreativ-search-submit:hover,
.kreativ-search-submit:focus-visible {
  color: var(--color-bg);
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.kreativ-primary-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem;
  overflow: visible;
  padding: 0;
  margin: 0;
  list-style: none;
}

.kreativ-primary-menu .menu-item-has-children {
  position: relative;
}

.kreativ-primary-menu .sub-menu {
  position: absolute;
  z-index: 1031;
  top: 100%;
  left: 0;
  display: none;
  min-width: 13rem;
  padding: 0.45rem;
  margin: 0;
  list-style: none;
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
  box-shadow: 0 0.7rem 1.5rem color-mix(in srgb, var(--color-text) 12%, transparent);
}

.kreativ-primary-menu > .menu-item:last-child > .sub-menu {
  right: 0;
  left: auto;
}

.kreativ-primary-menu .sub-menu .menu-item-has-children > .sub-menu {
  top: -0.45rem;
  left: calc(100% + 0.45rem);
}

.kreativ-primary-menu > .menu-item:last-child > .sub-menu .menu-item-has-children > .sub-menu {
  right: calc(100% + 0.45rem);
  left: auto;
}

.kreativ-primary-menu .menu-item-has-children:hover > .sub-menu,
.kreativ-primary-menu .menu-item-has-children:focus-within > .sub-menu,
.kreativ-primary-menu .menu-item-has-children.menu-item-open > .sub-menu {
  display: block;
}

.kreativ-submenu-toggle {
  display: none;
}

.kreativ-menu-toggle {
  display: none;
}

/* Three restrained directions for sites with different editorial priorities. */
body.kreativ-style-studio:not(.dark-mode) {
  --color-brand: #8b2e1a;
  --color-accent: #3d5e52;
  --color-text: #27231f;
  --color-bg: #f5f0e7;
  --color-muted: #655e55;
}

body.kreativ-style-portfolio:not(.dark-mode) {
  --color-brand: #2447a5;
  --color-accent: #0b6e69;
  --color-text: #182033;
  --color-bg: #f4f7fc;
  --color-muted: #586174;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-brand);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--color-brand);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* --- Buttons --- */
.btn-primary {
  color: #fff;
  background-color: var(--color-btn-primary);
  border-color: var(--color-btn-primary);
  border-radius: 0.3rem;
  padding: 0.4rem 1rem;
  font-weight: 600;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}
.btn-primary:hover {
  background-color: var(--color-btn-hover);
  border-color: var(--color-btn-hover);
}

/* --- Header --- */
.kreativ-header {
  background: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition:
    background 0.4s ease,
    color 0.4s ease;
}

.kreativ-logo a {
  color: var(--color-brand);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  transition: color 0.3s ease;
}
.kreativ-logo a:hover {
  color: var(--color-accent);
}

.kreativ-nav a {
  color: var(--color-text);
  font-weight: 600;
  margin-left: 1.5rem;
  transition: color 0.3s ease;
}
.kreativ-nav a:hover {
  color: var(--color-accent);
}

/* --- Dark Mode --- */
html.kreativ-dark-mode body,
html.kreativ-dark-mode .kreativ-header,
html.kreativ-dark-mode .kreativ-footer,
body.dark-mode,
body.dark-mode .kreativ-header,
body.dark-mode .kreativ-footer {
  background-color: #0e0e10;
  color: var(--color-text);
}

html.kreativ-dark-mode a,
body.dark-mode a {
  color: var(--color-accent);
}
html.kreativ-dark-mode a:hover,
body.dark-mode a:hover {
  color: var(--color-brand);
}

html.kreativ-dark-mode .btn-primary,
body.dark-mode .btn-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}
html.kreativ-dark-mode .btn-primary:hover,
body.dark-mode .btn-primary:hover {
  background-color: var(--color-brand);
  border-color: var(--color-brand);
}

html.kreativ-dark-mode .kreativ-header,
body.dark-mode .kreativ-header {
  background: #111;
  border-bottom: 1px solid #222;
}
html.kreativ-dark-mode .kreativ-logo a,
body.dark-mode .kreativ-logo a {
  color: var(--color-accent);
}

/* --- Footer --- */
.kreativ-footer {
  padding: 2.5rem 0;
  color: var(--color-muted);
  text-align: center;
  background-color: #fafafa;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.95rem;
}
html.kreativ-dark-mode .kreativ-footer,
body.dark-mode .kreativ-footer {
  background-color: #111;
  color: #bbb;
  border-top-color: #222;
}

.kreativ-header {
  padding-bottom: 0;
}

/* Default blog archives use a compact editorial reading layout. */
.kreativ-post-index {
  width: min(100% - 2.5rem, 1320px);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) 0;
}

.kreativ-post-index-header {
  max-width: 56rem;
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
}

.kreativ-post-index-intro {
  max-width: 42rem;
  margin: 1.5rem 0 0;
  color: var(--color-muted);
  font-size: 1.1rem;
}

.kreativ-post-index-kicker,
.kreativ-post-card-badge,
.kreativ-post-card-meta {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kreativ-post-index-kicker {
  margin: 0 0 0.7rem;
}

.kreativ-post-index-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 0.95;
}

.search .kreativ-post-index-header h1 {
  color: var(--color-text);
}

.kreativ-post-list {
  border-top: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
}

.kreativ-post-card {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(15rem, 1fr) minmax(15rem, 0.9fr);
  gap: clamp(1.25rem, 3vw, 3.25rem);
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
}

.kreativ-post-card-badge {
  grid-column: 1 / -1;
  margin: -0.5rem 0 0;
  color: var(--color-brand);
}

.sticky {
  position: relative;
}

.kreativ-post-card-media {
  display: block;
  align-self: center;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
}

.kreativ-post-card-media img,
.kreativ-post-card-media .kreativ-fallback-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kreativ-post-card-media .kreativ-fallback-thumb {
  background:
    linear-gradient(135deg, transparent 0 48%, color-mix(in srgb, var(--color-brand) 16%, transparent) 48% 52%, transparent 52%),
    color-mix(in srgb, var(--color-text) 7%, transparent);
}

.kreativ-post-card h2 {
  margin: 0 0 0.8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.5vw, 2.75rem);
  line-height: 1;
}

.kreativ-post-card h2 a {
  color: var(--color-text);
}

.kreativ-post-card h2 a:hover,
.kreativ-post-card-link:hover {
  color: var(--color-brand);
}

.kreativ-post-card-meta {
  line-height: 1.5;
}

.kreativ-post-card-meta a {
  color: inherit;
}

.kreativ-post-card-summary {
  max-width: none;
  align-self: center;
  color: var(--color-text);
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.55;
}

.kreativ-post-card-summary p {
  margin: 0 0 1.2rem;
}

.kreativ-post-card-link {
  display: inline-flex;
  padding-bottom: 0.15rem;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kreativ-post-index-pagination {
  padding-top: 2rem;
}

.kreativ-post-index-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.kreativ-post-index-pagination a,
.kreativ-post-index-pagination .current {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.4rem 0.8rem;
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
}

.kreativ-post-index-pagination .current {
  color: #fff;
  background: var(--color-brand);
  border-color: var(--color-brand);
}

.kreativ-archive-sort {
  display: flex;
  gap: 0.6rem;
  margin: -2.5rem 0 2.5rem;
}

.kreativ-archive-sort a {
  padding: 0.45rem 0.8rem;
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-text) 20%, transparent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kreativ-archive-sort a.is-current,
.kreativ-archive-sort a:hover {
  color: #fff;
  background: var(--color-brand);
  border-color: var(--color-brand);
  text-decoration: none;
}

.kreativ-content-shell {
  width: min(100% - 2.5rem, 860px);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) 0;
}

.kreativ-wide-page {
  width: min(100% - 2.5rem, 1320px);
}

.kreativ-wide-page .kreativ-entry-header {
  max-width: 72rem;
}

.kreativ-wide-page .kreativ-entry-content {
  max-width: 58rem;
}

.kreativ-entry-header {
  max-width: 60rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
}

.kreativ-page .kreativ-entry-header {
  margin-bottom: clamp(2rem, 3.5vw, 3.25rem);
}

.kreativ-entry-header h1,
.kreativ-empty-state h1,
.kreativ-related-posts h2 {
  margin: 0.4rem 0 1rem;
  color: var(--color-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 4.5vw, 4.75rem);
  line-height: 0.94;
}

.kreativ-entry-featured-media {
  max-width: 60rem;
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
}

.kreativ-entry-featured-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.kreativ-entry-content {
  max-width: 44rem;
  margin: 0 auto;
  font-size: 1.15rem;
}

.kreativ-entry-content > * + * {
  margin-top: 1.5rem;
}

.kreativ-entry-content img {
  height: auto;
  max-width: 100%;
}

/* Keep native form and table content readable when supplied by blocks or plugins. */
.kreativ-entry-content fieldset {
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 25%, transparent);
}

.kreativ-entry-content legend {
  padding: 0 0.35rem;
  color: var(--color-text);
  font-weight: 700;
}

.kreativ-entry-content label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.kreativ-entry-content input:not([type="checkbox"]):not([type="radio"]),
.kreativ-entry-content select,
.kreativ-entry-content textarea {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid color-mix(in srgb, var(--color-text) 35%, transparent);
}

.kreativ-entry-content textarea {
  min-height: 9rem;
  resize: vertical;
}

.kreativ-entry-content input[type="checkbox"],
.kreativ-entry-content input[type="radio"] {
  width: 1rem;
  height: 1rem;
  margin-right: 0.45rem;
  accent-color: var(--color-brand);
}

.kreativ-entry-content label:has(input[type="checkbox"]),
.kreativ-entry-content label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  font-weight: 400;
}

.kreativ-entry-content button,
.kreativ-entry-content input[type="submit"] {
  padding: 0.7rem 1rem;
  color: #fff;
  font-weight: 700;
  background: var(--color-btn-primary);
  border: 1px solid var(--color-btn-primary);
  cursor: pointer;
}

.kreativ-entry-content button:hover,
.kreativ-entry-content input[type="submit"]:hover {
  background: var(--color-btn-hover);
  border-color: var(--color-btn-hover);
}

.kreativ-entry-content .wp-block-table {
  overflow-x: auto;
}

.kreativ-entry-content table {
  width: 100%;
  border-collapse: collapse;
}

.kreativ-entry-content th,
.kreativ-entry-content td {
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
  border: 1px solid color-mix(in srgb, var(--color-text) 22%, transparent);
}

.kreativ-entry-content th {
  background: color-mix(in srgb, var(--color-text) 6%, var(--color-bg));
}

.kreativ-entry-content pre {
  padding: 1rem;
  overflow-x: auto;
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-text) 6%, var(--color-bg));
}

.kreativ-entry-footer,
.kreativ-entry-navigation,
.post_comments {
  max-width: 44rem;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 18%, transparent);
}

.kreativ-entry-footer {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.kreativ-entry-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.kreativ-entry-navigation .nav-next {
  margin-left: auto;
  text-align: right;
}

.kreativ-related-posts {
  max-width: 44rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  margin-right: auto;
  margin-left: auto;
}

.kreativ-related-posts h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  line-height: 1;
}

.kreativ-related-posts .kreativ-post-card {
  display: block;
  padding: 1.5rem 0;
}

.kreativ-related-posts .kreativ-post-card-media {
  display: none;
}

.kreativ-related-posts .kreativ-post-card h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  line-height: 1;
}

.kreativ-related-posts .kreativ-post-card-summary {
  max-width: none;
  margin-top: 0.8rem;
}

.comment-form > p {
  margin: 1.1rem 0;
}

.comment-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  box-sizing: border-box;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 35%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
}

.comment-form textarea {
  min-height: 12rem;
}

.comment-form .comment-form-cookies-consent label {
  display: inline;
  margin: 0;
  font-weight: 400;
}

.comment-form .submit {
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-brand);
  background: var(--color-brand);
  color: #fff;
  cursor: pointer;
}

.comment-form .submit:hover,
.comment-form .submit:focus-visible {
  background: var(--color-text);
  border-color: var(--color-text);
}

.kreativ-empty-state {
  max-width: 44rem;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.kreativ-empty-state .kreativ-search-form {
  display: flex;
  max-width: 32rem;
  margin: 2rem 0;
}

.kreativ-empty-state input[type="search"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--color-text) 30%, transparent);
}

.kreativ-archive-density-compact .kreativ-post-card {
  padding: clamp(1.5rem, 3vw, 3rem) 0;
}

/* Gutenberg patterns use the same spacing and type scale as theme templates. */
.kreativ-pattern-introduction,
.kreativ-pattern-feature,
.kreativ-pattern-case-study,
.kreativ-pattern-newsletter {
  max-width: 62rem;
  margin: clamp(2.5rem, 6vw, 6rem) auto;
  padding: clamp(2rem, 5vw, 5rem);
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-bg) 92%, var(--color-brand));
}

.kreativ-pattern-introduction {
  max-width: 48rem;
  padding: 0;
  background: transparent;
}

.kreativ-pattern-kicker {
  margin: 0 0 0.8rem;
  color: var(--color-brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kreativ-pattern-introduction h1,
.kreativ-pattern-feature h2,
.kreativ-pattern-case-study h2,
.kreativ-pattern-newsletter h2 {
  max-width: 16ch;
  margin: 0 0 1.5rem;
  color: var(--color-text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
}

.kreativ-pattern-lead {
  max-width: 40rem;
  margin: 0 0 1.8rem;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

.kreativ-pattern-feature .wp-block-button__link,
.kreativ-pattern-case-study .wp-block-button__link,
.kreativ-pattern-newsletter .wp-block-button__link {
  color: #fff;
  background: var(--color-brand);
}

.kreativ-pattern-case-study .wp-block-columns {
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 4rem);
}

.kreativ-pattern-case-study h3 {
  margin-bottom: 0.6rem;
  color: var(--color-brand);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kreativ-pattern-quote {
  max-width: 48rem;
  margin: clamp(3rem, 7vw, 7rem) auto;
  padding: 0;
  color: var(--color-text);
  border: 0;
}

.kreativ-pattern-quote p {
  margin: 0 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1.02;
}

.kreativ-pattern-quote cite {
  color: var(--color-muted);
  font-size: 0.9rem;
  font-style: normal;
}

.kreativ-hdr-right .kreativ-primary-menu {
  align-items: center;
  gap: 0.2rem;
  list-style: none;
}

.kreativ-hdr-right .kreativ-primary-menu a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--color-text);
  font-size: 0.9rem;
}

.kreativ-hdr-right .kreativ-primary-menu a:hover,
.kreativ-hdr-right .kreativ-primary-menu a:focus-visible {
  color: var(--color-brand);
  text-decoration: none;
}

.kreativ-primary-menu .current-menu-item > a,
.kreativ-primary-menu .current-menu-ancestor > a,
.kreativ-primary-menu .current_page_item > a,
.kreativ-primary-menu .current_page_ancestor > a,
.kreativ-primary-menu a[aria-current="page"] {
  color: var(--color-brand);
  font-weight: 700;
}

.kreativ-primary-menu > .current-menu-item > a,
.kreativ-primary-menu > .current-menu-ancestor > a,
.kreativ-primary-menu > .current_page_item > a,
.kreativ-primary-menu > .current_page_ancestor > a {
  box-shadow: inset 0 -2px 0 var(--color-brand);
}

.kreativ-logo a {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  white-space: nowrap;
}

.kreativ-logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(1.15rem, 1.7vw, 2rem);
}

/* Keep the sticky header below WordPress's logged-in admin bar. */
.admin-bar .kreativ-header {
  top: 32px;
}

@media (max-width: 1199.98px) {
  .kreativ-site-nav {
    gap: 0.5rem;
  }

  .kreativ-site-nav > .kreativ-logo {
    flex: 1 1 auto;
  }

  .kreativ-logo a {
    width: 100%;
  }

  .kreativ-logo-text {
    min-width: 0;
  }

  .kreativ-site-navigation.kreativ-offcanvas {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 100%;
    display: block;
    width: 100%;
    padding: 1.5rem;
    overflow-y: auto;
    visibility: hidden;
    background: var(--color-bg);
    transition: left 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }

  .kreativ-site-navigation.kreativ-offcanvas.open {
    left: 0;
    visibility: visible;
  }

  .kreativ-offcanvas .kreativ-search {
    width: 100%;
    margin: 0 0 1.5rem;
  }

  .kreativ-offcanvas .kreativ-primary-menu {
    flex-direction: column;
    gap: 0.35rem;
    overflow-x: visible;
  }

  .kreativ-offcanvas .menu-item-has-children {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .kreativ-offcanvas .sub-menu {
    position: static;
    display: none;
    grid-column: 1 / -1;
    min-width: 0;
    padding: 0.3rem 0 0.3rem 1rem;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .kreativ-offcanvas .menu-item-has-children:hover > .sub-menu,
  .kreativ-offcanvas .menu-item-has-children:focus-within > .sub-menu {
    display: none;
  }

  .kreativ-offcanvas .menu-item-has-children.menu-item-open > .sub-menu {
    display: block;
  }

  .kreativ-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    min-height: 2.4rem;
    color: var(--color-text);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--color-text) 25%, transparent);
    cursor: pointer;
  }

  .menu-item-open > .kreativ-submenu-toggle span {
    transform: rotate(45deg);
  }

  .kreativ-menu-toggle {
    order: 2;
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    margin-left: 0.5rem;
    padding: 0.45rem 0.7rem;
    color: var(--color-text);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--color-text) 30%, transparent);
    cursor: pointer;
  }

  .kreativ-offcanvas {
    top: 96px;
  }

  .admin-bar .kreativ-offcanvas {
    top: 128px;
  }
}

@media (max-width: 767.98px) {
  .kreativ-post-index {
    width: min(100% - 2rem, 1320px);
  }

  .kreativ-post-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

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

  .admin-bar .kreativ-offcanvas {
    top: 142px;
  }
}

@media (max-width: 767.98px) {
  .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.kreativ-heading {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1rem;
  margin-top: 1rem;
}
