/*
Theme Name: Qing
Description: A classic WordPress theme based on the СЕРЬГИ-БОКС static landing page.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: qing
*/

/* WordPress additions; the original landing-page design lives in css/styles.css. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus,
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 10px 16px;
  margin: 0;
  clip: auto;
  white-space: normal;
  color: #fff;
  background: var(--berry);
  border-radius: 8px;
}
body.admin-bar .site-header { top: 32px; }
body.home .elementor-location-header { position: sticky; top: 0; z-index: 50; }
body.home.admin-bar .elementor-location-header { top: 32px; }
@media (max-width: 782px) {
  body.home.admin-bar .elementor-location-header { top: 46px; }
}
.site-main { min-height: 48vh; }
.site-header .custom-logo { display: block; max-width: 160px; max-height: 48px; width: auto; height: auto; }
.site-header .logo > span:last-child { white-space: nowrap; }
.site-header .nav-links .current-menu-item > a,
.site-header .nav-links .current_page_item > a { color: var(--gold-deep); }
.site-footer .footer-links { list-style: none; }
.site-footer .footer-links a { margin-bottom: 10px; }

.qing-page-section { padding: 86px 0 100px; }
.qing-page-heading { max-width: 760px; }
.qing-page-title {
  margin: 14px 0 18px;
  color: var(--berry);
  font-size: clamp(30px, 4vw, 46px);
  overflow-wrap: anywhere;
}
.qing-archive-description { color: var(--muted); font-size: 17px; }
.qing-archive-description p + p { margin-top: 12px; }
.qing-breadcrumbs { margin-bottom: 22px; color: var(--muted); font-size: 14px; }
.qing-breadcrumbs a { color: var(--berry); text-decoration: none; }
.qing-breadcrumbs a:hover { text-decoration: underline; }

.qing-post-grid { align-items: stretch; }
.qing-post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.qing-post-card__image {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gold-soft), #f9eee5 60%, #e9d1cb);
}
.qing-post-card__image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.qing-post-card:hover .qing-post-card__image img { transform: scale(1.035); }
.qing-post-card__meta,
.qing-entry__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 13px; font-weight: 700; }
.qing-post-card__meta { padding: 24px 24px 0; }
.qing-post-card__meta a,
.qing-entry__meta a { color: var(--gold-deep); text-decoration: none; }
.qing-post-card__title { margin: 13px 0 11px; padding: 0 24px; font-size: 19px; line-height: 1.35; }
.qing-post-card__title a { color: var(--berry); text-decoration: none; }
.qing-post-card__title a:hover { color: var(--gold-deep); }
.qing-post-card__excerpt { margin-bottom: 22px; padding: 0 24px; color: var(--muted); font-size: 15px; }
.qing-post-card__link { margin: auto 24px 26px; color: var(--berry); font-size: 14px; font-weight: 700; text-decoration: none; }
.qing-post-card__link:hover { color: var(--gold-deep); }

.qing-pagination { margin-top: 42px; }
.qing-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.qing-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--berry);
  background: var(--ivory);
  font-weight: 700;
  text-decoration: none;
}
.qing-pagination .page-numbers.current,
.qing-pagination .page-numbers:hover { color: #fff; background: var(--berry); border-color: var(--berry); }

.qing-content-wrap { max-width: 820px; margin: 0 auto; }
/* Checkout needs room for both the address form and order summary. */
body.woocommerce-checkout .qing-content-wrap {
  width: 100%;
  max-width: 1180px;
  padding-inline: clamp(16px, 3vw, 32px);
}
body.woocommerce-checkout .qing-entry__content > .wp-block-woocommerce-checkout {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
  min-width: 0;
}
.qing-entry { min-width: 0; }
.qing-entry__image { margin: 32px 0; }
.qing-entry__image img { display: block; width: 100%; height: auto; border-radius: 22px; }
.qing-entry__content { color: var(--ink); font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.qing-entry__content > * + * { margin-top: 1.25em; }
.qing-entry__content h2,
.qing-entry__content h3,
.qing-entry__content h4 { margin-top: 1.7em; color: var(--berry); line-height: 1.3; }
.qing-entry__content h2 { font-size: clamp(25px, 3vw, 34px); }
.qing-entry__content h3 { font-size: clamp(21px, 2.3vw, 26px); }
.qing-entry__content p,
.qing-entry__content li { line-height: 1.85; }
.qing-entry__content ul,
.qing-entry__content ol { padding-left: 1.5em; }
.qing-entry__content a { color: var(--berry); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.qing-entry__content img { max-width: 100%; height: auto; }
.qing-entry__content figure { max-width: 100%; }
.qing-entry__content figcaption { color: var(--muted); font-size: 14px; text-align: center; }
.qing-entry__content blockquote { padding: 14px 22px; border-left: 4px solid var(--gold); color: var(--berry); background: var(--ivory); }
.qing-entry__content pre { max-width: 100%; padding: 16px; overflow-x: auto; background: var(--ivory); border: 1px solid var(--line); }
.qing-entry__content table { width: 100%; border-collapse: collapse; }
.qing-entry__content th,
.qing-entry__content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.qing-entry__content .aligncenter { display: block; margin-inline: auto; }
.qing-entry__content .alignleft { float: left; margin: 0 24px 20px 0; }
.qing-entry__content .alignright { float: right; margin: 0 0 20px 24px; }
.qing-entry__content::after { content: ""; display: block; clear: both; }
.qing-entry__footer { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); }
.qing-entry__footer a { color: var(--berry); }
.qing-post-navigation { margin-top: 42px; }
.qing-post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; }
.qing-post-navigation a { display: grid; gap: 6px; color: var(--berry); font-weight: 700; text-decoration: none; }
.qing-post-navigation a:hover { color: var(--gold-deep); }
.qing-page-links { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 16px; color: var(--muted); }
.qing-page-links a { color: var(--berry); }
.qing-front-content { border-top: 1px solid var(--line); background: var(--ivory); }

