/*
Theme Name: Kargah
Description: قالب اختصاصی درب‌یار — راهنما و خدمات تعمیر درب اتوماتیک شیشه‌ای.
Version: 1.0.0
Requires PHP: 8.0
Text Domain: kargah
*/

@font-face {
	font-family: "Estedad";
	src: url("assets/fonts/estedad.woff2") format("woff2");
	font-weight: 100 900;
	font-display: swap;
}

:root {
	--bg: #ffffff;
	--paper: #f4f9fb;
	--tint: #e7f3f7;
	--ink: #16323e;
	--muted: #5d7480;
	--teal: #1b86a8;
	--teal-d: #12657f;
	--sky: #a6d9ea;
	--amber: #f0a52c;
	--line: #d8e8ee;
	--r: 14px;
	--shadow: 0 1px 2px rgba(22, 50, 62, .06), 0 8px 24px rgba(22, 50, 62, .07);
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 16.5px/1.95 "Estedad", Tahoma, sans-serif;
	font-feature-settings: "ss01";
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-d); text-underline-offset: 4px; }
a:hover { color: var(--teal); }
h1, h2, h3 { line-height: 1.5; margin: 0 0 .6em; font-weight: 800; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }

.kg-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
.kg-narrow { max-width: 820px; }
.kg-skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.kg-skip:focus { inset-inline-start: 8px; }
.kg-i { width: 1.25em; height: 1.25em; flex: none; }

