/* Arun Surgical Branches — front end. Builds on the theme's Contact page styles
   (.contact-address-wrapper / .contact-address-link / .contact-img). */
:root {
	--asb-brand: var(--wcrfq-accent, #0a3d7a);
	--asb-ink: #1f2937;
	--asb-muted: #6b7280;
	--asb-line: #e5e7eb;
	--asb-soft: #f5f8fc;
	--asb-wa: #128c4b;
	--asb-radius: 12px;
}

.asb-branch { padding: 0 0 24px; }
.asb-branch > section { margin-bottom: 56px; }
.asb-branch .section-title h2 { margin-bottom: 6px; }
.asb-branch .section-title p { margin-bottom: 0; }

/* Badges */
.asb-badge {
	display: inline-block;
	margin-bottom: 10px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--asb-soft);
	color: var(--asb-brand);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .4px;
	text-transform: uppercase;
}
.asb-badge--main { background: var(--asb-brand); color: #fff; }

/* Open now */
.asb-open {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	font-size: 14px;
	font-weight: 600;
}
.asb-open::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.asb-open.is-open { color: #15803d; }
.asb-open.is-closed { color: #b45309; }

/* Contact list tweaks */
.asb-branch .contact-address-link li,
.asb-location .contact-address-link li { display: flex; align-items: flex-start; }
.asb-branch .contact-address-icon,
.asb-location .contact-address-icon { flex: 0 0 auto; }
.asb-branch .contact-address-text h4 a,
.asb-location .contact-address-text h4 a { color: inherit; }
.asb-branch .contact-address-text h4 a:hover,
.asb-location .contact-address-text h4 a:hover { color: var(--asb-brand); }
.asb-inline-link { display: inline-block; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--asb-brand) !important; }

/* Buttons */
.asb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.asb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 18px;
	border: 1px solid var(--asb-line);
	border-radius: 999px;
	background: #fff;
	color: var(--asb-ink) !important;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	transition: background .2s, border-color .2s, box-shadow .2s;
}
.asb-btn:hover { border-color: var(--asb-brand); box-shadow: 0 6px 16px rgba(10, 61, 122, .12); }
.asb-btn--primary { background: var(--asb-brand); border-color: var(--asb-brand); color: #fff !important; }
.asb-btn--whatsapp { background: var(--asb-wa); border-color: var(--asb-wa); color: #fff !important; }
.asb-btn--link { border-color: transparent; color: var(--asb-brand) !important; padding: 0 8px; }
.asb-btn--link:hover { box-shadow: none; text-decoration: underline !important; }
.asb-btn:focus-visible,
.asb-chip:focus-visible { outline: 3px solid rgba(10, 61, 122, .35); outline-offset: 2px; }

/* Social */
.asb-social { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.asb-social li { margin: 0; }
.asb-social li::before { display: none; }
.asb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--asb-line);
	border-radius: 999px;
	color: var(--asb-muted) !important;
	font-size: 13px;
}
.asb-social a:hover { color: var(--asb-brand) !important; border-color: var(--asb-brand); }

/* Image / map */
.asb-branch__img { border-radius: var(--asb-radius); overflow: hidden; }
.asb-branch__img img { display: block; width: 100%; height: auto; border-radius: var(--asb-radius); }
.asb-map { display: block; width: 100%; height: 420px; border: 0; border-radius: var(--asb-radius); background: var(--asb-soft); }
.asb-map--side { height: 480px; }
.asb-map--card { height: 220px; margin-top: 16px; }
.asb-branch__about { max-width: 820px; margin-left: auto; margin-right: auto; font-size: 16px; line-height: 1.8; }

/* Message form section */
.asb-branch__form { max-width: 860px; margin-left: auto; margin-right: auto; }

/* All-branches grid (Contact page) */
.asb-grid__col { display: flex; margin-bottom: 30px; }
.asb-location {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 24px;
	border: 1px solid var(--asb-line);
	border-radius: var(--asb-radius);
	background: #fff;
	transition: box-shadow .2s;
}
.asb-location:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .07); }
.asb-location__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.asb-location__title { margin: 0; font-size: 22px; line-height: 1.3; }
.asb-location__title a { color: var(--asb-ink); }
.asb-location__title a:hover { color: var(--asb-brand); }
.asb-location .asb-badge { margin: 0; white-space: nowrap; }
.asb-location .asb-open { margin-top: 6px; }
.asb-location .asb-map--card { margin-top: auto; }
.asb-location .asb-actions { margin-bottom: 16px; }

