/*
Theme Name: KojaKurtki Clean
Theme URI: https://kojakurtki.com/
Author: KojaKurtki migration
Description: Lightweight responsive migration theme for KojaKurtki content.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Text Domain: kojakurtki-clean
*/

:root {
  --kk-bg: #f4f1ec;
  --kk-surface: #ffffff;
  --kk-text: #20201f;
  --kk-muted: #676a64;
  --kk-line: #ded8cf;
  --kk-accent: #0f5f59;
  --kk-accent-dark: #0a443f;
  --kk-warm: #9b5737;
  --kk-soft: #ece6dc;
  --kk-max: 1360px;
  --kk-radius: 8px;
  --kk-shadow: 0 12px 30px rgba(24, 20, 16, 0.08);
  --kk-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--kk-bg);
  color: var(--kk-text);
  font-family: var(--kk-font);
  font-size: 17px;
  line-height: 1.65;
}

img,
iframe,
video {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--kk-accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--kk-warm);
}

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 1000;
  background: var(--kk-text);
  color: #fff;
  padding: 10px 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--kk-line);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 190px;
  gap: 20px;
  align-items: center;
  width: min(var(--kk-max), calc(100% - 40px));
  min-height: 70px;
  margin: 0 auto;
}

.site-branding {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.custom-logo-link,
.site-logo,
.site-title {
  display: inline-flex;
  align-items: center;
  color: var(--kk-text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.custom-logo-link img,
.site-logo img {
  width: auto;
  max-height: 44px;
}

.site-description {
  margin: 5px 0 0;
  color: var(--kk-muted);
  font-size: 13px;
  line-height: 1.3;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--kk-line);
  border-radius: 8px;
  background: var(--kk-surface);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--kk-text);
  content: "";
}

.primary-nav {
  justify-self: center;
  min-width: 0;
}

.primary-nav ul,
.footer-nav ul {
  display: flex;
  gap: 0 20px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav ul {
  flex-wrap: nowrap;
}

.footer-nav ul {
  flex-wrap: wrap;
}

.primary-nav a {
  display: block;
  padding: 4px 0;
  color: var(--kk-text);
  font-size: 15px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a {
  color: var(--kk-accent);
}

.header-search {
  width: 190px;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--kk-line);
  border-radius: 8px;
  background: #fff;
  color: var(--kk-text);
  font: inherit;
  font-size: 15px;
  padding: 9px 11px;
}

.search-submit,
.button-link,
.wp-block-button__link,
.form-submit .submit {
  border: 0;
  border-radius: 8px;
  background: var(--kk-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  padding: 10px 13px;
  text-decoration: none;
}

.search-submit:hover,
.button-link:hover,
.wp-block-button__link:hover,
.form-submit .submit:hover {
  background: var(--kk-accent-dark);
  color: #fff;
}

.site-main {
  min-height: 60vh;
}

.wrap {
  width: min(var(--kk-max), calc(100% - 40px));
  margin: 0 auto;
}

.home-intro {
  border-bottom: 1px solid var(--kk-line);
  background: linear-gradient(180deg, #fff 0%, #f8f5ef 58%, var(--kk-bg) 100%);
}

.home-intro__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  padding: 34px 0 32px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--kk-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--kk-text);
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 850;
}

h2 {
  margin: 0 0 18px;
  font-size: 30px;
}

h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--kk-muted);
  font-size: 19px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.featured-grid > *,
.content-layout > *,
.entry-shell > *,
.post-list > * {
  min-width: 0;
}

.featured-grid .post-card:first-child {
  grid-row: auto;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 34px;
  align-items: start;
  padding: 34px 0 52px;
}

.post-list {
  display: grid;
  gap: 18px;
}

.post-card {
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  background: var(--kk-surface);
  box-shadow: var(--kk-shadow);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.post-card:hover {
  border-color: rgba(155, 87, 55, 0.42);
  box-shadow: 0 16px 34px rgba(24, 20, 16, 0.12);
  transform: translateY(-1px);
}

.post-card--horizontal {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.post-card__media {
  display: block;
  min-width: 0;
  min-height: 210px;
  background: var(--kk-soft);
}

.post-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
}

.post-card__body {
  min-width: 0;
  padding: 22px;
}

.post-card__title {
  margin: 0 0 10px;
  font-size: 23px;
  overflow-wrap: break-word;
}

.post-card__title a {
  color: var(--kk-text);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--kk-accent);
}

.post-card__excerpt {
  margin: 0 0 14px;
  color: var(--kk-muted);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: var(--kk-muted);
  font-size: 14px;
}

.post-meta a {
  color: var(--kk-accent-dark);
  text-decoration: none;
}

.archive-header,
.page-header {
  padding: 36px 0 0;
}

.archive-description {
  max-width: 760px;
  color: var(--kk-muted);
}

.entry-shell {
  display: grid;
  grid-template-columns: minmax(0, 820px) 300px;
  gap: 34px;
  align-items: start;
  justify-content: center;
  padding: 34px 0 52px;
}

.entry-main {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  background: var(--kk-surface);
  box-shadow: var(--kk-shadow);
}

.entry-header,
.entry-content,
.entry-footer,
.comments-area {
  padding: 28px;
}

.entry-title {
  margin: 0 0 14px;
  font-size: clamp(32px, 3.8vw, 46px);
  overflow-wrap: break-word;
}

.entry-featured img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.entry-content {
  padding-top: 0;
  font-size: 18px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.15em;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 1.6em;
}

.entry-content .alignleft,
.entry-content .alignright {
  float: none;
  display: block;
  margin: 0 auto 1.4em;
}

.entry-content .aligncenter,
.entry-content img.aligncenter {
  display: block;
  margin: 0 auto 1.4em;
}

.entry-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--kk-line);
  padding: 8px 10px;
}

