/*
Theme Name: Biolife
Theme URI: http://biolife.local
Author: Biolife Clinic
Description: ثيم عيادات بايولايف. يعرض العيادات والأطباء والخدمات والعروض من محتوى الموقع.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: biolife
*/

:root {
  --ink: #10262c;
  --muted: #5c7278;
  --teal: #1c99a0;
  --teal-dark: #147e84;
  --magenta: #ce0d5a;
  --paper: #f3fbfb;
  --line: #d7e8ea;
  --white: #ffffff;
  --shadow: 0 16px 40px rgba(16, 38, 44, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Cairo", Tahoma, sans-serif;
  font-size: 17px;
  line-height: 1.8;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--magenta); }
button, input, select, textarea { font-family: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 20;
}
.skip-link:focus { top: 12px; }

.topbar {
  background: #071c22;
  color: #d7eef1;
  font-size: 14px;
}
.topbar .wrap, .site-header .wrap, .footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar a { color: #fff; }
.topbar-links { display: flex; gap: 16px; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 8px; }
.lang-switch a {
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 2px 10px;
}
.lang-switch a.is-active { background: var(--teal); border-color: var(--teal); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { min-height: 84px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand img { width: 72px; height: 72px; object-fit: contain; background: transparent; }
.brand strong { display: block; font-size: 22px; line-height: 1.1; }
.brand small { color: var(--muted); }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
}
.site-nav ul, .footer-links { list-style: none; display: flex; gap: 8px 18px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-weight: 700; }
.site-nav a[aria-current="page"] { color: var(--teal-dark); }
.header-cta { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  border: 0;
}
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn.magenta { background: var(--magenta); }
.btn.magenta:hover { background: #b81056; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.hero-stage {
  position: relative;
  min-height: 78vh;
  display: grid;
  place-items: end center;
  padding: 40px 16px;
  overflow: hidden;
  background: #0d3d42 center/cover no-repeat;
}
.hero-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 153, 160, .55), rgba(8, 30, 36, .12) 45%);
}
.hero-stage .btn { position: relative; z-index: 1; margin-bottom: 24px; }
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.booking-copy, .form-card, .wpcf7, .wpcf7 form, .wpcf7 p, .wpcf7 label { text-align: start; }
.booking h1 span { color: var(--teal); }
html[dir="rtl"] .wpcf7,
html[dir="rtl"] .wpcf7 form,
html[dir="rtl"] .form-card { direction: rtl; }
html[dir="rtl"] .wpcf7 input,
html[dir="rtl"] .wpcf7 textarea,
html[dir="rtl"] .wpcf7 select { direction: rtl; text-align: right; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { position: relative; display: block; min-height: 250px; border-radius: 18px; overflow: hidden; color: #fff; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 55%); }
.tile span { position: absolute; z-index: 1; inset-inline: 16px; bottom: 14px; font-size: 28px; font-weight: 800; }
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.reason-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.reason { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); text-align: center; }
.reason img { width: 72px; height: 72px; margin: 0 auto 8px; object-fit: contain; }
.video-card img, .result-row video { width: 100%; border-radius: 18px; }
.experts-head { text-align: center; }
.experts-head h2 { margin-top: -20px; }
.experts-head h2 span { color: var(--teal); }
.experts-head p { color: #0a0000; margin: 0; }
.expert-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 180px; align-items: stretch; }
.expert-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: center;
  background: #fff;
  color: var(--ink);
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 0 22px 28px;
}
.expert-card:hover { color: var(--ink); }
.expert-card img {
  width: min(100%, 220px);
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 12%;
  border-radius: 999px;
  margin: -130px auto 18px;
  padding: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  flex: none;
}
.expert-card h3 { color: #1c99a0; margin: 0 0 12px; font-size: 22px; line-height: 1.4; }
.expert-card p { margin: 0; color: #222; font-size: 16px; line-height: 1.85; }
.experts-more { text-align: center; margin: 28px 0 0; }
.result-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button, .filters a { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.filters button.is-active, .filters a:not(.ghost) { background: var(--teal); border-color: var(--teal); color: #fff; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.offer-grid img { width: 100%; border-radius: 16px; background: #fff; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.result-row video { background: #111; aspect-ratio: 9/16; object-fit: cover; }
.partners { background: #1c99a0; color: #fff; border-radius: 24px; padding: 28px 22px; }
.partners h2, .partners p { text-align: center; }
.logo-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 8px 0 22px; }
.logo-row img { height: 72px; width: auto; max-width: 160px; object-fit: contain; background: #fff; border-radius: 12px; padding: 8px; }
.eyebrow {
  color: var(--magenta);
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
}
h1, h2, h3 { line-height: 1.35; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3vw, 38px); }
.lead { font-size: 19px; color: #34555c; }
.hero-card, .panel, .card, .doctor-card, .form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card { padding: 22px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 10px; }
.stat { background: #fff; border-radius: 18px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; color: var(--teal-dark); font-size: 32px; }

.section { padding: 34px 0; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-bottom: 18px; }
.grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card, .doctor-card { overflow: hidden; }
.card-body, .doctor-card div { padding: 16px 16px 18px; }
.card h3, .doctor-card h3 { font-size: 20px; }
.meta { color: var(--muted); font-size: 14px; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #e7f5f6; }
.doctor-card { display: flex; }
.doctor-card a { display: flex; flex-direction: column; width: 100%; height: 100%; }
.doctor-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  object-position: center bottom;
  background: #fff;
  border-radius: 18px;
}
.doctor-card div { margin-top: auto; }
.single-hero .wp-post-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
}

.page-hero { padding: 36px 0 10px; }
.prose { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.prose > :first-child { margin-top: 0; }
.prose img { border-radius: 16px; margin: 12px 0; }
.form-card { padding: 22px; }
.wpcf7 label { font-weight: 700; }
.wpcf7 input, .wpcf7 textarea, .wpcf7 select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.wpcf7 input[type="submit"], .wpcf7 button { width: auto; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }

.site-footer { background: #071c22; color: #d5e6e9; margin-top: 40px; padding: 36px 0 18px; }
.site-footer a { color: #fff; }
.footer-grid { align-items: flex-start; display: grid; grid-template-columns: 1.3fr .8fr .9fr; }
.footer-links { display: grid; gap: 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 22px; padding-top: 12px; color: #9fb8bd; font-size: 14px; }
.float-actions {
  position: fixed;
  z-index: 40;
  bottom: 22px;
  inset-inline-end: 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: max-content;
  min-width: 156px;
}
.float-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  height: 56px;
  padding-inline: 8px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(7, 28, 34, 0.22);
}
.float-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  flex: none;
}
.float-ico svg { width: 22px; height: 22px; display: block; }
.float-label { line-height: 1; }
.float-whatsapp { background: #25d366; }
.float-whatsapp .float-ico { background: #fff; color: #25d366; }
.float-whatsapp .float-ico svg { width: 30px; height: 30px; }
.float-whatsapp:hover { background: #1ebe5d; color: #fff; }
.float-call { background: var(--teal); }
.float-call:hover { background: var(--teal-dark); color: #fff; }
.pager { display: flex; gap: 8px; justify-content: center; margin: 22px 0; }
.pager a, .pager span { background: #fff; border-radius: 10px; padding: 6px 12px; }

@media (max-width: 900px) {
  .hero, .grid-3, .grid-4, .footer-grid, .stats, .booking, .why, .expert-row, .offer-grid, .stats-row { grid-template-columns: 1fr 1fr; }
  .mosaic, .result-row { grid-template-columns: 1fr 1fr; }
  .hero-stage { min-height: 62vh; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .site-nav, .header-cta { display: none; }
  body.nav-open .site-nav {
    display: block;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px 16px;
  }
  body.nav-open .site-nav ul { display: grid; }
  .expert-row { row-gap: 168px; }
}
@media (max-width: 640px) {
  .float-actions { bottom: 16px; inset-inline-end: 16px; min-width: 142px; }
  .float-btn { height: 52px; font-size: 14px; }
  .float-ico { width: 36px; height: 36px; }
  .hero, .grid-3, .grid-4, .stats, .booking, .why, .mosaic, .expert-row, .result-row, .reason-grid, .offer-grid, .stats-row { grid-template-columns: 1fr; display: grid; }
  .header-cta { display: none; }
  .topbar { font-size: 12px; }
  .topbar .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding-block: 6px;
  }
  .topbar-links { flex-wrap: nowrap; gap: 8px; min-width: 0; }
  .topbar-links a { white-space: nowrap; }
  .lang-switch { flex: none; }
  .lang-switch a { padding: 1px 8px; }
  .site-header .wrap { min-height: 68px; gap: 10px; }
  .brand { gap: 8px; min-width: 0; }
  .brand img { width: 48px; height: 48px; }
  .brand strong { font-size: 17px; }
  .brand small { font-size: 12px; }
  .nav-toggle { flex: none; padding: 8px 10px; }
  .expert-row { margin-top: 128px; row-gap: 150px; }
  .expert-card img { width: min(70%, 180px); margin: -88px auto 14px; }
}
