/* =========================================================
   Aljawhara Dental — main stylesheet
   Brand: Midnight Green #003333 · Water #CCFFFF ·
          Magic Mint #99FFCC · Canary #FFFF99
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
	font-family: 'Alexandria';
	src: url('../fonts/alexandria-light.ttf') format('truetype');
	font-weight: 300;
	font-display: swap;
}
@font-face {
	font-family: 'Alexandria';
	src: url('../fonts/alexandria-regular.ttf') format('truetype');
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'Alexandria';
	src: url('../fonts/alexandria-medium.ttf') format('truetype');
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: 'Alexandria';
	src: url('../fonts/alexandria-semibold.ttf') format('truetype');
	font-weight: 600;
	font-display: swap;
}
@font-face {
	font-family: 'Alexandria';
	src: url('../fonts/alexandria-bold.ttf') format('truetype');
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: 'Playfair Display';
	src: url('../fonts/playfair-italic.woff2') format('woff2');
	font-style: italic;
	font-weight: 400 700;
	font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
	--midnight: #003333;
	--water: #CCFFFF;
	--mint: #99FFCC;
	--canary: #FFFF99;
	--paper: #ffffff;
	--soft: #f5f5f5;
	--ink: #0a1a1a;
	--radius-card: 2rem;
	--radius-pill: 999px;
	--max-w: 2000px;
	--pad-x: clamp(1rem, 4vw, 2rem);
	--pad-y: clamp(4rem, 9vw, 8rem);
	--font-body: 'Alexandria', 'Segoe UI', Tahoma, sans-serif;
	--font-accent: 'Playfair Display', Georgia, serif;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-weight: 300;
	color: var(--midnight);
	background: var(--paper);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Type ---------- */
.display {
	font-weight: 400;
	letter-spacing: -0.03em;
	line-height: 1.1;
	font-size: clamp(2.25rem, 6vw, 6rem);
	text-align: center;
}
.display em {
	font-family: var(--font-accent);
	font-style: italic;
	font-weight: 500;
}
/* Arabic: no italic serif — use heavier Alexandria for the accent instead */
.lang-ar .display { letter-spacing: 0; line-height: 1.35; font-size: clamp(2rem, 5.4vw, 5.2rem); }
.lang-ar .display em { font-family: var(--font-body); font-style: normal; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	padding: .8rem 1.8rem;
	border-radius: var(--radius-pill);
	border: 1px solid var(--midnight);
	cursor: pointer;
	transition: all .25s ease;
	background: transparent;
	color: var(--midnight);
}
.btn-solid, .btn-pill {
	background: var(--midnight);
	color: var(--mint);
}
.btn-solid:hover, .btn-pill:hover { background: #0a4d4d; }
.btn-outline:hover { background: var(--midnight); color: var(--mint); }

/* ---------- Nav ---------- */
.site-nav {
	position: sticky;
	top: 0;
	z-index: 60;
	background: linear-gradient(to bottom, rgba(255,255,255,.96), rgba(255,255,255,.88));
	backdrop-filter: blur(14px);
	border-bottom: 1px solid rgba(0,51,51,.08);
}
.nav-inner {
	max-width: var(--max-w);
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: .9rem var(--pad-x);
}
.nav-logo { display: flex; align-items: center; gap: .7rem; }
.nav-logo img { width: clamp(34px, 3.4vw, 46px); height: auto; flex: none; }
.nav-logo-text { font-weight: 600; font-size: clamp(1rem, 1.4vw, 1.25rem); white-space: nowrap; letter-spacing: -0.02em; }
.nav-links {
	display: flex;
	gap: clamp(1rem, 2.2vw, 2.2rem);
	font-weight: 400;
	font-size: .95rem;
}
.nav-links a { opacity: .85; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-lang { font-weight: 600; opacity: .6; transition: opacity .2s; }
.nav-lang:hover { opacity: 1; }
.nav-burger {
	display: none;
	flex-direction: column;
	gap: .4rem;
	background: none;
	border: 0;
	padding: .5rem 0;
	cursor: pointer;
}
.nav-burger span { width: 2rem; height: 2px; background: var(--midnight); transition: transform .3s; }
.nav-mobile { display: none; }

@media (max-width: 1100px) {
	.nav-links { display: none; }
	.nav-burger { display: flex; }
	.nav-mobile.is-open { display: block; border-top: 1px solid rgba(0,51,51,.08); }
	.nav-mobile ul { display: flex; flex-direction: column; padding: 1rem var(--pad-x) 1.5rem; gap: 1rem; font-size: 1.1rem; }
}
@media (max-width: 640px) {
	.nav-actions .btn-pill { padding: .55rem 1.1rem; font-size: .85rem; }
}

/* ---------- Sections ---------- */
.site-main section {
	max-width: var(--max-w);
	margin-inline: auto;
	padding: var(--pad-y) var(--pad-x);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(1.5rem, 3vw, 3rem);
}

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 7vw, 6rem); }
.hero-sub {
	text-align: center;
	max-width: 56rem;
	opacity: .8;
	font-size: clamp(.95rem, 1.6vw, 1.25rem);
}
.hero-media {
	width: 100%;
	border-radius: var(--radius-card);
	overflow: hidden;
	margin-top: clamp(1rem, 3vw, 3rem);
}
.hero-media video { width: 100%; height: clamp(300px, 60vh, 80vh); object-fit: cover; }

