/*
 * WordPress-only additions on top of main.css (the reference build's own
 * stylesheet, kept unmodified). Keep this file small: anything visual that
 * the reference already styles belongs to main.css.
 */

/* The brand shows the full logo image instead of the reference's icon + wordmark. */
.brand-logo {
	display: block;
	height: 52px;
	width: auto;
}

/* Footer brand keeps the reference brand block's 39px height. */
.footer-brand .brand-logo {
	height: 39px;
}

/* Sticky header sits below the admin bar for logged-in editors. */
.admin-bar .header {
	top: 32px;
}
@media (max-width: 782px) {
	.admin-bar .header {
		top: 46px;
	}
}
@media (max-width: 600px) {
	.admin-bar .header {
		top: 0;
	}
}

/* Mobile menu button swaps between the menu and close icons. */
.menu-button > span {
	display: block;
	line-height: 0;
}
.menu-button__close,
.menu-button[aria-expanded="true"] .menu-button__open {
	display: none !important;
}
.menu-button[aria-expanded="true"] .menu-button__close {
	display: block !important;
}

/* Spam trap on lead forms — hidden from people, visible to bots. */
.booking-form__hp {
	height: 1px;
	left: -9999px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
}
.booking-form {
	position: relative;
}
.booking-form button[disabled] {
	cursor: wait;
	opacity: 0.7;
}

/* The reference hides inactive steps/panels by not rendering them; here they are [hidden]. */
.apply-step[hidden],
.track-panel[hidden] {
	display: none;
}

/*
 * Photo slots added from the imagery brief (not in the reference design):
 * About facility + technology, Contact, and each centre's exterior/interior.
 */
.photo-wide {
	border-radius: 6px;
	box-shadow: 0 15px 40px #0d2a3314;
	display: block;
	height: 440px;
	margin: 0 0 60px;
	object-fit: cover;
	width: 100%;
}
.band .photo-wide {
	height: 380px;
	margin: 34px 0 0;
}
.article-layout .photo-wide {
	height: 300px;
	margin: 0 0 32px;
}
.photo-pair {
	display: grid;
	gap: 14px;
	grid-template-columns: 1fr 1fr;
	margin-bottom: 24px;
}
.centre-photo {
	border-radius: 6px;
	display: block;
	height: 220px;
	object-fit: cover;
	width: 100%;
}
@media (max-width: 780px) {
	.photo-wide {
		height: 240px;
		margin-bottom: 36px;
	}
	.band .photo-wide,
	.article-layout .photo-wide {
		height: 220px;
	}
	.photo-pair {
		grid-template-columns: 1fr;
	}
}

/* Doctor stats band shows only the stats a doctor has data for. */
.stats[data-count="3"] {
	grid-template-columns: repeat(3, 1fr);
}
.stats[data-count="2"] {
	grid-template-columns: repeat(2, 1fr);
}
.stats[data-count="1"] {
	grid-template-columns: 1fr;
}
@media (max-width: 780px) {
	.stats[data-count="3"] {
		grid-template-columns: repeat(2, 1fr);
	}
}

/*
 * Photos render as real <img> elements (indexable, alt text, responsive srcset)
 * filling the same boxes the reference styles as background images.
 */
.ic-cover {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.doctor-image .ic-cover {
	object-position: center 20%;
}
/* The doctors listing's photo is a plain <img> (as in the reference): fill the card's width, same crop. */
img.doctor-image {
	display: block;
	object-fit: cover;
	object-position: center 20%;
	width: 100%;
}
.fellowship-faculty-photo .ic-cover {
	border-radius: 50%;
	object-position: center 20%;
}

/*
 * Article bodies written in the editor (including the articles carried over
 * from the old iclinix.in): images, embeds and tables stay inside the column.
 */
.article-layout article img,
.article-layout article video,
.article-layout article iframe {
	height: auto;
	max-width: 100%;
}
.article-layout article iframe {
	aspect-ratio: 16 / 9;
	width: 100%;
}
.article-layout article figure {
	margin: 28px 0;
}
.article-layout article figcaption {
	color: #667085;
	font-size: 0.875rem;
	margin-top: 8px;
}
.article-layout article ul,
.article-layout article ol {
	list-style: disc;
	margin: 0 0 20px;
	padding-left: 1.4em;
}
.article-layout article ol {
	list-style: decimal;
}
.article-layout article li {
	margin-bottom: 8px;
}
.article-layout article table {
	border-collapse: collapse;
	display: block;
	margin: 24px 0;
	overflow-x: auto;
	width: 100%;
}
.article-layout article th,
.article-layout article td {
	border: 1px solid rgba(0, 0, 0, 0.12);
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
}
.article-layout article h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-top: 26px;
}
.article-layout article p a,
.article-layout article li a,
.article-layout article td a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/*
 * Card titles and step numbers keep the reference's h3 / <b> look but render as
 * role="heading" / <span>: pages list dozens of cards, and SEO checkers flag that
 * many heading and bold tags. Screen readers still announce the titles as headings.
 */
