:root {
  --blue: #07558f;
  --blue-dark: #003e70;
  --blue-soft: #eaf5fb;
  --green: #58a934;
  --green-dark: #3f8c24;
  --ink: #17324a;
  --muted: #697b8d;
  --line: #dce7ef;
  --surface: #ffffff;
  --shadow: 0 18px 42px rgba(16, 65, 102, .12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Tajawal", Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.7;
}

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  flex: 0 0 auto;
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  background: #f8fcff;
  color: #5b7183;
  font-size: 14px;
  border-bottom: 1px solid #e7f0f6;
}

.topbar__inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #e9f1f6;
}

.header__inner {
  height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand img { width: 250px; height: auto; }

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-weight: 700;
  color: #2d4960;
  font-size: 15px;
}

.nav a {
  position: relative;
  padding: 30px 0;
}

.nav a.active,
.nav a:hover { color: var(--blue); }

.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 20px;
  height: 3px;
  background: var(--green);
  border-radius: 10px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: .2s ease;
  white-space: nowrap;
}

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 20px rgba(88, 169, 52, .24);
}

.btn--primary:hover { transform: translateY(-1px); }

.btn--outline {
  color: var(--blue);
  background: #fff;
  border-color: #9bbbd2;
}

.btn--light {
  background: #fff;
  color: var(--blue);
}

.btn--block { width: 100%; }

.icon-button,
.menu-toggle {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #d7e4ec;
  background: #fff;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  background: currentColor;
  border-radius: 10px;
}

.search-panel {
  padding: 0 0 18px;
  display: flex;
  gap: 10px;
}

.search-panel[hidden] { display: none; }
.search-panel input { flex: 1; }

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(234, 245, 251, .1), rgba(234, 245, 251, .95)),
    linear-gradient(180deg, #f7fbfe, #fff);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(88, 169, 52, .13), transparent 24%),
    radial-gradient(circle at 76% 38%, rgba(7, 85, 143, .11), transparent 32%),
    linear-gradient(120deg, rgba(255,255,255,.1), rgba(255,255,255,.85)),
    url("../img/hero-clinic.svg") left center / min(55vw, 690px) auto no-repeat;
  opacity: .95;
}

.hero__grid {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1fr 340px;
  align-items: center;
  gap: 44px;
  padding: 54px 0 78px;
}

.hero__content {
  max-width: 700px;
  padding-inline-start: 22px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.22;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  color: var(--green);
}

.hero__lead {
  max-width: 600px;
  margin: 22px 0 28px;
  color: #3d566b;
  font-size: 21px;
  font-weight: 500;
}

.hero__buttons,
.hero__stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__stats {
  margin-top: 42px;
  color: var(--blue);
}

.hero__stats div {
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-inline-end: 18px;
  border-inline-end: 1px solid #d4e2eb;
}

.booking-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid #dfeaf1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.booking-card__head {
  min-height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #0d74b2);
}

.booking-card__head h2 {
  margin: 0;
  font-size: 22px;
}

