/* DosSantos Dental - responsive enhancement. Loaded last on every page. */
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe { max-width: 100%; }
.mobile-menu-toggle { display: none; }
@media (max-width: 900px) {
  .header { position: relative; z-index: 100; }
  .header > .wrap.nav, body.rialto .rialto-navigation {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    flex-wrap: wrap; min-height: 76px; gap: 12px; padding-block: 12px;
  }
  .header .logo, body.rialto .rialto-logo-link .logo { width: 78px; max-width: 100%; height: auto; }
  body.rialto .rialto-navigation .rialto-logo-link { order: 0; }
  body.rialto .rialto-navigation .mobile-menu-toggle { order: 1; }
  body.rialto .rialto-navigation .rialto-nav-links { order: 2; }
  .mobile-menu-toggle {
    display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center;
    width: 48px; height: 48px; padding: 12px; cursor: pointer;
    border: 1px solid #c5a46d; border-radius: 8px; background: transparent;
    color: #122c4f; margin-left: auto;
  }
  .mobile-menu-toggle:focus-visible, .header .links a:focus-visible { outline: 3px solid #c5a46d; outline-offset: 3px; }
  .menu-bars { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 22px; }
  .menu-bars span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .mobile-menu-toggle[aria-expanded="true"] .menu-bars span:first-child { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] .menu-bars span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle[aria-expanded="true"] .menu-bars span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .header .links, body.rialto .rialto-nav-links {
    display: none; flex-direction: column; align-items: stretch; justify-content: flex-start;
    flex: 0 0 100%; width: 100%; gap: 0; padding: 8px 0 12px;
    margin: 0; border-top: 1px solid #e6dfd4;
  }
  .header .links.is-open, body.rialto .rialto-nav-links.is-open { display: flex; }
  .header .links a, body.rialto .rialto-nav-links a {
    display: block; width: 100%; padding: 14px 12px; min-height: 48px;
    font-size: .92rem; line-height: 1.4; text-align: left;
    border-bottom: 1px solid #eae5dd; text-decoration: none;
  }
  .header .links a[aria-current="page"] { color: #a47732; }
  .wrap { max-width: 100%; }
  main, section, footer { min-width: 0; }
  .cards, .split, .details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { overflow-x: clip; }
  .wrap { width: min(100% - 32px, 1100px); margin-inline: auto; }
  h1, h2, h3, p { overflow-wrap: break-word; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); line-height: 1.16; }
  h2 { font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.2; }
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .office-card { min-height: 360px; }
  .team { grid-template-columns: minmax(0, 1fr); }
  body.rialto .rialto-hero { min-height: 510px; }
  body.rialto .rialto-hero .rialto-hero-content { width: min(100% - 36px, 1120px); padding-block: 60px; }
  body.rialto .rialto-hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
  body.rialto .rialto-hero p { font-size: 1rem; line-height: 1.65; }
  body.rialto .rialto-team-unified .rialto-team-members { display: grid; grid-template-columns: minmax(0,1fr); }
  body.rialto .rialto-team-unified .rialto-team-members li { grid-column: 1 / -1; }
  iframe { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-bars span { transition: none; }
}

/* Mobile menu visibility: override older, higher-specificity navigation rules. */
@media (max-width: 900px) {
  body .header .wrap.nav, body.rialto .header .rialto-navigation {
    display: flex !important; flex-direction: row !important; flex-wrap: wrap !important;
    align-items: center !important; justify-content: space-between !important;
  }
  body .header .mobile-menu-toggle { display: inline-flex !important; order: 2; }
  body .header .links, body.rialto .header .rialto-nav-links {
    display: none !important; flex: 0 0 100% !important; width: 100% !important;
    order: 3 !important; flex-direction: column !important;
  }
  body .header .links.is-open, body.rialto .header .rialto-nav-links.is-open {
    display: flex !important;
  }
  body.rialto .header .rialto-logo-link { order: 1 !important; }
}
