/* Top nav + footer for sub-pages now live in style.css (shared site-wide).
   This file covers everything specific to the inner content of center pages. */

/* ===== About section ===== */
.about {
  max-width: 720px;
  margin: 48px auto;
  padding: 0 24px;
  text-align: center;
}
.about h1 {
  color: var(--pine);
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 16px;
}
.about p {
  color: var(--ink);
  line-height: 1.9;
  margin-bottom: 24px;
}

/* ===== Gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 0 24px;
}
.gallery-item {
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 600px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Map ===== */
.map-section {
  max-width: 720px;
  margin: 0 auto 64px;
  padding: 0 24px;
  text-align: center;
}
.map-section h2 {
  color: var(--pine);
  margin-bottom: 16px;
}
.map-wrap {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(36,68,58,0.1);
}
.map-wrap iframe {
  width: 100%;
  height: 320px;
  border: 0;
  display: block;
}
/* ===== Page header (used on services, articles, etc.) ===== */
.page-header {
  max-width: 720px;
  margin: 48px auto 32px;
  padding: 0 24px;
  text-align: center;
}
.page-header h1 {
  color: var(--pine);
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 10px;
}
.page-header p {
  color: var(--sage);
  font-size: 15px;
}

/* ===== Services grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
@media (min-width: 700px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.1);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(36, 68, 58, 0.2);
}
.service-card h2 {
  color: var(--pine);
  font-size: 18px;
  margin-bottom: 8px;
  text-align: center;
}
.service-card p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
}
/* ===== Booking page ===== */
.booking-box {
  max-width: 500px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
.booking-box label {
  display: block;
  font-weight: 600;
  color: var(--pine);
  margin-bottom: 6px;
  margin-top: 18px;
}
.booking-box input[type="date"],
.booking-box input[type="text"],
.booking-box input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.slot-btn {
  padding: 10px 8px;
  border: 1px solid var(--sage);
  background: white;
  color: var(--pine);
  border-radius: 10px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.slot-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}
.slot-btn.active {
  background: var(--amber);
  border-color: var(--amber);
  color: white;
}

.loading, .empty {
  grid-column: 1 / -1;
  color: var(--sage);
  text-align: center;
  padding: 20px 0;
}

.booking-form { margin-top: 24px; }
.booking-form.hidden { display: none; }

.selected-summary {
  background: rgba(124, 154, 133, 0.15);
  color: var(--pine);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.status-msg {
  margin-top: 16px;
  font-weight: 600;
  text-align: center;
}
.status-msg.success { color: var(--pine); }
.status-msg.error { color: #B3402A; }
/* ===== Jalali calendar picker ===== */
.jalali-picker { position: relative; }

.date-btn {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 10px;
  background: white;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  text-align: right;
  cursor: pointer;
}

.calendar-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.15);
  border-radius: 14px;
  box-shadow: 0 12px 24px -8px rgba(36, 68, 58, 0.25);
  padding: 16px;
  z-index: 30;
}
.calendar-panel.hidden { display: none; }

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--pine);
}
.calendar-header button {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--pine);
  cursor: pointer;
  padding: 4px 10px;
}

.calendar-weekdays, .calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}
.calendar-weekdays span {
  font-size: 12px;
  font-weight: 700;
  color: var(--sage);
  padding: 4px 0;
}

.cal-day {
  border: none;
  background: none;
  padding: 8px 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}
.cal-day:hover:not(.disabled) { background: rgba(124, 154, 133, 0.2); }
.cal-day.today { font-weight: 700; color: var(--amber); }
.cal-day.selected { background: var(--amber); color: white; }
.cal-day.disabled { color: var(--muted); cursor: not-allowed; }
/* ===== Admin ===== */
.admin-box {
  max-width: 700px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
.admin-box label {
  display: block;
  font-weight: 600;
  color: var(--pine);
  margin-bottom: 6px;
}
.admin-box input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 14px;
}

.appt-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}
.appt-table th, .appt-table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid rgba(36, 68, 58, 0.1);
  font-size: 14px;
}
.appt-table th {
  background: var(--pine);
  color: white;
  font-weight: 700;
}
.delete-btn {
  background: #B3402A;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
}
.hidden { display: none; }
/* ===== Admin: articles ===== */
.admin-subheading {
  color: var(--pine);
  font-size: 18px;
  margin: 28px 0 14px;
}
#articleForm label {
  display: block;
  font-weight: 600;
  color: var(--pine);
  margin-top: 14px;
  margin-bottom: 6px;
}
#articleForm input[type="text"],
#articleForm input[type="file"],
#articleForm textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}
#articleForm textarea { resize: vertical; }

.admin-articles-list { margin-top: 12px; }
.admin-article-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: white;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(36, 68, 58, 0.1);
}
/* ===== Public articles list ===== */
.articles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 64px;
  padding: 0 24px;
}
@media (min-width: 700px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}

.article-card {
  display: block;
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.1);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(36, 68, 58, 0.2);
}
.article-card img,
.article-card-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #DCD2B8;
  display: block;
}
.article-card-body { padding: 16px; }
.article-card-body h2 {
  color: var(--pine);
  font-size: 16px;
  margin-bottom: 6px;
}
.article-card-body p {
  color: var(--sage);
  font-size: 13px;
  line-height: 1.7;
}

/* ===== Article detail page ===== */
.article-detail {
  max-width: 700px;
  margin: 40px auto 64px;
  padding: 0 24px;
}
.article-cover {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 24px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-detail h1 {
  color: var(--pine);
  font-size: clamp(22px, 4vw, 30px);
  margin-bottom: 20px;
}
.article-video {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 20px;
}
.article-body {
  color: var(--ink);
  line-height: 2;
  font-size: 16px;
}
/* ===== Chatbot widget ===== */
.chatbot-btn {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pine);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 20px -4px rgba(36, 68, 58, 0.4);
  z-index: 40;
  transition: transform 0.2s ease;
}
.chatbot-btn:hover { transform: scale(1.08); background: var(--amber); }

