:root {
  --green: #00a95b;
  --deep-green: #06402b;
  --text: #173d2b;
  --muted: #65776b;
  --line: rgba(6, 64, 43, .15);
  --page-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--text);
  background: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("https://senobarfood.com/img/sanobar-background.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
.page { width: min(var(--page-width), calc(100% - 36px)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* هدر */
.site-header { position: relative; padding: 25px 55px 17px; }
 .brand {
  width: clamp(240px, 52vw, 340px);
  max-width: 100%;
  aspect-ratio: 800 / 340;
  margin-inline: auto;
  overflow: hidden;
}
.brand-tagline {
  margin: -2px 0 0;
  text-align: center;
  color: var(--deep-green);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}
.brand img { width: 100%; height: auto; }
.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 17px;
  color: var(--deep-green);
  font-size: 14px;
  font-weight: 400;
  text-align: center;
}
.section-title::before, .section-title::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.section-title span { flex-shrink: 1; }

/* بنرها: متن و دکمه داخل خود تصاویر قرار دارند. */
.branches { display: grid; gap: 17px; }
.branch-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 5px 18px rgba(9, 49, 28, .075);
  transition: transform .22s ease, box-shadow .22s ease;
}
.branch-link img { width: 100%; height: auto; aspect-ratio: 8 / 3; object-fit: contain; }
@media (hover: hover) {
  .branch-link:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(9, 49, 28, .14); }
}
.branch-link:active { transform: scale(.993); }

/* منوی تماس */
.contact-menu { position: absolute; top: 28px; right: 0; }
.contact-menu > summary { display: block; cursor: pointer; list-style: none; line-height: 0; }
.contact-menu > summary::-webkit-details-marker { display: none; }
.contact-menu > summary::marker { content: ""; }
.menu-button {
  position: relative;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--deep-green);
  border: 1px solid transparent;
  border-radius: 12px;
}
.menu-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.contact-menu > summary:focus-visible { outline: none; }
.contact-menu > summary:focus-visible .menu-button { outline: 3px solid var(--green); outline-offset: 3px; }
.close-icon { display: none; }
.contact-menu[open] .menu-button {
  position: fixed;
  top: 20px;
  right: 20px;
}
.contact-menu[open] .menu-button { background: white; border-color: var(--line); }
.contact-menu[open] .open-icon { display: none; }
.contact-menu[open] .close-icon { display: block; }
/* کلیک روی این لایه نیز summary را می‌بندد. */
.contact-menu[open] > summary::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(5, 29, 18, .38);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  animation: backdrop-in .18s ease both;
}
html:has(.contact-menu[open]) { overflow: hidden; }
.contact-panel {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  padding: 85px 25px calc(25px + env(safe-area-inset-bottom));
  box-shadow: -12px 0 40px rgba(0, 30, 15, .12);
  animation: panel-in .24s ease both;
}
.contact-panel h2 { margin: 0 0 7px; color: var(--deep-green); font-size: 23px; line-height: 1.6; }
.panel-intro { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.contact-branch { padding: 20px 0; border-top: 1px solid var(--line); }
.contact-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.contact-heading h3 { margin: 0; font-size: 18px; color: var(--deep-green); }
.branch-index { color: var(--muted); font-size: 12px; }
.branch-specialty { margin: 3px 0 8px; font-size: 13px; color: #28794b; }
.address { margin: 9px 0 14px; color: var(--muted); font-size: 14px; line-height: 2; }
.phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 13px;
  border: 1px solid #dce9df;
  border-radius: 9px;
  background: #f4f9f5;
  color: var(--deep-green);
}
.phone-label { font-size: 13px; }
.phone bdi { direction: ltr; font-size: 17px; font-weight: 700; white-space: nowrap; }
.phone:hover { border-color: var(--green); }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px 10px 25px;
  color: #7b877e;
  font-size: 12px;
}
.site-footer::before, .site-footer::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.site-footer a { flex-shrink: 0; }
.site-footer a:hover { color: var(--deep-green); }
@keyframes panel-in { from { transform: translateX(35px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 600px) {
  .page { width: calc(100% - 28px); }
  .site-header { padding: 19px 44px 15px; }
  .brand { width: clamp(200px, 62vw, 280px); }
  .contact-menu { top: 21px; right: 2px; }
  .menu-button { width: 40px; height: 40px; }
  .menu-button svg { width: 25px; height: 25px; }
  .section-title { margin-bottom: 13px; gap: 12px; font-size: 13px; }
  .branches { gap: 12px; }
  .branch-link { border-radius: 15px; }
  .site-footer { gap: 14px; padding: 18px 9px 21px; }
}
@media (max-width: 360px) {
  .page { width: calc(100% - 22px); }
  .site-header { padding-inline: 40px; }
  .brand { width: min(205px, 100%); }
  .contact-panel { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
