/*
Theme Name: Uncode Child
Description: Child theme for Uncode theme
Author: Undsgn™
Author URI: http://www.undsgn.com
Template: uncode
Version: 1.0.0
Text Domain: uncode
*/

/* ==========================================================================
   Visually hidden (still read by Google and screen readers) — homepage H1
   ========================================================================== */
.comoti-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* ==========================================================================
   Homepage banner (row .comoti-hero): the photo always shows whole, at its own
   2000×625 (3.2:1) ratio, under a navy band that holds the transparent menu.
   The intro text / button / ISO badges live in the strip below (.comoti-hero-strip).
   ========================================================================== */
body .comoti-hero {
	--comoti-header: 106px; /* desktop header: 34px logo + 2×36px padding */
	position: relative;
	height: auto !important;
	min-height: 0 !important;
	padding-top: var(--comoti-header);
	background-color: #000D2F; /* the artwork's own navy, so band and photo blend */
}
body .comoti-hero::after {
	content: "";
	display: block;
	padding-top: 31.25%; /* 625 / 2000 */
}
body .comoti-hero > .row {
	position: absolute !important;
	inset: 0;
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
}
body .comoti-hero .background-inner {
	background-color: #000D2F;
	background-size: 100% auto !important;
	background-position: center bottom !important;
}
/* no darkening over the artwork (the old hero gradient was for text legibility) */
body .comoti-hero .block-bg-overlay {
	display: none !important;
}
/* banner + strip read as one rounded card: square the corners where they meet */
body .comoti-hero,
body .comoti-hero .row-background,
body .comoti-hero .background-wrapper,
body .comoti-hero .background-inner {
	border-bottom-left-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}
body .comoti-hero-strip,
body .comoti-hero-strip > .row {
	border-top-left-radius: 0 !important;
	border-top-right-radius: 0 !important;
}
body .comoti-hero-strip > .row {
	padding-top: 36px !important;
}
@media (max-width: 959px) {
	body .comoti-hero {
		--comoti-header: 88px; /* tablet/phone header height */
	}
	body .comoti-hero-strip > .row {
		padding-top: 27px !important;
	}
}
@media (min-width: 960px) {
	.comoti-hero-iso .uncode-flexbox {
		justify-content: flex-end;
	}
}

/* ==========================================================================
   Homepage — 4 domains of activity as side-by-side photo cards
   (row .comoti-domains, columns .comoti-domain; layout like Uncode's "Pricing Plans")
   ========================================================================== */
.comoti-domain .uncoltable {
	height: clamp(30rem, 40vw, 38rem); /* acts as min-height on display:table */
}
.comoti-domain .uncell {
	overflow: hidden;
}
/* Photo stays visible at the top, text sits on a dark fade at the bottom */
.comoti-domain .block-bg-overlay {
	opacity: 1 !important;
	background: linear-gradient(180deg, rgba(2, 8, 34, .35) 0%, rgba(2, 8, 34, .1) 30%, rgba(2, 8, 34, .55) 58%, rgba(2, 8, 34, .92) 100%) !important;
}
.comoti-domain .background-inner {
	transition: transform 1s cubic-bezier(.2, .7, .2, 1);
}
.comoti-domain:hover .background-inner {
	transform: scale(1.06);
}
/* body/.main-container prefix: outranks the site-wide justify snippet */
body .main-container .comoti-domain .comoti-domain-desc p {
	color: rgba(255, 255, 255, .82);
	font-size: 16px;
	line-height: 1.5;
	text-align: left !important;
	-webkit-hyphens: manual;
	hyphens: manual;
}
.comoti-domain .uncode-flexbox,
.comoti-domain .btn-container {
	width: 100%;
}
/* Content stays above the whole-card link so the button keeps its hover */
.comoti-domain .uncont {
	position: relative;
	z-index: 2;
	pointer-events: none;
}
.comoti-domain .uncont a {
	pointer-events: auto;
}

/* Tablet / small laptop: 2×2 grid (4 across is too narrow below 1200px).
   Uncode's equal-height table layout squeezes the 2nd row here, so this row
   switches to flex and the card body goes back into normal flow. */