.ic-h3 {
	display: block;
	font-family: Manrope, sans-serif;
	font-size: 1.15rem;
	font-weight: 700;
	letter-spacing: -0.005em;
	line-height: 1.12;
	margin: 0 0 18px;
}
.card-copy .ic-h3 {
	color: var(--navy);
	font-size: 16px;
	margin: 10px 0 8px;
}
.doctor-card .ic-h3 {
	color: var(--navy);
	margin: 5px 0 8px;
}
.rich-grid .ic-h3 {
	color: var(--navy);
	margin: 12px 0 8px;
}
.rich-grid.article-cards .ic-h3 {
	min-height: 48px;
}
.journey .ic-h3 {
	color: #fff;
	margin: 14px 0 8px;
}
.footer-grid .ic-h3 {
	color: #7dd0c2;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.rich-grid .ic-num {
	color: var(--teal);
	font: 800 12px Manrope;
	letter-spacing: 0.15em;
}
.journey .ic-num {
	color: var(--teal-2);
	display: block;
	font: 800 14px Manrope;
	letter-spacing: 0.14em;
}

/* Whole card clickable; the link itself is only the title. */
.ic-link-card {
	position: relative;
}
.ic-stretched::after {
	content: "";
	inset: 0;
	position: absolute;
	z-index: 1;
}
.ic-stretched:focus-visible {
	outline: none;
}
.ic-stretched:focus-visible::after {
	border-radius: 6px;
	outline: 2px solid var(--teal);
	outline-offset: -2px;
}

/*
 * Extra sections on treatment pages (template-parts/treatment-section.php):
 * the reference's own grids, a three-card row across the full width, room
 * under the sticky header when a link jumps to one, and a highlighted note.
 */
@media (min-width: 1101px) {
	.compare-grid[data-count="3"] {
		grid-template-columns: repeat(3, 1fr);
	}
}
.ic-extra-section {
	scroll-margin-top: 110px;
}
.section-head + .ic-extra-list,
.compare-grid + .ic-extra-list {
	margin-top: 20px;
}
.ic-note {
	background: #eef7f4;
	border-left: 3px solid var(--teal);
	margin-top: 24px;
	padding: 18px 22px;
}
.ic-note p {
	color: var(--ink);
	margin: 0;
}
.ic-extra-link {
	margin-top: 24px;
}

/*
 * Testimonials: Instagram reels in a swipeable row of phone-width cards
 * (Instagram's player needs at least 326px), arrows when the row overflows.
 */
