/*
Theme Name: KCE — Khulna City Engineering
Theme URI: https://www.khulnacityengineering.com
Author: Khulna City Engineering
Description: Corporate theme for Khulna City Engineering: equipment rental, materials supply and project support. Pairs with the "KCE Catalogue & Enquiries" plugin for the supply catalogue, Enquiry Basket and enquiry records. Page content is edited with the standard block editor.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
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: kce
*/

/* Base ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body {
	margin: 0; background: #fff; color: #1C1D20;
	font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: #C4161C; text-underline-offset: 3px; }
a:hover { color: #9E1015; }
:focus-visible { outline: 3px solid rgba(3, 164, 228, .55); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: "Archivo", "IBM Plex Sans", system-ui, sans-serif; color: inherit; line-height: 1.15; letter-spacing: -0.015em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kce-skip { position: absolute; left: 12px; top: -60px; z-index: 10000; background: #1C1D20; color: #fff; padding: 10px 16px; border-radius: 6px; }
.kce-skip:focus { top: 12px; color: #fff; }
.kce-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.kce-icon { flex-shrink: 0; }

/* Buttons (theme) */
.kce-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.kce-btn--primary { background: #C4161C; color: #fff; }
.kce-btn--primary:hover { background: #9E1015; color: #fff; }
.kce-btn--line { background: #fff; color: #1C1D20; border-color: #1C1D20; }
.kce-btn--line:hover { background: #1C1D20; color: #fff; }
.kce-btn--block { width: 100%; }
.kce-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Utility bar ------------------------------------------------------------ */
.kce-util { background: #1C1D20; color: #D9DBDE; font-size: 13px; }
.kce-util__inner { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kce-util__left, .kce-util__right { display: flex; align-items: center; gap: 20px; }
.kce-util__since { font-family: "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.kce-util__addr { display: inline-flex; align-items: center; gap: 6px; }
.kce-util a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.kce-util a:hover { color: #fff; text-decoration: underline; }

/* Header ----------------------------------------------------------------- */
.kce-header { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 900; background: #fff; border-bottom: 1px solid #E2E4E7; transition: box-shadow .2s ease; }
.kce-header.is-scrolled { box-shadow: 0 6px 20px rgba(28, 29, 32, .07); }
.kce-header__inner { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kce-logo { display: flex; align-items: center; flex-shrink: 0; }
.kce-logo__img { display: block; height: 48px; width: auto; }
.kce-nav__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
.kce-header__actions a, .kce-header__actions button { white-space: nowrap; }
.kce-nav__list a { color: #1C1D20; text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 0; position: relative; white-space: nowrap; }
.kce-nav__list a:hover, .kce-nav__list .current-menu-item > a { color: #C4161C; }
.kce-nav__list .current-menu-item > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: #E82025; }
.kce-header__actions { display: flex; align-items: center; gap: 10px; }
.kce-basket-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1.5px solid #1C1D20; border-radius: 8px; background: #fff; color: #1C1D20; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.kce-basket-btn:hover { background: #1C1D20; color: #fff; }
.kce-badge { background: #C4161C; color: #fff; border-radius: 999px; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-family: "IBM Plex Mono", monospace; line-height: 1; }
.kce-badge[hidden] { display: none; }
.kce-badge--light { background: #fff; color: #C4161C; }
.kce-header__quote { height: 44px; font-size: 14px; }
.kce-menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1.5px solid #D5D8DC; border-radius: 8px; background: #fff; cursor: pointer; }
.kce-menu-btn__bars { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.kce-menu-btn__bars span { display: block; height: 2px; background: #1C1D20; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.kce-menu-btn[aria-expanded="true"] .kce-menu-btn__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.kce-menu-btn[aria-expanded="true"] .kce-menu-btn__bars span:nth-child(2) { opacity: 0; }
.kce-menu-btn[aria-expanded="true"] .kce-menu-btn__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.kce-mnav { border-top: 1px solid #E2E4E7; background: #fff; max-height: calc(100vh - 120px); overflow-y: auto; }
.kce-mnav[hidden] { display: none; }
.kce-mnav__list { list-style: none; margin: 0; padding: 8px 16px; }
.kce-mnav__list a { display: flex; align-items: center; min-height: 52px; color: #1C1D20; text-decoration: none; font-weight: 600; font-size: 17px; border-bottom: 1px solid #ECEEF0; }
.kce-mnav__list .current-menu-item > a { color: #C4161C; }
.kce-mnav__foot { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.kce-mnav__contact { display: inline-flex; align-items: center; gap: 10px; color: #1C1D20; text-decoration: none; min-height: 44px; }

@media (max-width: 1340px) { .kce-basket-btn__text { display: none; } .kce-nav__list { gap: 20px; } }
@media (max-width: 1180px) {
	.kce-nav { display: none; }
	.kce-basket-btn__text { display: inline; }
	.kce-menu-btn { display: inline-flex; }
}
@media (max-width: 900px) { .kce-header__quote { display: none; } .kce-util__left { display: none; } .kce-util__inner { justify-content: center; } }
@media (max-width: 640px) {
	.kce-wrap { padding: 0 16px; }
	.kce-header__inner { height: 68px; }
	.kce-logo__img { height: 38px !important; }
	.kce-basket-btn { width: 44px; padding: 0; justify-content: center; position: relative; border-color: #D5D8DC; }
	.kce-basket-btn__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.kce-basket-btn .kce-badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; font-size: 11px; }
	.kce-util__phone2, .kce-util__mail { display: none !important; }
}

/* Page head -------------------------------------------------------------- */
.kce-pagehead { background: #fff; padding: 52px 0 44px; position: relative; border-bottom: 1px solid #E2E4E7; }
.kce-crumbs { display: flex; gap: 8px; font-size: 13px; color: #5A5F66; margin-bottom: 14px; flex-wrap: wrap; }
.kce-crumbs a { color: #5A5F66; text-decoration: none; }
.kce-crumbs a:hover { color: #C4161C; text-decoration: underline; }
.kce-pagehead__title { margin: 0; font-weight: 800; font-size: clamp(34px, 5vw, 50px); line-height: 1.06; letter-spacing: -0.02em; max-width: 900px; text-wrap: balance; }
.kce-pagehead__lead { margin: 16px 0 0; font-size: 18px; color: #4A4F56; max-width: 760px; text-wrap: pretty; }
.kce-pagehead .kce-btn-row { margin-top: 24px; }
.kce-rule { display: flex; height: 4px; }
.kce-rule span:first-child { flex: 5; background: #E82025; }
.kce-rule span:last-child { flex: 1; background: #03A4E4; }
.kce-rule--short { position: absolute; left: 0; bottom: -1px; width: min(320px, 40%); }

/* Footer ----------------------------------------------------------------- */
.kce-footer { background: #fff; border-top: 1px solid #E2E4E7; }
.kce-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 64px; padding-bottom: 40px; }
.kce-footer__brand p { color: #4A4F56; font-size: 14px; margin: 16px 0; max-width: 320px; }
.kce-footer__logo { display: inline-block; }
.kce-footer__logo .kce-logo__img { height: 72px; width: auto; }
.kce-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.kce-footer__col a { color: #1C1D20; text-decoration: none; }
.kce-footer__col a:hover { color: #C4161C; text-decoration: underline; }
.kce-footer__col span { color: #4A4F56; font-size: 14px; }
.kce-footer__title { margin: 0 0 4px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #5A5F66; font-weight: 600; }
.kce-social { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.kce-social a { width: 44px; height: 44px; border-radius: 8px; border: 1px solid #D5D8DC; display: flex; align-items: center; justify-content: center; color: #1C1D20; transition: background-color .15s ease, color .15s ease; }
.kce-social a:hover { background: #1C1D20; color: #fff; border-color: #1C1D20; }
.kce-social a.is-pending { opacity: .55; cursor: default; }
.kce-social a.is-pending:hover { background: none; color: #1C1D20; border-color: #D5D8DC; }
.kce-footer__bar { border-top: 1px solid #E2E4E7; }
.kce-footer__bar-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: #5A5F66; }
@media (max-width: 900px) { .kce-footer__grid { grid-template-columns: 1fr 1fr; } .kce-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .kce-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; } }

/* Quick contact (desktop) and action bar (mobile) ------------------------ */
.kce-quick { position: fixed; right: 22px; bottom: 22px; z-index: 800; display: flex; flex-direction: column; gap: 10px; }
.kce-quick__btn { width: 54px; height: 54px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 8px 22px rgba(28, 29, 32, .25); transition: transform .15s ease; }
.kce-quick__btn:hover { color: #fff; transform: translateY(-2px); }
.kce-quick__btn--wa { background: #1E7E45; }
.kce-quick__btn--call { background: #1C1D20; }
.kce-quick__btn--mail { background: #C4161C; }
.kce-mbar { display: none; }
@media (max-width: 782px) {
	.kce-quick { display: none; }
	body { padding-bottom: 76px; }
	.kce-mbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; background: #fff; border-top: 1px solid #E2E4E7; box-shadow: 0 -8px 20px rgba(28, 29, 32, .08); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
	.kce-mbar__btn { min-height: 50px; border-radius: 8px; border: 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: #fff; text-decoration: none; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
	.kce-mbar__btn:hover { color: #fff; }
	.kce-mbar__btn--call { background: #1C1D20; }
	.kce-mbar__btn--wa { background: #1E7E45; }
	.kce-mbar__btn--basket { background: #C4161C; }
}

/* Posts (if used) */
.kce-postlist { display: grid; gap: 28px; max-width: 760px; }
.kce-postlist__item h2 { margin: 0 0 4px; font-size: 24px; }
.kce-postlist__item h2 a { color: #1C1D20; text-decoration: none; }
.kce-postlist__date { margin: 0 0 8px; color: #5A5F66; font-size: 14px; }

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