/* ==========================================================
   BFMS - Responsive
   ========================================================== */

/* ==========================================================
   Compact desktop nav: iPad Pro landscape (992px) to 1260px
   ========================================================== */
@media (min-width: 992px) and (max-width: 1260px) {
	.header-inner {
		padding: 0 20px;
		gap: 16px;
	}

	.main-nav {
		gap: 10px;
	}

	.main-nav > ul {
		gap: 2px;
	}

	.main-nav > ul > li > a {
		font-size: 12.5px;
		padding: 10px 4px;
	}

	.btn-connect {
		font-size: 13px;
		padding: 0 12px;
		height: 38px;
	}
}

/* Page layout adjustments: 992px – 1100px */
@media (max-width: 1280px) {
	.offerings-grid {
		grid-template-columns: 1.4fr 1fr;
	}
}

@media (max-width: 1100px) {
	/* Home layout */
	.solution-row,
	.solution-row.reverse {
		grid-template-columns: 1fr 1.3fr;
	}

	.solution-row.reverse {
		grid-template-columns: 1.3fr 1fr;
	}

	.clients-grid {
		flex-wrap: wrap;
		justify-content: center;
	}

	.newsletter-card {
		grid-template-columns: 1fr 1.2fr;
	}

	.newsletter-content {
		padding: 36px;
	}

	.newsletter-content h3 {
		font-size: 26px;
		line-height: 32px;
	}

	.newsletter-content p {
		font-size: 17px;
		line-height: 24px;
	}

	/* Services */
	.workplace-box {
		grid-template-columns: 1fr 1fr;
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 40px;
	}
}

/* ==========================================================
   Mobile / tablet hamburger menu  (≤ 991px)
   iPad Pro portrait (834px) and below → hamburger
   iPad Pro landscape (1024px) and above → full desktop nav
   ========================================================== */
@media (max-width: 991px) {
	/* Show hamburger button */
	.menu-toggle {
		display: flex;
		position: relative;
		z-index: 120;
		margin-left: auto;
	}

	/* Slide-in nav panel */
	.main-nav {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		width: 320px;
		max-width: 88%;
		height: 100vh;
		height: 100dvh;
		padding: 90px 28px 40px;
		background: var(--black);
		overflow-y: scroll;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-y: contain;
		transform: translateX(100%);
		transition: transform .35s ease;
		z-index: 110;
	}

	body.menu-open .main-nav {
		transform: translateX(0);
	}

	body.menu-open .menu-toggle .icon-open {
		display: none;
	}

	body.menu-open .menu-toggle .icon-close {
		display: block;
	}

	/* body scroll lock is handled by JS (position:fixed approach for iOS) */

	/* Nav list vertical */
	.main-nav > ul {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		flex: none;
		gap: 0;
		width: 100%;
		margin-bottom: 24px;
	}

	.main-nav > .btn-connect {
		display: inline-flex;
	}

	.main-nav > ul > li {
		width: 100%;
		border-bottom: 1px solid #222;
	}

	.main-nav > ul > li > a {
		font-size: 16px;
		padding: 14px 0;
		justify-content: space-between;
	}

	/* Dropdown */
	.dropdown {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		display: none;
		background: transparent;
		box-shadow: none;
		padding: 0 0 10px;
		min-width: 0;
	}

	.has-dropdown.open .dropdown {
		display: block;
	}

	.has-dropdown:hover > a img {
		transform: none;
	}

	.has-dropdown.open > a img {
		transform: rotate(180deg);
	}

	/* Mega-menu (mobile: flat list only) */
	.main-nav > ul > li.has-mega {
		position: relative;
	}

	.mega-menu {
		position: static;
		display: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		background: transparent;
		backdrop-filter: none;
		box-shadow: none;
		border-radius: 0;
		min-height: 0;
	}

	.mega-menu::before,
	.mega-intro,
	.mega-image {
		display: none;
	}

	.has-mega.open .mega-menu {
		display: block;
	}

	.mega-links,
	.mega-links-2col {
		display: block;
		padding: 0 0 10px;
	}

	.mega-links a {
		display: block;
		color: var(--muted);
		font-size: 14px;
		padding: 10px 14px;
	}

	.mega-links a:hover {
		color: var(--orange);
	}

	.dropdown li a {
		color: var(--muted);
		padding: 8px 12px;
	}

	.dropdown li a:hover {
		background: transparent;
	}

	.main-nav > ul > li > a::after {
		display: none;
	}

	.main-nav > ul > li.active > a {
		color: var(--orange);
	}
}

