/*
Theme Name:   Karachi Steel Works
Theme URI:    https://karachisteelworks.com/
Author:       Karachi Steel Works
Description:  Lightweight industrial theme for a steel fabrication and welding workshop. Dark blue, white and charcoal with restrained metallic accents, mobile-first, bilingual English/Urdu with full RTL support. No page builder and no framework — presentation only; all content is owned by the Karachi Steel Works Core plugin.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  ksw-theme
Tags:         business, two-columns, custom-menu, featured-images, rtl-language-support, translation-ready
*/

/* ==========================================================================
   1. Design tokens
   The whole palette lives here. Changing a brand colour is a one-line edit.
   ========================================================================== */

:root {
	/* Core palette: dark blue, white, charcoal, metallic. */
	--navy-900: #081a2e;
	--navy-800: #0f2742;
	--navy-700: #173453;
	--navy-600: #1d4268;
	--charcoal-900: #1c1f24;
	--charcoal-700: #2b2f36;
	--charcoal-500: #4a5059;
	--steel-400: #8a949f;
	--steel-300: #b3bcc6;
	--steel-200: #d7dde3;
	--steel-100: #eef1f4;
	--white: #ffffff;

	/* Metallic accent — a brushed-steel sheen, used sparingly on rules and
	   section edges rather than as a fill. */
	--metal: linear-gradient(90deg, #8a949f 0%, #d7dde3 35%, #8a949f 70%, #b3bcc6 100%);

	/* WhatsApp keeps its own brand green: customers recognise it instantly,
	   and a navy WhatsApp button measurably reads as "some other button". */
	--whatsapp: #25d366;
	--whatsapp-dark: #1da851;

	--ink: var(--charcoal-900);
	--ink-soft: var(--charcoal-500);
	--surface: var(--white);
	--surface-alt: var(--steel-100);
	--line: var(--steel-200);

	--radius: 10px;
	--radius-sm: 6px;
	--shadow-sm: 0 1px 2px rgba(8, 26, 46, .07), 0 2px 8px rgba(8, 26, 46, .05);
	--shadow-md: 0 4px 14px rgba(8, 26, 46, .10), 0 2px 4px rgba(8, 26, 46, .06);
	--shadow-lg: 0 12px 32px rgba(8, 26, 46, .16);

	--wrap: 1180px;
	--gap: 1.5rem;

	--font-latin: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--font-urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", var(--font-latin);
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-latin);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--surface);
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--navy-800); }

h1, h2, h3, h4 {
	font-weight: 700;
	line-height: 1.2;
	color: var(--navy-800);
	margin: 0 0 .6em;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }

p { margin: 0 0 1.1em; }

ul, ol { padding-inline-start: 1.25em; }

:focus-visible {
	outline: 3px solid var(--navy-600);
	outline-offset: 2px;
	border-radius: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Hidden VERTICALLY, not horizontally.
 *
 * The usual `left: -9999px` is safe in a left-to-right page — a browser will not
 * scroll to negative coordinates. In a right-to-left page the overflow direction
 * flips and that same offset becomes 9,999px of real scrollable width, giving the
 * Urdu site a horizontal scrollbar across every page. Measured: documentElement
 * scrollWidth 11687 against clientWidth 1688.
 *
 * Moving the element off the top instead works identically in both directions.
 */
.ksw-skip {
	position: absolute;
	inset-inline-start: 0;
	top: -100px;
	background: var(--navy-800);
	color: var(--white);
	padding: .75rem 1.25rem;
	z-index: 999;
	transition: top .15s ease;
}
.ksw-skip:focus { top: 0; }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */

.ksw-wrap {
	width: min(100% - 2.5rem, var(--wrap));
	margin-inline: auto;
}

.ksw-section { padding: clamp(2.75rem, 6vw, 4.75rem) 0; }
.ksw-section--alt { background: var(--surface-alt); }
.ksw-section--dark { background: var(--navy-800); color: var(--steel-200); }
.ksw-section--dark h2, .ksw-section--dark h3 { color: var(--white); }

.ksw-section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.ksw-section-head p { color: var(--ink-soft); margin-bottom: 0; }

/* The brushed-steel rule under a section heading — the one decorative flourish. */
.ksw-rule {
	width: 68px; height: 3px;
	background: var(--metal);
	border-radius: 2px;
	margin-bottom: 1.1rem;
}

.ksw-grid {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}

/* ==========================================================================
   4. Buttons
   ========================================================================== */

.ksw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .55em;
	padding: .8rem 1.5rem;
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
	min-height: 48px; /* comfortable thumb target on a phone */
}
.ksw-btn:active { transform: translateY(1px); }

