/* Shared accessibility and responsive fixes, loaded after page-specific styles. */
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #38bdf8 !important; outline-offset: 4px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20000; padding: 12px 20px; border-radius: 8px; background: #fff; color: #172032; }
.skip-link:focus { top: 12px; }
.has-sub:focus-within .sub { display: block; }
.site-header { position: sticky !important; z-index: 10010 !important; }
.site-header .container { max-width: 1440px; }
.logo { flex-shrink: 0; }
.nav-list { gap: 8px; }
.nav-list a { white-space: nowrap; }
html[lang="en"] .nav-list { font-size: 14px; gap: 2px; }
html[lang="en"] .nav-list a { padding-inline: 6px; }
.nav-toggle { flex-shrink: 0; min-width: 44px; min-height: 44px; }
.reveal, .card, .slide-card { opacity: 1; }
.form-notice { padding: 14px 18px; border: 1px solid #93c5fd; border-radius: 12px; background: #eff6ff; color: #1e40af; font-size: 14px; line-height: 1.8; margin: 16px 0; }
.form-result { margin: 16px 0; padding: 14px 18px; border-radius: 12px; background: #eff6ff; color: #1e40af; line-height: 1.8; }
.form-result:empty { display: none; }
/* Use normal document scrolling so tall sections, keyboard and touch remain usable. */
html { scroll-padding-top: 88px; }
html, body { height: auto !important; overflow: visible !important; }
body.dialog-open { overflow: hidden !important; }
#customModal, #orderModal { z-index: 20000 !important; }
#fullpage-wrapper { height: auto !important; overflow: visible !important; scroll-snap-type: none !important; }
.fp-section { height: auto !important; min-height: min(800px, 100svh); overflow-x: clip !important; overflow-y: visible !important; scroll-margin-top: 88px; }
.fp-section.hero { padding-block: 0; }
.fp-section.hero::before { display: none; }
.fp-section > .container { height: auto !important; padding-top: 76px !important; padding-bottom: 76px !important; }
.hero-section { background-attachment: scroll !important; }
.fp-section .decor { display: none; }
.panel-gallery { overflow: hidden; }
.panel-gallery .panel .detail { visibility: hidden; }
.panel-gallery .panel.expanded .detail { visibility: visible; }
.footer-section { min-height: 180px !important; }
.fp-nav { display: none !important; }
.fp-section [style*="max-height: calc"] { max-height: none !important; }
[role="button"] { cursor: pointer; }
@media (max-width: 768px) {
  .panel-gallery { display: grid; height: auto; gap: 12px; background: transparent; }
  .panel-gallery .panel { min-height: 240px; height: auto; background-size: cover; border-radius: 12px; }
  .panel-gallery .panel .detail { display: none; }
  .panel-gallery .panel.expanded .detail { display: flex; position: relative; padding: 56px 24px 24px; }
  .panel-gallery .panel.expanded .detail h3 { opacity: 1; transform: none; position: static; }
  .panel-gallery .panel.expanded .detail p { font-size: 16px !important; }
}
@media (max-width: 1280px) {
  .site-header .container { height: auto; min-height: 72px; padding: 12px 20px; gap: 12px; }
  .logo { max-width: min(52vw, 300px); white-space: normal; font-size: 15px; line-height: 1.5; }
  .nav { position: static; margin-left: auto; gap: 10px; }
  .nav-toggle { display: block; }
  .nav-list { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 16px 24px; background: #101623; border-bottom: 1px solid #334155; max-height: calc(100dvh - 80px); overflow-y: auto; }
  .nav[data-open="true"] .nav-list { display: flex; flex-direction: column; gap: 8px; }
  .nav-list a { display: block; padding: 10px; }
  .has-sub .sub { position: static; display: block; min-width: 0; border: none; padding: 0 0 0 16px; background: transparent; }
  .tools { gap: 6px !important; }
  .tools select { max-width: 105px; }
  html[data-theme="light"] .nav-list { background: #fff; border-color: #cbd5e1; }
}
@media (max-width: 600px) {
  .site-header .container { flex-wrap: wrap; }
  .logo { max-width: calc(100% - 65px); font-size: 15px; }
  .nav { display: contents; }
  .nav-toggle { margin-left: auto; }
  .nav .tools { display: flex; justify-content: flex-end; width: 100%; }
  .tools select, .tools button { min-height: 36px; }
  .fp-section { min-height: auto; }
  .fp-section > .container { padding: 48px 20px !important; }
  .fp-section .grid { grid-template-columns: minmax(0, 1fr) !important; }
  .fp-section [style*="grid-template-columns"], #messageForm [style*="grid-template-columns"], #resumeForm [style*="grid-template-columns"], #orderForm [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  .fp-section [style*="gap: 40px"], .fp-section [style*="gap:40px"] { flex-wrap: wrap; gap: 24px !important; }
  .fp-section h1 { font-size: 36px !important; }
  .fp-section h2 { font-size: 28px !important; }
  .fp-section [style*="padding: 50px"], .fp-section [style*="padding: 40px"] { padding: 24px !important; }
  .fp-section [style*="padding: 48px"] { padding: 24px !important; }
  .fp-section .container, .fp-section .container > *, .grid > * { min-width: 0; }
  #orderModal > div, #customModal > div { max-height: 85dvh; overflow-y: auto; padding: 24px !important; }
  #heroSection { padding: 48px 0 !important; }
  #heroSection > .container > div { flex-direction: column; gap: 28px !important; align-items: flex-start !important; }
  #heroSection h1 { font-size: 36px !important; }
  #statsContainer { flex-wrap: wrap; gap: 24px !important; }
  #memberProfile [style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
  #memberProfile > a { position: static !important; margin: 16px 24px; }
  #contactInfo { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
