/*
Theme Name: MedCare
Theme URI: https://studio.rr.ms/
Author: Studio
Description: ثيم طبي عربي متعدد الصفحات — عيادة / مركز طبي.
Version: 2.0.0
Requires at least: 6.1
Requires PHP: 7.4
Text Domain: medcare
*/

:root {
	--ink: #102a43;
	--ink-soft: #627d98;
	--muted: #9fb3c8;
	--paper: #f0f4f8;
	--paper-2: #e6edf5;
	--line: rgba(16, 42, 67, 0.1);
	--primary: #0e7c86;
	--primary-dark: #09565e;
	--primary-soft: #e0fcff;
	--accent: #2bb0a6;
	--deep: #0a2540;
	--deep-2: #133b5c;
	--gold: #f0b429;
	--white: #ffffff;
	--danger: #d64545;
	--ok: #147d64;
	--shadow: 0 20px 50px rgba(10, 37, 64, 0.12);
	--shadow-sm: 0 8px 24px rgba(10, 37, 64, 0.08);
	--radius: 22px;
	--radius-sm: 14px;
	--header-h: 84px;
	--max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	direction: rtl;
	font-family: "IBM Plex Sans Arabic", "Tajawal", sans-serif;
	font-size: 16.5px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

html[dir="ltr"] body { direction: ltr; }
body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.site-shell { min-height: 100vh; overflow-x: hidden; }
.site-container {
	width: min(var(--max), calc(100% - 2rem));
	margin-inline: auto;
}

.skip-link {
	position: absolute;
	inset-inline-start: 1rem;
	top: -120px;
	z-index: 1000;
	background: var(--primary);
	color: #fff;
	padding: .75rem 1rem;
	border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

/* ===== Header ===== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 80;
	background: rgba(255,255,255,.86);
	backdrop-filter: blur(18px);
	border-bottom: 1px solid transparent;
	transition: .25s ease;
}
.site-header.is-scrolled {
	border-bottom-color: var(--line);
	box-shadow: var(--shadow-sm);
}
.site-header > .site-container {
	min-height: var(--header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.brand {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
}
.brand-logo {
	height: 52px;
	width: auto;
	display: block;
}
.brand-logo-white { height: 48px; width: auto; }

.site-nav .menu {
	display: flex;
	align-items: center;
	gap: .15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.site-nav .menu a {
	display: inline-flex;
	padding: .55rem .9rem;
	border-radius: 999px;
	color: var(--ink-soft);
	font-weight: 700;
	font-size: .93rem;
	transition: .2s ease;
}
.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a {
	color: var(--primary-dark);
	background: var(--primary-soft);
}

.site-header-actions {
	display: flex;
	align-items: center;
	gap: .65rem;
}

.language-switcher {
	display: inline-flex;
	align-items: center;
	gap: .25rem;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: .25rem;
}
.language-option {
	border: 0;
	background: transparent;
	color: var(--ink-soft);
	cursor: pointer;
	padding: .35rem .65rem;
	border-radius: 999px;
	font-weight: 800;
	font-size: .78rem;
}
.language-option.is-active {
	background: var(--white);
	color: var(--deep);
	box-shadow: var(--shadow-sm);
}

.header-cta,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4rem;
	min-height: 46px;
	padding: .75rem 1.2rem;
	border-radius: 999px;
	border: 0;
	font-weight: 800;
	cursor: pointer;
	transition: .2s ease;
}
.header-cta,
.button-primary {
	background: linear-gradient(135deg, var(--primary), #14919b);
	color: #fff;
	box-shadow: 0 12px 28px rgba(14, 124, 134, .28);
}
.header-cta:hover,
.button-primary:hover {
	transform: translateY(-1px);
	background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.button-ghost {
	background: #fff;
	color: var(--ink);
	border: 1px solid var(--line);
}
.button-ghost:hover { background: var(--paper); transform: translateY(-1px); }
.button-light {
	background: rgba(255,255,255,.14);
	color: #fff;
	border: 1px solid rgba(255,255,255,.28);
}
.button-light:hover { background: rgba(255,255,255,.22); }

.menu-toggle {
	display: none;
	align-items: center;
	gap: .5rem;
	border: 1px solid var(--line);
	background: #fff;
	border-radius: 999px;
	padding: .55rem .85rem;
	color: var(--ink);
	cursor: pointer;
	font-weight: 700;
}
.menu-toggle-icon { width: 18px; display: grid; gap: 4px; }
.menu-toggle-icon span {
	display: block; height: 2px; background: currentColor; border-radius: 99px;
}

/* ===== Hero redesign ===== */
.hero {
	position: relative;
	padding: 2.5rem 0 1rem;
}
.hero-shell {
	display: grid;
	grid-template-columns: 1.05fr .95fr;
	gap: 1.5rem;
	align-items: stretch;
}
.hero-copy-card {
	background:
		radial-gradient(circle at top left, rgba(43,176,166,.18), transparent 40%),
		linear-gradient(160deg, #0a2540 0%, #0e3a4f 48%, #0e7c86 120%);
	color: #fff;
	border-radius: 32px;
	padding: clamp(1.6rem, 3vw, 2.6rem);
	box-shadow: var(--shadow);
	position: relative;
	overflow: hidden;
	min-height: 520px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.hero-copy-card::after {
	content: "";
	position: absolute;
	width: 280px; height: 280px;
	border-radius: 50%;
	background: rgba(255,255,255,.06);
	inset-inline-end: -80px;
	bottom: -90px;
}
.hero-kicker {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .4rem .8rem;
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.16);
	font-size: .82rem;
	font-weight: 800;
	margin-bottom: 1rem;
	width: max-content;
}
.hero h1,
.section-heading,
.page-hero h1 {
	margin: 0 0 1rem;
	font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif;
	font-weight: 800;
	letter-spacing: -.03em;
	line-height: 1.22;
}
.hero h1 {
	font-size: clamp(2.1rem, 4.2vw, 3.4rem);
	max-width: 12ch;
}
.hero h1 em,
.section-heading em {
	font-style: normal;
	color: #7eefe5;
}
.hero-copy {
	margin: 0;
	color: rgba(255,255,255,.86);
	font-size: 1.05rem;
	max-width: 34rem;
}
.hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 1.6rem 0 1.4rem;
	position: relative;
	z-index: 1;
}
.hero-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0,1fr));
	gap: .7rem;
	position: relative;
	z-index: 1;
}
.hero-stat {
	background: rgba(255,255,255,.1);
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 16px;
	padding: .85rem .75rem;
}
.hero-stat strong {
	display: block;
	font-size: 1.35rem;
	font-family: Cairo, sans-serif;
}
.hero-stat span {
	font-size: .82rem;
	opacity: .85;
	font-weight: 600;
}