.ksw-btn--primary {
	background: var(--navy-800);
	color: var(--white);
	box-shadow: var(--shadow-sm);
}
.ksw-btn--primary:hover { background: var(--navy-900); color: var(--white); }

.ksw-btn--wa { background: var(--whatsapp); color: #06301a; }
.ksw-btn--wa:hover { background: var(--whatsapp-dark); color: #042412; }

.ksw-btn--ghost {
	background: transparent;
	border-color: var(--steel-300);
	color: var(--navy-800);
}
.ksw-btn--ghost:hover { border-color: var(--navy-800); background: var(--white); }

/* A ghost button on any dark band needs light text — its default navy is
   invisible on navy. The hero and the CTA are dark without carrying the
   --dark modifier class, so they are named here explicitly. */
.ksw-section--dark .ksw-btn--ghost,
.ksw-hero .ksw-btn--ghost,
.ksw-cta .ksw-btn--ghost,
.ksw-footer .ksw-btn--ghost { border-color: rgba(255,255,255,.35); color: var(--white); }

.ksw-section--dark .ksw-btn--ghost:hover,
.ksw-hero .ksw-btn--ghost:hover,
.ksw-cta .ksw-btn--ghost:hover,
.ksw-footer .ksw-btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); color: var(--white); }

/* The inverse of --primary, for a solid button sitting on a dark band. */
.ksw-btn--light { background: var(--white); color: var(--navy-800); box-shadow: var(--shadow-sm); }
.ksw-btn--light:hover { background: var(--steel-100); color: var(--navy-900); }

.ksw-btn--sm { padding: .55rem 1rem; font-size: .92rem; min-height: 40px; }
.ksw-btn--block { width: 100%; }

.ksw-btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 1.5rem;
}

/* ==========================================================================
   5. Header
   ========================================================================== */

.ksw-topbar {
	background: var(--navy-900);
	color: var(--steel-300);
	font-size: .875rem;
}
.ksw-topbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1.25rem;
	padding: .5rem 0;
}
.ksw-topbar a { color: var(--steel-200); text-decoration: none; }
.ksw-topbar a:hover { color: var(--white); text-decoration: underline; }
.ksw-topbar-phones { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.ksw-topbar-phones span { color: var(--steel-400); }

.ksw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
}

.ksw-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: .7rem 0;
}

.ksw-brand {
	display: flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
	min-width: 0;
}
/* The KSWORKS logo.
 *
 * It is a stacked lockup — emblem above, wordmark below — so it is roughly
 * 2.2:1 rather than the wide 4:1 of a typical header logo. Sizing it by height
 * alone made the wordmark too small to read, so it is sized by WIDTH with a
 * height ceiling: it takes the width it needs to stay legible, and the header
 * bar still cannot grow unbounded.
 */
.ksw-brand--logo { gap: 0; }
.ksw-logo-img {
	width: 190px;
	max-width: 52vw;
	height: auto;
	max-height: 86px;
	object-fit: contain;
}
@media (max-width: 900px) {
	.ksw-logo-img { width: 150px; max-height: 68px; }
}
@media (max-width: 600px) {
	.ksw-logo-img { width: 125px; max-height: 58px; }
}