.chatbot-panel {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 320px;
  max-width: 90vw;
  height: 440px;
  max-height: 70vh;
  background: white;
  border-radius: 18px;
  box-shadow: 0 20px 50px -10px rgba(36, 68, 58, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.chatbot-panel.closed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.chatbot-header {
  background: var(--pine);
  color: white;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.chatbot-close {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-line;
}
.chatbot-bubble.bot {
  background: rgba(124, 154, 133, 0.18);
  color: var(--ink);
  align-self: flex-start;
}
.chatbot-bubble.user {
  background: var(--amber);
  color: white;
  align-self: flex-end;
}

.chatbot-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}
.chatbot-reply-btn {
  border: 1px solid var(--sage);
  background: white;
  color: var(--pine);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.chatbot-reply-btn:hover { background: var(--pine); color: white; }

.chatbot-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(36,68,58,0.1);
}
.chatbot-input-row.hidden { display: none; }
.chatbot-text-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(36,68,58,0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
}
.chatbot-input-row button {
  background: var(--pine);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: inherit;
  cursor: pointer;
}
/* ===== Contact page ===== */
.contact-box {
  max-width: 600px;
  margin: 0 auto 48px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.1);
  border-radius: 14px;
  padding: 18px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--leaf-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--pine);
}
.contact-social {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.contact-social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--leaf-light);
  color: var(--pine);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.contact-social a:hover { background: var(--leaf); color: white; }
.contact-social svg { width: 15px; height: 15px; stroke: currentColor; }
.contact-item strong {
  display: block;
  color: var(--pine);
  margin-bottom: 4px;
}
.contact-item p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line; /* makes \n in hoursText actually break lines */
}

/* ===== Admin: patient files ===== */
.admin-box--wide { max-width: 980px; }
.patient-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.patient-search {
  flex: 1;
  min-width: 220px;
  padding: 11px 16px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
}
.patient-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .patient-form-grid { grid-template-columns: 1fr; } }
.patient-form-grid .field-full { grid-column: 1 / -1; }
.patient-form-grid label {
  display: block;
  font-weight: 600;
  color: var(--pine);
  margin-bottom: 6px;
  font-size: 13.5px;
}
.patient-form-grid input[type="text"],
.patient-form-grid input[type="tel"],
.patient-form-grid input[type="number"],
.patient-form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(36, 68, 58, 0.2);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
}
.patient-form-grid textarea { resize: vertical; }
.report-checks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.report-checks label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  cursor: pointer;
}
.report-checks input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--leaf); cursor: pointer; }
.patient-form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.btn-secondary {
  background: rgba(124,154,133,0.15);
  color: var(--pine);
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  font-size: 14px;
}

.patient-list { display: grid; gap: 10px; margin-bottom: 24px; }
.patient-row {
  background: white;
  border: 1px solid rgba(36,68,58,0.1);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.patient-row:hover { box-shadow: 0 8px 20px -10px rgba(20,64,47,0.25); }
.patient-row-info strong { color: var(--pine); display: block; font-size: 15px; }
.patient-row-info span { color: var(--sage); font-size: 12.5px; }
.patient-row-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  color: var(--sage);
}
.patient-empty { text-align: center; color: var(--sage); padding: 24px; }

.patient-detail {
  background: white;
  border: 1px solid rgba(36,68,58,0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.patient-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 24px;
  margin-bottom: 18px;
}
@media (max-width: 640px) { .patient-detail-grid { grid-template-columns: 1fr; } }
.patient-detail-grid div strong { display: block; color: var(--pine); font-size: 12.5px; margin-bottom: 2px; }
.patient-detail-grid div span { color: var(--ink); font-size: 14.5px; }
.patient-detail-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--leaf-light);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb.is-pdf { background: var(--leaf-light); }
.pdf-thumb-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  padding: 8px;
  text-decoration: none;
  text-align: center;
}
.pdf-thumb-link .pdf-icon {
  display: inline-block;
  background: var(--pine);
  color: white;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 8px;
  border-radius: 6px;
}
.pdf-thumb-link .pdf-name {
  font-size: 10.5px;
  color: var(--ink);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.photo-thumb .photo-remove {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(179,64,42,0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}
.photo-upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ===== Team section (About us team grid) ===== */
.team-banner {
  max-width: 900px;
  margin: 0 auto 32px;
  padding: 0 24px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 32px -12px rgba(20, 64, 47, 0.2);
}
.team-banner img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto 56px;
  padding: 0 24px;
}
.team-card {
  background: white;
  border: 1px solid rgba(36, 68, 58, 0.08);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px -14px rgba(20, 64, 47, 0.28);
}
.team-card .team-photo {
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--leaf-light);
}
.team-card .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-card .team-body {
  padding: 18px 16px 22px;
}
.team-card h3 {
  color: var(--pine);
  font-size: 16.5px;
  font-weight: 800;
  margin-bottom: 4px;
}
.team-card .team-role {
  color: var(--amber);
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 8px;
}
.team-card .team-credential {
  color: var(--sage);
  font-size: 11.5px;
  margin-bottom: 10px;
}
.team-card .team-bio {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.8;
}

/* "تیم ما" label — bigger than the site-wide default .eyebrow size */
#team .eyebrow {
  font-size: 15px;
}

/* Hide the "رزرو نوبت" button everywhere on center pages (online booking is disabled) */
a[href="appointment.html"] {
  display: none !important;
}