/* Compact cards (other branches / footer) */
.asb-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.asb-card {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 18px;
	border: 1px solid var(--asb-line);
	border-radius: var(--asb-radius);
	background: #fff;
}
.asb-card::before { display: none; }
.asb-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.asb-card__title { margin: 0; font-size: 17px; line-height: 1.35; }
.asb-card__title a { color: var(--asb-ink); }
.asb-card .asb-badge { margin: 0; font-size: 10px; }
.asb-card__addr { display: flex; gap: 6px; margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--asb-muted); }
.asb-card__addr .asb-icon { flex: 0 0 auto; margin-top: 3px; width: 16px; height: 16px; }
.asb-card__open { margin: 0 0 8px; }
.asb-card__open .asb-open { margin: 0; font-size: 13px; }
.asb-card__actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.asb-chip {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid var(--asb-line);
	border-radius: 999px;
	color: var(--asb-ink) !important;
	font-size: 13px;
	font-weight: 600;
}
.asb-chip .asb-icon { width: 15px; height: 15px; }
.asb-chip:hover { border-color: var(--asb-brand); color: var(--asb-brand) !important; }
.asb-chip--wa { color: var(--asb-wa) !important; }
.asb-card__more { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; font-size: 14px; font-weight: 600; color: var(--asb-brand) !important; }
.asb-card__more .asb-icon { width: 15px; height: 15px; }

/* Sticky mobile action bar on branch pages */
.asb-sticky { display: none; }
@media (max-width: 767px) {
	.asb-branch > section { margin-bottom: 36px; }
	.asb-branch__img { margin-top: 24px; }
	.asb-map { height: 300px; }
	.asb-map--side { height: 300px; }
	.asb-actions .asb-btn { flex: 1 1 calc(50% - 5px); }
	.asb-location { padding: 18px; }
	.asb-location__title { font-size: 19px; }
	.asb-sticky {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9980;
		display: flex;
		gap: 8px;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .97);
		box-shadow: 0 -6px 20px rgba(15, 23, 42, .1);
	}
	.asb-sticky .asb-btn { flex: 1 1 0; min-height: 48px; }
	.asb-sticky .asb-btn:last-child { flex: 0 0 48px; padding: 0; }
	body:has(.asb-sticky) { padding-bottom: 72px; }
	body:has(.asb-sticky) #scrollUp { bottom: 90px !important; }
	body:has(.asb-sticky) .wc-rfq-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Theme-proofing + card polish
   Branch shortcodes sit inside page content, where the theme's blog styles
   (.klb-post ul li { padding:0 }, .klb-post h3 { 24.5px; margin:10px 0 })
   flattened the cards. These selectors out-rank them (0,2,2 vs 0,1,2).
   ========================================================================== */

/* Compact cards: equal height, 4-up on desktop, 2-up tablet, 1-up phone */
ul.asb-cards {
	display: grid;
	/* auto-fit: 3 "other branches" fill the row instead of leaving a gap */
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 20px;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}
@media (max-width: 575px)  { ul.asb-cards { grid-template-columns: 1fr; gap: 14px; } }

ul.asb-cards > li.asb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 20px 20px 0;
	border: 1px solid var(--asb-line);
	border-radius: var(--asb-radius);
	background: #fff;
	line-height: 1.5;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