.ksw-brand-mark {
	flex: 0 0 auto;
	width: 42px; height: 42px;
	display: grid; place-items: center;
	background: var(--navy-800);
	color: var(--white);
	border-radius: var(--radius-sm);
}
.ksw-brand-text { min-width: 0; }
.ksw-brand-name {
	display: block;
	font-weight: 800;
	font-size: 1.1rem;
	color: var(--navy-800);
	line-height: 1.15;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ksw-brand-sub {
	display: block;
	font-size: .76rem;
	color: var(--ink-soft);
	letter-spacing: .02em;
	text-transform: uppercase;
}

.ksw-nav-list {
	display: flex;
	align-items: center;
	gap: .25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ksw-nav-list a {
	display: block;
	padding: .6rem .8rem;
	border-radius: var(--radius-sm);
	color: var(--charcoal-700);
	font-weight: 600;
	text-decoration: none;
	font-size: .97rem;
	white-space: nowrap;
}
.ksw-nav-list a:hover { background: var(--surface-alt); color: var(--navy-800); }
.ksw-nav-list .current-menu-item > a,
.ksw-nav-list .current_page_item > a,
.ksw-nav-list .ksw-current > a { color: var(--navy-800); box-shadow: inset 0 -3px 0 var(--navy-800); }

.ksw-header-actions { display: flex; align-items: center; gap: .5rem; }

.ksw-lang {
	display: inline-flex;
	align-items: center;
	gap: .3rem;
	padding: .45rem .75rem;
	border: 1px solid var(--steel-300);
	border-radius: 999px;
	font-weight: 700;
	font-size: .9rem;
	text-decoration: none;
	color: var(--navy-800);
	background: var(--white);
	white-space: nowrap;
}
.ksw-lang:hover { border-color: var(--navy-800); background: var(--surface-alt); }

.ksw-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 46px; height: 46px;
	background: var(--white);
	border: 1px solid var(--steel-300);
	border-radius: var(--radius-sm);
	cursor: pointer;
	color: var(--navy-800);
}

/* ==========================================================================
   6. Hero
   ========================================================================== */

.ksw-hero {
	position: relative;
	background: var(--navy-800);
	color: var(--steel-200);
	overflow: hidden;
}
.ksw-hero::after {
	/* A faint diagonal sheen — suggests brushed metal without an image request. */
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(115deg, rgba(255,255,255,.07) 0 12%, transparent 12% 24%,
		rgba(255,255,255,.05) 24% 30%, transparent 30%);
	pointer-events: none;
}
.ksw-hero-inner {
	position: relative;
	z-index: 1;
	display: grid;
	gap: clamp(1.75rem, 4vw, 3rem);
	align-items: center;
	padding: clamp(2.5rem, 7vw, 5rem) 0;
	grid-template-columns: 1fr;
}
@media (min-width: 900px) {
	.ksw-hero-inner { grid-template-columns: 1.1fr .9fr; }
}
.ksw-hero h1 { color: var(--white); margin-bottom: .5rem; }
.ksw-hero-kicker {
	display: inline-block;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--steel-300);
	border: 1px solid rgba(255,255,255,.22);
	border-radius: 999px;
	padding: .35rem .85rem;
	margin-bottom: 1.1rem;
}
.ksw-hero-lead { font-size: clamp(1.02rem, 1.8vw, 1.18rem); color: var(--steel-200); max-width: 38rem; }
.ksw-hero-figure {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	background: var(--navy-900);
	border: 1px solid rgba(255,255,255,.12);
}
.ksw-hero-figure img { width: 100%; }
.ksw-hero-figure figcaption {
	padding: .65rem .9rem;
	font-size: .82rem;
	color: var(--steel-300);
	background: rgba(0,0,0,.25);
}

/* ==========================================================================
   7. Cards
   ========================================================================== */

.ksw-card {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.ksw-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--steel-300); }

.ksw-card-media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--steel-100);
	display: grid;
	place-items: center;
	overflow: hidden;
	border-bottom: 1px solid var(--line);
}
.ksw-card-media img { width: 100%; height: 100%; object-fit: cover; }

.ksw-thumb-placeholder {
	color: var(--steel-400);
	display: grid;
	place-items: center;
	gap: .6rem;
	padding: 1rem;
	text-align: center;
}
.ksw-thumb-placeholder-text {
	font-size: .82rem;
	letter-spacing: .01em;
	color: var(--steel-400);
	max-width: 16em;
}

