/* Phone / tablet layout — loaded at max-width: 920px */

:root {
  --mobile-action-bar-height: calc(3.35rem + env(safe-area-inset-bottom, 0px));
  --mobile-shell-inline: max(0.75rem, env(safe-area-inset-left, 0px));
}

html.has-mobile-layout {
  scroll-padding-bottom: var(--mobile-action-bar-height);
}

html.has-mobile-layout body {
  padding-bottom: var(--mobile-action-bar-height);
}

/* Utility bar: keep sitemap / online interview on phone and tablet */
html.has-mobile-layout .header-utility {
  padding-block: 0.4rem;
}

html.has-mobile-layout .header-utility-inner {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

html.has-mobile-layout .header-utility-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 0.35rem 0.7rem;
}

html.has-mobile-layout .header-utility-tel,
html.has-mobile-layout .header-utility-link--contact {
  display: none;
}

html.has-mobile-layout .header-utility-org {
  font-size: 0.74rem;
  line-height: 1.4;
}

/* Compact sticky header */
html.has-mobile-layout .site-header {
  position: sticky;
  top: 0;
  z-index: 130;
  background: rgba(255, 250, 241, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

html.has-mobile-layout .site-header.is-scrolled {
  box-shadow: 0 4px 18px rgba(31, 58, 42, 0.08);
}

html.has-mobile-layout .header-inner {
  padding-block: 0.55rem 0.65rem;
}

html.has-mobile-layout .brand-text > span {
  display: none;
}

html.has-mobile-layout .brand-text {
  font-size: 0.8rem;
  line-height: 1.35;
}

html.has-mobile-layout .nav-toggle {
  display: none !important;
}

/* Full-screen navigation overlay */
html.has-mobile-layout body.nav-open::before {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(20, 36, 28, 0.42);
  content: "";
  pointer-events: none;
}

html.has-mobile-layout .site-header.is-nav-open {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--mobile-action-bar-height);
  left: 0;
  z-index: 120;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 0;
  background: rgba(255, 250, 241, 0.98);
  box-shadow: 0 12px 40px rgba(31, 58, 42, 0.12);
  padding-inline: var(--mobile-shell-inline);
  padding-bottom: 1rem;
}

html.has-mobile-layout .site-header.is-nav-open .header-inner {
  gap: 0.5rem;
  padding-block: calc(0.55rem + env(safe-area-inset-top, 0px)) 0;
}

html.has-mobile-layout .site-header.is-nav-open nav {
  position: static;
  display: block !important;
  width: 100%;
  margin: 0;
  padding: 0.35rem 0 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html.has-mobile-layout .site-header.is-nav-open .nav-list {
  gap: 0.45rem;
  color: var(--color-text);
}

html.has-mobile-layout .site-header.is-nav-open .nav-list a {
  min-height: 2.85rem;
  border-radius: 0.9rem;
  color: var(--color-primary-dark);
  font-size: 0.92rem;
}

html.has-mobile-layout .site-header.is-nav-open .sub-nav a {
  min-height: 2.5rem;
  color: var(--color-primary-dark);
}

html.has-mobile-layout .nav-list {
  gap: 0.45rem;
}

html.has-mobile-layout .nav-list a {
  min-height: 2.85rem;
  border-radius: 0.9rem;
  font-size: 0.92rem;
}

html.has-mobile-layout .sub-nav a {
  min-height: 2.5rem;
}

/* Homepage hero */
html.has-mobile-layout .hero {
  gap: 1rem;
  padding-block: 1.5rem 1.25rem;
}

html.has-mobile-layout .hero-panel {
  min-height: auto;
  padding: clamp(5rem, 30vw, 6.5rem) 1rem 1.15rem;
}

html.has-mobile-layout .hero-panel::after {
  width: min(42vw, 9.5rem);
  right: 0.75rem;
  bottom: 0.75rem;
  opacity: 0.38;
}

html.has-mobile-layout .hero-actions {
  gap: 0.55rem;
}

html.has-mobile-layout .contact-panel {
  padding: 1.1rem 1rem 1.15rem;
}

html.has-mobile-layout .contact-list li {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Quick navigation grid (homepage) */
.mobile-quick-nav {
  padding: 0 0 0.25rem;
}

.mobile-quick-nav__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-quick-nav__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: 0.95rem;
  background: rgba(255, 250, 241, 0.95);
  box-shadow: var(--shadow-soft);
  color: var(--color-primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.mobile-quick-nav__link--accent {
  border-color: rgba(47, 118, 85, 0.35);
  background: linear-gradient(145deg, rgba(47, 118, 85, 0.12), rgba(255, 250, 241, 0.98));
}

.mobile-quick-nav__link:active {
  transform: scale(0.98);
}

@media (min-width: 768px) {
  html.has-mobile-layout .mobile-quick-nav__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Section spacing */
html.has-mobile-layout .brand-banner-section {
  padding-block: 0.25rem 0;
}

html.has-mobile-layout .brand-banner {
  border-radius: 1rem;
}

html.has-mobile-layout .section {
  padding-block: 2rem;
}

html.has-mobile-layout .section-header {
  margin-bottom: 1rem;
}

html.has-mobile-layout .section-title {
  font-size: clamp(1.35rem, 6vw, 1.75rem);
}

html.has-mobile-layout .card {
  padding: 1rem 0.95rem;
}

html.has-mobile-layout .card h3 {
  font-size: 1rem;
  line-height: 1.4;
}

html.has-mobile-layout .feature {
  padding: 1.35rem 1rem;
}

html.has-mobile-layout .list-panel {
  padding: 1rem 0.95rem;
}

/* Inner pages */
html.has-mobile-layout .page-hero {
  padding-block: 1.35rem 1rem;
}

html.has-mobile-layout .page-hero .hero-panel {
  min-height: auto;
  padding: clamp(5.5rem, 32vw, 7rem) 1rem 1.15rem;
}

html.has-mobile-layout #content-view {
  padding-bottom: 0.5rem;
}

html.has-mobile-layout .content-card {
  margin-bottom: 0.85rem;
}

html.has-mobile-layout .content-facility-grid {
  grid-template-columns: 1fr;
}

html.has-mobile-layout .content-figure--gallery {
  grid-template-columns: 1fr;
}

html.has-mobile-layout .content-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html.has-mobile-layout .content-table-wrap .content-table th,
html.has-mobile-layout .content-table-wrap .content-table td {
  display: table-cell;
  width: auto;
  white-space: nowrap;
}

html.has-mobile-layout .content-table-wrap--schedule .content-table th,
html.has-mobile-layout .content-table-wrap--schedule .content-table td {
  white-space: normal;
  min-width: 4.5rem;
}

/* Fixed bottom action bar */
.mobile-action-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 125;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-height: var(--mobile-action-bar-height);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--color-line);
  background: rgba(255, 250, 241, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -6px 24px rgba(31, 58, 42, 0.08);
}

.mobile-action-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 3.35rem;
  padding: 0.35rem 0.4rem;
  border: 0;
  background: transparent;
  color: var(--color-primary-dark);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mobile-action-bar__item:active,
.mobile-action-bar__item.is-active {
  background: rgba(47, 118, 85, 0.1);
  color: var(--color-primary);
}

.mobile-action-bar__icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.mobile-action-bar__icon--tel {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

.mobile-action-bar__icon--mail {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/%3E%3Cpolyline points='22,6 12,13 2,6'/%3E%3C/svg%3E");
}

.mobile-action-bar__icon--menu {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='3' y1='6' x2='21' y2='6'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='18' x2='21' y2='18'/%3E%3C/svg%3E");
}

html.has-mobile-layout body.nav-open .mobile-action-bar__icon--menu {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
}

.mobile-action-bar__label {
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* Overlays above action bar */
html.has-mobile-layout .cookie-consent {
  bottom: var(--mobile-action-bar-height);
}

html.has-mobile-layout .back-to-top {
  right: max(0.65rem, env(safe-area-inset-right, 0px));
  bottom: calc(var(--mobile-action-bar-height) + 0.5rem);
  min-width: 5.75rem;
}

html.has-mobile-layout .corner-mascot {
  left: max(0.1rem, env(safe-area-inset-left, 0px));
  bottom: calc(var(--mobile-action-bar-height) + 0.1rem);
  width: clamp(10rem, 48vw, 14rem);
}

html.has-mobile-layout body[data-page="lighthouse"] .content-card--media-left {
  padding: 1.15rem 1rem;
}

html.has-mobile-layout .content-card[id] {
  scroll-margin-top: calc(3.75rem + env(safe-area-inset-top, 0px));
}

html.has-mobile-layout body[data-page="lighthouse"] .content-card--media-left h2 {
  font-size: clamp(1.05rem, 4.8vw, 1.3rem);
  margin-bottom: 0.85rem;
}

html.has-mobile-layout body[data-page="lighthouse"] .content-card--media-left .content-media-layout__body p {
  font-size: 0.92rem;
  line-height: 1.9;
}

html.has-mobile-layout .content-map__frame {
  aspect-ratio: 1 / 1;
  min-height: 240px;
}

html.has-mobile-layout .footer {
  padding-bottom: 0.5rem;
}