@media (min-width: 570px) and (max-width: 1199px) {
	/* selectors doubled up to outrank Uncode's own !important tablet rules */
	body .main-container .comoti-domains .row.row .row-inner.row-inner {
		display: flex !important;
		flex-wrap: wrap;
		row-gap: 18px;
		height: auto !important;
	}
	body .main-container .comoti-domains .row.row .row-inner.row-inner > .comoti-domain.comoti-domain[class*="col-lg-"] {
		display: block !important;
		width: 50% !important;
		float: none !important;
		height: auto !important;
	}
	body .main-container .comoti-domains .row.row .comoti-domain.comoti-domain > .uncol.uncol {
		height: auto !important;
	}
	.comoti-domain .uncoltable {
		position: relative !important;
		width: 100%;
		height: 30rem;
	}
}
@media (min-width: 570px) and (max-width: 767px) {
	.comoti-domain .uncoltable {
		height: 34rem;
	}
}
@media (max-width: 569px) {
	.comoti-domains .wpb_column {
		margin-bottom: 18px;
	}
}
@media (max-width: 569px) {
	.comoti-domain .uncoltable {
		height: 27rem;
	}
}

/* ==========================================================================
   Header — small desktops (960–1199px): the 34px logo + 9 menu items + language
   switcher overflowed at ~1024px, so tighten the menu link padding there only.
   ========================================================================== */
@media (min-width: 960px) and (max-width: 1199px) {
	/* .menu-primary-inner = main menu in both languages (RO and EN menus have different ids) */
	body .menu-horizontal ul.menu-primary-inner {
		margin-left: clamp(6px, calc((100vw - 950px) * .4), 24px);
	}
	body .menu-horizontal ul.menu-primary-inner > li > a {
		padding-left: 9px !important;
		padding-right: 9px !important;
	}
	body .menu-horizontal ul.menu-primary-inner > li.pll-parent-menu-item > a {
		padding-right: 0 !important;
	}
}

/* ==========================================================================
   Mobile (phones, ≤569px — Uncode's own small breakpoint)
   ========================================================================== */
@media (max-width: 569px) {

	/* Big custom headings whose clamp() minimum is 56–65px, so long words like
	   "turbomotoare" got cut off: "Laboratoare și facilități" (home, RO/EN)
	   and the hero titles on Despre, Laboratoare, Proiecte, Documente. */
	.main-container .fontsize-174595-custom,
	.main-container .fontsize-1668813-custom,
	.main-container .fontsize-6091193-custom,
	.main-container .fontsize-7147453-custom,
	.main-container .fontsize-7689713-custom {
		font-size: clamp(2.5rem, 12.5vw, 3rem) !important;
		line-height: 1.05 !important;
	}

	/* Page titles on the custom-built inner pages (Cariere, Brevete, TURBOEXP…) */
	.main-container h1:not([class*="fontsize-"]) {
		font-size: clamp(2rem, 10vw, 2.5rem) !important;
		line-height: 1.1 !important;
	}

	/* Safety net: never clip a long Romanian word, break it instead */
	.main-container h1,
	.main-container h2,
	.main-container h3 {
		overflow-wrap: break-word;
	}

	/* Justified body text leaves big gaps in narrow phone columns —
	   fall back to the surrounding alignment (same as the snippet's exceptions). */
	body .main-container .post-content p,
	body .main-container .post-content li,
	body .main-container .post-content blockquote,
	body .main-container .uncode_text_column p,
	body .main-container .uncode_text_column li {
		text-align: inherit !important;
		-webkit-hyphens: manual;
		hyphens: manual;
	}
}

/* Small phones (iPhone SE 1st gen, older Androids) */
@media (max-width: 359px) {
	/* 35–36px section titles: "dezvoltare", "experimentare?" don't fit at 320px */
	.main-container .fontsize-210105,
	.main-container .fontsize-1668912-custom,
	.main-container .fontsize-1668935-custom {
		font-size: 30px !important;
	}
}
