/* Site-specific overrides + mobile responsiveness */

html,
body {
	overflow-x: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

/* Header logo: fixed height 65, keep aspect ratio. Do not resize on sticky. */
#header .header-logo {
	width: auto !important;
	height: auto !important;
	overflow: visible !important;
}

#header .header-logo a {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

#header .header-logo img {
	max-width: none !important;
	width: auto !important;
	height: 65px !important;
	object-fit: contain;
}

/* Sticky only shrinks the bar — logo stays the same size to avoid jumpy/stuck sizing */
html.sticky-header-active #header .header-logo img {
	width: auto !important;
	height: 65px !important;
}

/* Desktop/tablet header: logo left, nav right */
@media (min-width: 992px) {
	.header-container .header-row {
		flex-wrap: nowrap !important;
		align-items: center !important;
	}

	.header-column-logo,
	.header-column-nav-menu {
		order: 0 !important;
		width: auto !important;
		align-self: center !important;
	}

	.header-column-logo {
		flex: 0 0 auto !important;
		align-items: center !important;
	}

	.header-column-nav-menu {
		flex: 1 1 auto !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
	}

	.header-column-nav-menu .header-row,
	.header-column-nav-menu .header-nav,
	.header-column-nav-menu .header-nav-main,
	.header-column-nav-menu .header-nav-main > nav {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
		height: 100%;
		margin-left: auto;
	}

	#header .header-nav-main nav > ul.nav {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
		margin-top: auto !important;
		margin-bottom: auto !important;
	}

	#header .header-nav-main nav > ul > li {
		display: flex !important;
		align-items: center !important;
	}

	#header .header-nav-main nav > ul > li > a.nav-link {
		display: flex !important;
		align-items: center !important;
	}

	.header-top .nav-item-header-top-socials {
		width: auto !important;
	}

	.header-top .header-top-button-make-as-appoitment {
		width: 195px;
		min-width: 195px;
		flex: 0 0 195px;
	}

	#header .header-nav-main nav {
		display: flex !important;
	}

	#header .header-btn-collapse-nav {
		display: none !important;
	}
}

/* Header: collapse contact strip + keep CTA usable on phones */
@media (max-width: 991px) {
	.header-top .header-nav-top > ul {
		flex-wrap: wrap;
		align-items: stretch;
	}

	.header-top .nav-item-header-top-socials {
		width: 100%;
		min-height: 48px;
	}

	.header-top .header-top-socials {
		padding-left: 12px !important;
	}

	.header-top .header-top-button-make-as-appoitment {
		width: auto;
		min-width: 170px;
		flex: 1;
	}

	.header-container .header-row {
		flex-wrap: wrap;
		align-items: center;
	}

	.header-column-logo {
		flex: 1 1 auto;
		min-width: 0;
		order: 1;
	}

	.header-column-logo .header-logo img,
	#header .header-logo img {
		width: auto !important;
		height: 55px !important;
	}

	html.sticky-header-active #header .header-logo img {
		width: auto !important;
		height: 55px !important;
	}

	.header-column-nav-menu {
		flex: 0 0 auto !important;
		order: 2;
	}

	/* Mobile: expand Departments submenu on tap */
	#header .header-nav-main nav > ul > li.dropdown.open > .dropdown-menu {
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
		position: static !important;
		box-shadow: none !important;
		border: 0 !important;
		padding: 0 0 0.5rem 0.75rem !important;
		background: transparent !important;
	}

	#header .header-nav-main nav > ul > li.dropdown > .dropdown-menu .dropdown-item {
		padding-top: 0.45rem;
		padding-bottom: 0.45rem;
	}

	.page-header .breadcrumb {
		margin-bottom: 0.5rem;
	}

	.page-header h1 {
		font-size: 2rem !important;
		line-height: 1.2 !important;
	}
}

@media (max-width: 575px) {
	.header-top .header-top-button-make-as-appoitment a {
		font-size: 11px;
		padding: 0 10px;
		text-align: center;
	}

	.header-column-logo .header-logo img,
	#header .header-logo img {
		width: auto !important;
		height: 48px !important;
	}

	html.sticky-header-active #header .header-logo img {
		width: auto !important;
		height: 48px !important;
	}

	.page-header h1 {
		font-size: 1.75rem !important;
	}
}

/* Service cards: avoid oversized forced heights on phones */
@media (max-width: 991px) {
	.custom-cards .cards-container .card {
		min-height: 0;
		height: auto;
	}

	.custom-cards .cards-container .card .card-body {
		padding: 1.75rem 1.25rem;
	}

	.custom-cards .cards-container .card .card-body img {
		max-width: 120px;
		padding-bottom: 12px;
	}

	.custom-cards .cards-container .card .card-body .card-title {
		font-size: 1.25rem;
	}
}

/* Counters + feature lists in More About */
.more-about .counters {
	flex-wrap: wrap !important;
	row-gap: 1rem;
}

.more-about .counters .counter {
	width: 100%;
}

.more-about .number-counter-text {
	display: block;
	white-space: normal;
	line-height: 1.25;
}

.more-about-features {
	width: 100%;
}