.entry-content blockquote {
  margin: 1.5em 0;
  border-left: 4px solid var(--kk-accent);
  padding: 4px 0 4px 18px;
  color: var(--kk-muted);
}

.entry-content .ngg-galleryoverview {
  max-width: 100%;
}

.sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.widget {
  border: 1px solid var(--kk-line);
  border-radius: var(--kk-radius);
  background: var(--kk-surface);
  padding: 22px;
  box-shadow: 0 8px 22px rgba(24, 20, 16, 0.05);
}

.widget h2,
.widget-title {
  margin: 0 0 14px;
  font-size: 19px;
}

.widget ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.widget li + li {
  margin-top: 10px;
}

.widget a {
  color: var(--kk-accent-dark);
  font-weight: 650;
  text-decoration: none;
}

.widget a:hover {
  color: var(--kk-warm);
  text-decoration: underline;
}

.widget .search-form {
  display: grid;
  gap: 10px;
}

.widget .search-submit {
  width: 100%;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.pagination .page-numbers {
  min-width: 42px;
  border: 1px solid var(--kk-line);
  border-radius: 8px;
  background: var(--kk-surface);
  color: var(--kk-text);
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
}

.pagination .current {
  border-color: var(--kk-accent);
  background: var(--kk-accent);
  color: #fff;
}

.post-navigation,
.posts-navigation {
  margin-top: 24px;
}

.site-footer {
  border-top: 1px solid var(--kk-line);
  background: #1f2725;
  color: #dbe5df;
}

.site-footer a {
  color: #f3fbf7;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  width: min(var(--kk-max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.site-footer p {
  margin: 0;
}

.site-footer__brand {
  max-width: 620px;
}

.site-footer__title {
  color: #f3fbf7;
  font-weight: 750;
}

.site-footer__note {
  margin-top: 6px;
  color: #b9c7c0;
  font-size: 14px;
  line-height: 1.45;
}

.footer-nav {
  justify-self: end;
}

.footer-nav a {
  color: #f3fbf7;
  font-size: 14px;
  text-decoration: none;
}

.not-found {
  padding: 50px 0;
}

@media (max-width: 980px) {
  .site-header__inner {
    grid-template-columns: auto auto;
    gap: 16px;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

  .primary-nav,
  .header-search {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .site-header.is-open .primary-nav,
  .site-header.is-open .header-search {
    display: block;
  }

  .primary-nav ul {
    display: grid;
    gap: 0;
  }

  .primary-nav a {
    border-top: 1px solid var(--kk-line);
    padding: 13px 0;
  }

  .home-intro__inner,
  .featured-grid,
  .content-layout,
  .entry-shell,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .wrap,
  .site-header__inner,
  .site-footer__inner {
    width: min(var(--kk-max), calc(100% - 28px));
  }

  .site-header__inner {
    min-height: 72px;
  }

  .site-title {
    font-size: 25px;
  }

  .site-description {
    display: none;
  }

  .home-intro__inner {
    padding: 30px 0 24px;
  }

  .post-card--horizontal {
    grid-template-columns: 1fr;
  }

  .entry-header,
  .entry-content,
  .entry-footer,
  .comments-area {
    padding: 20px;
  }
}
