.kce-section {
  --kce-primary: #07584f;
  --kce-primary-dark: #004b43;
  --kce-gold: #d7b45e;
  --kce-bg: #fffefb;
  --kce-card: #fff;
  --kce-text: #303b3a;
  --kce-muted: #737b7a;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  padding: 64px 24px;
  color: var(--kce-text);
  background-color: var(--kce-bg);
  background-image:
    linear-gradient(rgba(255,254,251,.92), rgba(255,254,251,.92)),
    url("../images/karana-pattern.svg");
  background-position: center, center top;
  background-size: auto, 920px auto;
  direction: rtl;
  font-family: Estedad, IRANSansX, Vazirmatn, Tahoma, sans-serif;
}

.kce-section *, .kce-section *::before, .kce-section *::after { box-sizing: border-box; }
.kce-section button, .kce-section input, .kce-section textarea { font: inherit; }
.kce-section button { cursor: pointer; }
.kce-section [hidden] { display: none !important; }

.kce-container { position: relative; z-index: 1; width: 100%; max-width: 1200px; margin: 0 auto; }

.kce-header {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 28px;
  margin-bottom: 34px;
  text-align: center;
}

.kce-heading-copy { display: flex; flex-direction: column; align-items: center; }
.kce-eyebrow { color: #bd8314; font-size: 15px; font-weight: 500; }
.kce-eyebrow span { position: relative; display: block; width: 130px; height: 1px; margin: 12px auto 14px; background: var(--kce-gold); }
.kce-eyebrow span::after { content: ""; position: absolute; inset: -4px auto auto 50%; width: 8px; height: 8px; border: 1px solid var(--kce-gold); background: var(--kce-bg); transform: translateX(-50%) rotate(45deg); }
.kce-title { margin: 0; color: var(--kce-primary); font-size: clamp(31px, 3.6vw, 48px); font-weight: 800; line-height: 1.25; letter-spacing: -.8px; }
.kce-description { margin: 10px 0 12px; color: var(--kce-text); font-size: 17px; line-height: 1.8; }
.kce-count { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 4px 16px; color: var(--kce-primary); border: 1px solid rgba(7,88,79,.48); border-radius: 5px; background: rgba(255,255,255,.62); font-size: 14px; }
.kce-count b { font-weight: 800; }
.kce-mark { display: flex; justify-content: center; color: #c88e1b; }
.kce-brand-mark { width: 54px; height: 72px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }

.kce-form {
  position: relative;
  margin-bottom: 18px;
  padding: 28px 50px 18px;
  border: 1.5px solid var(--kce-primary);
  border-radius: 0 0 14px 14px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 7px 24px rgba(32,46,44,.035);
}

.kce-form::before { content: ""; position: absolute; top: -1.5px; right: 27px; left: 27px; height: 1.5px; background: var(--kce-primary); }
.kce-corner { position: absolute; top: -5px; width: 46px; height: 46px; color: var(--kce-primary); }
.kce-corner svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.kce-corner-tr { right: -5px; }
.kce-corner-tl { left: -5px; transform: scaleX(-1); }

.kce-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.kce-fields.has-phone { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kce-fields label { display: block; }
.kce-textarea { grid-column: 1 / -1; }
.kce-fields input, .kce-fields textarea {
  display: block;
  width: 100%;
  color: var(--kce-text);
  border: 1px solid #d4dbda;
  border-radius: 6px;
  outline: none;
  background: rgba(255,255,255,.72);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.kce-fields input { height: 48px; padding: 0 16px; }
.kce-fields textarea { min-height: 100px; padding: 13px 16px; resize: vertical; line-height: 1.9; }
.kce-fields input::placeholder, .kce-fields textarea::placeholder { color: #858c8b; opacity: 1; }
.kce-fields input:focus, .kce-fields textarea:focus { border-color: var(--kce-primary); background: #fff; box-shadow: 0 0 0 3px rgba(7,88,79,.09); }

.kce-form-footer { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 22px; margin-top: 14px; }
.kce-privacy { display: flex; align-items: center; gap: 10px; color: var(--kce-muted); font-size: 13px; line-height: 1.7; }
.kce-privacy svg { width: 24px; min-width: 24px; height: 24px; fill: none; stroke: #c88e1b; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kce-submit { display: inline-flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 10px; min-width: 158px; height: 46px; padding: 0 22px; color: #fff; border: 0; border-radius: 6px; background: linear-gradient(100deg, var(--kce-primary-dark), #067064); box-shadow: 0 8px 18px rgba(7,88,79,.18); transition: transform .2s ease, box-shadow .2s ease, filter .2s ease; }
.kce-submit:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(7,88,79,.24); filter: brightness(1.05); }
.kce-submit:disabled { cursor: wait; opacity: .68; transform: none; }
.kce-submit svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.kce-submit span { font-size: 15px; font-weight: 700; }
.kce-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; white-space: nowrap !important; }
.kce-form-message { display: none; margin-top: 12px; padding: 9px 14px; border-radius: 6px; font-size: 13px; }
.kce-form-message.is-visible { display: block; }
.kce-form-message.is-success { color: #07584f; background: #edf8f5; }
.kce-form-message.is-error { color: #9d2828; background: #fff0f0; }
.kce-reply-context { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -8px 0 15px; padding: 8px 12px; color: var(--kce-primary); border-right: 3px solid var(--kce-gold); background: #f5faf8; font-size: 13px; }
.kce-cancel-reply { padding: 2px 7px; color: #a57312; border: 0; background: transparent; font-size: 12px; }

.kce-comments { display: flex; flex-direction: column; gap: 14px; }
.kce-comment-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 178px) minmax(0, 1fr) 98px;
  grid-template-areas: "head body reply" "replies replies replies";
  align-items: start;
  column-gap: 20px;
  min-height: 110px;
  padding: 20px 22px;
  border: 1px solid rgba(39,57,54,.08);
  border-radius: 10px;
  background: var(--kce-card);
  box-shadow: 0 5px 17px rgba(25,42,39,.11);
}
.kce-comment-head { grid-area: head; display: flex; align-items: flex-start; gap: 12px; }
.kce-avatar { display: flex; align-items: center; justify-content: center; width: 52px; min-width: 52px; height: 52px; color: #fff; border-radius: 50%; background: linear-gradient(135deg, #008276, var(--kce-primary-dark)); box-shadow: 0 5px 12px rgba(7,88,79,.15); font-size: 22px; font-weight: 800; }
.kce-author-meta { min-width: 0; padding-top: 2px; }
.kce-author-name { overflow: hidden; color: #151b1a; font-size: 15px; font-weight: 800; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.kce-author-meta time { color: var(--kce-muted); font-size: 11px; }
.kce-comment-body { grid-area: body; align-self: center; color: var(--kce-text); font-size: 14px; line-height: 2; }
.kce-comment-body p { margin: 0; }
.kce-reply-btn { grid-area: reply; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 78px; height: 40px; color: #b57c12; border: 1px solid #ce9b37; border-radius: 6px; background: #fff; transition: color .2s ease, background .2s ease, transform .2s ease; }
.kce-reply-btn:hover { color: #fff; background: #b9851f; transform: translateY(-1px); }
.kce-reply-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kce-reply-btn span { font-size: 13px; }

.kce-replies { grid-area: replies; position: relative; margin: 15px 76px 0 0; }
.kce-replies::before { content: ""; position: absolute; top: -43px; right: -50px; width: 24px; height: 72px; border-right: 1px solid var(--kce-gold); border-bottom: 1px solid var(--kce-gold); }
.kce-replies .kce-comment-card { display: grid; grid-template-columns: minmax(135px, 175px) minmax(0, 1fr); grid-template-areas: "head body" "replies replies"; min-height: 80px; padding: 13px 18px; border-color: rgba(7,88,79,.15); border-radius: 6px; background: linear-gradient(100deg, #f4faf8, #edf6f4); box-shadow: none; }
.kce-replies .kce-avatar { width: 44px; min-width: 44px; height: 44px; font-size: 18px; }
.kce-replies .kce-reply-btn { display: none; }
.kce-replies .kce-comment-body { font-size: 13px; line-height: 1.9; }
.kce-replies .kce-replies { margin-right: 45px; }
.kce-verified { display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; color: #c9972d; font-size: 16px; }
.kce-comment-card.is-official > .kce-comment-head .kce-author-name { color: var(--kce-primary); }

.kce-empty, .kce-closed-message { padding: 22px; color: var(--kce-muted); border: 1px dashed rgba(7,88,79,.3); border-radius: 8px; background: rgba(255,255,255,.65); text-align: center; font-size: 14px; }
.kce-closed-message { margin-bottom: 18px; }
.kce-load-more { display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: 16px; width: min(520px, 100%); height: 48px; margin: 20px auto 0; color: var(--kce-primary); border: 1.5px solid var(--kce-primary); border-radius: 7px; background: rgba(255,255,255,.75); transition: color .2s ease, background .2s ease, transform .2s ease; }
.kce-load-more:hover { color: #fff; background: var(--kce-primary); transform: translateY(-1px); }
.kce-load-more:disabled { cursor: wait; opacity: .65; transform: none; }
.kce-load-more svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kce-load-more span { font-size: 15px; font-weight: 700; }
.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; }

@media (max-width: 900px) {
  .kce-section { padding: 48px 18px; background-size: auto, 700px auto; }
  .kce-header { grid-template-columns: 72px minmax(0,1fr) 72px; gap: 12px; }
  .kce-brand-mark { width: 42px; height: 60px; }
  .kce-form { padding-right: 30px; padding-left: 30px; }
  .kce-fields.has-phone { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .kce-phone-field { grid-column: 1 / -1; }
  .kce-comment-card { grid-template-columns: minmax(130px, 160px) minmax(0,1fr) 84px; column-gap: 12px; padding: 18px; }
}

@media (max-width: 640px) {
  .kce-section { padding: 36px 12px; background-size: auto, 520px auto; }
  .kce-header { display: block; margin-bottom: 18px; }
  .kce-mark { display: none; }
  .kce-eyebrow { font-size: 12px; }
  .kce-eyebrow span { width: 102px; margin: 9px auto 10px; }
  .kce-title { font-size: 28px; letter-spacing: -.4px; }
  .kce-description { margin: 8px 0 10px; font-size: 13px; }
  .kce-count { min-height: 29px; padding: 3px 12px; font-size: 12px; }
  .kce-form { margin-bottom: 13px; padding: 20px 18px 15px; border-radius: 0 0 9px 9px; }
  .kce-form::before { right: 20px; left: 20px; }
  .kce-corner { top: -4px; width: 35px; height: 35px; }
  .kce-fields, .kce-fields.has-phone { display: flex; flex-direction: column; gap: 9px; }
  .kce-phone-field { display: none !important; }
  .kce-fields input { height: 43px; padding: 0 12px; font-size: 12px; }
  .kce-fields textarea { min-height: 94px; padding: 10px 12px; font-size: 12px; }
  .kce-form-footer { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 10px; }
  .kce-submit { order: -1; width: 100%; height: 43px; }
  .kce-privacy { justify-content: center; gap: 7px; font-size: 10px; text-align: center; }
  .kce-privacy svg { width: 19px; min-width: 19px; height: 19px; }
  .kce-reply-context { align-items: flex-start; font-size: 11px; }
  .kce-comments { gap: 10px; }
  .kce-comment-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "head head" "body body" "reply reply" "replies replies"; min-height: 0; padding: 15px 13px; border-radius: 8px; }
  .kce-comment-head { justify-self: stretch; }
  .kce-avatar { width: 46px; min-width: 46px; height: 46px; font-size: 19px; }
  .kce-author-name { font-size: 13px; }
  .kce-author-meta time { font-size: 10px; }
  .kce-comment-body { margin-top: 11px; font-size: 12px; line-height: 2; }
  .kce-reply-btn { justify-self: start; min-width: 67px; height: 34px; margin-top: 10px; }
  .kce-reply-btn span { font-size: 11px; }
  .kce-reply-btn svg { width: 16px; height: 16px; }
  .kce-replies { margin: 12px 0 0; }
  .kce-replies::before { display: none; }
  .kce-replies .kce-comment-card { grid-template-columns: 1fr; grid-template-areas: "head" "body" "replies"; padding: 12px; }
  .kce-replies .kce-avatar { width: 40px; min-width: 40px; height: 40px; font-size: 16px; }
  .kce-replies .kce-comment-body { margin-top: 8px; font-size: 11.5px; }
  .kce-replies .kce-replies { margin-right: 18px; }
  .kce-load-more { height: 43px; margin-top: 14px; gap: 10px; }
  .kce-load-more span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .kce-section *, .kce-section *::before, .kce-section *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