/* ---------- Why ---------- */
.why-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: clamp(2rem, 7vw, 7rem); }
.why-logo {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -45%);
	width: clamp(120px, 16vw, 240px);
	height: auto;
	pointer-events: none;
}
.why-text {
	text-align: center;
	max-width: 70rem;
	font-size: clamp(1.05rem, 2vw, 1.5rem);
	line-height: 1.45;
}

/* ---------- Section head ---------- */
.section-head { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.section-head p { text-align: center; font-size: clamp(1.05rem, 2vw, 1.5rem); }

/* ---------- Service cards ---------- */
.service-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	width: 100%;
}
.service-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
	padding: 2rem;
	border-radius: var(--radius-card);
	rotate: var(--tilt, 0deg);
	transition: rotate .35s ease, transform .35s ease;
}
.service-card:hover { rotate: 0deg; transform: translateY(-4px); }
.service-card-static { rotate: 0deg; }
.service-card .service-icon { width: 4rem; height: 4rem; }
.service-card p { opacity: .9; font-size: .98rem; line-height: 1.4; flex: 1; }
.service-card h3 { font-size: 1.35rem; font-weight: 600; }

@media (max-width: 1180px) { .service-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .service-cards { grid-template-columns: 1fr; } }

/* ---------- Partners marquee ---------- */
.partners .display { line-height: 1.2; }
.marquee {
	width: 100%;
	overflow: hidden;
	position: relative;
	height: 5.5rem;
	mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
	-webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 2.5vw, 2rem);
	width: max-content;
	animation: marquee 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item img { width: 4.5rem; height: 4.5rem; object-fit: contain; }
@keyframes marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

/* ---------- Doctors ---------- */
.doctor-slider { position: relative; width: 100%; }
.doctor-track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: .5rem;
}
.doctor-track::-webkit-scrollbar { display: none; }
.doctor-card {
	flex: 0 0 clamp(240px, 23vw, 330px);
	scroll-snap-align: start;
	aspect-ratio: 3 / 4;
	background: #f1f1f1;
	border-radius: var(--radius-card);
	padding: 1.5rem 1.5rem 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: background .3s;
}
.doctor-card:hover { background: var(--water); }
.doctor-meta { text-align: center; padding-bottom: 1.25rem; }
.doctor-meta h3 { font-size: 1.2rem; font-weight: 700; }
.doctor-meta p { font-size: .9rem; opacity: .85; line-height: 1.3; margin-top: .4rem; }
.doctor-card img { flex: 1; width: 100%; object-fit: cover; object-position: top; min-height: 0; }
.slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	border: 0;
	background: var(--midnight);
	color: var(--mint);
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	opacity: .9;
}
.slider-prev { left: -.5rem; }
.slider-next { right: -.5rem; }
.slider-btn:hover { opacity: 1; }

/* Doctors page grid */
.doctors-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1rem;
	align-items: stretch;
}
.doctors-grid .doctor-card { flex: none; width: 100%; }

/* ---------- CTA ---------- */
.cta { flex-direction: row !important; align-items: flex-start !important; flex-wrap: wrap; }
.cta-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 2rem; }
.cta-copy .display { text-align: start; }
.lang-ar .cta-copy .display { text-align: start; }
.cta-copy p { font-size: clamp(1.05rem, 2vw, 1.5rem); }
.cta-form { flex: 1 1 420px; }