@media (max-width: 991px) {
	.section {
		padding: 80px 0 70px;
	}

	.section-title {
		font-size: 40px;
		margin-bottom: 44px;
	}

	.solutions-section .section-title,
	.features-section .section-title {
		line-height: 1.3;
	}

	.hero h1 {
		font-size: 46px;
		line-height: 58px;
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		row-gap: 44px;
	}

	.stat-item:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.stat-number {
		font-size: 64px;
		margin-bottom: 24px;
	}

	.stat-item p {
		font-size: 24px;
	}

	.practice-text {
		padding: 30px;
	}

	.practice-text h3 {
		font-size: 30px;
	}

	.certified-grid {
		grid-template-columns: repeat(2, 1fr);
		row-gap: 50px;
	}

	.certified-item:nth-child(3) {
		border-left: 0;
	}

	.newsletter-card {
		grid-template-columns: 1fr;
	}

	.newsletter-image img {
		height: 300px;
	}

	.stay-touch {
		flex-direction: column;
		align-items: flex-start;
		padding: 26px;
	}

	.subscribe-form {
		width: 100%;
	}

	.offerings-grid {
		grid-template-columns: 1fr;
		gap: 36px;
		padding-left: 0;
	}

	.offerings-image img {
		height: 380px;
	}

	.offerings-text p {
		font-size: 20px;
		line-height: 28px;
	}

	.workplace-box {
		grid-template-columns: 1fr;
	}

	.workplace-image img {
		min-height: 0;
		height: 340px;
	}

	.cta-band .container {
		flex-direction: column;
		text-align: center;
		gap: 20px;
	}

	.cta-band h2 {
		font-size: 26px;
	}
}

@media (max-width: 767px) {
	.site-header {
		padding-top: 18px;
	}

	.header-logo img {
		height: 38px;
	}

	.section {
		padding: 64px 0 56px;
	}

	.section-title {
		font-size: 30px;
		padding-bottom: 24px;
		margin-bottom: 36px;
	}

	.section-title::after {
		width: 90px;
	}

	.hero h1 {
		font-size: 32px;
		line-height: 42px;
	}

	.hero-slide,
	.hero-inner {
		padding-bottom: 44px;
	}

	.hero-home .hero-dots {
		top: auto;
		bottom: 24px;
	}

	.hero-inner {
		height: 380px;
	}

	.hero-inner .hero-dots {
		top: auto;
		bottom: 22px;
	}

	.stat-number {
		font-size: 48px;
	}

	.stat-item {
		padding: 0 18px;
	}

	.stat-item p {
		font-size: 20px;
	}

	.solution-row,
	.solution-row.reverse {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.solution-row.reverse .solution-text {
		order: 1;
		text-align: left;
	}

	.solution-row.reverse .solution-image {
		order: 2;
	}

	.solution-row.reverse .link-explore {
		margin-right: 0;
	}

	.solution-text h3 {
		font-size: 28px;
		margin-bottom: 12px;
	}

	.solution-image img {
		height: 240px;
	}

	.solution-row + .solution-row {
		margin-top: 44px;
	}

	.clients-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 30px;
	}

	.client-logo img {
		height: 44px;
		margin: 0 auto;
	}

	.practice-row,
	.practice-row.reverse {
		grid-template-columns: 1fr;
	}

	.practice-row.reverse .practice-image {
		order: 1;
	}

	.practice-row.reverse .practice-text {
		order: 2;
	}

	.practice-image img {
		height: 240px;
	}

	.practice-text {
		padding: 24px 0 36px;
	}

	.certified-item img {
		width: 84px;
		height: 84px;
		margin-bottom: 20px;
	}

	.certified-item p {
		font-size: 17px;
	}

	.newsletter-slider {
		padding: 0;
		margin-bottom: 48px;
	}

	.slider-arrow {
		top: 150px;
		z-index: 3;
	}

	.slider-prev {
		left: 10px;
	}

	.slider-next {
		right: 10px;
	}

	.newsletter-image img {
		height: 240px;
	}

	.newsletter-content {
		padding: 26px 20px;
	}

	.newsletter-content h3 {
		font-size: 22px;
		line-height: 28px;
	}

	.newsletter-content p {
		font-size: 15px;
		line-height: 22px;
	}

	.insights-list {
		margin-bottom: 70px;
	}

	.insight-row {
		height: auto;
		padding: 20px 0;
		font-size: 17px;
	}

	.insight-btn {
		width: 40px;
		height: 40px;
	}

	.stay-touch h3 {
		font-size: 22px;
	}

	.stay-touch p {
		font-size: 15px;
	}

	.offerings-image img {
		height: 260px;
	}

	.offerings-text h2 {
		font-size: 28px;
		margin-bottom: 16px;
	}

	.offerings-text p {
		font-size: 17px;
		line-height: 25px;
	}

	.services-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.service-card {
		height: 300px;
	}

	.service-card-body {
		left: 20px;
		right: 20px;
		bottom: 20px;
	}

	.service-card-body h3 {
		font-size: 21px;
	}

	.workplace-content {
		padding: 32px 22px;
	}

	.workplace-content h2 {
		font-size: 28px;
		line-height: 36px;
	}

	.workplace-image img {
		height: 240px;
	}

	.features-grid {
		grid-template-columns: 1fr;
	}

	.feature-item {
		min-height: 0;
		padding: 30px 24px;
	}

	.feature-item h4 {
		font-size: 17px;
	}

	.feature-item p {
		font-size: 14px;
	}

	.cta-band h2 {
		font-size: 22px;
	}

	.footer-grid {
		grid-template-columns: 1fr;
		gap: 36px;
		padding-bottom: 40px;
	}

	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-bottom-links {
		gap: 24px;
	}
}

