/* The full-bleed 100vw hero trick (.dnsaab-shop-hero) doesn't account for
   the scrollbar width, causing a horizontal scrollbar on tall pages. */
html, body { overflow-x: hidden; }

/* Homepage "For men" section: background image behind the content */
.dnsaab-formen-section { position: relative; }
.dnsaab-formen-bg {
	position: absolute;
	left: 0;
	top: 2.5rem;
	bottom: 0;
	width: auto;
	aspect-ratio: 736 / 977;
	background-image: url('/assets/for-men-section.png');
	background-size: cover;
	background-position: top left;
	background-repeat: no-repeat;
	opacity: 0.9;
	z-index: -20;
	pointer-events: none;
}
@media (max-width: 1023px) {
	.dnsaab-formen-bg { display: none; }
}

/* Homepage "best results" section: doctor photo as background image on
   the right, matching the "For men" technique above */
.dnsaab-bestresults-section { position: relative; }
.dnsaab-bestresults-bg {
	position: absolute;
	right: 0;
	top: 2.5rem;
	bottom: 0;
	width: auto;
	aspect-ratio: 771 / 1080;
	background-image: url('/assets/for-best-results.png');
	background-size: cover;
	background-position: top right;
	background-repeat: no-repeat;
	z-index: 0;
	pointer-events: none;
	/* Scaled from the top-right corner so it grows down/left in place;
	   section has overflow-hidden so excess is clipped. */
	transform: scale(1.08);
	transform-origin: top right;
}
@media (max-width: 1023px) {
	.dnsaab-bestresults-bg { display: none; }
}

/* Homepage hero: reserve space for the fixed header so the logo can't
   start underneath it. Scroll-indicator dots moved into normal flow
   (instead of absolute-positioned) so they stay tied to the CTA buttons. */
.dnsaab-hero {
	padding-top: 150px;
}
.dnsaab-hero-dots {
	margin-top: 2rem;
}

/* Procedure detail pages: bottom-aligned hero content has no reserved
   space for the fixed header, so add padding-top to push it clear. */
.dnsaab-proc-hero {
	padding-top: 150px;
}

/* ===== Navbar cleanup ===== */

/* Show the desktop nav from lg:1024px (was xl:1280px) and shrink text/
   spacing so 10 items + Shop Now fit. Matches all three aria-label
   translations ("Primary"/"Principal"/"أساسي") since the i18n build
   translates the attribute itself on AR/FR static pages. */
header nav[aria-label="Primary"],
header nav[aria-label="Principal"],
header nav[aria-label="أساسي"] {
	gap: 0.7rem !important;
	flex-wrap: nowrap !important;
}
@media (min-width: 1024px) {
	header nav[aria-label="Primary"],
	header nav[aria-label="Principal"],
	header nav[aria-label="أساسي"] {
		display: flex !important;
	}
}
@media (max-width: 1023px) {
	header nav[aria-label="Primary"],
	header nav[aria-label="Principal"],
	header nav[aria-label="أساسي"] {
		display: none !important;
	}
}
header nav[aria-label="Primary"] a,
header nav[aria-label="Principal"] a,
header nav[aria-label="أساسي"] a {
	font-size: 0.66rem !important;
	letter-spacing: 0.05em !important;
	white-space: nowrap !important;
	flex-shrink: 0 !important;
}

/* Show the hamburger below the 1024px breakpoint, matching the nav */
header button[aria-label="Menu"] {
	display: none;
}
@media (max-width: 1023px) {
	header button[aria-label="Menu"] {
		display: inline-flex !important;
	}
}

/* Keep the logo name on one line, never let it break mid-word */
header a[aria-label="Dr. Nader Saab"] {
	flex-shrink: 0;
	white-space: nowrap;
}
header a[aria-label="Dr. Nader Saab"] span {
	white-space: nowrap;
}
header a[aria-label="Dr. Nader Saab"] span:first-child {
	font-size: 1.05rem !important;
}

