/**
 * Eximia mobile fixes — Home hero + "Search by Condition" cards
 * v1.0.0 (Nov 2026). Pre-compiled, no npm build needed.
 * Loaded after theme.min.css via functions.php. Desktop (>=1080px) is untouched.
 */

/* ------------------------------------------------------------------
   1. HOME HERO (below lg / 1080px)
   Theme default crops the X graphic to 16:9 and pushes it 25% off the
   right edge. Show the whole graphic, centred, and tighten the top gap.
   ------------------------------------------------------------------ */
@media (max-width: 1079.98px) {
	.tb-homepage-hero.tb-hero {
		padding-top: 2rem; /* theme default: 5rem. Raise/lower to taste. */
	}

	.tb-homepage-hero .section-fg .fg-img {
		transform: none;
		aspect-ratio: auto;
		object-fit: contain;
		object-position: center;
		width: 100%;
		max-width: 560px; /* keeps it sensible on tablets */
		height: auto;
		margin: 1.5rem auto 0;
		align-self: center;
	}
}

/* ------------------------------------------------------------------
   2. CONDITION CARDS (below md / 768px)
   Replaces the tall square card with a compact row: icon left, title
   right. Applies to both the slider layout (Home) and the grid layout.
   ------------------------------------------------------------------ */
@media (max-width: 767.98px) {
	/* 2a. Slider -> static 2-col grid. Overrides Swiper's inline sizes. */
	.tb-therapeutic-areas .slider .swiper {
		overflow: visible;
	}

	.tb-therapeutic-areas .slider .swiper-wrapper {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: .5rem;
		width: auto;
		height: auto;
		transform: none !important;
		transition: none !important;
	}

	.tb-therapeutic-areas .slider .swiper-slide {
		width: auto !important;
		height: auto;
		margin: 0 !important;
	}

	/* Arrows hidden; search box takes the full row. */
	.tb-therapeutic-areas .top .slider-navigation {
		display: none;
	}

	.tb-therapeutic-areas .top .search-form {
		flex: 1 1 auto;
		width: 100%;
	}

	/* Make nopad-bottom section stretch to contain the grid.
	   The theme offsets .block-content 5rem down; on mobile the
	   grid is taller than the original slider, so reset the trick. */
	.tb-therapeutic-areas.nopad-bottom .block-content {
		position: static;
		top: auto;
		margin-top: 0;
	}

	.tb-therapeutic-areas.nopad-bottom + .section {
		padding-top: 2.5rem;
	}

	/* Grid layout (e.g. Therapeutic Areas page) */
	.area-list {
		grid-template-columns: 1fr 1fr;
		gap: .5rem;
	}

	/* 2b. Compact card — uniform height across all cards */
	.area-list-item {
		position: relative; /* anchor for the ::after chevron */
		display: flex;
		align-items: center;
		min-height: 5.25rem; /* enough for 3-line titles; keeps all rows even */
		padding: .5rem 1.75rem .5rem .625rem;
		background-color: #cec2e1;
		border-radius: 10px;
		transition: background-color .3s;
		box-sizing: border-box;
	}

	.area-list-item .bg {
		display: none;
	}

	.area-list-item .c {
		position: static;
		display: flex;
		align-items: center;
		gap: .5rem;
		width: 100%;
		padding: 0;
	}

	.area-list-item .c .ico {
		flex: 0 0 1.75rem;
		width: 1.75rem;
		height: 1.75rem;
		margin: 0;
	}

	.area-list-item .c .ico svg {
		display: block;
		width: 100%;
		height: 100%;
	}

	.area-list-item .c .title {
		position: static;
		padding: 0;
		border-top: 0;
		font-size: .8125rem;
		font-weight: 600;
		line-height: 1.25;
		flex: 1 1 0%;
		min-width: 0;
		padding-right: .75rem; /* keep text clear of chevron */
	}

	/* Chevron affordance on the right */
	.area-list-item::after {
		content: "";
		position: absolute;
		top: 50%;
		right: .625rem;
		width: .4rem;
		height: .4rem;
		border-top: 2px solid #26215d;
		border-right: 2px solid #26215d;
		transform: translateY(-50%) rotate(45deg);
		flex-shrink: 0;
	}

	.area-list-item:hover,
	.area-list-item:focus {
		background-color: #ddd3ec;
	}
}