.booking-card form,
.panel form {
  padding: 20px;
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 6px;
  color: #506579;
  font-weight: 700;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7e3eb;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

textarea {
  min-height: 132px;
  resize: vertical;
  padding-top: 14px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(7, 85, 143, .09);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 800;
}

.form-message.error { color: #b42318; }

.quick-actions {
  position: relative;
  z-index: 5;
  margin-top: -48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border: 1px solid #e3edf3;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quick-actions a {
  min-height: 120px;
  padding: 20px 16px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 2px;
  border-inline-start: 1px solid #e8eff4;
  color: var(--blue);
}

.quick-actions a:first-child { border-inline-start: 0; }
.quick-actions .icon { width: 38px; height: 38px; color: var(--green); }
.quick-actions small { color: var(--muted); }

.section { padding: 74px 0; }
.section--soft { background: linear-gradient(180deg, #f7fbfe, #fff); }

.section__title {
  text-align: center;
  margin-bottom: 32px;
}

.section__title--align { text-align: start; margin-bottom: 16px; }

.section__title span {
  width: 20px;
  height: 32px;
  display: inline-block;
  background: linear-gradient(180deg, var(--green), #86cc63);
  border-radius: 100% 0 100% 0;
  transform: rotate(26deg);
}

.section__title h2 {
  margin: 4px 0 6px;
  color: var(--blue);
  font-size: 32px;
  line-height: 1.3;
}

.section__title p {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service-card,
.doctor-card,
.offer-card,
.blog-grid article,
.panel,
.about-points div {
  background: #fff;
  border: 1px solid #e2ebf1;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(21, 64, 94, .07);
}

.service-card {
  min-height: 210px;
  padding: 24px 20px;
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.service-card:hover,
.doctor-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 32px rgba(21, 64, 94, .12);
}

.service-card .icon {
  width: 56px;
  height: 56px;
  color: var(--blue);
}

.service-card h3,
.doctor-card h3,
.offer-card h3 {
  margin: 0;
  color: var(--green-dark);
  font-size: 21px;
}

.service-card p,
.doctor-card p,
.offer-card p {
  margin: 0;
  color: var(--muted);
}

.small-link {
  margin-top: 6px;
  min-height: 36px;
  padding: 0 22px;
  border: 1px solid #cfdde6;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: 800;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.doctor-card {
  overflow: hidden;
  text-align: center;
}

.doctor-photo {
  height: 150px;
  background:
    linear-gradient(rgba(234, 245, 251, .84), rgba(234, 245, 251, .84)),
    url("../img/doctor-pattern.svg") center / cover;
  display: grid;
  place-items: end center;
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.doctor-avatar {
  width: 96px;
  height: 96px;
  margin-bottom: -36px;
  border: 5px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 800;
}

.doctor-card__body {
  padding: 48px 18px 18px;
}

.doctor-card__actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.doctor-card__actions .btn {
  min-height: 38px;
  padding: 0 10px;
  font-size: 14px;
}

.appointment-scheduler {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

.field-label {
  color: #385268;
  font-weight: 800;
  font-size: 14px;
}

.date-options,
.time-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-option,
.time-option {
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid #c8d9e5;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.date-option {
  display: grid;
  gap: 2px;
  min-width: 76px;
  text-align: center;
  font-size: 12px;
}

.date-option strong { color: var(--blue); }

.date-option.is-selected,
.time-option.is-selected {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.date-option:disabled,
.time-option:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.schedule-hint {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.offer-banner {
  min-height: 150px;
  padding: 28px 42px;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 62, 112, .98), rgba(7, 85, 143, .78)),
    radial-gradient(circle at 20% 40%, rgba(88, 169, 52, .55), transparent 20%),
    url("../img/offer-bg.svg") left center / auto 100% no-repeat;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 30px;
  box-shadow: 0 16px 34px rgba(7, 85, 143, .18);
}

.offer-banner h2,
.offer-banner p { margin: 0; }

.discount {
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background: #fff;
  color: var(--green-dark);
  font-weight: 800;
  line-height: 1.25;
}

.discount strong {
  display: block;
  font-size: 40px;
}

.offer-grid {
  margin-top: 22px;
  display: flex;
  gap: 18px;
  width: max-content;
  animation: offers-scroll 26s linear infinite;
}

.offers-carousel {
  overflow: hidden;
  padding: 4px 2px 18px;
}

.offers-carousel:hover .offer-grid { animation-play-state: paused; }

.offer-card {
  width: min(274px, 78vw);
  min-height: 180px;
  padding: 22px;
}
.offer-card .icon { width: 40px; height: 40px; color: var(--blue); margin-bottom: 10px; }

@keyframes offers-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(38%); }
}

.page-hero {
  padding: 76px 0;
  color: #fff;
  background: linear-gradient(115deg, var(--blue-dark), var(--blue));
}

.page-hero .eyebrow { color: #a9df91; }
.page-hero h1 { margin: 0; font-size: 42px; }
.page-hero p:not(.eyebrow) { max-width: 610px; margin: 10px 0 0; color: #deedf6; font-size: 18px; }

.owner-message,
.about-story {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
}

.owner-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid #dce9f0;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.owner-letter {
  margin: 12px 0;
  padding: 2px 20px;
  border-inline-start: 4px solid var(--green);
  color: #365367;
  font-size: 18px;
  font-weight: 500;
  line-height: 2;
}

.owner-letter p { margin: 0 0 13px; }
.owner-letter p:last-child { margin-bottom: 0; }
.owner-name { margin: 0; color: var(--green-dark); font-weight: 800; }
.owner-name span { color: var(--muted); font-size: 14px; font-weight: 500; }
.about-story > div > p { color: #4d6374; font-size: 18px; line-height: 2; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 34px;
  align-items: start;
}

.about-grid > div > p {
  margin: 0;
  color: #4d6374;
  font-size: 18px;
}

.about-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.about-points div {
  padding: 20px;
}

.about-points .icon {
  width: 42px;
  height: 42px;
  color: var(--green);
}

.about-points strong {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 18px;
}

.about-points p { margin: 4px 0 0; color: var(--muted); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.blog-grid article {
  padding: 24px;
}

.blog-grid strong {
  color: var(--blue);
  font-size: 20px;
}

.blog-grid p { margin: 8px 0 0; color: var(--muted); }

.section--contact {
  background: #f7fbfe;
  padding-top: 42px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .95fr .9fr;
  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--blue);
}

.panel__title h2 {
  margin: 0;
  font-size: 25px;
}

.panel > p {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.branches {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.branch {
  padding: 15px;
  border: 1px solid #e2ebf1;
  border-radius: 10px;
  background: #fbfdff;
}

.branch h3 { margin: 0; color: var(--blue); font-size: 17px; }
.branch p { margin: 5px 0; color: var(--muted); }

.branch__actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.branch__actions a {
  min-height: 34px;
  border: 1px solid #cfdde6;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}

.hours {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.hours div {
  padding: 14px;
  display: grid;
  text-align: center;
  background: #fbfdff;
  border: 1px solid #e2ebf1;
  border-radius: 10px;
}

.hours strong { color: var(--blue); }
.hours span { color: var(--muted); }
.note {
  margin-top: 16px !important;
  padding: 11px;
  border-radius: 8px;
  background: #edf8e9;
  color: var(--green-dark) !important;
  font-weight: 800;
}

.footer {
  color: #dcecf7;
  background: linear-gradient(135deg, #004a80, #06395f);
}

.footer__grid {
  padding: 48px 0 30px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
}

.footer__logo {
  width: 230px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
}

.footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer p { max-width: 330px; }

.footer a,
.footer span {
  display: block;
  color: #dcecf7;
  margin: 7px 0;
}

.social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.social a {
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
}

.footer__bottom {
  padding: 16px 0 24px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #c0d8e8;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 37, 58, .5);
}

.modal[hidden] { display: none; }

.modal__content {
  width: min(420px, 100%);
  position: relative;
  padding: 34px 28px;
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal__close {
  position: absolute;
  inset-inline-start: 14px;
  top: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: #eef6fb;
  cursor: pointer;
  font-size: 24px;
}

.modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  color: var(--green);
}

.modal h2 { margin: 0; color: var(--blue); }
.modal p { color: var(--muted); }

@media (max-width: 1080px) {
  .header__inner { grid-template-columns: auto auto; justify-content: space-between; }
  .nav {
    position: absolute;
    inset: 86px 16px auto;
    display: none;
    padding: 16px;
    border: 1px solid #dce8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: grid; }
  .nav a { padding: 8px 0; }
  .nav a::after { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; }
  .booking-card { max-width: 560px; }
  .cards-grid, .doctor-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .contact-grid, .about-grid, .owner-message, .about-story { grid-template-columns: 1fr; }
  .owner-message { max-width: 680px; }
  .owner-photo { width: min(310px, 100%); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 22px, 1180px); }
  .topbar__inner { gap: 12px; padding: 8px 0; }
  .brand img { width: 190px; }
  .header__inner { height: 74px; gap: 12px; }
  .header__actions .btn { display: none; }
  .nav { top: 74px; }
  .hero__grid { min-height: auto; padding: 38px 0 82px; gap: 28px; }
  .hero__content { padding-inline-start: 0; }
  .hero h1 { font-size: 34px; }
  .hero__lead { font-size: 18px; }
  .hero__stats div { border: 0; min-width: 130px; }
  .hero__bg { background-size: 92vw auto; opacity: .38; }
  .booking-card { width: 100%; }
  .quick-actions {
    margin-top: -42px;
    grid-template-columns: 1fr;
  }
  .quick-actions a {
    min-height: 92px;
    border-inline-start: 0;
    border-top: 1px solid #e8eff4;
  }
  .cards-grid, .doctor-grid, .blog-grid, .about-points, .form-row {
    grid-template-columns: 1fr;
  }
  .page-hero { padding: 54px 0; }
  .page-hero h1 { font-size: 32px; }
  .owner-letter { font-size: 17px; }
  .section { padding: 54px 0; }
  .section__title h2 { font-size: 27px; }
  .offer-banner {
    padding: 24px;
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .contact-grid { gap: 14px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { display: grid; }
}