/* Keep phone/WhatsApp visible but shrink them at 1024–1180px */
@media (min-width: 1024px) and (max-width: 1180px) {
	header a[href^="tel:"],
	header a[href^="https://wa.me/"] {
		font-size: 0.6rem !important;
		letter-spacing: 0.03em !important;
	}
}

/* ===== Language switcher -> compact dropdown ===== */
.dnsaab-lang-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.dnsaab-lang-trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	background: none;
	border: none;
	color: inherit;
	font: inherit;
	font-size: 0.7rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0.2rem 0;
}
.dnsaab-lang-trigger svg {
	width: 10px;
	height: 10px;
	transition: transform 0.15s ease;
}
.dnsaab-lang-switch[data-open="true"] .dnsaab-lang-trigger svg {
	transform: rotate(180deg);
}
.dnsaab-lang-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 64px;
	background: #1a1a1a;
	border: 1px solid rgba(246, 241, 234, 0.15);
	border-radius: 8px;
	padding: 6px;
	display: none;
	flex-direction: column;
	gap: 2px;
	z-index: 200;
}
.dnsaab-lang-switch[data-open="true"] .dnsaab-lang-menu {
	display: flex;
}
.dnsaab-lang-menu a {
	display: block;
	padding: 6px 10px;
	border-radius: 5px;
	font-size: 0.7rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(246, 241, 234, 0.8);
	text-decoration: none;
}
.dnsaab-lang-menu a:hover {
	background: rgba(246, 241, 234, 0.08);
	color: #f6f1ea;
}

/* ===== Mobile menu drawer (built fresh in JS, styled here) ===== */
.dnsaab-mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 9998;
	display: none;
}
.dnsaab-mobile-drawer[data-open="true"] {
	display: block;
}
.dnsaab-mobile-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}
.dnsaab-mobile-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: min(84vw, 360px);
	background: #1a1a1a;
	padding: 5.5rem 1.75rem 2.5rem;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 1.75rem;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.35);
}
.dnsaab-mobile-drawer-close {
	position: absolute;
	top: 1.5rem;
	right: 1.5rem;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(246, 241, 234, 0.3);
	background: none;
	color: #f6f1ea;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.dnsaab-mobile-drawer-nav {
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}
.dnsaab-mobile-drawer-nav a {
	color: #f6f1ea;
	font-size: 0.95rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	opacity: 0.9;
}
.dnsaab-mobile-drawer-nav a:hover {
	opacity: 1;
	color: #c9a35c;
}
.dnsaab-mobile-drawer-divider {
	height: 1px;
	background: rgba(246, 241, 234, 0.12);
}
.dnsaab-mobile-drawer-extras {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}
.dnsaab-mobile-drawer-extras a {
	color: rgba(246, 241, 234, 0.85);
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	text-decoration: none;
}
.dnsaab-mobile-drawer-langs {
	display: flex;
	gap: 0.75rem;
}
.dnsaab-mobile-drawer-langs a {
	color: rgba(246, 241, 234, 0.6);
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
}
.dnsaab-mobile-drawer-langs a[aria-current="true"] {
	color: #c9a35c;
}
body.dnsaab-drawer-locked {
	overflow: hidden;
}

/* ===== Header: transparent on load, solid once scrolled ===== */
header[data-scrolled] {
	background-color: transparent;
}
header[data-scrolled="true"] {
	background-color: rgba(20, 17, 15, 0.97) !important;
	backdrop-filter: blur(6px);
	box-shadow: 0 1px 0 rgba(246, 241, 234, 0.08);
}

/* ===== Fixed social icon bar — left, vertically centered ===== */
/* Separate circular buttons with gaps between them (not one joined pill),
   matching the reference design. */
