/* Queen Dent · shared page geometry.
 * This stylesheet is loaded last on EVERY page. One content rail controls the
 * header, footer, breadcrumbs, sections and inset photographs. Full-bleed
 * section backgrounds and intentionally narrow reading columns are retained.
 */
:root {
  --container: 1280px;
  --page-gutter: 48px;
  --page-width: min(var(--container), calc(100% - var(--page-gutter) - var(--page-gutter)));
  --page-inset: max(var(--page-gutter), calc((100% - var(--container)) / 2));
  --header: 88px;
  --section-space: 72px;
  --section-space-tight: 42px;
  --card-radius: 16px;
}
html { scrollbar-gutter: stable; scroll-padding-top: calc(var(--header) + 24px); }
body { min-width: 0; }
.container,
.site-header .header-inner,
.hero > .container,
.hero.qd-real-hero > .container,
.qd-anchor-nav > .container {
  width: var(--page-width);
  max-width: var(--container);
  margin-inline: auto;
}
/* The logo and the rightmost booking button share the footer's exact edges. */
.site-header { height: var(--header); }
.site-header .header-inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0;
}
.site-header .brand.brand-image { width: 220px; min-width: 0; }
.site-header .desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
  min-width: 0;
  margin-inline: auto;
}
.site-header .desktop-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  height: 100%;
  padding-block: 0;
  font-size: 12px;
  line-height: 1.4;
}
.site-header .desktop-nav a::after { bottom: 18px; }
.site-header .nav-service-entry { height: 100%; display: flex; align-items: center; gap: 4px; }
.site-header .header-contact { display: block; flex: 0 0 auto; }
.site-header .header-contact > a { font-size: 16px; }
.site-header .header-contact .header-hours { font-size: 10px; line-height: 1.4; }
.site-header .header-telegram { display: grid; flex: 0 0 44px; width: 44px; height: 44px; }
.site-header .header-cta {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 12px 18px;
  font-size: 12px;
  line-height: 1.4;
}
.site-header .mobile-actions { display: none; }
/* Regular blocks use the same vertical rhythm and surface treatment. */
.section { padding-block: var(--section-space); }
.section-tight { padding-block: var(--section-space-tight); }
.service-card, .doctor-card, .qd-staff-card, .contact-card,
.info-card, .qd-photo-tile, .qd-price-box, .service-offer {
  border-radius: var(--card-radius);
}
.btn { border-radius: 7px; }
.breadcrumbs { min-width: 0; padding-block: 24px; }
.footer-main > *, .section-head > *, .qd-gallery-heading > * { min-width: 0; }
.site-footer .brand.brand-image { width: 220px; }
/* Real photographs sit on the same right content rail (not on a vw offset).
 * Percentages are resolved against the section, so a browser scrollbar cannot
 * shift a picture relative to the header or footer.
 */