.qing-search-form { display: flex; gap: 12px; flex-wrap: wrap; }
.qing-search-field {
  flex: 1 1 260px;
  min-width: 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--ivory);
  font: inherit;
}
.qing-search-field:focus { border-color: var(--gold-deep); outline: 2px solid var(--gold-soft); outline-offset: 1px; }
.qing-search-submit { padding: 13px 24px; }
.qing-empty { padding: 28px; background: var(--ivory); border: 1px solid var(--line); border-radius: 18px; }
.qing-empty p + p { margin-top: 12px; }
.qing-search-area { margin-top: 28px; }
.qing-no-results { display: grid; gap: 16px; }
.qing-no-results h2 { color: var(--berry); font-size: 23px; }
.qing-no-results .btn { justify-self: start; }

.qing-comments { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }
.qing-comments h2,
.qing-comments h3 { margin-bottom: 22px; color: var(--berry); font-size: 23px; }
.qing-comments .qing-comments__list { list-style: none; }
.qing-comments .comment { margin: 22px 0; padding: 20px; background: var(--ivory); border: 1px solid var(--line); border-radius: 14px; }
.qing-comments .comment .children { padding-left: 24px; list-style: none; }
.qing-comments .comment-meta { margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.qing-comments .comment-content > * + * { margin-top: 10px; }
.qing-comments .comment-reply-link { color: var(--berry); font-weight: 700; }
.qing-comments .comment-form p { margin-bottom: 16px; }
.qing-comments .comment-form label { display: block; margin-bottom: 6px; font-weight: 700; }
.qing-comments .comment-form input:not([type="checkbox"]),
.qing-comments .comment-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.qing-comments .form-submit input { width: auto; padding: 12px 22px; color: #fff; background: var(--berry); border: 0; border-radius: 999px; cursor: pointer; }

@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
@media (max-width: 860px) {
  .site-header .custom-logo { max-width: 60px; max-height: 36px; }
}
@media (max-width: 480px) {
  .site-header .custom-logo { max-width: 48px; max-height: 32px; }
}
@media (max-width: 760px) {
  .qing-page-section { padding: 60px 0 76px; }
  .qing-post-grid { grid-template-columns: 1fr 1fr; }
  .qing-entry__content { font-size: 16px; }
  .qing-post-navigation .nav-links { flex-direction: column; }
}
@media (max-width: 560px) {
  .qing-post-grid { grid-template-columns: 1fr; }
  .qing-page-title { font-size: 29px; }
  .qing-post-card__meta { padding: 22px 20px 0; }
  .qing-post-card__title,
  .qing-post-card__excerpt { padding-inline: 20px; }
  .qing-post-card__link { margin-inline: 20px; }
  .qing-entry__content .alignleft,
  .qing-entry__content .alignright { float: none; margin: 18px auto; }
}