.ksw-card-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.ksw-card-body h3 { margin-bottom: .4rem; font-size: 1.12rem; }
.ksw-card-body h3 a { color: inherit; text-decoration: none; }
.ksw-card-body h3 a:hover { color: var(--navy-600); text-decoration: underline; }
.ksw-card-body p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1rem; }
/* The two card buttons share one row.
 *
 * They used to be plain flex items sized by their own text, so a longer label
 * on the WhatsApp button overflowed the card and wrapped both buttons onto
 * separate lines — the cards then had uneven heights down the grid.
 *
 * flex: 1 1 0 makes them split the available width evenly and ignore their
 * natural text width, so the row holds together whatever the label says. They
 * only stack when the card is genuinely too narrow for a readable button,
 * which is the point at which stacking is the right answer anyway.
 */
.ksw-card-actions {
	margin-top: auto;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.ksw-card-actions .ksw-btn {
	flex: 1 1 0;
	min-width: 7.5rem;
	padding-inline: .75rem;
	text-align: center;
	white-space: nowrap;
}

/* ==========================================================================
   8. Why choose us
   ========================================================================== */

.ksw-points { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ksw-point {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.4rem;
	box-shadow: var(--shadow-sm);
}
.ksw-point-icon {
	width: 44px; height: 44px;
	display: grid; place-items: center;
	border-radius: var(--radius-sm);
	background: var(--navy-800);
	color: var(--white);
	margin-bottom: .9rem;
}
.ksw-point h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.ksw-point p { font-size: .94rem; color: var(--ink-soft); margin: 0; }

/* ==========================================================================
   9. Call-to-action band
   ========================================================================== */

.ksw-cta { background: var(--navy-800); color: var(--steel-200); }
.ksw-cta-inner { padding: clamp(2.5rem, 5vw, 3.75rem) 0; text-align: center; }
.ksw-cta h2 { color: var(--white); margin-bottom: .75rem; }
.ksw-cta p { max-width: 54rem; margin-inline: auto; color: var(--steel-200); }
.ksw-cta .ksw-btn-row { justify-content: center; }
.ksw-cta-phones {
	margin-top: 1.5rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--white);
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
	justify-content: center;
}
.ksw-cta-phones a { color: var(--white); text-decoration: none; border-bottom: 2px solid rgba(255,255,255,.35); }
.ksw-cta-phones a:hover { border-color: var(--white); }
.ksw-cta-tagline {
	margin-top: 1.75rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--steel-300);
}

/* ==========================================================================
   10. Gallery
   ========================================================================== */

.ksw-gallery {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}
.ksw-gallery-item {
	margin: 0;
	border-radius: var(--radius-sm);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--steel-100);
	aspect-ratio: 1;
	position: relative;
}
.ksw-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ksw-gallery-item:hover img { transform: scale(1.04); }
.ksw-gallery-item figcaption {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	padding: .6rem .75rem;
	font-size: .85rem;
	color: var(--white);
	background: linear-gradient(transparent, rgba(8,26,46,.85));
}

.ksw-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.ksw-filter {
	padding: .45rem .9rem;
	border: 1px solid var(--steel-300);
	background: var(--white);
	border-radius: 999px;
	font-size: .9rem;
	font-weight: 600;
	color: var(--charcoal-700);
	cursor: pointer;
}
.ksw-filter[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }

/* Lightbox */
.ksw-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(8,26,46,.92);
	display: none;
	place-items: center;
	z-index: 200;
	padding: 1.5rem;
}
.ksw-lightbox[open], .ksw-lightbox.is-open { display: grid; }
.ksw-lightbox img { max-width: min(96vw, 1100px); max-height: 86vh; width: auto; border-radius: var(--radius-sm); }
.ksw-lightbox-caption { color: var(--steel-200); text-align: center; margin-top: .85rem; font-size: .95rem; }
.ksw-lightbox-close {
	position: absolute;
	top: 1rem; inset-inline-end: 1rem;
	width: 44px; height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.3);
	background: rgba(0,0,0,.4);
	color: var(--white);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

/* ==========================================================================
   11. Single product
   ========================================================================== */

