/*
 * Costhub design standard.
 * One type scale (Major Third, 1.25), two families, WCAG AA text colours, 44px tap targets.
 * Loaded after the theme and page builder so every page follows the same rules.
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/poppins-700.woff2") format("woff2"); }

:root {
	--ch-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ch-font-heading: "Poppins", var(--ch-font-body);

	--ch-fs-xs: 0.875rem;   /* 14px: legal lines only */
	--ch-fs-sm: 0.9375rem;  /* 15px: labels, meta */
	--ch-fs-base: 1rem;     /* 16px mobile, 18px desktop (see html below) */
	--ch-fs-lg: 1.125rem;
	--ch-fs-h6: 1.125rem;
	--ch-fs-h5: 1.125rem;
	--ch-fs-h4: 1.25rem;
	--ch-fs-h3: 1.5rem;
	--ch-fs-h2: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem);
	--ch-fs-h1: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
	--ch-lh-body: 1.6;
	--ch-lh-heading: 1.2;

	--ch-color-heading: #1a202c;
	--ch-color-text: #2d3748;
	--ch-color-muted: #4a5568;
	--ch-color-line: #e2e8f0;
	--ch-color-surface: #f7fafc;
	--ch-color-brand: #f5a524;
	--ch-color-brand-strong: #f7630c;
	--ch-color-link: #1159af;

	--ch-space-1: 0.25rem;
	--ch-space-2: 0.5rem;
	--ch-space-3: 0.75rem;
	--ch-space-4: 1rem;
	--ch-space-5: 1.5rem;
	--ch-space-6: 2rem;
	--ch-space-7: 3rem;
	--ch-space-8: 4rem;

	--ch-radius: 12px;
	--ch-shadow: 0 1px 2px rgba(26, 32, 44, 0.06), 0 4px 16px rgba(26, 32, 44, 0.08);
	--ch-shadow-hover: 0 2px 4px rgba(26, 32, 44, 0.08), 0 12px 28px rgba(26, 32, 44, 0.14);

	/* Theme hooks */
	--global-body-font-family: var(--ch-font-body);
	--global-heading-font-family: var(--ch-font-heading);
}

html {
	font-size: 100%;
}

@media (min-width: 1025px) {
	:root {
		--ch-fs-base: 1.125rem; /* 18px */
		--ch-fs-lg: 1.25rem;
	}
}

/* ---------- Base ---------- */

