:root {
  --office-ink: #2f2823;
  --office-brown: #594a3f;
  --office-muted: #766b63;
  --office-cream: #f7f2eb;
  --office-line: #e4dbd1;
  --office-sand: #eee5da;
  --office-deep: #4d4036;
  --office-white: #fffdfa;
}

body {
  color: var(--office-ink);
  background: #fffdfb;
  font-family: "Vazirmatn", sans-serif;
  letter-spacing: -.01em;
}

/* Legacy theme components still consume these RGB variables. Keep them in the
   approved brown palette even when an old blue theme value is stored. */
body.persian-office {
  --theme-default: 77, 64, 54;
  --theme-default-dark: 57, 47, 40;
}

/* Approved Persian reference system */
.persian-office header { position: relative; z-index: 20; }
.persian-office .top-header { background: var(--office-cream); border: 0; min-height: 38px; }
.persian-office .top-header .custom-container { max-width: 1340px; }
.persian-office .top-header-left a,
.persian-office .top-header-right a { color: var(--office-muted); font-size: .78rem; }
.persian-office .top-header-right a:nth-child(-n+2) { display: none; }
.persian-office .main-header { background: rgba(255,253,250,.97); border-bottom: 1px solid var(--office-line); box-shadow: 0 4px 20px rgba(77,64,54,.04); }
.persian-office .main-menu { min-height: 76px; }
.persian-office .brand-logo a { display: flex; align-items: center; gap: 10px; }
.persian-office .brand-logo img { width: auto; max-width: 185px; height: 52px; object-fit: contain; }
.persian-office .brand-logo img.light { display: block; filter: sepia(.25) saturate(.7); }
.persian-office .brand-logo img.dark { display: none; }
.persian-office .brand-logo .brand-name { color: var(--office-deep); font-size: .98rem; font-weight: 800; }
.persian-office .main-navbar .nav-menu { gap: 8px; }
.persian-office .main-navbar .nav-link { color: var(--office-ink); font-size: .86rem; padding: 27px 12px !important; position: relative; }
.persian-office .main-navbar .nav-link:hover,
.persian-office .main-navbar .nav-link.active { color: var(--office-deep); }
.persian-office .main-navbar .nav-link:hover:after,
.persian-office .main-navbar .nav-link.active:after { content: ""; position: absolute; right: 12px; left: 12px; bottom: 13px; height: 1px; background: var(--office-deep); }
.persian-office .menu-right .default-btn { border: 1px solid var(--office-line); border-radius: 50%; background: transparent; width: 38px; height: 38px; }
.persian-office .menu-right .default-btn.mode { display: none; }
.persian-office .header-booking-pill { display:inline-flex; align-items:center; gap:8px; background:var(--office-deep); color:#fff; border-radius:999px; padding:10px 20px; font-size:.78rem; font-weight:700; white-space:nowrap; order:-1; }

@media (min-width: 992px) {
  .persian-office .menu-right .header-account-menu { display: none; }
}

.persian-office:not(.reference-home) .site-main > section:not(.breadcrumb-section) { padding-top: 72px; padding-bottom: 72px; }
.persian-office .title h2 { color: var(--office-ink); font-size: clamp(1.75rem, 3vw, 2.7rem); font-weight: 700; }
.persian-office .title .dot-img span { color: var(--office-muted); font-size: .82rem; }
.persian-office .service-details,
.persian-office .blog-box { border: 1px solid var(--office-line); border-radius: 14px; overflow: hidden; background: var(--office-white); box-shadow: 0 8px 24px rgba(77,64,54,.06); }
.persian-office .service-details .service-img { height: 240px; overflow: hidden; }
.persian-office .service-details .service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.persian-office .service-details:hover .service-img img { transform: scale(1.04); }
.persian-office .service-content { padding: 22px 20px 24px; }
.persian-office .service-content h4 { color: var(--office-ink); font-size: 1.05rem; font-weight: 750; }
.persian-office .service-content p { color: var(--office-muted); line-height: 2; font-size: .82rem; }
.persian-office .label-img { top: 14px; right: 14px; z-index: 2; background: var(--office-deep); color: #fff; border-radius: 999px; padding: 5px 13px; }
.persian-office .label-img img { display: none; }
.persian-office .label-img span { font-size: .72rem; }
.persian-office .btn.sub-btn,
.persian-office .btn.sec-btn-right { background: var(--office-deep); border-color: var(--office-deep); color: #fff; border-radius: 999px; padding: 10px 21px !important; }
.persian-office .btn.sub-btn-2 { color: var(--office-deep); border: 1px solid #b8aa9d; border-radius: 999px; background: transparent; }
.persian-office .about-us-section,
.persian-office .light-section { background: var(--office-cream); }
.persian-office .about-us-section .image-container img { border-radius: 0 26px 0 26px !important; max-height: 430px; object-fit: cover; }
.persian-office .blog-img { height: 210px; overflow: hidden; }
.persian-office .blog-img img { width: 100%; height: 100%; object-fit: cover; }
.persian-office .blog-content { padding: 18px 20px 22px; }
.persian-office .blog-content h5 { color: var(--office-ink); line-height: 1.7; }

.persian-office .footer-dark.reference-footer { background: var(--office-cream); color: var(--office-ink); border-top: 1px solid var(--office-line); }
.persian-office .reference-footer .footer-1 { padding: 62px 0 42px; }
.persian-office .reference-footer .footer-content h5 { color: var(--office-ink); font-weight: 800; }
.persian-office .reference-footer .footer-content p,
.persian-office .reference-footer .footer-content a { color: var(--office-muted); font-size: .82rem; line-height: 2; }
.persian-office .copyright { background: #e8ded2; border-top: 1px solid var(--office-line); }
.persian-office .right-sidebar,
.persian-office .sidebar-wrapper,
.persian-office .blog-sidebar,
.persian-office .blog-left-sidebar,
.persian-office .left-sidebar { background: var(--office-cream); border: 1px solid var(--office-line); border-radius: 16px; padding: 24px; }
.persian-office .blog-left-sidebar .sidebar-box { background:#fffdfa; border:1px solid var(--office-line); border-radius:12px; padding:20px; margin-bottom:18px; }
.persian-office .blog-left-sidebar .sidebar-box:last-child { margin-bottom:0; }
.persian-office .blog-left-sidebar .sidebar-title h5 { color:var(--office-deep); font-weight:750; }
.persian-office .blog-left-sidebar input { border:1px solid var(--office-line); border-radius:999px; background:#fff; }
.persian-office .right-sidebar h5,
.persian-office .sidebar-wrapper h5,
.persian-office .blog-sidebar h5 { color: var(--office-deep); border-bottom: 1px solid var(--office-line); padding-bottom: 12px; }

/* Shared header: logo on the right, simple centered links, actions on the left. */
.persian-office .main-header { background: rgba(255,253,250,.94); box-shadow: none; }
.persian-office .main-header .main-menu { gap: 25px; }
.persian-office .main-header .main-menu .menu-left .brand-logo a { width: auto; min-width: 195px; }
.persian-office .brand-logo .brand-name { white-space: normal; line-height: 1.45; }
.persian-office #main-nav { margin-inline: auto; }
.persian-office .main-navbar .nav-menu { flex-wrap: nowrap; }
.persian-office .main-navbar .nav-link { white-space: nowrap; }
.persian-office .menu-right .icon-nav { flex-direction: row; }
.persian-office .menu-right .default-btn img { width: 18px; height: 18px; }
.persian-office .header-booking-pill { order: 0; }
.persian-office .header-booking-pill:hover { color: #fff; background: #756457; }
.persian-office .menu-right .user-dropdown { border: 1px solid var(--office-line); border-radius: 12px !important; background: var(--office-white) !important; }
.persian-office .menu-right .user-dropdown a:hover { color: var(--office-brown) !important; letter-spacing: 0 !important; }

/* The reference footer is light, flat and editorial rather than a dark news-feed panel. */
.persian-office .footer-dark.reference-footer { background: #f9f6f2; }
.persian-office .reference-footer .footer-1 { padding: 54px 0 42px; }
.persian-office .reference-footer .footer-content { height: 100%; }
.persian-office .reference-footer .footer-logo img { width: auto; max-width: 190px; height: auto; max-height: 68px; object-fit: contain; }
.persian-office .reference-footer .footer-logo .brand-name { color: var(--office-deep); font-weight: 750; margin: 10px 0 5px; }
.persian-office .reference-footer .footer-content h5 { font-size: .94rem; margin-bottom: 15px; }
.persian-office footer.footer-dark.reference-footer .footer-1 .footer-content > div .footer-title h5,
.persian-office footer.footer-dark.reference-footer .footer-1 .footer-content h5 { color: var(--office-ink) !important; opacity: 1; }
.persian-office footer.footer-dark.reference-footer .footer-1 .footer-content .footer-logo p { color: var(--office-muted); }
.persian-office footer.footer-dark.reference-footer ~ .copyright,
.persian-office footer.footer-dark.reference-footer ~ .copyright .d-flex p { background: #f9f6f2; color: var(--office-muted); }
.persian-office .reference-footer .footer-content ul { padding: 0; margin: 0; }
.persian-office .reference-footer .footer-content li { margin-bottom: 3px; }
.persian-office .reference-footer .footer-content a:hover { color: var(--office-deep); }
.reference-footer-social { display: flex; gap: 15px; margin-top: 20px; }
.persian-office .reference-footer-social a { font-size: 1.15rem; color: var(--office-deep); }
.persian-office .reference-footer-cta { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--office-deep); color: #fff !important; border-radius: 999px; padding: 9px 20px; margin-top: 12px; }
.persian-office .reference-footer-cta:hover { background: var(--office-brown); color: #fff; }
.persian-office .copyright { background: #f9f6f2; padding: 13px 0; font-size: .74rem; }
.persian-office .copyright a { color: var(--office-muted); }
.persian-office .copyright .d-flex { align-items: center; gap: 20px; }

/* Inner-page controls: the old theme relies on decorative pseudo-elements and
   white text over transparent backgrounds, which leaves links unreadable. */
.persian-office .site-main .btn.sub-btn,
.persian-office .site-main .btn.sec-btn-right,
.persian-office .site-main .btn.sub-btn-2,
.persian-office .site-main .btn-book {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 43px; padding: 11px 23px !important; border-radius: 999px !important;
  font-family: inherit; font-size: .84rem; font-weight: 650;
  line-height: 1.5; text-transform: none; letter-spacing: 0;
  box-shadow: none; text-decoration: none; border-image: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.persian-office .site-main .btn.sub-btn,
.persian-office .site-main .btn.sec-btn-right,
.persian-office .site-main .btn-book { background: var(--office-deep) !important; border: 1px solid var(--office-deep) !important; color: #fff !important; }
.persian-office .site-main .btn.sub-btn-2 { background: transparent !important; border: 1px solid #b8aa9d !important; color: var(--office-deep) !important; }
.persian-office .site-main .btn.sub-btn:hover,
.persian-office .site-main .btn.sec-btn-right:hover,
.persian-office .site-main .btn-book:hover { background: #756457 !important; border-color: #756457 !important; color: #fff !important; }
.persian-office .site-main .btn.sub-btn-2:hover { background: var(--office-sand) !important; color: var(--office-deep) !important; }
.persian-office .site-main .btn.sub-btn::after,
.persian-office .site-main .btn.sub-btn-2::after,
.persian-office .site-main .btn.sec-btn-right::after { content: none !important; display: none !important; }

/* Replace the mirrored blue medical-theme banner with a compact neutral title. */
.persian-office .site-main .breadcrumb-section {
  transform: none !important; margin: 0; border-radius: 0;
  background: linear-gradient(120deg, #f7f2eb, #eee6dc);
  border-bottom: 1px solid var(--office-line);
}
.persian-office .site-main .breadcrumb-section .img-overlay,
.persian-office .site-main .breadcrumb-section .overlay-img {
  transform: none !important; padding: 45px 0 !important;
  background: none; backdrop-filter: none;
}
.persian-office .site-main .breadcrumb-section .page-title h3 {
  color: var(--office-ink); font-family: inherit; font-size: clamp(1.5rem, 2.3vw, 2.35rem);
  font-weight: 700; line-height: 1.6; text-transform: none; overflow-wrap: anywhere;
}
.persian-office .site-main .breadcrumb-section .breadcrumb-item,
.persian-office .site-main .breadcrumb-section .breadcrumb-item.active,
.persian-office .site-main .breadcrumb-section .breadcrumb-item::before { color: var(--office-muted) !important; }
.persian-office .site-main .breadcrumb-section .breadcrumb-item:first-child a { background: var(--office-sand); border-radius: 50%; }
.persian-office .site-main .breadcrumb-section .breadcrumb-item:first-child a svg { stroke: var(--office-deep); }
.persian-office .site-main .breadcrumb-section .icon-breadcrumb .breadcrumb { flex-wrap: wrap; }

.persian-office .site-main h2, .persian-office .site-main h3,
.persian-office .site-main h4, .persian-office .site-main h5 { color: var(--office-ink); font-family: inherit; }
.persian-office .site-main p { color: var(--office-muted); line-height: 1.95; }
.persian-office .site-main .blog-left-sidebar,
.persian-office .site-main .right-sidebar,
.persian-office .site-main .left-sidebar { box-shadow: none; }
.persian-office .site-main .blog-left-sidebar .sidebar-box h5 { color: var(--office-ink); }
.persian-office .site-main .blog-left-sidebar .sidebar-box a { color: var(--office-deep); }
.persian-office .site-main .blog-left-sidebar .sidebar-box a:hover { color: #8b7462; }
.persian-office .site-main .blog-details-box { background: var(--office-white); border: 1px solid var(--office-line); border-radius: 14px; overflow: hidden; }
.persian-office .site-main .blog-details-box .blog-content { padding: 24px; }
.persian-office .site-main .blog-details-box .blog-img { max-height: 440px; overflow: hidden; }
.persian-office .site-main .blog-details-box .blog-img img { width: 100%; max-height: 440px; object-fit: cover; }
.persian-office .site-main .about-info-content { padding: 0; }
.persian-office .site-main .about-info-content h5 { font-size: clamp(1.45rem, 2.1vw, 2rem); line-height: 1.55; }
.persian-office .site-main .about-info-content .btn { margin-bottom: 0; }
.persian-office .site-main .about-info-content > div a:not(.btn) { color: var(--office-deep); }
.persian-office .site-main .customer-wrap { row-gap: 18px; }
.persian-office .site-main .customer-wrap .customer-wrapper { padding: 0; }
.persian-office .site-main .customer-wrap .customer-wrapper .customer-box {
  width: 100%; min-height: 150px; padding: 34px 16px;
  background: var(--office-cream); border: 1px solid var(--office-line);
  border-radius: 14px; box-shadow: none;
}
.persian-office .site-main .customer-wrap .customer-wrapper .customer-box h4,
.persian-office .site-main .customer-wrap .customer-wrapper .customer-box h4 span { color: var(--office-deep); font-size: 1.65rem; }
.persian-office .site-main .customer-wrap .customer-wrapper .outline-box { display: none; }

/* Search is a small, calm dialog—not the legacy full-width theme panel. */
.office-search-modal { direction: rtl; text-align: right; }
.office-search-modal .modal-dialog { max-width: min(640px, calc(100vw - 32px)); }
.office-search-modal .modal-content { background: var(--office-white); border: 1px solid var(--office-line); border-radius: 18px; box-shadow: 0 24px 72px rgba(38,30,24,.17); overflow: hidden; }
.office-search-modal .modal-header { display: flex; align-items: flex-start; justify-content: space-between; border: 0; padding: 28px 30px 12px; }
.office-search-modal .modal-header h5 { color: var(--office-ink); font-family: inherit; font-size: 1.4rem; margin: 4px 0 0; }
.office-search-modal .office-search-eyebrow { color: var(--office-muted); font-size: .76rem; }
.office-search-modal .btn-close { flex: 0 0 auto; width: 30px; height: 30px; margin: 0; padding: 6px; border: 1px solid var(--office-line); border-radius: 50%; opacity: .8; background-size: 10px; }
.office-search-modal .modal-body { padding: 12px 30px 30px; }
.office-search-field { display: flex; align-items: center; min-height: 54px; border: 1px solid var(--office-line); border-radius: 12px; background: #fff; overflow: hidden; }
.office-search-field:focus-within { border-color: var(--office-brown); box-shadow: 0 0 0 3px rgba(89,74,63,.1); }
.office-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--office-ink); padding: 13px 17px; font-family: inherit; }
.office-search-field input::placeholder { color: #a5968a; }
.office-search-field button { flex: 0 0 48px; height: 48px; border: 0; border-radius: 9px; margin: 2px; background: var(--office-deep); color: #fff; font-size: 1.15rem; }
.office-search-field button:hover { background: var(--office-brown); }
.office-search-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 17px; }
.office-search-links a { display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--office-line); border-radius: 999px; padding: 9px 16px; color: var(--office-deep); font-size: .82rem; }
.office-search-links a:hover { background: var(--office-cream); color: var(--office-deep); }
@media (max-width:575px) { .office-search-modal .modal-header { padding: 22px 20px 10px; } .office-search-modal .modal-body { padding: 12px 20px 22px; } }

.main-header,
.top-header {
  background: rgba(255, 253, 251, .96);
  border-color: var(--office-line);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo .brand-name {
  color: var(--office-ink);
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.nav-link,
.top-header a,
.footer-content a {
  color: var(--office-ink);
}

.nav-link:hover,
.top-header a:hover,
.footer-content a:hover {
  color: var(--office-brown);
}

.footer-dark {
  background: var(--office-cream);
  color: var(--office-ink);
}

.copyright {
  background: #eee6dc;
  color: var(--office-muted);
}

@media (max-width: 767.98px) {
  .brand-logo .brand-name {
    font-size: .82rem;
  }

  .home-section.style-2 .home-bg-img {
    min-height: 620px;
    background-position: 66% center;
  }

  .home-section.style-2 .home-hero-content {
    padding: 42px 24px 30px;
    background: linear-gradient(180deg, rgba(247, 242, 235, .94), rgba(247, 242, 235, .55));
  }

  .persian-office .top-header { display: none; }
  .persian-office .header-booking-pill { display: none; }
  .persian-office .brand-logo .brand-name { font-size: .78rem; }
  .persian-office .main-navbar .nav-link { padding: 13px 18px !important; }
  .persian-office .main-header .main-menu .menu-left .brand-logo a { min-width: 0; }
  .persian-office .copyright .d-flex { flex-wrap: wrap; }
}

@media (max-width: 1199.98px) {
  .persian-office .main-header .main-menu { gap: 12px; }
  .persian-office #main-nav { margin-inline: 0; }
  .persian-office .main-navbar .nav-menu { background: var(--office-white) !important; }
}

@media (max-width: 575.98px) {
  .persian-office .reference-footer .accordion-hidden { height: auto !important; overflow: visible !important; padding: 0 !important; }
  .persian-office .reference-footer .footer-title { cursor: default !important; }
  .persian-office .reference-footer .footer-title h5::before { content: none !important; }
  .persian-office .reference-footer .footer-content { margin-bottom: 20px; }
}

/* Keep the long patient form in the document flow when the header becomes sticky. */
.patient-dashboard .main-header.sticky {
  position: sticky !important;
  top: 0;
}

.patient-dashboard .profile-setting-box > h6 {
  clear: both;
  margin-top: 28px;
  margin-bottom: 12px;
}

.patient-dashboard .profile-setting-box .form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--office-ink);
  font-weight: 600;
}
/* Keep Persian installment controls readable inside the responsive payments table. */
.payment-installment-form .form-select {
  width: auto;
  min-width: 7.5rem;
}