.ksw-single { display: grid; gap: clamp(1.75rem, 4vw, 3rem); grid-template-columns: 1fr; }
@media (min-width: 880px) { .ksw-single { grid-template-columns: 1.15fr .85fr; align-items: start; } }

.ksw-single-media {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--steel-100);
	aspect-ratio: 4 / 3;
	display: grid;
	place-items: center;
}
.ksw-single-media img { width: 100%; height: 100%; object-fit: cover; }

.ksw-aside {
	position: sticky;
	top: 90px;
	background: var(--surface-alt);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.4rem;
}
.ksw-aside h3 { font-size: 1.1rem; }
.ksw-aside .ksw-btn { width: 100%; margin-bottom: .6rem; }
.ksw-aside-note { font-size: .88rem; color: var(--ink-soft); margin: .4rem 0 0; }

.ksw-breadcrumb { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; }
.ksw-breadcrumb a { color: var(--ink-soft); }

/* ==========================================================================
   12. Contact page and form
   ========================================================================== */

.ksw-contact-grid { display: grid; gap: clamp(1.75rem, 4vw, 2.75rem); grid-template-columns: 1fr; }
@media (min-width: 880px) { .ksw-contact-grid { grid-template-columns: 1fr 1fr; } }

.ksw-contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.ksw-contact-item { display: flex; gap: .9rem; align-items: flex-start; }
.ksw-contact-icon {
	flex: 0 0 auto;
	width: 40px; height: 40px;
	display: grid; place-items: center;
	border-radius: var(--radius-sm);
	background: var(--navy-800);
	color: var(--white);
}
.ksw-contact-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); display: block; }
.ksw-contact-value { font-weight: 700; color: var(--navy-800); font-size: 1.05rem; }
.ksw-contact-value a { color: inherit; text-decoration: none; }
.ksw-contact-value a:hover { text-decoration: underline; }

.ksw-map {
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	background: var(--steel-100);
	min-height: 320px;
}
.ksw-map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.ksw-map-fallback { padding: 2rem; text-align: center; color: var(--ink-soft); }

