/**
 * Shared responsive safeguards.
 *
 * Loaded last and intentionally scoped below 1200px so the approved desktop
 * presentation remains unchanged.
 */

@media (max-width: 1199px) {
	html,
	body {
		max-width: 100%;
		overflow-x: clip;
	}

	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	img,
	picture,
	video,
	canvas,
	svg,
	iframe {
		max-width: 100%;
	}

	img,
	video {
		height: auto;
	}

	.total-assurance-header__container,
	.total-assurance-hero__container,
	.total-assurance-home-services__container,
	.total-assurance-calculator__container,
	.total-assurance-providers__container,
	.total-assurance-about__container,
	.total-assurance-statistics__container,
	.total-assurance-service-showcase__container,
	.total-assurance-why-choose__container,
	.total-assurance-values-testimonials__container,
	.total-assurance-latest__container,
	.total-assurance-footer__container,
	.total-assurance-about-page__container,
	.total-assurance-team-page__container,
	.total-assurance-contact-page__container,
	.total-assurance-blog-container,
	.total-assurance-faq-page__container,
	.total-assurance-service-detail__container {
		width: min(calc(100% - 48px), var(--ta-container-width, 1280px));
		margin-inline: auto;
	}

	.total-assurance-footer__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.total-assurance-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	.total-assurance-hero__container,
	.total-assurance-calculator__layout,
	.total-assurance-about__layout,
	.total-assurance-about-page__hero-grid,
	.total-assurance-team-banner__inner,
	.total-assurance-team-founder__inner,
	.total-assurance-contact-page__hero-grid,
	.total-assurance-contact-page__main-grid,
	.total-assurance-blog-hero__inner,
	.total-assurance-blog-layout,
	.total-assurance-faq-hero__inner,
	.total-assurance-faq-page__layout,
	.total-assurance-service-detail__hero-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
	}

	.total-assurance-hero__content,
	.total-assurance-about-page__hero-content,
	.total-assurance-team-banner__content,
	.total-assurance-contact-page__hero-content,
	.total-assurance-blog-hero__content,
	.total-assurance-faq-hero__content,
	.total-assurance-service-detail__hero-content {
		order: 1;
	}

	.total-assurance-hero__visual,
	.total-assurance-about-page__hero-visual,
	.total-assurance-team-banner__visual,
	.total-assurance-contact-page__hero-visual,
	.total-assurance-blog-hero__visual,
	.total-assurance-faq-hero__visual,
	.total-assurance-service-detail__hero-media {
		order: 2;
		width: 100%;
	}

	.total-assurance-service-detail__hero-media img,
	.total-assurance-contact-page__hero-visual img,
	.total-assurance-blog-hero__visual img,
	.total-assurance-faq-hero__visual img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	.total-assurance-blog-sidebar {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.total-assurance-values-testimonials__grid,
	.total-assurance-why-choose__grid,
	.total-assurance-contact-page__details-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.total-assurance-header__container,
	.total-assurance-hero__container,
	.total-assurance-home-services__container,
	.total-assurance-calculator__container,
	.total-assurance-providers__container,
	.total-assurance-about__container,
	.total-assurance-statistics__container,
	.total-assurance-service-showcase__container,
	.total-assurance-why-choose__container,
	.total-assurance-values-testimonials__container,
	.total-assurance-latest__container,
	.total-assurance-footer__container,
	.total-assurance-about-page__container,
	.total-assurance-team-page__container,
	.total-assurance-contact-page__container,
	.total-assurance-blog-container,
	.total-assurance-faq-page__container,
	.total-assurance-service-detail__container {
		width: min(calc(100% - 40px), var(--ta-container-width, 1280px));
	}

	.total-assurance-home-services__grid,
	.total-assurance-service-showcase__grid,
	.total-assurance-why-choose__grid,
	.total-assurance-values-testimonials__grid,
	.total-assurance-latest__grid,
	.total-assurance-blog-grid,
	.total-assurance-blog-sidebar,
	.total-assurance-contact-page__details-grid,
	.total-assurance-footer__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.total-assurance-hero__actions,
	.total-assurance-contact-page__actions,
	.total-assurance-service-detail__actions,
	.total-assurance-cta__actions {
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.total-assurance-hero__actions a,
	.total-assurance-contact-page__actions a,
	.total-assurance-service-detail__actions a,
	.total-assurance-cta__actions a,
	.total-assurance-hero__actions button,
	.total-assurance-contact-page__actions button {
		width: 100%;
		justify-content: center;
	}

	.total-assurance-hero__feature-card,
	.total-assurance-calculator__feature-card,
	.total-assurance-contact-page__trust-badge {
		position: relative;
		inset: auto;
		width: 100%;
		margin-top: 20px;
		transform: none;
	}

	.total-assurance-statistics__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.total-assurance-faq-page__categories {
		position: static;
		display: flex;
		gap: 12px;
		overflow-x: auto;
		scrollbar-width: thin;
		-webkit-overflow-scrolling: touch;
	}

	.total-assurance-faq-page__category {
		flex: 0 0 auto;
	}

	.total-assurance-footer__bottom {
		align-items: flex-start;
		flex-direction: column;
		gap: 16px;
	}

	.total-assurance-footer__map iframe {
		width: 100%;
		min-height: 220px;
	}

	input,
	select,
	textarea,
	button {
		max-width: 100%;
	}
}

@media (max-width: 575px) {
	.total-assurance-header__container,
	.total-assurance-hero__container,
	.total-assurance-home-services__container,
	.total-assurance-calculator__container,
	.total-assurance-providers__container,
	.total-assurance-about__container,
	.total-assurance-statistics__container,
	.total-assurance-service-showcase__container,
	.total-assurance-why-choose__container,
	.total-assurance-values-testimonials__container,
	.total-assurance-latest__container,
	.total-assurance-footer__container,
	.total-assurance-about-page__container,
	.total-assurance-team-page__container,
	.total-assurance-contact-page__container,
	.total-assurance-blog-container,
	.total-assurance-faq-page__container,
	.total-assurance-service-detail__container {
		width: min(calc(100% - 32px), var(--ta-container-width, 1280px));
	}

	.total-assurance-statistics__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.total-assurance-hero h1,
	.total-assurance-about-page__hero h1,
	.total-assurance-team-banner h1,
	.total-assurance-contact-page__hero h1,
	.total-assurance-blog-hero h1,
	.total-assurance-faq-hero h1,
	.total-assurance-service-detail__hero h1 {
		overflow-wrap: anywhere;
		hyphens: auto;
	}
}

/*
 * Align internal-page banner copy with the Home hero on desktop.
 * Page-specific artwork, dimensions, and responsive stacking stay unchanged.
 */
@media (min-width: 992px) {
	.total-assurance-about-page__banner-content,
	.total-assurance-team-banner__content,
	.total-assurance-contact-hero__content,
	.total-assurance-services-hero__content,
	.total-assurance-faq-hero__content,
	.total-assurance-service-detail__hero-content {
		box-sizing: border-box;
		padding: 50px 40px 50px 0;
	}

	.total-assurance-blog-hero__content {
		box-sizing: border-box;
		padding-top: 50px;
		padding-right: 40px;
		padding-bottom: 50px;
	}
}

/*
 * Home page responsive alignment refinements.
 * These rules intentionally stop below the desktop breakpoint so the
 * established desktop presentation remains unchanged.
 */
@media (max-width: 991px) {
	body.home {
		overflow-x: hidden;
	}

	body.home .total-assurance-hero__stats {
		align-items: flex-start;
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 0;
		justify-content: space-between;
		max-width: 100%;
		width: 100%;
	}

	body.home .total-assurance-hero__stat {
		align-items: center;
		flex: 1 1 0;
		flex-direction: column;
		gap: 8px;
		justify-content: flex-start;
		min-width: 0;
		padding: 0 16px;
		text-align: center;
	}

	body.home .total-assurance-hero__stat + .total-assurance-hero__stat {
		border-left: 1px solid rgba(6, 26, 58, 0.18);
	}

	body.home .total-assurance-hero__stat p {
		align-items: center;
		gap: 1px;
		justify-content: flex-start;
		line-height: 1.3;
		margin: 0;
		min-width: 0;
	}

	body.home .total-assurance-hero__stat svg {
		flex: 0 0 auto;
		height: 30px;
		margin: 0;
		width: 30px;
	}

	body.home .total-assurance-hero__feature-card {
		left: 50%;
		margin-left: 0;
		margin-right: 0;
		max-width: calc(100% - 40px);
		right: auto;
		transform: translateX(-50%);
	}

	body.home .total-assurance-home-services__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.home .total-assurance-home-services__grid > .total-assurance-service-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		justify-self: center;
		max-width: calc(50% - 11px);
		width: 100%;
	}
}

