/* Colours taken from the association's logo (static/img/logo.png). */
:root {
  --aman-navy: #121240;
  --aman-purple: #7474e4;
  --aman-teal: #3ddbc0;
  --aman-teal-dark: #1f9e88;
  --aman-bg: #f7f8fc;
}

body {
  font-family: "Tajawal", system-ui, sans-serif;
  background: var(--aman-bg);
  color: var(--aman-navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-header {
  background: #fff;
  border-bottom: 4px solid var(--aman-teal);
}

.site-logo {
  height: 56px;
  width: auto;
}

/* «علم وخبر رقم: 902» under the logo (SiteSettings.registration_no). */
.site-registration {
  font-size: .72rem;
  font-weight: 700;
  color: var(--aman-navy);
  line-height: 1.2;
  margin-top: .1rem;
}

@media (min-width: 768px) {
  .site-logo {
    height: 72px;
  }
}

.site-footer {
  background: var(--aman-navy);
  color: #fff;
}

.site-footer a {
  color: var(--aman-teal);
}

.btn-aman {
  background: var(--aman-teal-dark);
  border-color: var(--aman-teal-dark);
  color: #fff;
}

.btn-aman:hover,
.btn-aman:focus {
  background: var(--aman-navy);
  border-color: var(--aman-navy);
  color: #fff;
}

.text-aman-purple {
  color: var(--aman-purple);
}

/* --- Public site ---------------------------------------------------------- */

.public-nav .nav-link {
  color: var(--aman-navy);
  font-weight: 500;
  border-radius: .5rem;
  padding-inline: .75rem;
}

.public-nav .nav-link.active,
.public-nav .nav-link:hover {
  background: rgba(61, 219, 192, .18);
  color: var(--aman-navy);
}

.site-footer a {
  text-decoration: none;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  font-size: 1.1rem;
}

.hero {
  background: linear-gradient(135deg, var(--aman-navy) 0%, #24246b 55%, var(--aman-teal-dark) 100%);
  color: #fff;
}

.hero .lead {
  font-size: 1.35rem;
  font-weight: 500;
}

.section-title {
  font-weight: 700;
  position: relative;
  padding-bottom: .5rem;
  margin-bottom: 1.25rem;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: var(--aman-teal);
}

.text-center .section-title::after,
.section-title.text-center::after {
  inset-inline-start: calc(50% - 1.5rem);
}

.card-soft {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .25rem 1rem rgba(18, 18, 64, .07);
  background: #fff;
}

a.card-soft {
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

a.card-soft:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1.5rem rgba(18, 18, 64, .12);
}

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(116, 116, 228, .12);
  color: var(--aman-purple);
  font-size: 1.5rem;
}

/* «الخدمات»: coloured icons (apps/public/our_services.py gives each its --c). */
.svc-icon {
  --c: var(--aman-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, #fff);
  font-size: 1.5rem;
}

.svc-icon.svc-icon-sm {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.05rem;
}

.service-items li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .3rem 0;
  font-weight: 500;
}

.dispensary-photo {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  border-radius: 1rem 1rem 0 0;
}

.dispensary-photo-empty {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem 1rem 0 0;
  background: linear-gradient(135deg, rgba(116, 116, 228, .15), rgba(61, 219, 192, .2));
  color: var(--aman-purple);
  font-size: 2.5rem;
}

/* Dispensary without a photo: a sign-like box with the name (public/_dispensary_cover.html).
   Drawn left-to-right on purpose (like the printed signs), so physical left/right. */
.disp-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  container-type: inline-size;
  border: 4px solid #66c7ba;  /* green frame, the teal of the signs */
}

.disp-cover-card {
  border-radius: 1rem 1rem 0 0;
}

.disp-cover svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.disp-cover-name,
.disp-cover-logo {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.disp-cover-name {
  font-weight: 700;
  line-height: 1.35;
}

/* Look A: name on white (left), logo on navy (right), purple band between. */
.disp-cover-name-a {
  left: 0;
  width: 44%;
  padding: 0 4%;
  color: var(--aman-navy);
  font-size: 1.3rem;
  font-size: 7.5cqw;
}

.disp-cover-logo {
  right: 0;
  width: 40%;
}

.disp-cover-logo img {
  width: 84%;
  height: auto;
}

/* Look B: name in white on navy, teal wave on the right. */
.disp-cover-name-b {
  left: 0;
  width: 80%;
  padding: 0 6%;
  color: #fff;
  font-size: 1.9rem;
  font-size: 11cqw;
}

/* Big touch-friendly contact buttons */
.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border-radius: 2rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
}

.contact-btn:hover { color: #fff; filter: brightness(.92); }
.contact-btn .bi { font-size: 1.25rem; }
.btn-whatsapp { background: #25d366; }
.btn-call { background: var(--aman-navy); }
.btn-facebook { background: #1877f2; }
.btn-instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); }
.btn-map { background: var(--aman-teal-dark); }
.btn-link-extra { background: var(--aman-purple); }

/* A dispensary's address: tapping it opens the map (Dispensary.map_link). */
.address-link {
  color: var(--aman-teal-dark);
  text-decoration: underline dotted;
  text-underline-offset: .25em;
}

.address-link:hover { color: var(--aman-navy); }

.gallery-thumb {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  border-radius: .75rem;
  cursor: zoom-in;
}

.number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--aman-teal);
  color: var(--aman-navy);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- «مواعيد الأطباء» ------------------------------------------------------
   Each region has a colour (the dispensary's header), each specialty has a
   colour (its badge). The colour comes from the |tone filter: number % 8. */
.tone-0 { --tone: #1f9e88; --tone-soft: #e3f6f2; }
.tone-1 { --tone: #5b5bd6; --tone-soft: #ececfb; }
.tone-2 { --tone: #d9480f; --tone-soft: #fdece4; }
.tone-3 { --tone: #1971c2; --tone-soft: #e5f0fa; }
.tone-4 { --tone: #a61e4d; --tone-soft: #f9e6ed; }
.tone-5 { --tone: #2b8a3e; --tone-soft: #e6f4e9; }
.tone-6 { --tone: #9c6500; --tone-soft: #fbf1dc; }
.tone-7 { --tone: #7048e8; --tone-soft: #efeafd; }

/* Each dispensary: a coloured background and a thin frame in its region's colour. */
.schedule-place {
  overflow: hidden;
  background: var(--tone-soft);
  border: 1px solid var(--tone);
}

.schedule-place-head {
  color: var(--tone);
  text-decoration: none;
  border-bottom: 1px solid var(--tone);
}

.schedule-place-head:hover { color: var(--aman-navy); }

.schedule-place .schedule-day { border-color: rgba(18, 18, 64, .12) !important; }

.schedule-date {
  flex: 0 0 8.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  align-self: flex-start;
  padding: .3rem .6rem;
  border-radius: .5rem;
  background: #fff;
  color: var(--aman-navy);
}

.schedule-date.is-today { background: #d3f9d8; }

.schedule-row { padding: .3rem 0; }

.schedule-time {
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: .4rem;
  background: var(--aman-navy);
  color: #fff;
  font-size: .9rem;
}

.schedule-row.is-cancelled .schedule-time {
  background: #fa5252;
  text-decoration: line-through;
}

/* The specialty, next to the doctor's name, on a filled colour of its own. */
.tone-badge {
  background: var(--tone);
  color: #fff;
  font-size: .8rem;
}

/* Home page banner (apps/announcements). «عاجل» in red, first. */
.announcements {
  display: grid;
  gap: .5rem;
}

.announcement {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: #e3f6f2;
  border-inline-start: 5px solid var(--aman-teal-dark);
  color: var(--aman-navy);
  font-weight: 500;
}

.announcement > .bi { color: var(--aman-teal-dark); font-size: 1.2rem; }

.announcement.is-urgent {
  background: #fdecec;
  border-color: #e03131;
}

.announcement.is-urgent > .bi { color: #e03131; }

.announcement-link {
  flex-shrink: 0;
  font-weight: 700;
  color: inherit;
}

/* «أقرب مستوصف لخدمتك» (public/_nearest.html, static/js/nearest.js). */
.nearest-list {
  display: grid;
  gap: .6rem;
}

.nearest-item {
  padding: .75rem;
  border-radius: .75rem;
  background: var(--aman-bg);
}

.nearest-item.is-first {
  background: #e3f6f2;
  outline: 2px solid var(--aman-teal);
}

/* «تواصل معنا» honeypot: hidden in place. Never push it off-screen with
   left:-10000px: on an RTL page that side scrolls, giving a blank sideways scroll. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.error-code {
  font-size: 5rem;
  font-weight: 700;
  color: var(--aman-purple);
  line-height: 1;
}