/* ---------- Booking form ---------- */
.booking-form { display: flex; flex-direction: column; gap: 1rem; width: 100%; position: relative; }
.booking-form label { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; font-weight: 500; }
.booking-form input, .booking-form select {
	font-family: var(--font-body);
	font-size: 1rem;
	padding: .85rem 1.1rem;
	border-radius: 1rem;
	border: 1px solid rgba(0,51,51,.25);
	background: rgba(0,51,51,.02);
	color: var(--midnight);
	width: 100%;
}
.booking-form input:focus, .booking-form select:focus {
	outline: 2px solid var(--mint);
	border-color: var(--midnight);
}
.booking-row { display: flex; gap: .75rem; }
.booking-country { flex: 0 0 8.5rem; }
.booking-phone { flex: 1; }
.booking-submit { margin-top: .5rem; }
.booking-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	text-align: center;
	padding: 2.5rem 1rem;
	background: rgba(0,51,51,.03);
	border: 1px solid rgba(0,51,51,.08);
	border-radius: var(--radius-card);
}
.booking-success[hidden] { display: none; }
.booking-success h4 { font-size: 1.3rem; font-weight: 600; }

/* ---------- Booking modal ---------- */
.booking-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.booking-modal.is-open { display: block; }
.booking-backdrop { position: absolute; inset: 0; background: rgba(0,26,26,.55); backdrop-filter: blur(4px); }
.booking-card {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(540px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	background: var(--paper);
	border-radius: var(--radius-card);
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}
.booking-head h3 { font-size: 1.6rem; font-weight: 500; line-height: 1.3; }
.booking-head em { font-family: var(--font-accent); }
.lang-ar .booking-head em { font-family: var(--font-body); font-style: normal; font-weight: 700; }
.booking-close {
	position: absolute;
	top: 1rem;
	inset-inline-end: 1.25rem;
	background: none;
	border: 0;
	font-size: 2rem;
	cursor: pointer;
	color: var(--midnight);
	opacity: .6;
}
.booking-close:hover { opacity: 1; }

/* ---------- Page hero ---------- */
.page-hero { padding-bottom: clamp(2rem, 4vw, 4rem) !important; }
.page-hero p {
	text-align: center;
	max-width: 56rem;
	opacity: .85;
	font-size: clamp(1rem, 1.8vw, 1.3rem);
}

/* ---------- About ---------- */
.founder { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; }
.founder-photo { flex: 1 1 360px; }
.founder-photo img { border-radius: var(--radius-card); background: var(--water); }
.founder-copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: 1.25rem; }
.founder-copy .display { text-align: start; font-size: clamp(2rem, 4vw, 3.6rem); }
.founder-title { font-weight: 600; font-size: 1.1rem; color: #0a4d4d; }
.founder-copy p:last-child { font-size: 1.05rem; line-height: 1.6; }

.story p { text-align: center; max-width: 64rem; font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.55; }

.pillars { flex-direction: row !important; flex-wrap: wrap; align-items: stretch !important; }
.pillar {
	flex: 1 1 260px;
	border-radius: var(--radius-card);
	padding: 2.25rem;
	display: flex;
	flex-direction: column;
	gap: .9rem;
}
.pillar h3 { font-size: 1.4rem; font-weight: 700; }
.pillar p { line-height: 1.5; }

.commitment-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	width: 100%;
}
.commitment-list li {
	border: 1px solid rgba(0,51,51,.12);
	border-radius: 1.25rem;
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.commitment-list h3 { font-size: 1.1rem; font-weight: 600; }
.commitment-list p { font-size: .95rem; opacity: .85; line-height: 1.45; }

.branch-links { width: 100%; max-width: 56rem; }
.branch-links li { border-bottom: 1px solid rgba(0,51,51,.12); }
.branch-links a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.4rem .25rem;
	font-size: 1.25rem;
	font-weight: 500;
	transition: padding-inline-start .25s;
}
.branch-links a:hover { padding-inline-start: 1rem; color: #0a4d4d; }
.lang-ar .branch-links a span { transform: scaleX(-1); }

/* ---------- Services page ---------- */
.services-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
}
.services-grid .service-card h3 { order: 2; }
.services-grid .service-card p { order: 3; flex: none; }
.services-grid .service-icon { order: 1; }