@media (max-width: 720px) {
	body.home .total-assurance-hero__feature-card {
		left: auto;
		margin: -32px auto 30px;
		max-width: calc(100% - 40px);
		right: auto;
		transform: none;
		width: calc(100% - 40px);
	}

	body.home .total-assurance-home-services__grid {
		gap: 16px;
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
	}

	body.home .total-assurance-home-services__grid > .total-assurance-service-card,
	body.home .total-assurance-home-services__grid > .total-assurance-service-card:last-child:nth-child(odd) {
		grid-column: auto;
		justify-self: stretch;
		margin-left: auto;
		margin-right: auto;
		max-width: none;
		width: 100%;
	}
}

@media (max-width: 575px) {
	body.home .total-assurance-hero__stat {
		align-items: center !important;
		display: flex !important;
		flex-direction: column;
		gap: 7px !important;
		height: auto !important;
		justify-content: flex-start !important;
		min-height: 0 !important;
		padding: 0 8px;
	}

	body.home .total-assurance-hero__stat svg {
		flex: 0 0 auto;
		height: 27px;
		margin: 0 !important;
		width: 27px;
	}

	body.home .total-assurance-hero__stat p {
		gap: 0;
		font-size: 11px;
		justify-content: flex-start !important;
		line-height: 1.35;
		margin: 0 !important;
		padding: 0 !important;
	}

	body.home .total-assurance-hero__stat strong {
		font-size: 12px;
		line-height: 1.3;
	}

	body.home .total-assurance-home-services {
		padding-left: 0;
		padding-right: 0;
	}
}

/* Keep the homepage hero artwork edge-to-edge on tablet and mobile. */
@media (max-width: 991px) {
	body.home .total-assurance-hero__visual {
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		max-width: none;
		width: 100vw;
	}
}