body {
	color: var(--ch-color-text);
	font-family: var(--ch-font-body);
	font-size: var(--ch-fs-base);
	line-height: var(--ch-lh-body);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title {
	color: var(--ch-color-heading);
	font-family: var(--ch-font-heading);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: var(--ch-lh-heading);
}

h1, .elementor-widget-heading h1.elementor-heading-title { font-size: var(--ch-fs-h1); }
h2, .elementor-widget-heading h2.elementor-heading-title { font-size: var(--ch-fs-h2); }
h3, .elementor-widget-heading h3.elementor-heading-title { font-size: var(--ch-fs-h3); }
h4, .elementor-widget-heading h4.elementor-heading-title { font-size: var(--ch-fs-h4); }
h5, .elementor-widget-heading h5.elementor-heading-title { font-size: var(--ch-fs-h5); }
h6, .elementor-widget-heading h6.elementor-heading-title { font-size: var(--ch-fs-h6); }

p, li, td, th, dd, dt, label, input, select, textarea,
.elementor-widget-text-editor,
.elementor-widget-container {
	font-size: inherit;
}

/* Hero heading keeps its white-on-photo colour set in the page builder. */
.elementor-widget-heading .elementor-heading-title { line-height: var(--ch-lh-heading); }

/* ---------- Page-builder widgets ---------- */

/* Section kickers ("Our Works", "Our Services"): same size everywhere. */
.elementor-widget-divider .elementor-divider__text {
	font-family: var(--ch-font-heading);
	font-size: var(--ch-fs-h2);
	font-weight: 600;
	line-height: var(--ch-lh-heading);
}

.elementor-widget-image-box .elementor-image-box-title {
	font-family: var(--ch-font-heading);
	font-size: var(--ch-fs-h3);
	font-weight: 600;
	line-height: 1.3;
}

/* Side-image boxes ("Why choose us"): icon sits beside the title, text uses the full card width. */
.elementor-widget-image-box.elementor-position-left .elementor-image-box-wrapper {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: var(--ch-space-3) var(--ch-space-4);
	text-align: left;
}

.elementor-widget-image-box.elementor-position-left .elementor-image-box-content {
	display: contents;
}

.elementor-widget-image-box.elementor-position-left .elementor-image-box-wrapper .elementor-image-box-img {
	grid-column: 1;
	width: 3.5rem !important;
	margin: 0 !important;
}

.elementor-widget-image-box.elementor-position-left .elementor-image-box-title {
	grid-column: 2;
	margin: 0;
}

.elementor-widget-image-box.elementor-position-left .elementor-image-box-description {
	grid-column: 1 / -1;
	margin: 0;
}

.elementor-icon-box-title,
.elementskit-info-box-title,
.ekit-wid-con .profile-title,
.ekit-wid-con .ekit-team-name {
	font-family: var(--ch-font-heading);
	font-size: var(--ch-fs-h4);
	font-weight: 600;
	line-height: 1.3;
}

.elementor-image-box-description,
.elementor-icon-box-description,
.elementskit-box-style-content,
.ekit-wid-con .profile-body p,
.ekit-wid-con .elementskit-commentor-content p,
.ekit-wid-con .elementskit-profile-info,
.eael-data-table td,
.eael-data-table th {
	font-size: var(--ch-fs-base);
	line-height: var(--ch-lh-body);
}

.ekit-wid-con .profile-card .profile-designation,
.ekit-wid-con .profile-body .profile-designation,
.ekit-wid-con .elementskit-profile-info .elementskit-author-des {
	color: var(--ch-color-muted);
	font-size: var(--ch-fs-sm);
}

/* Forms: sub-labels ("First", "Last") stay readable. */
div.wpforms-container .wpforms-form .wpforms-field-sublabel,
div.wpforms-container .wpforms-form .wpforms-field-description {
	font-size: var(--ch-fs-sm) !important; /* WPForms shrinks these further on phones */
}

/* Blog meta (date, author, category, "Read more") is sized relative to its parent by the theme. */
.entry-meta,
.entry-meta a,
.entry-meta time,
.entry-meta .meta-label,
.entry-taxonomies,
.entry-taxonomies a,
a.post-more-link {
	font-size: var(--ch-fs-sm);
}

/* ---------- Buttons: one size, 44px tap target ---------- */

.elementor-button,
.elementskit-btn,
.header-button,
.button,
.wp-block-button__link,
.wpforms-submit,
.ch-button {
	font-family: var(--ch-font-body);
	font-size: 1rem !important;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
}

.elementor-button,
.ch-button {
	align-items: center;
	display: inline-flex;
	justify-content: center;
}

.ch-button {
	background: var(--ch-color-brand);
	border-radius: 6px;
	color: var(--ch-color-heading);
	padding: 0.75rem 1.5rem;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.ch-button:hover,
.ch-button:focus-visible {
	background: var(--ch-color-brand-strong);
	color: #fff;
}

/* Text on the brand blue/orange panels needs near-black to reach 4.5:1. Colours set per widget still win. */
.elementor-image-box-description,
.elementor-icon-box-description {
	color: var(--ch-color-heading);
}

/* ---------- Header and footer ---------- */

.header-html,
.header-html-inner,
.main-navigation .primary-menu-container > ul > li.menu-item > a {
	font-size: 1rem;
}

.site-footer,
.site-footer .widget,
.site-footer .footer-html,
.site-footer p,
.site-footer li,
.site-footer a {
	font-size: 1rem;
	line-height: 1.6;
}

/* Footer sits on brand blue (#00a1ff) and orange (#f7630c): near-black passes AA on both. */
.site-footer .site-middle-footer-wrap p,
.site-footer .site-middle-footer-wrap strong,
.site-footer .site-bottom-footer-wrap p {
	color: var(--ch-color-heading);
}

.site-footer .widget-title {
	font-family: var(--ch-font-heading);
	font-size: var(--ch-fs-lg);
}

.site-footer .site-bottom-footer-wrap,
.site-footer .site-bottom-footer-wrap p {
	font-size: var(--ch-fs-sm);
}

/* ---------- Projects: grid and cards ---------- */

.ch-project-grid {
	display: grid;
	gap: var(--ch-space-5);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	margin: 0 auto;
	max-width: var(--global-content-width, 1290px);
}

.ch-card {
	background: #fff;
	border-radius: var(--ch-radius);
	box-shadow: var(--ch-shadow);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ch-card:hover,
.ch-card:focus-within {
	box-shadow: var(--ch-shadow-hover);
	transform: translateY(-2px);
}

.ch-card__link {
	color: inherit;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
}

.ch-card__link:focus-visible {
	outline: 3px solid var(--ch-color-link);
	outline-offset: -3px;
}

.ch-card__media {
	aspect-ratio: 16 / 10;
	background: var(--ch-color-line);
	overflow: hidden;
}

.ch-card__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ch-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--ch-space-2);
	padding: var(--ch-space-5);
}

/* Page-builder paragraph margins would otherwise leak into the cards. */
.ch-card .ch-card__body > * {
	margin: 0;
}

.ch-card .ch-card__body > .ch-card__meta {
	margin-top: auto;
}

.ch-eyebrow {
	color: var(--ch-color-muted);
	font-size: var(--ch-fs-sm);
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 0;
	text-transform: uppercase;
}

.ch-card__title {
	font-size: var(--ch-fs-h4);
	line-height: 1.3;
	margin: 0;
}

.ch-card__meta {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: var(--ch-fs-sm);
	gap: var(--ch-space-3);
	justify-content: space-between;
	margin: auto 0 0;
	padding-top: var(--ch-space-3);
}

.ch-card__cta {
	color: var(--ch-color-link);
	font-weight: 600;
}

.ch-status {
	border-radius: 999px;
	display: inline-block;
	font-size: var(--ch-fs-sm);
	font-weight: 600;
	line-height: 1;
	padding: 0.4em 0.8em;
}

.ch-status--tendering { background: #fef3c7; color: #92400e; }
.ch-status--ongoing { background: #dbeafe; color: #1e40af; }
.ch-status--complete { background: #dcfce7; color: #166534; }

.elementor-widget-container .ch-project-grid__more,
.ch-project-grid__more {
	margin: 0;
	padding-top: var(--ch-space-7);
	text-align: center;
}

/* ---------- Projects: table ---------- */

.ch-table-wrap {
	margin: 0 auto;
	max-width: var(--global-content-width, 1290px);
	overflow-x: auto;
}

.ch-table {
	border-collapse: collapse;
	font-size: var(--ch-fs-base);
	width: 100%;
}

.ch-table th,
.ch-table td {
	border-bottom: 1px solid var(--ch-color-line);
	padding: var(--ch-space-3) var(--ch-space-4);
	text-align: left;
	vertical-align: top;
}

.ch-table thead th {
	background: var(--ch-color-heading);
	color: #fff;
	font-size: var(--ch-fs-sm);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ch-table tbody th {
	font-weight: 600;
}

.ch-table tbody th a {
	color: var(--ch-color-heading);
}

.ch-table tbody tr:nth-child(even) {
	background: var(--ch-color-surface);
}

@media (max-width: 767px) {
	.ch-table thead {
		display: none;
	}

	.ch-table tr {
		border-bottom: 1px solid var(--ch-color-line);
		display: block;
		padding: var(--ch-space-3) 0;
	}

	.ch-table th,
	.ch-table td {
		border: 0;
		display: block;
		padding: var(--ch-space-1) var(--ch-space-4);
	}

	.ch-table td::before {
		color: var(--ch-color-muted);
		content: attr(data-label) ": ";
		font-weight: 600;
	}
}

/* ---------- Projects: single page ---------- */

.ch-project {
	padding-block: var(--ch-space-6) var(--ch-space-8);
}

.ch-back {
	font-size: var(--ch-fs-sm);
	margin: 0 0 var(--ch-space-5);
}

.ch-back a {
	color: var(--ch-color-link);
	font-weight: 600;
	text-decoration: none;
}

.ch-project__header {
	margin-bottom: var(--ch-space-6);
	max-width: 60rem;
}

.ch-project__title {
	font-size: var(--ch-fs-h1);
	margin: var(--ch-space-3) 0 0;
}

.ch-project__intro {
	align-items: start;
	display: grid;
	gap: var(--ch-space-6);
}

@media (min-width: 900px) {
	.ch-project__intro {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}

.ch-project__cover {
	margin: 0;
}

.ch-project__cover img {
	aspect-ratio: 4 / 3;
	border-radius: var(--ch-radius);
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.ch-facts {
	display: grid;
	gap: var(--ch-space-4);
	margin: 0 0 var(--ch-space-5);
}

.ch-facts > div {
	border-bottom: 1px solid var(--ch-color-line);
	padding-bottom: var(--ch-space-3);
}

.ch-facts dt {
	color: var(--ch-color-muted);
	font-size: var(--ch-fs-sm);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.ch-facts dd {
	color: var(--ch-color-heading);
	font-size: var(--ch-fs-lg);
	font-weight: 500;
	margin: var(--ch-space-1) 0 0;
}

.ch-project__description {
	max-width: 70ch;
}

.ch-project__photos {
	margin-top: var(--ch-space-8);
}

.ch-project__photos h2 {
	font-size: var(--ch-fs-h3);
	margin: 0 0 var(--ch-space-5);
}

.ch-gallery {
	display: grid;
	gap: var(--ch-space-3);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ch-gallery a {
	border-radius: 8px;
	display: block;
	overflow: hidden;
}

.ch-gallery img {
	aspect-ratio: 4 / 3;
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.3s ease;
	width: 100%;
}

.ch-gallery a:hover img,
.ch-gallery a:focus-visible img {
	transform: scale(1.04);
}

.ch-project__nav {
	border-top: 1px solid var(--ch-color-line);
	display: flex;
	flex-wrap: wrap;
	font-size: var(--ch-fs-base);
	gap: var(--ch-space-4);
	justify-content: space-between;
	margin-top: var(--ch-space-8);
	padding-top: var(--ch-space-5);
}

.ch-project__nav a {
	color: var(--ch-color-link);
	font-weight: 600;
	text-decoration: none;
}

.ch-project__nav-next {
	margin-left: auto;
	text-align: right;
}

/* ---------- Lightbox ---------- */

.ch-lightbox {
	background: rgba(10, 12, 16, 0.96);
	border: 0;
	height: 100vh;
	max-height: none;
	max-width: none;
	padding: 0;
	width: 100vw;
}

.ch-lightbox::backdrop {
	background: rgba(10, 12, 16, 0.96);
}

.ch-lightbox__img {
	height: 100%;
	object-fit: contain;
	padding: 3.5rem 1rem;
	width: 100%;
}

.ch-lightbox__count {
	color: #fff;
	font-size: var(--ch-fs-sm);
	left: 50%;
	margin: 0;
	position: absolute;
	top: 1rem;
	transform: translateX(-50%);
}

.ch-lightbox__btn {
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 2rem;
	height: 48px;
	line-height: 1;
	position: absolute;
	width: 48px;
}

.ch-lightbox__btn:hover,
.ch-lightbox__btn:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.ch-lightbox__close { right: 1rem; top: 0.75rem; }
.ch-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.ch-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (prefers-reduced-motion: reduce) {
	.ch-card,
	.ch-gallery img {
		transition: none;
	}
}
