/* ==================================================================
   Public page styles — صفحة الزبائن
   تستعمل المتغيّرات من theme.css و base.css و components.css
   ================================================================== */

.page { max-width: 920px; margin: 0 auto; padding: 24px 18px 60px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--green-d), var(--green));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 30px 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '🌿';
  position: absolute;
  left: -10px; top: -30px;
  font-size: 180px;
  opacity: .08;
  pointer-events: none;
  line-height: 1;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}
.hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.hero .sub { font-size: 14.5px; color: #d0e0cc; margin-top: 6px; font-weight: 500; }
.hero .loc {
  font-size: 13.5px;
  color: #b8ccb4;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Farm selector ---------- */
.farm-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.farm-bar label { font-size: 13px; color: var(--ink-soft); font-weight: 700; }
.farm-bar select {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--green);
  outline: none;
  cursor: pointer;
  flex: 1;
  min-width: 140px;
  padding: 4px;
}

/* ---------- Legend ---------- */
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot.free    { background: #4a8259; }
.dot.partial { background: #c97b35; }
.dot.full    { background: #b54434; }

/* ---------- Calendar — صفحة عامة ---------- */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.cal-nav { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: center; }
.cal-nav .mlabel {
  font-size: 19px;
  font-weight: 800;
  font-family: var(--font-display);
  min-width: 180px;
  text-align: center;
  color: var(--ink);
}
.cal-nav button {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 20px;
  color: var(--green);
  display: grid;
  place-items: center;
  transition: .15s;
}
.cal-nav button:hover:not(:disabled) {
  background: var(--green);
  color: #fff;
  transform: scale(1.05);
}
.cal-nav button:disabled { opacity: .4; cursor: not-allowed; }

.cal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.dow {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
  padding: 8px 0;
  font-family: var(--font-display);
}
.cell {
  aspect-ratio: 1/1;
  min-height: 54px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 6px 4px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .14s;
  position: relative;
}
.cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -8px rgba(47,93,58,.4);
}
.cell.muted { background: #f6f2e8; opacity: .4; cursor: default; }
.cell.muted:hover { transform: none; box-shadow: none; }
.cell.past { opacity: .5; cursor: default; }
.cell.past:hover { transform: none; box-shadow: none; }
.cell.today {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}
.cell.free    { border-color: #a7c5a8; background: #eef5ec; }
.cell.partial { border-color: #e7c08a; background: #fbf2e0; }
.cell.full    { border-color: #e1a8a1; background: #fbe7e3; cursor: not-allowed; }
.cell.full:hover { transform: none; box-shadow: none; }
.cell .dn {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-family: var(--font-display);
  line-height: 1;
}
.cell.full .dn    { color: var(--red); }
.cell.partial .dn { color: var(--amber); }
.cell.free .dn    { color: var(--green); }
.cell .lab {
  font-size: 9.5px;
  font-weight: 700;
  margin-top: 4px;
  letter-spacing: 0;
}

/* ---------- Day details ---------- */
.details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 20px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.details .dtitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--font-display);
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.details .dtitle .date  { color: var(--green-d); }
.details .dtitle .badge {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
}
.badge.free    { background: #e4efe2; color: var(--green); }
.badge.partial { background: #fbedda; color: var(--amber); }
.badge.full    { background: #fbe7e3; color: var(--red); }

.shift-list { display: grid; gap: 10px; }
.shift {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  flex-wrap: wrap;
}
.shift.taken { background: #fbe7e3; border-color: #e1a8a1; }
.shift.taken .name { color: var(--red); }
.shift .name { font-weight: 800; font-size: 15px; }
.shift .time { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; font-weight: 600; }
.shift .stat {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.shift.taken .stat { background: var(--red); color: #fff; }
.shift:not(.taken) .stat { background: var(--green); color: #fff; }

.help-text {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  padding: 10px;
  background: #faf6ec;
  border-radius: var(--radius-sm);
}

/* ---------- CTA ---------- */
.cta {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.cta p  { color: var(--ink-soft); font-size: 14px; margin-bottom: 14px; }
.cta .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.cta .btn-wa { background: #25D366; color: #fff; }
.cta .btn-wa:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .page { padding: 14px 12px 40px; }
  .hero { padding: 22px 18px; border-radius: var(--radius-lg); }
  .hero h1 { font-size: 23px; }
  .cal { padding: 10px; }
  .cal-grid { gap: 4px; }
  .cell { min-height: 46px; padding: 4px 2px; border-radius: var(--radius-sm); border-width: 1px; }
  .cell .dn { font-size: 13.5px; }
  .cell .lab { display: none; }
  .dow { font-size: 11px; padding: 5px 0; }
  .cal-nav .mlabel { min-width: 120px; font-size: 16px; }
  .cal-nav button { width: 38px; height: 38px; font-size: 18px; }
  .legend { font-size: 12px; gap: 10px; }
  .farm-bar { padding: 9px 12px; }
  .shift { padding: 12px 14px; }
}
@media (max-width: 360px) {
  .cell { min-height: 42px; }
}

/* ===== بطاقة معلومات التواصل ===== */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 12px 0 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14.5px;
  color: #2b3d2a;
}
.contact-row .ci {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.contact-row .ct { font-weight: 600; }

.contact-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.contact-phones:empty,
.contact-phones:not(:has(*)) {
  border: none;
  padding: 0;
  margin: 0;
}
.phone-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #2e5d2f, #1d3d1d);
  color: #fff !important;
  border-radius: 999px;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  text-decoration: none;
  transition: all .2s;
  direction: ltr;
}
.phone-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 93, 47, .3);
}

@media (max-width: 480px) {
  .contact-card { padding: 12px 14px; }
  .phone-btn { font-size: 13px; padding: 7px 12px; }
}

/* ===== العنوان داخل قسم CTA ===== */
.cta-address {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: #2b3d2a;
  margin: 12px auto 16px;
  padding: 10px 18px;
  background: rgba(255,255,255,.7);
  border: 1px dashed rgba(46,93,47,.3);
  border-radius: 12px;
  max-width: fit-content;
}
.cta-address span { direction: rtl; }

/* تحسين أزرار الأرقام في CTA */
.cta .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}
.cta .actions .btn-pri {
  direction: ltr;
  font-family: 'Cairo', sans-serif;
}
