/*
Theme Name: د. ولاء الديري - إصدار 3.6
Theme URI: https://example.com/walaa-aldairi
Author: Custom medical theme
Description: قالب عربي متجاوب لطبيبة عيون، يدعم الحجز عبر واتساب والمقالات والخدمات.
Version: 3.6.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: walaa-aldairi
*/

:root {
  --ink: #183b3f;
  --muted: #607476;
  --teal: #087f83;
  --teal-dark: #075d61;
  --mint: #eaf7f5;
  --sand: #f6f1e8;
  --white: #fff;
  --line: #dce9e7;
  --shadow: 0 16px 50px rgba(18, 70, 73, .11);
  --radius: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fbfdfc; font-family: Tahoma, Arial, sans-serif; line-height: 1.8; }
body.menu-open { overflow: hidden; }
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #f2a900; outline-offset: 3px; }
.container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.skip-link:focus { width: auto; height: auto; clip: auto; z-index: 9999; background: #fff; padding: 10px; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); border-bottom: 1px solid rgba(8,127,131,.12); backdrop-filter: blur(14px); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.brand > img, .brand-mark { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: 57% 20%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--teal); }
.brand-mark-shell { display: grid; place-items: center; flex: 0 0 58px; width: 58px; height: 58px; padding: 6px; overflow: hidden; border: 3px solid #fff; border-radius: 50%; background: #102e28; box-shadow: 0 0 0 2px var(--teal); }
.brand-mark-shell img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-copy strong { display: block; color: var(--teal-dark); font-size: 1.08rem; }
.brand-copy small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.main-nav ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.main-nav a { font-weight: 700; font-size: .94rem; }
.main-nav a:hover { color: var(--teal); }
.header-actions { display: flex; gap: 10px; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.6rem; color: var(--ink); }
.mobile-nav-head, .nav-overlay { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px; border: 1px solid transparent; border-radius: 999px; font: inherit; font-weight: 800; cursor: pointer; transition: .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--teal); box-shadow: 0 10px 26px rgba(8,127,131,.24); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { color: var(--teal-dark); background: #fff; border-color: var(--line); }

.hero { position: relative; overflow: hidden; padding: 72px 0 64px; background: radial-gradient(circle at 10% 10%, #fff 0, transparent 38%), linear-gradient(135deg, var(--mint), #f8fbfa 62%, var(--sand)); }
.hero:after { content: ""; position: absolute; inset: auto -100px -180px auto; width: 440px; height: 440px; border: 1px solid rgba(8,127,131,.16); border-radius: 50%; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 64px; }
.eyebrow { display: inline-flex; padding: 7px 13px; margin-bottom: 16px; border-radius: 999px; color: var(--teal-dark); background: rgba(255,255,255,.76); border: 1px solid var(--line); font-size: .85rem; font-weight: 800; }
h1,h2,h3,h4 { margin: 0 0 14px; line-height: 1.35; }
h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); letter-spacing: -.04em; }
.hero h1 span { color: var(--teal); }
.hero-lead { max-width: 670px; color: #3f5b5e; font-size: 1.25rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.trust-item { padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,.8); border: 1px solid var(--line); font-size: .88rem; font-weight: 700; }
.trust-band { padding: 24px 0; border-block: 1px solid var(--line); background: #fff; }
.trust-band-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); }
.trust-band-grid div { padding: 18px; background: #fff; }
.trust-band-grid strong, .trust-band-grid span { display: block; }
.trust-band-grid strong { color: var(--teal-dark); }
.trust-band-grid span { color: var(--muted); font-size: .86rem; }
.portrait-wrap { position: relative; max-width: 480px; margin-inline: auto; }
.portrait-card { position: relative; overflow: hidden; aspect-ratio: 4/5; border-radius: 42% 42% 28px 28px; background: #dfeeed; box-shadow: var(--shadow); }
.portrait-card img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 27%; }
.portrait-badge { position: absolute; inset: auto -16px 28px auto; width: 150px; padding: 16px; color: #fff; background: var(--teal-dark); border: 5px solid #fff; border-radius: 18px; box-shadow: var(--shadow); text-align: center; }
.portrait-badge strong { display: block; font-size: 1.7rem; line-height: 1.2; }

.section { padding: 88px 0; }
.section-soft { background: #f2f8f7; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.section-head p { max-width: 610px; margin: 0; color: var(--muted); }
.kicker { color: var(--teal); font-size: .9rem; font-weight: 900; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.specialty-gallery { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 18px; }
.specialty-shot { position: relative; overflow: hidden; min-height: 340px; margin: 0; border-radius: 24px; background: var(--mint); box-shadow: 0 10px 35px rgba(18,70,73,.08); }
.specialty-shot:first-child { min-height: 430px; }
.specialty-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.specialty-shot:hover img { transform: scale(1.025); }
.specialty-shot figcaption { position: absolute; inset: auto 14px 14px; padding: 11px 15px; border-radius: 14px; color: #fff; background: rgba(7,68,72,.86); font-weight: 800; backdrop-filter: blur(7px); }
.service-card { min-height: 230px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 28px rgba(18,70,73,.06); transition: .25s ease; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.service-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 20px; padding: 8px; overflow: hidden; border-radius: 19px; background: #102e28; box-shadow: 0 8px 20px rgba(16,46,40,.14); }
.service-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.service-definition { padding-top: 18px; border-top: 1px solid var(--line); }
.service-card h2, .service-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.service-card p { margin: 0; color: var(--muted); }
.service-card .text-link { display: inline-block; margin-top: 14px; }
.journey-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.journey-grid li { padding: 22px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.journey-grid li > span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 50%; color: #fff; background: var(--teal); font-weight: 900; }
.journey-grid h3 { font-size: 1.05rem; }
.journey-grid p { margin: 0; color: var(--muted); font-size: .88rem; }
.section-more { margin-top: 28px; text-align: center; }

.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.about-photo { position: relative; overflow: hidden; min-height: 540px; border-radius: 30px; background: var(--mint); }
.about-photo img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 52% 31%; }
.about-copy h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.about-copy p { color: var(--muted); }
.credentials { display: grid; gap: 14px; margin-top: 24px; }
.credential { display: flex; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.credential span { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: var(--mint); color: var(--teal); font-weight: 900; }
.credential strong { display: block; }
.credential small { color: var(--muted); }

.booking-shell { display: grid; grid-template-columns: .8fr 1.2fr; overflow: hidden; border-radius: 32px; background: var(--teal-dark); box-shadow: var(--shadow); }
.booking-info { padding: 46px; color: #fff; background: linear-gradient(160deg, var(--teal), var(--teal-dark)); }
.booking-info h2 { font-size: 2.2rem; }
.booking-info p { color: rgba(255,255,255,.8); }
.contact-list { display: grid; gap: 16px; margin-top: 30px; }
.contact-list a, .contact-list div { display: flex; gap: 12px; align-items: flex-start; }
.booking-form { padding: 42px; background: #fff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 6px; font-weight: 800; font-size: .9rem; }
input, select, textarea { width: 100%; min-height: 52px; padding: 10px 14px; border: 1px solid #cfe0de; border-radius: 12px; background: #fbfdfd; color: var(--ink); font: inherit; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(8,127,131,.14); border-color: var(--teal); }
.form-note { margin: 12px 0 0; color: var(--muted); font-size: .82rem; }
.privacy-consent label { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; }
.privacy-consent input { flex: 0 0 18px; width: 18px; min-height: 18px; margin-top: 6px; }
.privacy-consent a { color: var(--teal-dark); text-decoration: underline; }

.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; }
.post-thumb { display: grid; place-items: center; min-height: 190px; background: linear-gradient(135deg, var(--mint), var(--sand)); color: var(--teal); font-size: 3rem; }
.post-thumb img { width: 100%; height: 210px; object-fit: cover; }
.post-thumb .brand-placeholder { width: 92px; height: 92px; padding: 12px; border-radius: 24px; background: #102e28; object-fit: contain; box-shadow: 0 10px 25px rgba(16,46,40,.16); }
.article-disclaimer { margin-top: 30px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--mint); color: var(--muted); font-size: .9rem; }
.research-original-title, .research-source { padding: 18px; border-inline-start: 4px solid var(--teal); border-radius: 12px; background: #f4f9f8; }
.research-source { margin-top: 28px; line-height: 2; }
.post-body { padding: 22px; }
.post-meta { color: var(--teal); font-size: .8rem; font-weight: 800; }
.post-body h3 { margin-top: 7px; font-size: 1.18rem; }
.post-body p { color: var(--muted); font-size: .92rem; }
.text-link { color: var(--teal-dark); font-weight: 900; }

.page-hero { padding: 70px 0 42px; background: var(--mint); text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.breadcrumbs { display: flex; gap: 9px; align-items: center; padding-block: 16px; color: var(--muted); font-size: .88rem; }
.breadcrumbs a { color: var(--teal-dark); }
.medical-review { display: flex; justify-content: space-between; gap: 15px; margin: 22px 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--mint); font-size: .88rem; }
.service-hero { padding: 66px 0; background: linear-gradient(135deg,var(--mint),#fff); }
.service-hero-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 48px; align-items: center; }
.service-hero-grid h1 { font-size: clamp(2.1rem,5vw,3.8rem); }
.service-hero-grid > img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.service-content-grid { display: grid; grid-template-columns: 1fr 330px; gap: 44px; align-items: start; }
.service-main section { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.service-main p { color: #385457; }
.service-side { position: sticky; top: 118px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.service-side ol { padding-inline-start: 22px; color: var(--muted); }
.faq-wrap { width: min(850px,100%); }
.faq-wrap details { margin: 12px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.faq-wrap summary { cursor: pointer; font-weight: 800; }
.faq-wrap details p { color: var(--muted); }
.content-wrap { width: min(850px, calc(100% - 36px)); margin: 60px auto; }
.clinic-login { min-height: calc(100vh - 170px); display: grid; place-items: center; padding: 50px 16px; background: linear-gradient(135deg,var(--mint),#fff,var(--sand)); }
.clinic-login-card { width: min(430px,100%); padding: 34px; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.clinic-login-card img { display: block; width: 86px; height: 86px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; }
.clinic-login-card h1, .clinic-login-card p { text-align: center; }
.clinic-login-card label { margin-top: 14px; }
.clinic-login-card .btn { width: 100%; margin-top: 20px; }
.login-error { padding: 10px 12px; border-radius: 10px; color: #912018; background: #fff0ee; }
.entry-content { color: #385457; }
.entry-content h2, .entry-content h3 { margin-top: 1.7em; color: var(--ink); }
.entry-content a { color: var(--teal); text-decoration: underline; }
.entry-content img { border-radius: 20px; }
.pagination { margin: 34px 0; }

.site-footer { padding: 56px 0 24px; color: rgba(255,255,255,.82); background: #123f42; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .9fr; gap: 50px; }
.site-footer h3 { color: #fff; }
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-links a { padding: 6px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: .8rem; }
.social-section { overflow: hidden; background: linear-gradient(135deg,#fff,var(--mint)); }
.social-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 46px; align-items: center; }
.social-copy h2 { font-size: clamp(1.8rem,4vw,3rem); }
.social-copy p { color: var(--muted); }
.social-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.tiktok-card { min-height: 360px; display: grid; place-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links a:hover { color: #fff; }
.copyright { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .84rem; text-align: center; }
.whatsapp-float { position: fixed; inset: auto auto 22px 22px; z-index: 80; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; color: #fff; background: #25d366; box-shadow: 0 12px 28px rgba(0,0,0,.2); font-size: 1.55rem; }
.mobile-booking-bar { display: none; }
.page-template-template-clinic-dashboard .mobile-booking-bar, .page-template-template-clinic-dashboard .whatsapp-float { display: none !important; }

@media (max-width: 960px) {
  .main-nav { position: fixed; inset: 0; z-index: 202; display: block; width: 100vw; height: 100vh; height: 100dvh; padding: 22px 20px 40px; overflow-y: auto; color: var(--ink); background: #fff !important; opacity: 1; box-shadow: none; transform: translateX(110%); visibility: hidden; isolation: isolate; transition: transform .25s ease,visibility .25s; }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
  .main-nav ul { width: min(100%,520px); margin: 8px auto 0; flex-direction: column; align-items: stretch; gap: 8px; }
  .main-nav li { width: 100%; }
  .main-nav li a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfa; font-size: 1rem; text-align: right; }
  .main-nav li a:hover, .main-nav li a:focus-visible { color: var(--teal-dark); background: var(--mint); }
  .mobile-nav-head { display: flex; width: min(100%,520px); margin: 0 auto 22px; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .mobile-nav-head strong { font-size: 1.2rem; }
  .menu-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mint); color: var(--ink); font-size: 1.8rem; cursor: pointer; }
  .nav-overlay { position: fixed; inset: 0; z-index: 201; display: block; background: #fff; }
  .nav-overlay[hidden] { display: none; }
  body.menu-open .mobile-booking-bar, body.menu-open .whatsapp-float { display: none !important; }
  .menu-toggle { display: block; }
  .header-actions .btn { display: none; }
  .hero-grid, .about-grid, .booking-shell, .social-grid, .service-hero-grid, .service-content-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-actions, .trust-row { justify-content: center; }
  .services-grid, .posts-grid { grid-template-columns: repeat(2,1fr); }
  .specialty-gallery { grid-template-columns: 1fr 1fr; }
  .specialty-shot:first-child { grid-column: 1 / -1; }
  .portrait-wrap { width: min(480px, 90%); }
  .about-photo { min-height: 450px; }
  .trust-band-grid, .journey-grid { grid-template-columns: repeat(2,1fr); }
  .service-side { position: static; }
}

@media (max-width: 640px) {
  body.admin-bar .site-header { top: 46px; }
  .container { width: min(100% - 24px, 1180px); }
  .header-inner { min-height: 76px; }
  .brand > img, .brand-mark, .brand-mark-shell { width: 48px; height: 48px; flex-basis: 48px; }
  .brand-copy small { display: none; }
  .hero { padding-top: 46px; }
  .hero-grid { gap: 36px; }
  .hero h1 { font-size: 1.82rem; letter-spacing: -.025em; }
  .hero h1 span { display: inline-block; margin-top: 5px; font-size: 1.58rem; line-height: 1.45; }
  .hero-lead { font-size: 1.05rem; }
  .trust-row { gap: 8px; margin-top: 20px; }
  .trust-item { flex: 1 1 calc(50% - 8px); padding: 9px 10px; font-size: .78rem; line-height: 1.65; }
  .trust-item:first-child { flex-basis: 100%; }
  .hero-actions { margin-top: 22px; }
  .section { padding: 62px 0; }
  .section-head { display: block; }
  .services-grid, .posts-grid, .form-grid, .specialty-gallery { grid-template-columns: 1fr; }
  .specialty-shot, .specialty-shot:first-child { grid-column: auto; min-height: 260px; }
  .field-full { grid-column: auto; }
  .about-photo { min-height: 390px; }
  .booking-info, .booking-form { padding: 28px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait-badge { inset-inline-end: 5px; }
  .trust-band-grid, .journey-grid { grid-template-columns: 1fr; }
  .medical-review { flex-direction: column; }
  body { padding-bottom: 82px; }
  .whatsapp-float { display: none; }
  .mobile-booking-bar { position: fixed; inset: auto 50% max(14px,env(safe-area-inset-bottom)) auto; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 8px; width: min(360px,calc(100% - 28px)); min-height: 58px; padding: 10px 20px; transform: translateX(50%); border: 3px solid #fff; border-radius: 999px; color: #fff; background: #25b95b; box-shadow: 0 12px 35px rgba(0,0,0,.28); font-weight: 900; }
  .mobile-booking-bar small { font-size: .75rem; opacity: .86; }
}