/* ==========================================================
   Sustainability page — mobile fixes
   ========================================================== */

/* Tablet: card width fix (620px hardcoded in style.css breaks layout) */
@media (max-width: 992px) {
	.green-practice-card {
		width: 100%;
	}

	.certification-logo img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.green-practice-card {
		width: 100%;
		height: 260px;
	}

	.certification-logo {
		width: 70px;
		height: 70px;
	}

	.certification-logo img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
}

/* ==========================================================
   Employee Corner — responsive fixes
   ========================================================== */

/* Global: ec-card had fixed width:405px — fill grid column */
.ec-section .ec-card {
	width: 100%;
}

/* Global: ev-text had fixed width:400px — go full width */
.ev-section .ev-text {
	width: 100%;
}

/* Tablet (≤991px) */
@media (max-width: 991px) {
	.ev-section .ev-review {
		flex: 0 0 calc((100% - 20px) / 2);
		height: auto;
		min-height: 320px;
	}

	.ev-section .ev-name,
	.ev-section .ev-role {
		font-size: 17px;
	}

	.ev-section .ev-text {
		font-size: 17px;
		line-height: 1.55;
	}

	.ej-section .ej-banner {
		min-height: 360px;
	}

	.ec-section .ec-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.ec-section .ec-card {
		height: 300px;
	}
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
	/* ec-section */
	.ec-section {
		padding: 48px 0 36px;
	}

	.ec-section .ec-heading {
		font-size: 28px;
		margin-bottom: 28px;
	}

	.ec-section .ec-cards {
		grid-template-columns: 1fr;
	}

	.ec-section .ec-card {
		height: 260px;
	}

	.ec-section .ec-card-title {
		font-size: 20px;
	}

	.ec-section .ec-card-text {
		font-size: 14px;
		line-height: 1.5;
	}

	/* es-section */
	.es-section {
		padding: 32px 0 48px;
	}

	.es-section .es-container {
		flex-direction: column;
		gap: 24px;
	}

	.es-section .es-img {
		flex: none;
		width: 100%;
	}

	.es-section .es-title {
		font-size: 28px;
		line-height: 1.3;
	}

	.es-section .es-desc {
		font-size: 16px;
		line-height: 1.6;
	}

	/* ev-section */
	.ev-section {
		padding: 40px 0 48px;
	}

	.ev-section .ev-container {
		padding: 0 16px;
	}

	.ev-section .ev-title {
		font-size: 28px;
	}

	.ev-section .ev-review {
		flex: 0 0 100%;
		min-width: 0;
		height: auto;
		min-height: 0;
		padding: 36px 18px 18px;
	}

	.ev-section .ev-text {
		font-size: 15px;
		line-height: 1.55;
		margin-top: 36px;
	}

	.ev-section .ev-name,
	.ev-section .ev-role {
		font-size: 14px;
	}

	.ev-section .ev-arrow {
		width: 40px;
		height: 40px;
	}

	/* ej-section */
	.ej-section {
		padding: 36px 0 44px;
	}

	.ej-section .ej-banner {
		min-height: 280px;
	}

	.ej-section .ej-content {
		flex-direction: column;
		align-items: flex-start;
		padding: 28px 20px;
		gap: 20px;
	}

	.ej-section .ej-title {
		font-size: 18px;
		line-height: 1.4;
	}

	.ej-section .ej-text {
		font-size: 14px;
	}
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
	.ev-section .ev-review {
		flex: 0 0 100%;
	}

	.ec-section .ec-card {
		height: 240px;
	}
}