.hero.qd-real-hero .hero-image {
  right: var(--page-inset);
  width: calc((var(--page-width) - 32px) / 2);
}
.hero.qd-real-hero.qd-portrait-hero .hero-image {
  right: var(--page-inset);
  width: min(400px, calc(var(--page-width) * .32));
}
.hero-signature { right: var(--page-inset); }
@media (max-width: 1320px) {
  .site-header .header-inner { gap: 16px; }
  .site-header .brand.brand-image { width: 200px; }
  .site-header .desktop-nav { gap: 16px; }
  .site-header .header-contact > a { font-size: 14px; }
  .site-header .header-contact .header-hours { font-size: 9px; }
  .site-header .header-cta { padding-inline: 15px; }
}
@media (max-width: 1199px) {
  .site-header .header-contact { display: none; }
}
@media (max-width: 1120px) {
  :root { --page-gutter: 32px; --section-space: 60px; --section-space-tight: 38px; }
}
/* Tablet navigation switches as a unit, before desktop controls can overlap. */
@media (max-width: 1024px) {
  html { scrollbar-gutter: auto; }
  :root { --header: 80px; }
  .site-header .desktop-nav,
  .site-header .header-contact,
  .site-header .header-cta,
  .site-header .header-telegram { display: none; }
  .site-header .brand.brand-image { width: 206px; }
  .site-header .mobile-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
  .site-header .mobile-actions .icon-button { width: 44px; height: 44px; flex: 0 0 44px; }
  .site-header .mobile-actions .icon { width: 20px; height: 20px; }
}
@media (max-width: 900px) {
  :root { --page-gutter: 24px; }
}
@media (max-width: 800px) {
  .hero.qd-real-hero .hero-image,
  .hero.qd-real-hero.qd-portrait-hero .hero-image {
    inset: auto;
    width: var(--page-width);
    max-width: var(--container);
    margin-inline: auto;
    margin-bottom: 28px;
  }
}
@media (max-width: 640px) {
  :root { --page-gutter: 20px; --header: 72px; --section-space: 44px; --section-space-tight: 30px; }
  .site-header .header-inner { gap: 8px; }
  .site-header .brand.brand-image { width: clamp(144px, 44vw, 202px); }
  .site-header .mobile-actions { gap: 6px; }
  .site-header .mobile-actions .icon-button { width: 40px; height: 40px; flex-basis: 40px; }
  .site-header .mobile-actions .icon { width: 18px; height: 18px; }
  .breadcrumbs { padding-block: 18px; }
  .mobile-bottom-bar { padding-inline: max(var(--page-gutter), env(safe-area-inset-left), env(safe-area-inset-right)); }
}
@media (max-width: 374px) {
  .site-header .brand.brand-image { width: clamp(132px, 42vw, 154px); }
  .site-header .header-inner { gap: 6px; }
  .site-header .mobile-actions { gap: 4px; }
  .site-header .mobile-actions .icon-button { width: 38px; height: 38px; flex-basis: 38px; }
}
@supports not (scrollbar-gutter: stable) {
  @media (min-width: 1025px) { html { overflow-y: scroll; } }
}
@media print {
  :root { --page-gutter: 0px; --container: 100%; }
  html { scrollbar-gutter: auto; }
  .container { width: 100%; max-width: none; }
}

/* The catalogue follows the same tablet breakpoint as the header. */
@media (min-width: 901px) and (max-width: 1024px) {
  .qd-menu-browse {display:block}
  .qd-menu-tabs {display:none}
  .qd-menu-branches {min-height:0;padding:0 25px}
  .qd-menu-branch {border-bottom:1px solid var(--line)}
  .qd-menu-branch>summary {display:flex;align-items:center;gap:13px;padding:20px 0;font-size:14px;list-style:none;cursor:pointer}
  .qd-menu-branch>summary>.icon:first-child {color:var(--copper);width:22px}
  .qd-menu-branch>summary>.icon:last-child {width:15px;height:15px;margin-left:5px;transform:rotate(90deg)}
  .qd-menu-branch[open]>summary>.icon:last-child {transform:rotate(-90deg)}
  .qd-menu-branch>summary>span {flex:1}
  .qd-menu-branch>summary>small {color:var(--muted);font-size:11px}
  .qd-menu-branch-head h3 {display:none}
  .qd-menu-branch-head {margin-bottom:12px}
  .qd-menu-branch-head a {min-height:35px}
  .qd-menu-groups {display:block}
  .qd-menu-subbranch {margin-left:14px;border-left:1px solid #e4cfc7;padding-left:17px}
  .qd-menu-subbranch>summary {font-size:20px;min-height:50px;margin-bottom:4px}
  .qd-menu-subbranch[open]>summary>.icon {transform:rotate(-90deg)}
  .qd-menu-subbranch>div {padding-bottom:15px}
  .qd-menu-service {padding:12px 0;flex-direction:row;justify-content:space-between;gap:22px}
  .qd-menu-service>small {white-space:nowrap;margin-top:2px}
  .qd-menu-branch-body {padding-bottom:15px}
  .qd-menu-mobile-links {display:flex;flex-direction:column;padding:15px 0}
  .qd-menu-mobile-links a {font-size:12px}
  .qd-catalog-dialog {width:min(720px,calc(100vw - 36px))}
  .qd-menu-search {margin:0 25px 21px}
  .qd-catalog-top {padding:23px 25px 19px}
  .qd-catalog-bottom {padding:15px 25px;align-items:flex-start;flex-direction:column;gap:3px}
  .qd-catalog-bottom a {min-height:36px}
  .qd-menu-search {width:calc(100% - 50px)}
}

.price-nav, .qd-service-aside, .qd-section-sidebar, .qd-education-heading { top: calc(var(--header) + 24px); }
