/* =========================================================
   Titan Hermetik — supplementary theme CSS
   ========================================================= */

/* ---------------------------------------------------------
   SAFETY NET BASE STYLES
   These rules duplicate theme.json's colors/typography/spacing
   intent as plain CSS. theme.json (Global Styles) SHOULD be the
   single source of truth and will override these via higher
   specificity / later cascade on hosts where it loads correctly.
   But since this stylesheet is enqueued unconditionally via
   wp_enqueue_style() (not dependent on the Global Styles engine),
   it guarantees the site still looks correct even on WordPress
   versions/setups where theme.json fails to generate its inline
   stylesheet (e.g. theme.json schema version mismatches, caching
   issues, or a Global Styles user revision resetting values).
   --------------------------------------------------------- */

:root {
	--th-blue-primary: #0D57A5;
	--th-blue-deep: #06366B;
	--th-navy: #181F25;
	--th-red: #EB3F33;
	--th-red-hover: #DC2626;
	--th-focus-gray: #70808F;
	--th-white: #FFFFFF;
	--th-light-gray: #F3F5F7;
	--th-border-gray: #E0E6EB;
}

body {
	font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	color: var(--th-navy);
	background: #fff;
	font-size: 14px;
	line-height: 1.45;
}

h1, h2, h3, h4, h5, h6 {
	font-family: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
	font-weight: 800;
	line-height: 1.2;
	color: var(--th-navy);
}
h1 { font-size: clamp(1.75rem, 1rem + 3.2vw, 3.75rem); font-weight: 800; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem); font-weight: 800; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.4; }
h4 { font-size: 14px; font-weight: 700; line-height: 1.4; }

a { color: var(--th-blue-primary); text-decoration: none; }
a:hover { color: var(--th-blue-deep); text-decoration: underline; }

.wp-block-button__link,
.wp-element-button {
	border-radius: 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	padding: 12px 28px;
	color: #fff;
	background-color: var(--th-red);
}
.wp-block-button__link:hover,
.wp-element-button:hover {
	background-color: var(--th-red-hover);
	color: #fff;
	text-decoration: none;
}

/* Color utility classes — explicit fallback in case the Global
   Styles stylesheet (which normally generates these) doesn't load. */
.has-blue-primary-color { color: var(--th-blue-primary) !important; }
.has-blue-deep-color { color: var(--th-blue-deep) !important; }
.has-navy-color { color: var(--th-navy) !important; }
.has-red-color { color: var(--th-red) !important; }
.has-focus-gray-color { color: var(--th-focus-gray) !important; }
.has-white-color { color: var(--th-white) !important; }
.has-border-gray-color { color: var(--th-border-gray) !important; }

.has-blue-primary-background-color { background-color: var(--th-blue-primary) !important; }
.has-blue-deep-background-color { background-color: var(--th-blue-deep) !important; }
.has-navy-background-color { background-color: var(--th-navy) !important; }
.has-red-background-color { background-color: var(--th-red) !important; }
.has-white-background-color { background-color: var(--th-white) !important; }
.has-light-gray-background-color { background-color: var(--th-light-gray) !important; }

.has-small-font-size { font-size: 12px !important; }
.has-body-font-size { font-size: 14px !important; }
.has-nav-font-size { font-size: 16px !important; }
.has-subheading-font-size { font-size: 20px !important; }
.has-heading-font-size { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem) !important; }
.has-display-font-size { font-size: clamp(1.75rem, 1rem + 3.2vw, 3.75rem) !important; }

/* Container width fallback — mirrors theme.json layout.contentSize/wideSize */
.wp-block-group.alignfull { max-width: none; }
main#main-content > .wp-block-pattern,
main#main-content > *:not(.alignfull):not(.alignwide) {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

/* ---- Skip link (accessibility) ---- */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: #0D57A5;
	color: #fff;
	padding: 12px 20px;
	z-index: 100000;
	border-radius: 0 0 6px 0;
	text-decoration: none;
	font-weight: 700;
}
.skip-link:focus {
	top: 0;
}