ul.asb-cards > li.asb-card::before,
ul.asb-cards > li.asb-card::after { display: none; content: none; }
ul.asb-cards > li.asb-card:hover {
	border-color: #d6e2f0;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.asb-card .asb-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.asb-card .asb-card__title { margin: 0; padding: 0; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.asb-card .asb-card__title a { color: var(--asb-ink); text-decoration: none; }
.asb-card .asb-card__title a:hover { color: var(--asb-brand); }
.asb-card .asb-badge {
	flex: 0 0 auto;
	margin: 2px 0 0;
	padding: 3px 9px;
	font-size: 10.5px;
	line-height: 1.4;
	letter-spacing: .5px;
	white-space: nowrap;
}

.asb-card .asb-card__addr { display: flex; gap: 8px; margin: 0 0 12px; padding: 0; font-size: 14px; line-height: 1.6; color: var(--asb-muted); }
.asb-card .asb-card__addr .asb-icon { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 3px; color: #94a3b8; }
.asb-card .asb-card__open { margin: -4px 0 12px; padding: 0; }
.asb-card .asb-card__open .asb-open { margin: 0; font-size: 13px; }

.asb-card .asb-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.asb-card .asb-chip { min-height: 36px; padding: 0 14px; line-height: 1; text-decoration: none; }

/* Footer row pinned to the bottom so every card's link lines up */
.asb-card .asb-card__foot {
	margin: auto -20px 0;
	padding: 12px 20px;
	border-top: 1px solid var(--asb-line);
	background: var(--asb-soft);
	border-radius: 0 0 var(--asb-radius) var(--asb-radius);
}
.asb-card .asb-card__more { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 600; text-decoration: none; }
.asb-card .asb-card__more:hover .asb-icon { transform: translateX(3px); }
.asb-card .asb-card__more .asb-icon { transition: transform .2s; }

@media (max-width: 575px) {
	ul.asb-cards > li.asb-card { padding: 16px 16px 0; }
	.asb-card .asb-card__foot { margin: auto -16px 0; padding: 12px 16px; }
	.asb-card .asb-card__title { font-size: 17px; }
}

/* All-branches grid (Contact page) */
.asb-grid .row { row-gap: 0; }
.asb-grid .asb-grid__col { display: flex; margin-bottom: 24px; }
.asb-grid .asb-location { padding: 24px; }
.asb-grid .asb-location .asb-location__title { margin: 0; padding: 0; font-size: 21px; font-weight: 600; line-height: 1.3; }
.asb-grid .asb-location .contact-address-link { margin: 0 0 8px; padding: 0; list-style: none; }
.asb-grid .asb-location .contact-address-link li { margin: 0 0 18px; padding: 0; }
.asb-grid .asb-location .contact-address-link li::before { display: none; }
.asb-grid .asb-location .contact-address-text h4 { margin: 4px 0 0; font-size: 16px; line-height: 1.55; }
.asb-grid .asb-location .asb-actions { margin: 4px 0 18px; }
@media (max-width: 767px) {
	.asb-grid .asb-grid__col { margin-bottom: 16px; }
	.asb-grid .asb-location { padding: 18px; }
	.asb-grid .asb-location .asb-location__title { font-size: 19px; }
	.asb-grid .asb-location .contact-address-link li { margin-bottom: 14px; }
	.asb-grid .asb-location .contact-address-icon { margin-right: 14px; }
}

/* Social list inside page content */
ul.asb-social { margin: 0; padding: 0; list-style: none; }
ul.asb-social > li { margin: 0; padding: 0; }

/* Branch image placeholder: site logo, centred */
.asb-logo-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 360px;
	height: 100%;
	padding: 40px 24px;
	border: 1px solid var(--asb-line);
	border-radius: var(--asb-radius);
	background:
		radial-gradient(circle at 50% 35%, #fff 0, #fff 35%, transparent 70%),
		linear-gradient(135deg, var(--asb-soft), #eaf1fa);
	text-align: center;
}
.asb-logo-ph__img { display: block; width: auto !important; max-width: min(320px, 80%); max-height: 140px; height: auto; object-fit: contain; }
.asb-logo-ph__name { font-size: 26px; font-weight: 700; color: var(--asb-ink); }
.asb-logo-ph__caption { font-size: 14px; font-weight: 600; letter-spacing: .4px; color: var(--asb-muted); text-transform: uppercase; }
@media (max-width: 767px) {
	.asb-logo-ph { min-height: 220px; padding: 28px 16px; }
	.asb-logo-ph__img { max-height: 96px; }
}