.more-about-features .custom-list-icons {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

.more-about-features .custom-list-icons li {
	line-height: 1.45 !important;
	white-space: normal;
	word-break: break-word;
}

@media (max-width: 1199px) {
	.more-about .custom-list-icons:first-child li {
		padding-right: 0 !important;
	}
}

@media (max-width: 767px) {
	.more-about .counters > [class*="col-"] {
		justify-content: flex-start !important;
	}

	.more-about .number-counter {
		font-size: 2rem !important;
	}

	.more-about .number-counter-text {
		font-size: 0.95rem !important;
	}

	.more-about .custom-list-icons li {
		padding-left: 48px !important;
		padding-right: 0 !important;
		margin-bottom: 0.85rem !important;
	}

	.more-about {
		overflow-x: hidden !important;
	}

	.patient-reviews {
		overflow-x: hidden !important;
	}
}

@media (min-width: 576px) and (max-width: 767px) {
	.more-about .counters > [class*="col-"] {
		flex: 0 0 33.333333%;
		max-width: 33.333333%;
	}

	.more-about .number-counter {
		font-size: 1.75rem !important;
	}

	.more-about .number-counter-text {
		font-size: 0.85rem !important;
	}
}

@media (max-width: 991px) {
	.more-about {
		overflow-x: hidden !important;
	}

	.patient-reviews {
		overflow-x: hidden !important;
	}
}

/* Hero text + buttons */
@media (max-width: 767px) {
	.section-funnel h1 {
		font-size: 1.85rem !important;
		line-height: 1.25 !important;
	}

	.section-funnel h2 {
		font-size: 0.95rem !important;
	}

	.section-funnel .btn,
	.bg-color-primary .btn,
	.btn.px-5 {
		display: inline-block;
		width: auto;
		max-width: 100%;
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
		white-space: normal;
	}

	.owl-carousel-wrapper {
		max-width: 100%;
	}
}

/* Medical services cards + icons */
.medical-services .cards-medical-services .card .card-body img {
	width: 100%;
	max-width: 120px;
	height: auto;
}

@media (max-width: 991px) {
	.medical-services .cards-medical-services .card .card-body img {
		max-width: 140px;
	}
}

@media (max-width: 575px) {
	.medical-services .cards-medical-services .card {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}

	.medical-services .cards-medical-services .card .card-body img {
		max-width: 160px;
		margin-bottom: 1.5rem !important;
	}

	.medical-services .cards-medical-services .card .card-body {
		padding-top: 2.5rem !important;
		padding-bottom: 2.5rem !important;
	}
}

/* Footer top info: make CTAs usable on small screens */
@media (max-width: 1199px) {
	.footer-top-info .footer-top-info-detail {
		padding-right: 0 !important;
		width: 100%;
	}

	.footer-top-info .btn-footer-top-info {
		position: static !important;
		transform: none !important;
		width: 100%;
		max-width: 220px;
		margin-top: 0.75rem;
		margin-right: 0 !important;
	}
}

@media (max-width: 575px) {
	.footer-top-info .col-xl-4 {
		padding: 1.25rem !important;
	}

	.footer-top-info h4 {
		font-size: 1.1rem;
	}

	.footer-top-info .footer-top-info-desc {
		font-size: 0.9rem;
		line-height: 1.45;
	}
}

/* Footer columns */
@media (max-width: 991px) {
	#footer .row.py-5 > [class*="col-"] {
		margin-bottom: 1.5rem;
	}

	#footer .nav-footer {
		flex-wrap: wrap;
		gap: 0 1.5rem;
	}

	#footer .nav-footer > ul.ps-4 {
		padding-left: 0 !important;
	}

	#footer .footer-column-opening-hours .custom-info {
		display: flex;
		justify-content: space-between;
		align-items: baseline;
		gap: 1rem;
	}

	#footer .footer-column-opening-hours .opening-hours-label {
		flex: 0 1 auto;
		padding-right: 0.75rem;
		margin-right: 0.5rem;
	}

	#footer .footer-column-opening-hours .opening-hours-value {
		flex: 0 0 auto;
		text-align: right;
		white-space: nowrap;
	}
}

@media (max-width: 575px) {
	#footer .row.py-5 > .col-lg-2 img {
		max-width: 120px;
	}

	#footer .social-icons {
		margin-top: 0.5rem;
	}
}

/* Contact map + form */
@media (max-width: 767px) {
	#googlemaps.google-map {
		min-height: 280px !important;
	}

	.contact-form .form-control {
		font-size: 16px;
	}

	.contact-form .btn {
		width: 100%;
	}
}

/* Blog / sidebars / cards */
@media (max-width: 991px) {
	.blog-posts .card-body,
	.blog-posts .card .card-body {
		padding-left: 1.25rem;
		padding-right: 1.25rem;
	}
}

@media (max-width: 575px) {
	.pagination {
		flex-wrap: wrap;
		justify-content: center;
	}
}

/* Prevent angled desktop cutouts from creating horizontal scroll */
@media (max-width: 991px) {
	.more-about .col-cuttin-more-about,
	.patient-reviews .col-cutting-patient-reviews {
		min-height: 0;
	}
}

/* Appointment CTA: keep text/button readable on light and dark bands */
.medical-services .appointment-cta p,
.medical-services .appointment-cta h3 {
	color: var(--quaternary) !important;
	text-shadow: none;
}

.appointment-cta .btn-primary {
	color: #fff !important;
	background-color: var(--primary) !important;
	border-color: var(--primary) !important;
}

.appointment-cta .btn-primary:hover {
	background-color: var(--primary-100, #3a9120) !important;
	border-color: var(--primary-100, #3a9120) !important;
	color: #fff !important;
}