/* ---- Smooth scroll for in-page anchors, respecting reduced motion ---- */
html {
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---- Header responsive horizontal padding (header uses hardcoded 40px
   inline for maximum reliability; these queries bring it down to spec) ---- */
@media (max-width: 1023px) {
	header.wp-block-group.alignfull {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}
@media (max-width: 767px) {
	header.wp-block-group.alignfull {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
}

/* ---- Responsive container padding for full-width Group blocks ----
   Patterns use inline padding-left/right:40px (desktop spec). These
   rules bring that down to the tablet/mobile spec values without
   needing separate desktop/tablet/mobile block variations. */
@media (max-width: 1023px) {
	.wp-block-group.alignfull > .wp-block-group,
	.entry-content,
	main#main-content {
		padding-left: 24px;
		padding-right: 24px;
	}
}
@media (max-width: 767px) {
	.wp-block-group.alignfull > .wp-block-group,
	.entry-content,
	main#main-content {
		padding-left: 16px;
		padding-right: 16px;
	}
	.wp-block-heading {
		word-break: break-word;
	}
}

/* ---- Dash-list: turns default <ul> bullets into a red/blue dash marker
   matching the original design (used by What We Do + Services cards) ---- */
.titan-dash-list {
	list-style: none;
	padding-left: 0;
	margin: 0;
}
.titan-dash-list li {
	position: relative;
	padding-left: 16px;
	margin-bottom: 6px;
	line-height: 20px;
}
.titan-dash-list li::before {
	content: "•";
	color: #0D57A5;
	position: absolute;
	left: 0;
	font-weight: 700;
}
.titan-dash-list--light li::before {
	color: #EB3F33;
}

/* ---- Services grid: hide the empty 6th spacer column on tablet/mobile
   where columns stack (it would otherwise leave a blank gap) ---- */
@media (max-width: 1023px) {
	.titan-services-spacer {
		display: none;
	}
}

/* ---- Card hover states (Global Styles/theme.json can't target :hover on
   custom card wrappers built from Group blocks) ---- */
#what-we-do .wp-block-column > .wp-block-group,
.titan-project-gallery figure {
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#what-we-do .wp-block-column > .wp-block-group:hover {
	border-color: #0D57A5 !important;
	box-shadow: 0px 4px 12px rgba(13, 87, 165, 0.1);
}
#services .wp-block-column > .wp-block-group:hover {
	background-color: rgba(255, 255, 255, 0.1) !important;
	transform: translateY(-2px);
}
.titan-project-gallery .wp-block-image img {
	transition: transform 0.4s ease;
	border-radius: 6px;
}
.titan-project-gallery .wp-block-image:hover img {
	transform: scale(1.05);
}

/* ---- Navigation block: hard fallback in case block-supports styles
   (overlayTextColor/overlayBackgroundColor/textColor block attributes)
   don't generate their CSS via Global Styles ---- */
.titan-primary-nav.wp-block-navigation {
	color: #ffffffd9;
}
.titan-primary-nav .wp-block-navigation-item > a,
.titan-primary-nav .wp-block-navigation-item > a.wp-block-navigation-item__content {
	color: #ffffffd9 !important;
	font-size: 14px;
	font-weight: 600;
	padding: 8px 16px;
}
.titan-primary-nav .wp-block-navigation__responsive-container:not(.hidden-by-default) {
	background-color: #0D57A5;
}
.titan-primary-nav .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #ffffff;
}
.titan-primary-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a {
	color: #181F25 !important;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	stroke: #fff;
}
.titan-lang-switch.wp-block-navigation .wp-block-navigation-item > a {
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700;
	padding: 4px 10px !important;
}


.titan-primary-nav .wp-block-navigation-item > a:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
}
.titan-primary-nav .wp-block-navigation-item.current-menu-item > a {
	color: #fff !important;
	box-shadow: inset 0 -3px 0 #fff;
}
.titan-lang-switch .wp-block-navigation-item > a {
	padding: 4px 10px !important;
}

/* Mobile navigation overlay: force white background + navy text already set
   via block attributes in parts/header.html; this just tidies spacing. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding: 24px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item > a {
	font-size: 18px;
	padding: 14px 0;
	display: block;
}

/* ---- Contact map iframe: ensure full height inside its column ---- */
.wp-block-column iframe {
	display: block;
	width: 100%;
}

/* ---- Footer widget area (optional, only renders if a widget is added) ---- */
.footer-widget {
	color: #fff;
}
.footer-widget-title {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 8px;
}

/* ---- Buttons: full width on mobile to match original design ---- */
@media (max-width: 767px) {
	.wp-block-buttons .wp-block-button {
		width: 100%;
	}
	.wp-block-buttons .wp-block-button .wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}