/* ---------- Insurance ---------- */
.sector-filters { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.sector-btn {
	font-family: var(--font-body);
	font-size: .92rem;
	font-weight: 500;
	padding: .55rem 1.3rem;
	border-radius: var(--radius-pill);
	border: 1px solid rgba(0,51,51,.25);
	background: transparent;
	color: var(--midnight);
	cursor: pointer;
	transition: all .2s;
}
.sector-btn:hover { border-color: var(--midnight); }
.sector-btn.is-active { background: var(--midnight); color: var(--mint); border-color: var(--midnight); }
.partners-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	width: 100%;
}
.partner-card {
	margin: 0;
	border: 1px solid rgba(0,51,51,.1);
	border-radius: 1.25rem;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .75rem;
	text-align: center;
	background: #fff;
}
.partner-card img { width: 4.5rem; height: 4.5rem; object-fit: contain; }
.partner-card figcaption { font-size: .85rem; font-weight: 500; opacity: .85; }
.partner-card.is-hidden { display: none; }

/* ---------- Branches ---------- */
.branches { gap: 1.5rem !important; }
.branch-card {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	border: 1px solid rgba(0,51,51,.12);
	border-radius: var(--radius-card);
	overflow: hidden;
	background: #fff;
}
.branch-map { flex: 1 1 320px; min-height: 220px; background: var(--soft); }
.branch-map img { width: 100%; height: 100%; object-fit: cover; }
.branch-info { flex: 2 1 380px; padding: 2rem; display: flex; flex-direction: column; gap: .9rem; }
.branch-info h3 { font-size: 1.5rem; font-weight: 700; }
.branch-info p { line-height: 1.5; opacity: .9; }
.branch-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .5rem; }

/* ---------- Blog ---------- */
.blog-grid {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
	align-items: stretch;
}
.blog-card {
	border: 1px solid rgba(0,51,51,.12);
	border-radius: var(--radius-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
}
.blog-thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.blog-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.blog-body time { font-size: .85rem; opacity: .65; }
.blog-body h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.blog-body p { opacity: .85; flex: 1; }
.blog-more { font-weight: 600; color: #0a4d4d; }
.blog-empty { text-align: center; font-size: 1.2rem; opacity: .7; grid-column: 1 / -1; }

/* ---------- Single ---------- */
.single-thumb img { border-radius: var(--radius-card); }
.single-post { max-width: 56rem !important; }
.prose { width: 100%; font-size: 1.08rem; line-height: 1.7; }
.prose h2, .prose h3 { margin: 1.6em 0 .6em; font-weight: 600; }
.prose p { margin: 0 0 1.2em; }
.prose img { border-radius: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--midnight);
	color: #e8f5f0;
	margin-top: var(--pad-y);
}
.footer-inner {
	max-width: var(--max-w);
	margin-inline: auto;
	padding: clamp(3rem, 6vw, 5rem) var(--pad-x) 2rem;
	display: flex;
	flex-wrap: wrap;
	gap: clamp(2rem, 5vw, 5rem);
}
.footer-brand { flex: 2 1 320px; display: flex; flex-direction: column; gap: 1.25rem; }
.footer-logo { display: flex; align-items: center; gap: .8rem; }
.footer-logo img { width: 52px; height: auto; filter: brightness(0) invert(1); }
.footer-logo span { font-weight: 600; font-size: 1.3rem; color: #fff; }
.footer-brand p { opacity: .8; max-width: 30rem; line-height: 1.6; }
.footer-social { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-social a { opacity: .75; font-size: .95rem; transition: opacity .2s; }
.footer-social a:hover { opacity: 1; color: var(--mint); }
.footer-col { flex: 1 1 180px; display: flex; flex-direction: column; gap: 1rem; }
.footer-col h4 { font-size: 1.05rem; font-weight: 600; color: var(--mint); }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { opacity: .8; transition: opacity .2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
	border-top: 1px solid rgba(204,255,255,.15);
	padding: 1.5rem var(--pad-x);
	text-align: center;
	font-size: .9rem;
	opacity: .7;
}

/* ---------- Pagination ---------- */
.pagination { grid-column: 1 / -1; text-align: center; }
.pagination .nav-links { display: flex; justify-content: center; gap: .75rem; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	.marquee-track { animation: none; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 900px) {
	.cta, .founder, .pillars { flex-direction: column !important; }
	.cta-copy .display, .founder-copy .display { text-align: center; }
	.cta-copy, .founder-copy { align-items: center; text-align: center; }
	.slider-btn { display: none; }
}