/* ==========================================================
   Life @ BFMS mobile menu — ensure links visible & spaced
   ========================================================== */
@media (max-width: 1100px) {
	/* Life @ BFMS mega-menu links in mobile drawer */
	.has-mega .mega-links a {
		font-size: 14px;
		padding: 10px 14px;
		color: #b0b0b0;
		display: block;
	}

	.has-mega .mega-links a:hover {
		color: var(--orange);
	}

	/* Active page link highlight */
	.has-mega.active .mega-links a:hover {
		color: var(--orange);
	}
}

/* ==========================================================
   All-pages responsive fixes
   ========================================================== */

/* ------ Global (all viewports) bug fixes ------ */

/* certification-logo img was 207×207px inside a 105×105px container */
.certification-logo img {
	width: 100%;
	height: 100%;
}

/* hk-gallery-card img had a fixed 506px width — must fill its flex card */
.hk-gallery-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* green-practice-card / standard-card have fixed 620px width inside a
   repeat(2, minmax(0,1fr)) grid — overflow on any viewport < ~1300px */
.green-practice-card,
.standard-card {
	width: 100%;
}

/* ------ Wide desktop (≤ 1280px) ------ */
@media (max-width: 1280px) {
	/* Values: diagram is 1066px fixed and overflows the container
	   between ~1100–1220px viewports */
	.values-section {
		overflow-x: hidden;
	}
}

/* nl-featured fixed column overflows 1200–1280px; capabilities-grid overflows 1100–1280px.
   min-width:992px guards both so mobile single-column rules are never overridden. */
@media (min-width: 992px) and (max-width: 1280px) {
	.nl-featured {
		grid-template-columns: 1fr 1fr;
	}
	.capabilities-grid {
		grid-template-columns: 1fr 1fr;
	}
}

/* ------ Narrow desktop (≤ 1199px) ------ */
@media (max-width: 1199px) {
	/* About: mv-values 7-col is cramped at 1101–1199px;
	   about.css already sets 4-col at 1100px, extend range */
	.mv-values {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ------ Tablet (≤ 991px) ------ */
@media (max-width: 991px) {
	/* Testimonial video section had zero responsive rules */
	.testimonial-video-section {
		padding: 64px 0;
	}

	.testimonial-video-row {
		grid-template-columns: 1fr;
		gap: 28px;
		margin-bottom: 52px;
	}

	.testimonial-video-media {
		height: 300px;
	}

	.testimonial-video-content {
		padding: 0 8px;
	}

	.testimonial-video-content h2 {
		font-size: 28px;
		line-height: 36px;
	}

	.testimonial-video-content > p {
		font-size: 16px;
	}

	.testimonial-text {
		font-size: 17px;
		line-height: 1.6;
	}

	/* USP: commitment banner heading had no tablet reduction */
	.usp-commitment h2 {
		font-size: 40px;
		line-height: 50px;
	}

	/* Services: feature-item had 74px side padding — too wide on tablet */
	.feature-item {
		padding: 40px 36px 28px;
	}

	/* How We Work: reduce oversized font sizes on tablet */
	.hww-subtitle    { font-size: 15px; }
	.hww-list li     { font-size: 14px; }
	.hww-col-label   { font-size: 11px; }
	.hww-col-text    { font-size: 13px; }

	/* Housekeeping: tailored body paragraph was 32px — reduce on tablet */
	.hk-tailored-body > p {
		font-size: 22px;
		line-height: 1.6;
	}
}

/* Contact: hero height fix scoped to tablet only (767px fix lives in contact.css) */
@media (min-width: 768px) and (max-width: 991px) {
	.contact-hero {
		height: 420px;
		padding-bottom: 160px;
	}

	.contact-hero .hero-dots {
		top: 140px;
	}
}

/* ------ Mobile (≤ 767px) ------ */
@media (max-width: 767px) {
	/* Testimonial video: further collapse */
	.testimonial-video-media {
		height: 220px;
	}

	.testimonial-video-content h2 {
		font-size: 24px;
		line-height: 32px;
	}

	.testimonial-text {
		font-size: 15px;
	}

	/* How We Work: mobile font sizes */
	.hww-subtitle    { font-size: 13px; }
	.hww-list li     { font-size: 13px; }
	.hww-col-label   { font-size: 10px; }
	.hww-col-text    { font-size: 12px; }

	/* Housekeeping: tailored body mobile */
	.hk-tailored-body > p {
		font-size: 17px;
	}
}

/* ------ Small mobile (≤ 480px) ------ */
@media (max-width: 480px) {
	.testimonial-video-media {
		height: 180px;
	}
}