.hero-media {
	display: grid;
	grid-template-rows: 1.35fr .9fr;
	gap: 1rem;
	min-height: 520px;
}
.hero-media figure {
	margin: 0;
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	box-shadow: var(--shadow);
	border: 1px solid var(--line);
	background: #fff;
}
.hero-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	min-height: 100%;
}
.hero-media figcaption {
	position: absolute;
	inset-inline: 1rem;
	bottom: 1rem;
	background: rgba(10,37,64,.78);
	color: #fff;
	padding: .55rem .85rem;
	border-radius: 999px;
	font-size: .84rem;
	font-weight: 700;
	width: max-content;
	max-width: calc(100% - 2rem);
}
.hero-media-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.hero-side-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 24px;
	padding: 1.15rem;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .45rem;
}
.hero-side-card strong {
	font-family: Cairo, sans-serif;
	font-size: 1.05rem;
	color: var(--deep);
}
.hero-side-card span { color: var(--ink-soft); font-size: .92rem; }
.hero-side-card .ico {
	width: 42px; height: 42px; border-radius: 14px;
	display: grid; place-items: center;
	background: var(--primary-soft); color: var(--primary-dark);
	font-weight: 800; margin-bottom: .25rem;
}

/* ===== Sections ===== */
.section { padding: 4rem 0; }
.section-head {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 1.25rem;
	margin-bottom: 1.8rem;
}
.section-kicker {
	display: inline-flex;
	padding: .35rem .75rem;
	border-radius: 999px;
	background: var(--primary-soft);
	color: var(--primary-dark);
	font-size: .8rem;
	font-weight: 800;
	margin-bottom: .7rem;
}
.section-heading {
	font-size: clamp(1.7rem, 3vw, 2.4rem);
	color: var(--deep);
}
.section-lead {
	margin: 0;
	color: var(--ink-soft);
	max-width: 28rem;
}

.band {
	background:
		linear-gradient(180deg, rgba(14,124,134,.05), rgba(14,124,134,.02)),
		#eaf2f7;
	border-block: 1px solid var(--line);
}

.services-grid,
.doctors-grid,
.cards-grid,
.values-grid,
.home-gallery {
	display: grid;
	gap: 1.1rem;
}
.services-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.doctors-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.cards-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.values-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.home-gallery { grid-template-columns: 1.2fr .8fr; }

