:root {
  --kp-bg: #f8f9fa;
  --kp-surface: #ffffff;
  --kp-surface-warm: #fcfbf9;
  --kp-border: #e7e4de;
  --kp-text: #4f555a;
  --kp-muted: #6c757d;
  --kp-accent: #20c997;
}

body {
  background-color: var(--kp-bg);
  color: var(--kp-text);
}

.navbar-app {
  background-color: var(--kp-surface);
  border-bottom: 1px solid var(--kp-border);
}

.navbar-app .navbar-brand {
  color: #495057;
  letter-spacing: 0.02em;
}

.navbar-app .navbar-brand:hover {
  color: #343a40;
}

.navbar-app .nav-link {
  color: var(--kp-muted);
}

.navbar-app .nav-link:hover {
  color: #495057;
}

.navbar-app .navbar-toggler {
  border-color: var(--kp-border);
  border-radius: 0.85rem;
  padding: 0.45rem 0.65rem;
}

.navbar-app .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(32, 201, 151, 0.15);
}

.navbar-app .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(79, 85, 90, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.search-strip {
  background-color: var(--kp-surface-warm);
  border-bottom: 1px solid var(--kp-border);
}

.content-shell {
  width: min(100%, 1140px);
  margin: 1.5rem auto;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: 1.25rem;
  box-shadow: 0 2px 10px rgba(68, 63, 55, 0.05);
}

.card,
.list-group-item,
.table,
.form-control,
.form-select,
.alert {
  border-color: var(--kp-border);
  border-radius: 1rem;
}

.card,
.list-group-item,
.table {
  background-color: var(--kp-surface);
  box-shadow: 0 2px 8px rgba(68, 63, 55, 0.05);
}

.btn {
  border-radius: 0.85rem;
}

.btn-primary,
.btn-secondary {
  background-color: transparent;
  border-color: var(--kp-muted);
  color: var(--kp-muted);
}

.btn-primary:hover,
.btn-secondary:hover {
  background-color: #efefef;
  border-color: #5c646b;
  color: #495057;
}

.btn-outline-primary {
  border-color: var(--kp-accent);
  color: #149a76;
}

.btn-outline-primary:hover {
  background-color: rgba(32, 201, 151, 0.1);
  color: #0f7b5e;
}

.site-footer-app {
  background: var(--kp-surface);
  border-top: 1px solid var(--kp-border);
}

.about-section {
  padding-top: 0.5rem;
  padding-bottom: 1rem;
}

.about-panel {
  max-width: 900px;
  background: var(--kp-surface);
  border: 1px solid var(--kp-border);
  border-radius: 1.2rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 2px 10px rgba(68, 63, 55, 0.05);
}

.about-lead {
  color: #5f5951;
  line-height: 1.9;
}

.about-image {
  border-radius: 1rem;
  border: 1px solid var(--kp-border);
}

.post-index {
  padding: 0.25rem;
}

.post-card {
  border: 1px solid var(--kp-border);
  border-radius: 1.25rem;
  box-shadow: 0 2px 10px rgba(68, 63, 55, 0.05);
}

.post-card__title {
  color: #0d6efd;
}

.post-card__title:hover {
  color: #0b5ed7;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-card__category {
  align-self: flex-start;
  color: #6a6258;
  background: #fbfaf8 !important;
}

.post-card__images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-card__image {
  width: 124px;
  height: 124px;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--kp-border);
  background: #fff;
}

.post-card__tag {
  letter-spacing: 0.02em;
}

.post-card__footer {
  border-top: 1px solid var(--kp-border);
}

.post-show {
  max-width: 900px;
}

.post-show__images {
  margin-inline: auto;
}

.kp-pagination-wrap {
  display: flex;
  justify-content: center;
}

.kp-pagination-meta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  color: var(--kp-muted);
  font-size: 0.9rem;
}

.kp-pagination-single {
  width: fit-content;
  margin-inline: auto;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--kp-border);
  border-radius: 999px;
  background: var(--kp-surface-warm);
  color: var(--kp-muted);
  font-size: 0.85rem;
}

.kp-pagination-wrap .pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kp-pagination-wrap .page,
.kp-pagination-wrap .first,
.kp-pagination-wrap .prev,
.kp-pagination-wrap .next,
.kp-pagination-wrap .last,
.kp-pagination-wrap .current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--kp-border);
  border-radius: 999px;
  background: var(--kp-surface);
  color: var(--kp-muted);
  font-size: 0.9rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.kp-pagination-wrap .page a,
.kp-pagination-wrap .first a,
.kp-pagination-wrap .prev a,
.kp-pagination-wrap .next a,
.kp-pagination-wrap .last a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0 0.75rem;
  color: inherit;
  text-decoration: none;
}

.kp-pagination-wrap .page:hover,
.kp-pagination-wrap .first:hover,
.kp-pagination-wrap .prev:hover,
.kp-pagination-wrap .next:hover,
.kp-pagination-wrap .last:hover {
  border-color: #cfd4da;
  background: #f2f4f6;
  color: #495057;
}

.kp-pagination-wrap .current {
  border-color: var(--kp-accent);
  background: rgba(32, 201, 151, 0.13);
  color: #0f7b5e;
  font-weight: 600;
}

.kp-pagination-wrap .gap {
  color: var(--kp-muted);
  padding: 0 0.25rem;
}

.post-show__image {
  width: min(100%, 420px);
  height: auto;
  object-fit: cover;
}

.post-show__actions {
  margin-top: 0.5rem;
}

.post-rating {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
}

.post-rating img,
.post-rating-input img {
  width: 20px;
  height: 20px;
}

.post-rating--lg img {
  width: 24px;
  height: 24px;
}