.dnsaab-social-bar {
	position: fixed;
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9997;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.dnsaab-social-bar a {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 17, 15, 0.75);
	border: 1px solid rgba(246, 241, 234, 0.18);
	color: #f6f1ea;
	opacity: 0.9;
	transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.dnsaab-social-bar a:hover {
	opacity: 1;
	color: #c9a35c;
	border-color: #c9a35c;
	transform: scale(1.06);
}
.dnsaab-social-bar svg {
	width: 15px;
	height: 15px;
}
@media (max-width: 767px) {
	.dnsaab-social-bar { display: none; }
}

/* ===== Before/After gallery grid ===== */
.dnsaab-ba-groups { display: flex; flex-direction: column; gap: 4.5rem; }
.dnsaab-ba-grid {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.75rem;
}
@media (min-width: 640px) { .dnsaab-ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .dnsaab-ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dnsaab-ba-card { background: #fffdf8; }
.dnsaab-ba-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: rgba(20,17,15,0.1); }
.dnsaab-ba-img { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #14110f0d; }
.dnsaab-ba-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dnsaab-ba-tag {
	position: absolute; bottom: 8px; left: 8px;
	background: rgba(20,17,15,0.75); color: #f6f1ea;
	font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
	padding: 3px 8px; border-radius: 999px;
}
.dnsaab-ba-tag--after { background: rgba(201,163,94,0.9); color: #1a1a1a; }
.dnsaab-ba-caption { padding: 0.85rem 0.25rem 0; font-size: 0.78rem; color: rgba(20,17,15,0.55); }

/* Outranks the page's own display:none!important on these */
html body header a[href^="tel:"],
html body header a[href^="https://wa.me/"] {
	display: inline-flex !important;
}

/* Bordered box wrapping phone + WhatsApp together, matching the reference */
.dnsaab-contact-box {
	display: inline-flex !important;
	align-items: center;
	gap: 0.9rem;
	border: 1px solid rgba(201, 163, 94, 0.5);
	border-radius: 999px;
	padding: 0.45rem 1.1rem;
}
.dnsaab-contact-box a {
	display: inline-flex !important;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	white-space: nowrap;
	color: #f6f1ea;
	text-decoration: none;
}
.dnsaab-contact-box a:hover { color: #c9a35c; }
.dnsaab-contact-box svg { width: 13px; height: 13px; flex-shrink: 0; }
@media (max-width: 1180px) {
	.dnsaab-contact-box { padding: 0.4rem 0.85rem; gap: 0.7rem; }
	.dnsaab-contact-box a { font-size: 0.64rem; }
}
@media (max-width: 1023px) {
	.dnsaab-contact-box { display: none !important; }
}

/* Procedure flip cards */
.dnsaab-flip-grid {
	display: grid;
	grid-template-columns: repeat(1, minmax(0, 1fr));
	gap: 1.75rem;
}
@media (min-width: 640px) { .dnsaab-flip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .dnsaab-flip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.dnsaab-flip-card {
	perspective: 1600px;
	aspect-ratio: 3/4;
}
.dnsaab-flip-inner {
	position: relative;
	width: 100%;
	height: 100%;
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
	transform-style: preserve-3d;
}
.dnsaab-flip-card:hover .dnsaab-flip-inner,
.dnsaab-flip-card:focus-within .dnsaab-flip-inner,
.dnsaab-flip-card.is-flipped .dnsaab-flip-inner {
	transform: rotateY(180deg);
}

/* Big, smooth rounded corners on the card itself */
.dnsaab-flip-face {
	position: absolute;
	inset: 0;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
	overflow: hidden;
	border-radius: 28px;
	box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* Front: photo + gradient scrim + title */
.dnsaab-flip-front {
	background: linear-gradient(155deg, #2a2622 0%, #14110f 65%, #0a0908 100%);
}
.dnsaab-flip-front-photo {
	position: absolute;
	inset: 0;
	filter: grayscale(1) contrast(1.05);
}
.dnsaab-flip-front-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dnsaab-flip-monogram {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 6rem;
	color: rgba(246, 241, 234, 0.1);
	pointer-events: none;
}
.dnsaab-flip-front::after {
	/* scrim so the title stays legible over any photo */
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(10,9,8,0.88) 0%, rgba(10,9,8,0.35) 38%, rgba(10,9,8,0) 65%);
	z-index: 1;
}
/* "Lifted panel" effect: title floats up on hover */
.dnsaab-flip-front-label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 1.5rem 1.5rem 1.75rem;
	text-align: center;
	transform: translateY(0) translateZ(0);
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.dnsaab-flip-card:hover .dnsaab-flip-front-label,
.dnsaab-flip-card.is-flipped .dnsaab-flip-front-label {
	transform: translateY(-10px);
}
.dnsaab-flip-front-title {
	font-family: inherit;
	font-weight: 700;
	font-size: 1.1rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
	filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}

/* Back: solid gradient panel, centered content */
.dnsaab-flip-back {
	transform: rotateY(180deg);
	background: linear-gradient(165deg, #1f3a3a 0%, #14110f 75%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}
.dnsaab-flip-back-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5rem;
	text-align: center;
	transform: translateY(14px) translateZ(0);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s, opacity 0.5s ease 0.12s;
	filter: drop-shadow(0 10px 24px rgba(0,0,0,0.4));
}
.dnsaab-flip-card:hover .dnsaab-flip-back-panel,
.dnsaab-flip-card.is-flipped .dnsaab-flip-back-panel {
	transform: translateY(0) translateZ(0);
	opacity: 1;
}
.dnsaab-flip-back-desc {
	font-size: 0.92rem;
	line-height: 1.65;
	color: #f6f1ea;
}
.dnsaab-flip-back-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	padding: 0.75rem 1.75rem;
	border: 1.5px solid #f6f1ea;
	border-radius: 4px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #f6f1ea;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}
.dnsaab-flip-back-cta:hover {
	background: #f6f1ea;
	color: #14110f;
}

.dnsaab-flip-card a.dnsaab-flip-hit {
	position: absolute;
	inset: 0;
	z-index: 5;
}
@media (hover: none) {
	.dnsaab-flip-card.is-flipped .dnsaab-flip-inner { transform: rotateY(180deg); }
}

/* Backface-visibility hides a face visually but not from hit-testing;
   explicitly disable pointer-events on whichever face isn't showing. */
.dnsaab-flip-back { pointer-events: none; }
.dnsaab-flip-card:hover .dnsaab-flip-front,
.dnsaab-flip-card:focus-within .dnsaab-flip-front,
.dnsaab-flip-card.is-flipped .dnsaab-flip-front {
	pointer-events: none;
}
.dnsaab-flip-card:hover .dnsaab-flip-back,
.dnsaab-flip-card:focus-within .dnsaab-flip-back,
.dnsaab-flip-card.is-flipped .dnsaab-flip-back {
	pointer-events: auto;
}

/* ===== Branded loading flash shown briefly on language-switch clicks ===== */
#dnsaab-i18n-loader {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: #0a0908;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.75rem;
	opacity: 1;
	transition: opacity 0.35s ease;
}
#dnsaab-i18n-loader.dnsaab-i18n-loader--out {
	opacity: 0;
	pointer-events: none;
}
#dnsaab-i18n-loader img {
	width: 110px;
	height: auto;
	opacity: 0.95;
}
#dnsaab-i18n-loader .dnsaab-i18n-spinner {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 2px solid rgba(246, 241, 234, 0.18);
	border-top-color: #c9a35c;
	animation: dnsaab-i18n-spin 0.85s linear infinite;
}
@keyframes dnsaab-i18n-spin {
	to {
		transform: rotate(360deg);
	}
}

/* RTL phone-number fix: isolate as LTR so digits don't reorder on Arabic pages */
html[dir="rtl"] a[href^="tel:"],
html[dir="rtl"] a[href^="https://wa.me/"] {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}

/* Homepage "On Instagram" grid: always 6 columns. Tailwind's compiled
   bundle has no grid-cols-6 utility (purged), so a custom class is used
   instead of a lg:grid-cols-6 utility class. */
.dnsaab-insta-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 1px;
	background: rgba(26, 26, 26, 0.1);
}