.ic-reels {
	position: relative;
}
.ic-reels__track {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	padding: 6px 2px 18px;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.ic-reels__track::-webkit-scrollbar {
	display: none;
}
.ic-reel {
	flex: 0 0 340px;
	margin: 0;
	scroll-snap-align: start;
}
.ic-reel__frame {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: 0 15px 40px #0d2a3314;
	overflow: hidden;
}
.ic-reel iframe {
	border: 0;
	display: block;
	height: 760px;
	width: 100%;
}
.ic-reels__nav {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 6px;
}
.ic-reels__nav[hidden] {
	display: none;
}
.ic-reels__nav button {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--navy);
	cursor: pointer;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	width: 44px;
}
.ic-reels__nav button:hover:not(:disabled) {
	border-color: var(--teal);
	color: var(--teal);
}
.ic-reels__nav button:disabled {
	cursor: default;
	opacity: 0.35;
}
@media (max-width: 780px) {
	.ic-reel {
		flex-basis: min(340px, 86vw);
	}
}
/* YouTube Shorts: a 9:16 card, thumbnail + play button until tapped, then the player. */
.ic-reel--youtube {
	flex-basis: 280px;
}
.ic-reel--youtube .ic-reel__frame {
	aspect-ratio: 9 / 16;
	background: var(--navy);
}
.ic-reel--youtube iframe {
	height: 100%;
}
.ic-yt {
	background: none;
	border: 0;
	cursor: pointer;
	display: block;
	height: 100%;
	padding: 0;
	position: relative;
	width: 100%;
}
.ic-yt img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}
.ic-yt__play {
	align-items: center;
	background: #ffffffe6;
	border-radius: 50%;
	box-shadow: 0 8px 24px #0d2a3340;
	color: var(--teal);
	display: flex;
	height: 64px;
	justify-content: center;
	left: 50%;
	padding-left: 4px;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: transform 0.2s;
	width: 64px;
}
.ic-yt:hover .ic-yt__play,
.ic-yt:focus-visible .ic-yt__play {
	transform: translate(-50%, -50%) scale(1.08);
}
.ic-yt__play svg {
	fill: currentColor;
}
.ic-reel figcaption,
.ic-gallery__item figcaption {
	color: var(--muted);
	font-size: 14px;
	margin-top: 10px;
}

/* Gallery: editor-picked photos in a square-cropped grid. */
.ic-gallery {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.ic-gallery__item {
	margin: 0;
}
.ic-gallery__img {
	aspect-ratio: 1;
	border-radius: 6px;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

/*
 * Blog: the featured image opens each article and tops each card on /blog/
 * (not in the reference design). Cards without one get a plain panel so the
 * grid stays even.
 */
.article-layout .ic-article-photo {
	aspect-ratio: 16 / 9;
	height: auto;
}
.ic-card-photo {
	align-items: center;
	aspect-ratio: 16 / 9;
	background: #e7f4f1;
	border-radius: 4px;
	color: var(--teal);
	display: flex;
	justify-content: center;
	margin-bottom: 16px;
	overflow: hidden;
}
.ic-card-photo__img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

/* Blog: filter chips are links; page links under the cards. */
a.chip {
	display: inline-block;
	text-decoration: none;
}
.ic-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 40px;
}
.ic-pagination .page-numbers {
	align-items: center;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	color: var(--ink);
	display: inline-flex;
	font-size: 13px;
	font-weight: 700;
	justify-content: center;
	min-width: 40px;
	padding: 10px 14px;
	text-decoration: none;
}
.ic-pagination a.page-numbers:hover {
	border-color: var(--teal);
	color: var(--teal);
}
.ic-pagination .page-numbers.current {
	background: var(--navy);
	border-color: var(--navy);
	color: #fff;
}
.ic-pagination .page-numbers.dots {
	background: none;
	border-color: transparent;
	min-width: 0;
	padding: 10px 2px;
}
.ic-sr-only {
	clip: rect(0 0 0 0);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/*
 * Insurer strip (template-parts/insurer-marquee.php): the list twice in one
 * track that slides left by half its width, so the loop is seamless. The
 * edges fade; hover or focus pauses it; reduced motion shows a still,
 * swipeable row instead.
 */
.ic-marquee-band {
	background: #fff;
	border-bottom: 1px solid var(--line);
	padding: 26px 0 30px;
}
.ic-marquee-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	justify-content: space-between;
	margin-bottom: 16px;
}
.ic-marquee {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
	mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
	overflow: hidden;
}
.section-head + .ic-marquee {
	margin-bottom: 28px;
}
.ic-marquee__track {
	animation: ic-marquee var(--ic-marquee-duration, 90s) linear infinite;
	display: flex;
	width: max-content;
}
.ic-marquee:hover .ic-marquee__track,
.ic-marquee:focus-within .ic-marquee__track {
	animation-play-state: paused;
}
.ic-marquee__list {
	display: flex;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0 12px 0 0;
}
.ic-marquee__list .tpa-chip {
	white-space: nowrap;
}
@keyframes ic-marquee {
	to {
		transform: translateX(-50%);
	}
}
@media (prefers-reduced-motion: reduce) {
	.ic-marquee {
		-webkit-mask-image: none;
		mask-image: none;
		overflow-x: auto;
	}
	.ic-marquee__track {
		animation: none;
	}
	.ic-marquee__list[aria-hidden="true"] {
		display: none;
	}
}