.post-rating-input {
  min-height: 24px;
}

.post-sort {
  align-items: center;
}

.genre-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.genre-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f8f9fa;
  border-radius: 20px;
  border: 1px solid #ddd;
  transition: 0.2s;
}

.genre-item:hover {
  background: #e9ecef;
  border-color: #bbb;
}

.post-index {
  padding: 0.25rem;
}

.post-card {
  border: 1px solid var(--kp-border);
  border-radius: 1.25rem;
  box-shadow: 0 2px 10px rgba(68, 63, 55, 0.05);
}

.post-card__title {
  color: #0d6efd;
}

.post-card__title:hover {
  color: #0b5ed7;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-card__category {
  align-self: flex-start;
  color: #6a6258;
  background: #fbfaf8 !important;
}

.post-card__images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-card__image {
  width: 124px;
  height: 124px;
  object-fit: cover;
  border-radius: 0.9rem;
  border: 1px solid var(--kp-border);
  background: #fff;
}

.post-card__tag {
  letter-spacing: 0.02em;
}

.post-card__footer {
  border-top: 1px solid var(--kp-border);
}

.post-show {
  max-width: 900px;
}

.post-show__images {
  margin-inline: auto;
}

.post-show__image {
  width: min(100%, 420px);
  height: auto;
  object-fit: cover;
}

.post-show__actions {
  margin-top: 0.5rem;
}

.img-fluid {
  max-width: 400px;
  height: auto;
}

.logo-img {
  display: block;
  width: 400px;
  height: auto;
  margin-top: 40px;
}

.top-hero {
  position: relative;
  overflow: hidden;
}

.top-hero__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(234, 224, 208, 0.45), transparent 36%),
    radial-gradient(circle at bottom right, rgba(226, 220, 210, 0.5), transparent 30%),
    linear-gradient(135deg, #fbfaf8 0%, #ffffff 52%, #f3f1ec 100%);
}

.top-hero__panel {
  position: relative;
  padding: 32px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--kp-border);
  box-shadow: 0 6px 20px rgba(68, 63, 55, 0.07);
}

.top-hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f5f1e9;
  color: #6a6258;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.top-hero__logo {
  display: block;
  width: min(100%, 280px);
  height: auto;
}

.top-hero__title {
  color: #3f3b35;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
}

.top-hero__lead {
  max-width: 34rem;
  color: #5f5951;
  font-size: 1.08rem;
  line-height: 1.8;
}

.top-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.top-hero__chips span {
  padding: 8px 14px;
  border: 1px solid var(--kp-border);
  border-radius: 999px;
  background: #fff;
  color: #6a6258;
  font-size: 0.92rem;
}

.top-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.top-hero__visual {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.top-hero__card {
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--kp-border);
  box-shadow: 0 6px 18px rgba(68, 63, 55, 0.08);
}

.top-hero__card--main {
  padding: 18px;
  transform: none;
  width: min(100%, 560px);
}

.top-hero__card--note {
  position: absolute;
  right: 0;
  bottom: -24px;
  width: min(320px, 82%);
  padding: 18px 20px;
}

.top-hero__photo {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 20px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
  letter-spacing: 0.02em;
}

@media (max-width: 991.98px) {
  .top-hero__panel {
    padding: 24px;
  }

  .top-hero__visual {
    align-items: stretch;
  }

  .top-hero__card--main {
    width: 100%;
  }

  .top-hero__card--note {
    position: static;
    width: 100%;
    margin-top: 16px;
  }
}

@media (max-width: 575.98px) {
  .top-hero__actions {
    flex-direction: column;
  }

  .top-hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .content-shell {
    width: calc(100% - 24px);
    margin: 1rem auto;
    padding: 1.5rem;
  }

  .navbar-app .container {
    align-items: flex-start;
  }

  .navbar-app .navbar-collapse {
    width: 100%;
    margin-top: 0.75rem;
  }

  .navbar-app .navbar-nav {
    width: 100%;
    gap: 0.25rem;
  }

  .navbar-app .nav-link {
    padding-left: 0;
    padding-right: 0;
  }

  .post-card__footer {
    align-items: flex-start !important;
  }

  .post-show {
    max-width: 100%;
  }

  .post-show__image {
    width: 100%;
  }

  .logo-img {
    width: min(100%, 320px);
    margin-top: 24px;
  }
}

@media (max-width: 767.98px) {
  .content-shell {
    width: calc(100% - 16px);
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .search-strip .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .post-card__meta {
    gap: 0.35rem;
  }

  .post-card__images {
    gap: 0.5rem;
  }

  .post-card__image {
    width: calc(50% - 0.25rem);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .post-sort {
    width: 100%;
  }

  .post-sort .btn {
    flex: 1 1 0;
  }

  .post-show__actions .btn,
  .post-show__actions form {
    width: 100%;
  }

  .list-group-item.d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .list-group-item.d-flex.justify-content-between.align-items-center > div:last-child {
    width: 100%;
  }

  .list-group-item.d-flex.justify-content-between.align-items-center .btn {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .content-shell {
    width: calc(100% - 12px);
    margin: 0.75rem auto;
    padding: 1rem;
  }

  .about-panel,
  .top-hero__panel {
    padding: 1rem;
    border-radius: 1rem;
  }

  .top-hero__title {
    font-size: 1.9rem;
  }

  .top-hero__lead {
    font-size: 0.98rem;
  }

  .top-hero__chips span {
    width: 100%;
    text-align: center;
  }

  .post-card__image {
    width: 100%;
  }

  .post-rating img,
  .post-rating-input img {
    width: 18px;
    height: 18px;
  }

  .genre-item {
    width: 100%;
    justify-content: flex-start;
  }
}