.ksw-form { display: grid; gap: 1rem; }
.ksw-field { display: grid; gap: .35rem; }
.ksw-field label { font-weight: 600; font-size: .95rem; color: var(--charcoal-700); }
.ksw-field .ksw-req { color: #b32d2e; }
.ksw-field input, .ksw-field select, .ksw-field textarea {
	width: 100%;
	padding: .75rem .9rem;
	border: 1px solid var(--steel-300);
	border-radius: var(--radius-sm);
	font: inherit;
	font-size: 1rem;
	color: var(--ink);
	background: var(--white);
	min-height: 48px;
}
.ksw-field textarea { min-height: 130px; resize: vertical; }
.ksw-field input:focus, .ksw-field select:focus, .ksw-field textarea:focus {
	border-color: var(--navy-600);
	outline: 2px solid rgba(29,66,104,.18);
	outline-offset: 0;
}
.ksw-field--error input, .ksw-field--error textarea, .ksw-field--error select { border-color: #b32d2e; background: #fff7f7; }
.ksw-field-error { color: #b32d2e; font-size: .88rem; }

/* The honeypot. Hidden from people, reachable by bots; never display:none,
   which some bots specifically skip.
   Clipped rather than pushed off-screen, for the RTL reason documented on
   .ksw-skip above — a negative horizontal offset adds scrollable width in Urdu. */
.ksw-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.ksw-notice {
	padding: 1rem 1.15rem;
	border-radius: var(--radius-sm);
	border: 1px solid;
	margin-bottom: 1.25rem;
	font-weight: 600;
}
.ksw-notice--ok { background: #effaf3; border-color: #9ddcb5; color: #126b3a; }

/* The WhatsApp handoff shown after a successful submission. */
.ksw-wa-handoff {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	padding: 1.25rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-sm);
}
.ksw-wa-handoff-btn { width: 100%; }
.ksw-notice--bad { background: #fdf2f2; border-color: #e7a9a9; color: #8c2320; }

/* ==========================================================================
   12b. Certificates and past experience
   ========================================================================== */

.ksw-cred-group {
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: var(--ink-soft);
	margin-bottom: 1rem;
}
body.ksw-lang-ur .ksw-cred-group { text-transform: none; letter-spacing: 0; }

.ksw-cred-grid {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.ksw-cred {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

/* The certificate scan itself, clickable to read full size. */
.ksw-cred-media {
	all: unset;
	display: block;
	cursor: zoom-in;
	aspect-ratio: 4 / 3;
	background: var(--steel-100);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}
.ksw-cred-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ksw-cred-media:hover img { transform: scale(1.03); }
.ksw-cred-media:focus-visible { outline: 3px solid var(--navy-600); outline-offset: -3px; }

.ksw-cred-body { padding: 1.15rem 1.25rem 1.3rem; }
.ksw-cred-body h3 { font-size: 1.08rem; margin-bottom: .4rem; }

.ksw-cred-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1rem;
	font-size: .9rem;
	color: var(--ink-soft);
	margin-bottom: .6rem;
}
.ksw-cred-meta strong { color: var(--charcoal-700); }

.ksw-cred-text { font-size: .95rem; color: var(--ink-soft); }
.ksw-cred-text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   12c. Past projects — named sites
   ========================================================================== */

.ksw-proj-grid {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.ksw-proj {
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: box-shadow .18s ease, transform .18s ease;
}
.ksw-proj:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.ksw-proj-media {
	all: unset;
	position: relative;
	display: block;
	cursor: zoom-in;
	aspect-ratio: 4 / 3;
	background: var(--steel-100);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}
.ksw-proj-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.ksw-proj-media:hover img { transform: scale(1.04); }
.ksw-proj-media:focus-visible { outline: 3px solid var(--navy-600); outline-offset: -3px; }

/* "4 photos" badge, so it is obvious the card opens into more. */
.ksw-proj-count {
	position: absolute;
	inset-inline-end: .6rem;
	bottom: .6rem;
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .3rem .6rem;
	border-radius: 999px;
	background: rgba(8, 26, 46, .78);
	color: var(--white);
	font-size: .78rem;
	font-weight: 600;
}

.ksw-proj-body { padding: 1.15rem 1.25rem 1.35rem; }
.ksw-proj-body h3 { font-size: 1.12rem; margin-bottom: .45rem; }

.ksw-proj-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem 1rem;
	font-size: .9rem;
	color: var(--ink-soft);
	margin-bottom: .6rem;
}
.ksw-proj-meta span { display: inline-flex; align-items: center; gap: .3rem; }

.ksw-proj-scope {
	font-weight: 600;
	color: var(--charcoal-700);
	font-size: .96rem;
	margin-bottom: .5rem;
}
.ksw-proj-client { font-size: .9rem; color: var(--ink-soft); margin-bottom: .5rem; }
.ksw-proj-client strong { color: var(--charcoal-700); }
.ksw-proj-text { font-size: .95rem; color: var(--ink-soft); }
.ksw-proj-text p:last-child { margin-bottom: 0; }

/* Lightbox navigation, shared by projects, certificates and the gallery. */
.ksw-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .3);
	background: rgba(0, 0, 0, .45);
	color: var(--white);
	cursor: pointer;
	padding: 0;
}
.ksw-lightbox-nav:hover { background: rgba(0, 0, 0, .7); }
.ksw-lightbox-prev { inset-inline-start: 1rem; }
.ksw-lightbox-next { inset-inline-end: 1rem; }
/* The arrows are directional glyphs, so mirror them in Urdu. */
body.ksw-rtl .ksw-lightbox-nav svg { transform: scaleX(-1); }

.ksw-lightbox-counter {
	color: var(--steel-300);
	text-align: center;
	font-size: .85rem;
	margin: .35rem 0 0;
}

@media (max-width: 640px) {
	.ksw-lightbox-nav { width: 44px; height: 44px; }
	.ksw-lightbox-prev { inset-inline-start: .35rem; }
	.ksw-lightbox-next { inset-inline-end: .35rem; }
}

/* ==========================================================================
   12d. Prices
   ========================================================================== */

.ksw-card-price {
	font-weight: 800;
	font-size: 1.05rem;
	color: var(--navy-800);
	margin: 0 0 .5rem;
}
/* "Contact for price" is information, not a number — it should not shout like
   one, or a card with no price looks louder than a card with one. */
.ksw-card-price--ask {
	font-weight: 600;
	font-size: .95rem;
	color: var(--ink-soft);
}

.ksw-aside-price {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--navy-800);
	margin: 0 0 .25rem;
	line-height: 1.2;
}
.ksw-aside-price--ask { font-size: 1.15rem; color: var(--charcoal-700); }
.ksw-aside-price-note {
	font-size: .88rem;
	color: var(--ink-soft);
	margin: 0 0 1.1rem;
}

/* ==========================================================================
   12e. Customer reviews
   ========================================================================== */

.ksw-review-grid {
	display: grid;
	gap: var(--gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	margin-bottom: clamp(2rem, 4vw, 3rem);
}

.ksw-review {
	margin: 0;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.3rem;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.ksw-review blockquote {
	margin: 0;
	font-size: .98rem;
	color: var(--ink);
	line-height: 1.6;
}
.ksw-review figcaption { font-size: .92rem; color: var(--ink-soft); margin-top: auto; }
.ksw-review figcaption strong { color: var(--navy-800); display: block; }
.ksw-review-place { font-size: .86rem; }

/* Stars — display */
.ksw-stars { display: inline-flex; gap: 2px; font-size: 1.05rem; line-height: 1; }
.ksw-star { color: var(--steel-300); }
.ksw-star.is-on { color: #e0a21a; }

.ksw-review-form-wrap {
	max-width: 42rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: clamp(1.25rem, 3vw, 2rem);
	box-shadow: var(--shadow-sm);
}
.ksw-review-form-wrap h3 { margin-bottom: .35rem; }
.ksw-review-intro { color: var(--ink-soft); margin-bottom: 1.25rem; }
.ksw-review-empty {
	padding: .9rem 1rem;
	background: var(--surface-alt);
	border-radius: var(--radius-sm);
	color: var(--ink-soft);
	font-size: .95rem;
}

.ksw-field-label { font-weight: 600; font-size: .95rem; color: var(--charcoal-700); }

/* Stars — input.
 *
 * The radios are rendered 5..1 so that the CSS sibling selector can light up
 * the chosen star and every star before it. Built on real radio inputs, so it
 * still works with JavaScript disabled and is reachable by keyboard.
 */
.ksw-rating-input {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
	margin-top: .3rem;
}
.ksw-rating-input input {
	position: absolute;
	width: 1px; height: 1px;
	opacity: 0;
	pointer-events: none;
}
.ksw-rating-input label {
	font-size: 1.9rem;
	line-height: 1;
	color: var(--steel-300);
	cursor: pointer;
	transition: color .12s ease;
}
.ksw-rating-input input:checked ~ label,
.ksw-rating-input label:hover,
.ksw-rating-input label:hover ~ label { color: #e0a21a; }
.ksw-rating-input input:focus-visible + label { outline: 3px solid var(--navy-600); outline-offset: 2px; }

/* ==========================================================================
   13. Advertisement block
   ========================================================================== */

.ksw-ad {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--white);
	padding: 1rem;
	box-shadow: var(--shadow-sm);
	max-width: 760px;
	margin-inline: auto;
}
.ksw-ad img { width: 100%; border-radius: var(--radius-sm); }
.ksw-ad figcaption { margin-top: .75rem; font-size: .88rem; color: var(--ink-soft); text-align: center; }

/* ==========================================================================
   14. Footer
   ========================================================================== */

.ksw-footer { background: var(--charcoal-900); color: var(--steel-300); padding: clamp(2.5rem, 5vw, 3.5rem) 0 0; }
.ksw-footer h3 { color: var(--white); font-size: 1.02rem; margin-bottom: .85rem; }
.ksw-footer a { color: var(--steel-200); }
.ksw-footer a:hover { color: var(--white); }
.ksw-footer-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
	padding-bottom: 2.25rem;
}
.ksw-footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .95rem; }
.ksw-footer-list a { text-decoration: none; }
.ksw-footer-list a:hover { text-decoration: underline; }
.ksw-footer-bottom {
	border-top: 1px solid rgba(255,255,255,.12);
	padding: 1.1rem 0;
	font-size: .88rem;
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.25rem;
	justify-content: space-between;
	color: var(--steel-400);
}

/* ==========================================================================
   15. Floating WhatsApp
   ========================================================================== */

.ksw-float-wa {
	position: fixed;
	inset-inline-end: 18px;
	bottom: 18px;
	z-index: 90;
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .8rem 1.1rem;
	border-radius: 999px;
	background: var(--whatsapp);
	color: #06301a;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(37,211,102,.38), var(--shadow-md);
	transition: transform .15s ease, background-color .15s ease;
}
.ksw-float-wa:hover { background: var(--whatsapp-dark); color: #042412; transform: translateY(-2px); }
@media (max-width: 640px) {
	.ksw-float-wa { padding: .85rem; inset-inline-end: 14px; bottom: 14px; }
	.ksw-float-wa-text { display: none; }
}

/* ==========================================================================
   16. 404 / empty states
   ========================================================================== */

.ksw-empty {
	border: 1px dashed var(--steel-300);
	border-radius: var(--radius);
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: var(--ink-soft);
	background: var(--surface-alt);
}

/* ==========================================================================
   17. Mobile navigation
   ========================================================================== */

@media (max-width: 900px) {
	.ksw-burger { display: inline-flex; }

	.ksw-nav {
		position: fixed;
		inset: 0;
		background: rgba(8,26,46,.5);
		display: none;
		z-index: 60;
	}
	.ksw-nav.is-open { display: block; }

	.ksw-nav-list {
		position: absolute;
		top: 0;
		inset-inline-end: 0;
		height: 100%;
		width: min(320px, 86vw);
		background: var(--white);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 5rem 1rem 2rem;
		box-shadow: var(--shadow-lg);
		overflow-y: auto;
	}
	.ksw-nav-list a {
		padding: .95rem .8rem;
		border-bottom: 1px solid var(--line);
		border-radius: 0;
		font-size: 1.05rem;
	}
	.ksw-nav-close {
		position: absolute;
		top: 1rem; inset-inline-end: 1rem;
		width: 44px; height: 44px;
		border: 1px solid var(--steel-300);
		background: var(--white);
		border-radius: var(--radius-sm);
		font-size: 1.4rem;
		cursor: pointer;
		color: var(--navy-800);
	}
}

@media (min-width: 901px) {
	.ksw-nav-close { display: none; }
}

/* ==========================================================================
   18. Urdu typography
   Applied by language class, not only by [dir], so an Urdu string inside an
   English page can still be set correctly.
   ========================================================================== */

.ksw-lang-ur body, body.ksw-lang-ur {
	font-family: var(--font-urdu);
	font-size: 18px;
	line-height: 2.1;
}
body.ksw-lang-ur h1, body.ksw-lang-ur h2, body.ksw-lang-ur h3 { line-height: 1.7; letter-spacing: 0; }
body.ksw-lang-ur .ksw-brand-sub { text-transform: none; letter-spacing: 0; }
body.ksw-lang-ur .ksw-hero-kicker { letter-spacing: 0; text-transform: none; }
body.ksw-lang-ur .ksw-contact-label { text-transform: none; letter-spacing: 0; }
[lang="ur"] { font-family: var(--font-urdu); line-height: 2.1; }

/* Numbers and Latin-script phone numbers stay LTR inside Urdu text. */
.ksw-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ==========================================================================
   19. WordPress core classes used by page content
   ========================================================================== */

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .88rem; color: var(--ink-soft); }

.ksw-prose { max-width: 46rem; }
.ksw-prose h2 { margin-top: 2rem; }
.ksw-prose ul li { margin-bottom: .4rem; }

/* ==========================================================================
   20. Print
   ========================================================================== */

@media print {
	.ksw-header, .ksw-topbar, .ksw-float-wa, .ksw-footer, .ksw-cta { display: none !important; }
	body { font-size: 12pt; }
}

/* ==========================================================================
   21. Reduced motion
   ========================================================================== */

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