.service-card,
.doctor-card,
.info-card,
.value-card,
.contact-card,
.appointment-card,
.contact-panel,
.content-block,
.entry-content {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

.service-card,
.doctor-card,
.info-card,
.value-card {
	padding: 1.35rem;
	transition: .2s ease;
}
.service-card:hover,
.doctor-card:hover,
.info-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	border-color: rgba(14,124,134,.22);
}

.service-icon,
.doctor-avatar,
.value-icon {
	width: 52px; height: 52px;
	border-radius: 16px;
	display: grid; place-items: center;
	background: linear-gradient(145deg, var(--primary-soft), #fff);
	color: var(--primary-dark);
	font-weight: 800;
	font-size: 1.15rem;
	margin-bottom: 1rem;
	border: 1px solid rgba(14,124,134,.12);
}
.service-card h3,
.doctor-card h3,
.info-card h3,
.value-card h3,
.contact-card h3 {
	margin: 0 0 .5rem;
	font-family: Cairo, sans-serif;
	font-size: 1.12rem;
	color: var(--deep);
}
.service-card p,
.doctor-card p,
.info-card p,
.value-card p { margin: 0; color: var(--ink-soft); }

.more-link {
	display: inline-flex;
	margin-top: 1rem;
	color: var(--primary);
	font-weight: 800;
}
.doctor-meta {
	display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem;
}
.chip {
	display: inline-flex;
	padding: .28rem .65rem;
	border-radius: 999px;
	background: rgba(14,124,134,.08);
	color: var(--primary-dark);
	font-size: .78rem;
	font-weight: 700;
}

.gallery-card {
	margin: 0;
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	background: #fff;
	min-height: 320px;
}
.gallery-card img {
	width: 100%; height: 100%; object-fit: cover; min-height: 320px;
}
.gallery-card figcaption {
	position: absolute;
	inset-inline: 1rem; bottom: 1rem;
	background: rgba(10,37,64,.78);
	color: #fff;
	padding: .55rem .85rem;
	border-radius: 999px;
	font-size: .84rem;
	font-weight: 700;
	width: max-content;
	max-width: calc(100% - 2rem);
}
.gallery-stack {
	display: grid;
	gap: 1.1rem;
}
.gallery-stack .gallery-card { min-height: 150px; }
.gallery-stack .gallery-card img { min-height: 150px; }

.cta-band { padding: 1rem 0 4rem; }
.cta-panel {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 2rem;
	border-radius: 30px;
	background:
		radial-gradient(circle at top left, rgba(43,176,166,.25), transparent 35%),
		linear-gradient(135deg, #0a2540, #0e7c86 90%);
	color: #fff;
	box-shadow: var(--shadow);
}
.cta-panel h2 {
	margin: 0 0 .45rem;
	font-family: Cairo, sans-serif;
	font-size: clamp(1.5rem, 3vw, 2.1rem);
}
.cta-panel p { margin: 0; opacity: .9; max-width: 36rem; }

/* ===== Inner pages ===== */
.page-content { padding-bottom: 3rem; }
.page-hero { padding: 2.2rem 0 1.2rem; }
.page-hero-inner {
	padding: 1.8rem;
	border-radius: 28px;
	background:
		linear-gradient(135deg, rgba(255,255,255,.95), rgba(224,252,255,.75)),
		#fff;
	border: 1px solid var(--line);
	box-shadow: var(--shadow-sm);
}
.page-hero h1 {
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	color: var(--deep);
}
.page-hero p { margin: 0; color: var(--ink-soft); max-width: 40rem; }
.breadcrumb {
	display: flex; flex-wrap: wrap; gap: .4rem;
	color: var(--ink-soft); font-size: .88rem; font-weight: 600; margin-bottom: .7rem;
}
.breadcrumb a { color: var(--primary); }

.split-grid {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 1.15rem;
	align-items: start;
}
.content-block,
.appointment-card,
.contact-panel,
.entry-content { padding: 1.4rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.timeline li {
	border-inline-start: 3px solid rgba(14,124,134,.2);
	padding-inline-start: 1rem;
}
.timeline strong { display: block; margin-bottom: .2rem; color: var(--deep); }
.timeline p { margin: 0; color: var(--ink-soft); }

/* forms */
.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: .9rem;
}
.form-field { display: grid; gap: .35rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 800; font-size: .92rem; color: var(--deep); }
.form-field input,
.form-field select,
.form-field textarea {
	width: 100%;
	border: 1px solid var(--line);
	background: #f8fafc;
	border-radius: 14px;
	padding: .85rem .95rem;
	color: var(--ink);
	outline: none;
	transition: .2s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
	border-color: rgba(14,124,134,.45);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(14,124,134,.1);
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-note { margin: .85rem 0 0; color: var(--ink-soft); font-size: .88rem; }
.form-status { display: none; margin-top: 1rem; padding: .85rem 1rem; border-radius: 14px; font-weight: 700; }
.form-status.is-visible { display: block; }
.form-status.is-success { background: #e3f9e5; color: var(--ok); border: 1px solid rgba(20,125,100,.15); }
.form-status.is-error { background: #ffeeee; color: var(--danger); border: 1px solid rgba(214,69,69,.15); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.contact-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.contact-list li {
	display: flex; gap: .75rem; align-items: flex-start;
	padding: .9rem 1rem; border-radius: 14px;
	background: var(--paper); border: 1px solid var(--line);
}
.contact-list strong { display: block; margin-bottom: .1rem; color: var(--deep); }
.contact-list span, .contact-list a { color: var(--ink-soft); }

.map-placeholder {
	min-height: 280px;
	border-radius: var(--radius);
	background:
		linear-gradient(135deg, rgba(14,124,134,.12), rgba(43,176,166,.16)),
		repeating-linear-gradient(90deg, rgba(16,42,67,.04) 0 1px, transparent 1px 28px),
		repeating-linear-gradient(0deg, rgba(16,42,67,.04) 0 1px, transparent 1px 28px);
	border: 1px solid var(--line);
	display: grid; place-items: center; text-align: center;
	padding: 1.5rem; color: var(--ink-soft); font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
	background:
		radial-gradient(circle at top left, rgba(43,176,166,.16), transparent 30%),
		linear-gradient(180deg, #0a2540, #071a2c);
	color: rgba(255,255,255,.84);
	padding: 3.2rem 0 1.4rem;
	margin-top: 1rem;
}
.footer-grid {
	display: grid;
	grid-template-columns: 1.35fr repeat(3, minmax(0,1fr));
	gap: 1.4rem;
}
.footer-brand { margin-bottom: .85rem; }
.footer-intro, .footer-links, .footer-hours {
	margin: 0; padding: 0; list-style: none; color: rgba(255,255,255,.7);
}
.footer-heading {
	margin: 0 0 .85rem;
	font-size: 1rem;
	font-family: Cairo, sans-serif;
	color: #fff;
}
.footer-links, .footer-hours { display: grid; gap: .5rem; }
.footer-links a:hover { color: #7eefe5; }
.footer-bottom {
	margin-top: 2rem;
	padding-top: 1.15rem;
	border-top: 1px solid rgba(255,255,255,.1);
	color: rgba(255,255,255,.55);
	font-size: .9rem;
}

/* reveal */
.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 1040px) {
	.hero-shell,
	.split-grid,
	.section-head,
	.cta-panel,
	.footer-grid,
	.home-gallery { grid-template-columns: 1fr; }
	.services-grid,
	.doctors-grid,
	.cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.values-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.hero-media { min-height: auto; grid-template-rows: auto; }
	.hero-copy-card { min-height: auto; }
	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 auto 0;
		background: rgba(255,255,255,.98);
		border-bottom: 1px solid var(--line);
		padding: 1rem;
		transform: translateY(-130%);
		opacity: 0;
		pointer-events: none;
		transition: .25s ease;
	}
	body.nav-open .site-nav {
		transform: none; opacity: 1; pointer-events: auto;
	}
	.site-nav .menu { flex-direction: column; align-items: stretch; }
	.site-nav .menu a { padding: .9rem 1rem; border-radius: 14px; }
	.menu-toggle { display: inline-flex; }
}

@media (max-width: 680px) {
	.services-grid,
	.doctors-grid,
	.cards-grid,
	.values-grid,
	.form-grid,
	.hero-stats,
	.hero-media-bottom,
	.footer-grid { grid-template-columns: 1fr; }
	.brand-logo { height: 44px; }
	.header-cta { padding: .55rem .8rem; font-size: .82rem; min-height: 40px; }
	.language-option { padding: .3rem .5rem; font-size: .72rem; }
	.page-hero-inner,
	.appointment-card,
	.contact-panel,
	.content-block,
	.entry-content { padding: 1.1rem; }
	.hero-media figure img { min-height: 240px; }
}