/* buttons, chips */
.kg-btn {
	display: inline-flex; align-items: center; gap: .5em;
	background: var(--teal); color: #fff; text-decoration: none;
	font-weight: 700; padding: .72em 1.3em; border-radius: 999px;
	border: 2px solid var(--teal); transition: background .2s, transform .2s;
}
.kg-btn:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; transform: translateY(-1px); }
.kg-btn--ghost { background: transparent; color: var(--teal-d); }
.kg-btn--ghost:hover { background: var(--tint); color: var(--teal-d); }
.kg-btn--light { background: #fff; color: var(--teal-d); border-color: #fff; }
.kg-btn--light:hover { background: var(--paper); color: var(--teal-d); }
.kg-btn--sm { padding: .45em 1em; font-size: .92rem; }
.kg-btn--block { width: 100%; justify-content: center; }
.kg-chip {
	display: inline-block; font-size: .8rem; font-weight: 700; color: var(--teal-d);
	background: var(--tint); padding: .15em .8em; border-radius: 999px; text-decoration: none; margin-bottom: .6em;
}
.kg-eyebrow { color: var(--teal); font-weight: 700; font-size: .92rem; margin-bottom: .4em; letter-spacing: 0; }

/* header */
.kg-top { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.kg-top__in { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.kg-logo img { height: 46px; width: auto; }
.kg-nav { margin-inline-start: auto; }
.kg-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.kg-nav a { display: block; padding: .4em .85em; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .96rem; }
.kg-nav a:hover, .kg-nav .current-menu-item > a, .kg-nav .current_page_item > a { background: var(--tint); color: var(--teal-d); }
.kg-burger { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); cursor: pointer; }

@media (max-width: 900px) {
	.kg-top__in { min-height: 62px; gap: 10px; }
	.kg-logo img { height: 38px; }
	.kg-burger { display: inline-flex; }
	.kg-top__cta { display: none; }
	.kg-nav { position: absolute; inset-inline: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
	.kg-nav.is-open { display: block; }
	.kg-nav ul { flex-direction: column; padding: 8px 16px 14px; }
	.kg-nav a { padding: .7em .6em; }
}

/* hero */
.kg-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #eaf6fa 0%, #f7fbfc 55%, #fff 100%); padding: 56px 0 64px; }
.kg-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.kg-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 900; line-height: 1.45; }
.kg-hero h1 span { display: block; color: var(--teal); }
.kg-lead { font-size: 1.08rem; color: var(--muted); max-width: 36em; }
.kg-hero__btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.kg-ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .95rem; }
.kg-ticks li { display: flex; align-items: center; gap: 6px; }
.kg-ticks .kg-i { color: var(--teal); }
.kg-hero__panes i {
	position: absolute; top: -10%; bottom: -10%; width: 28%;
	background: linear-gradient(180deg, rgba(166, 217, 234, .32), rgba(166, 217, 234, .08));
	border: 1px solid rgba(27, 134, 168, .12); transform: skewX(-8deg);
	animation: kg-slide 9s ease-in-out infinite alternate;
}
.kg-hero__panes i:first-child { inset-inline-end: 6%; }
.kg-hero__panes i:last-child { inset-inline-end: 36%; animation-delay: -4.5s; opacity: .6; }
@keyframes kg-slide { from { translate: 0 0; } to { translate: 40px 0; } }
@media (prefers-reduced-motion: reduce) { .kg-hero__panes i { animation: none; } html { scroll-behavior: auto; } }

.kg-finder { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 24px; }
.kg-finder h2 { font-size: 1.2rem; margin-bottom: .2em; }
.kg-finder > p { color: var(--muted); font-size: .92rem; }
.kg-finder ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kg-finder a {
	display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
	background: var(--paper); border: 1px solid transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
	transition: border-color .2s, background .2s;
}
.kg-finder a > .kg-i:first-child { color: var(--teal); }
.kg-finder a span { flex: 1; }
.kg-finder a em { font-style: normal; font-size: .75rem; color: var(--muted); font-weight: 500; }
.kg-finder a > .kg-i:last-child { color: var(--muted); width: 1em; }
.kg-finder a:hover { border-color: var(--sky); background: #fff; }

@media (max-width: 900px) {
	.kg-hero { padding: 32px 0 40px; }
	.kg-hero__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* sections */
.kg-sec { padding: 64px 0; }
.kg-sec--tint { background: var(--paper); }
.kg-h { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 800; }
.kg-sub { color: var(--muted); margin-top: -.3em; }
.kg-h-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.kg-h-row a { font-weight: 700; text-decoration: none; }

.kg-flow { list-style: none; counter-reset: s; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kg-flow li { counter-increment: s; position: relative; padding: 22px 20px 20px; border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.kg-flow li::before {
	content: counter(s, persian); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	background: var(--teal); color: #fff; font-weight: 800; margin-bottom: 12px;
}
.kg-flow b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.kg-flow span { color: var(--muted); font-size: .93rem; line-height: 1.85; }

.kg-parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.kg-part { background: #fff; border-radius: var(--r); padding: 22px; border: 1px solid var(--line); }
.kg-part .kg-i { width: 34px; height: 34px; color: var(--teal); background: var(--tint); padding: 6px; border-radius: 10px; margin-bottom: 10px; }
.kg-part h3 { font-size: 1.04rem; margin-bottom: .3em; }
.kg-part p { color: var(--muted); font-size: .93rem; margin: 0; line-height: 1.9; }

@media (max-width: 900px) {
	.kg-sec { padding: 44px 0; }
	.kg-flow { grid-template-columns: 1fr 1fr; }
	.kg-parts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.kg-flow, .kg-parts { grid-template-columns: 1fr; }
}

/* cards */
.kg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 22px; }
.kg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kg-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.kg-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.kg-card__img { aspect-ratio: 16 / 9; background: var(--tint); }
.kg-card__img img { width: 100%; height: 100%; object-fit: cover; }
.kg-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.kg-card h3 { font-size: 1.02rem; line-height: 1.7; margin-bottom: .4em; }
.kg-card h3 a { color: var(--ink); text-decoration: none; }
.kg-card h3 a:hover { color: var(--teal-d); }
.kg-card p { color: var(--muted); font-size: .9rem; line-height: 1.85; margin-bottom: .8em; }
.kg-card small { margin-top: auto; color: var(--muted); font-size: .8rem; }
.kg-card .kg-chip { align-self: flex-start; }
.kg-list { display: grid; gap: 18px; }
.kg-card--row { flex-direction: row; }
.kg-card--row .kg-card__img { flex: 0 0 34%; aspect-ratio: auto; min-height: 190px; }
.kg-card--row h3 { font-size: 1.15rem; }

@media (max-width: 1000px) { .kg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
	.kg-grid, .kg-grid--3 { grid-template-columns: 1fr; }
	.kg-card--row { flex-direction: column; }
	.kg-card--row .kg-card__img { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
}

.kg-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 30px; justify-content: center; }
.kg-pages a, .kg-pages span { padding: .3em .85em; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; }
.kg-pages .current { background: var(--teal); border-color: var(--teal); color: #fff; }

/* list / page heads */
.kg-listhead { background: linear-gradient(180deg, var(--paper), #fff); padding: 34px 0 18px; border-bottom: 1px solid var(--line); }
.kg-listhead h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 900; margin-bottom: .3em; }
.kg-trail { font-size: .85rem; color: var(--muted); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kg-trail a { color: var(--muted); text-decoration: none; }
.kg-trail a:hover { color: var(--teal-d); }
.kg-trail i { font-style: normal; opacity: .5; }
.kg-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.kg-tabs a { padding: .3em 1em; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .92rem; background: #fff; }
.kg-tabs a[aria-current] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* single */
.kg-post__head { background: linear-gradient(180deg, var(--paper), #fff); padding: 32px 0 8px; }
.kg-post__head h1 { font-size: clamp(1.5rem, 3.2vw, 2.25rem); font-weight: 900; line-height: 1.55; }
.kg-post__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .86rem; }
.kg-post__meta span { display: inline-flex; align-items: center; gap: 5px; }
.kg-post__grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 44px; padding-top: 14px; padding-bottom: 56px; }
.kg-post__cover { margin: 0 0 22px; border-radius: 18px; overflow: hidden; background: var(--tint); }
.kg-glance { border-inline-start: 4px solid var(--amber); background: #fff8ec; border-radius: 12px; padding: 14px 18px; margin-bottom: 26px; }
.kg-glance b { display: block; margin-bottom: 2px; }
.kg-glance p { margin: 0; color: #5a4a2c; }
.kg-sticky { position: sticky; top: 92px; display: grid; gap: 16px; }
.kg-box { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: #fff; }
.kg-box h2 { font-size: 1rem; margin-bottom: .6em; }
.kg-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.kg-box li a { display: block; padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--ink); text-decoration: none; font-size: .92rem; line-height: 1.8; }
.kg-box li:last-child a { border: 0; }
.kg-box li a:hover { color: var(--teal-d); }
.kg-box--cta { background: var(--tint); border-color: transparent; }
.kg-box--cta p { font-size: .9rem; color: var(--muted); }
@media (max-width: 1000px) {
	.kg-post__grid { grid-template-columns: 1fr; gap: 10px; }
	.kg-sticky { position: static; }
}

/* prose */
.kg-prose { font-size: 1.03rem; }
.kg-prose h2 { font-size: 1.4rem; margin-top: 1.9em; padding-bottom: .3em; border-bottom: 2px solid var(--tint); }
.kg-prose h3 { font-size: 1.14rem; margin-top: 1.5em; color: var(--teal-d); }
.kg-prose ul, .kg-prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.kg-prose li { margin-bottom: .45em; }
.kg-prose li::marker { color: var(--teal); }
.kg-prose strong { font-weight: 700; }
.kg-prose a.kg-out::after { content: "↖"; font-size: .75em; margin-inline-start: 2px; opacity: .6; }
.kg-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .94rem; display: block; overflow-x: auto; }
.kg-prose th, .kg-prose td { border: 1px solid var(--line); padding: .6em .8em; text-align: start; vertical-align: top; min-width: 120px; }
.kg-prose th { background: var(--tint); font-weight: 700; }
.kg-prose tr:nth-child(even) td { background: var(--paper); }
.kg-prose blockquote { margin: 0 0 1.2em; padding: 12px 18px; border-inline-start: 4px solid var(--sky); background: var(--paper); border-radius: 10px; }
.kg-tip, .kg-warn {
	border-radius: 12px; padding: 14px 18px 4px; margin: 0 0 1.3em; border: 1px solid;
}
.kg-tip { background: #effaf6; border-color: #bfe6d6; }
.kg-warn { background: #fff6f2; border-color: #f6d0bf; }
.kg-tip > b:first-child, .kg-warn > b:first-child { display: block; margin-bottom: 2px; }
.kg-steps { counter-reset: st; list-style: none; padding: 0 !important; }
.kg-steps > li { counter-increment: st; position: relative; padding-inline-start: 46px; margin-bottom: 1em; }
.kg-steps > li::before {
	content: counter(st, persian); position: absolute; inset-inline-start: 0; top: 2px; width: 32px; height: 32px; border-radius: 10px;
	background: var(--tint); color: var(--teal-d); display: grid; place-items: center; font-weight: 800;
}

/* faq */
.kg-faq { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.kg-faq summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.kg-faq summary::-webkit-details-marker { display: none; }
.kg-faq summary::after { content: "+"; color: var(--teal); font-size: 1.3rem; line-height: 1; }
.kg-faq[open] summary::after { content: "−"; }
.kg-faq > div { padding: 0 18px 6px; color: var(--muted); }

/* band */
.kg-band { background: linear-gradient(120deg, var(--teal-d), var(--teal)); color: #fff; padding: 40px 0; }
.kg-band__in { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.kg-band h2 { margin-bottom: .2em; font-size: 1.35rem; }
.kg-band p { margin: 0; opacity: .9; }

/* contact list */
.kg-contact { list-style: none; padding: 0 !important; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.kg-contact li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.kg-contact li:last-child { border: 0; }
.kg-contact span { color: var(--muted); }

/* footer */
.kg-foot { background: var(--paper); border-top: 1px solid var(--line); padding-top: 44px; font-size: .94rem; }
.kg-foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.kg-logo--foot img { height: 52px; margin-bottom: 12px; }
.kg-foot p { color: var(--muted); max-width: 30em; }
.kg-foot h2 { font-size: 1rem; }
.kg-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.kg-foot ul a { color: var(--ink); text-decoration: none; }
.kg-foot ul a:hover { color: var(--teal-d); }
.kg-foot__info li { display: flex; gap: 8px; align-items: center; color: var(--muted); }
.kg-foot__info .kg-i { color: var(--teal); }
.kg-foot__base { border-top: 1px solid var(--line); margin-top: 32px; padding-block: 16px; color: var(--muted); font-size: .84rem; }
@media (max-width: 800px) { .kg-foot__grid { grid-template-columns: 1fr; gap: 22px; } }

.kg-404 { text-align: center; }
.kg-404 .kg-hero__btns { justify-content: center; }
.kg-page__body { padding-top: 26px; padding-bottom: 56px; }
