/* Estone site fixes: responsive corrections loaded after the theme styles. */

/* Featured slider on Tech Blog / News: banners are 2:1 with text baked into the image,
   so a taller box with object-fit: cover cut off the sides on tablets and phones. */
@media (max-width: 1024px) {
	.eab-featured__media,
	.eab-card__media {
		height: auto !important;
		aspect-ratio: 2 / 1;
	}
	/* List cards had a fixed 180px image height: a thin strip on tablets, cropped sides on phones. */
	.eab-card__media img,
	.eab-featured__media img {
		width: 100%;
		height: 100% !important;
		object-fit: cover;
	}

	/* Section heroes: the background picture has devices on the right half; once the copy spans the
	   full width it runs over them. A dark veil keeps the white copy readable. */
	.estone-solution-hero .esh-media::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(90deg, rgba(8, 18, 34, 0.86) 0%, rgba(8, 18, 34, 0.7) 100%);
		pointer-events: none;
	}
	.estone-solution-hero .esh-main {
		position: relative;
		z-index: 1;
	}
}

/* Spec tables (two columns: label | value) had min-width: 500px, forcing sideways scrolling on phones.
   Let them fit the screen and wrap; the label column gets a narrower share. */
@media (max-width: 600px) {
	.wp-block-table.spec-table table {
		min-width: 0 !important;
		width: 100% !important;
	}
	.wp-block-table.spec-table td:first-child,
	.wp-block-table.spec-table th:first-child {
		width: 38% !important;
	}
	.wp-block-table.spec-table td,
	.wp-block-table.spec-table th {
		overflow-wrap: anywhere;
	}
}

/* The header is transparent (white logo and menu) at the top of the page and only turns solid on scroll.
   That suits pages that open with the dark section hero; on every other page (empty product category
   pages, home, contact, search, 404, …) it was invisible on the light background. Without a hero the
   header uses the theme's solid "scrolled" look from the start. */
body:not(:has(.estone-solution-hero, .wp-block-cover)) .estone-header {
	color: var(--eh-ink);
	background: #fff;
	box-shadow: 0 2px 15px rgba(0, 0, 0, 0.082);
}
body:not(:has(.estone-solution-hero, .wp-block-cover)) .estone-header .estone-header__logo-white {
	visibility: hidden;
}
body:not(:has(.estone-solution-hero, .wp-block-cover)) .estone-header .estone-header__logo-colour {
	visibility: visible;
}

/* Globe (language) dropdown: the whole row is clickable, not only the letters. */
.estone-header__regions nav.wp-block-navigation {
	padding: 6px 0 !important;
}
.estone-header__regions .wp-block-navigation__container,
.estone-header__regions .wp-block-navigation-item {
	width: 100%;
}
.estone-header__regions .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 26px !important;
	text-align: center;
}
.estone-header__regions .wp-block-navigation-item__content:hover,
.estone-header__regions .wp-block-navigation-item__content:focus-visible {
	background: rgba(15, 40, 80, 0.06);
}
