/* One visibility rule for every route; a hidden homepage must stay hidden. */
[hidden] { display: none !important; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.site-header { z-index: 1100; }
.consent { z-index: 1200; }
.photo-lightbox { z-index: 1300; }
.leaflet-control-attribution { font-size:10px; line-height:1.4; }
.contact-privacy a { color:#78dfdc; }
.contact-field select { appearance:none; min-height:50px; background-image:linear-gradient(45deg,transparent 50%,#78dfdc 50%),linear-gradient(135deg,#78dfdc 50%,transparent 50%); background-position:calc(100% - 18px) 50%,calc(100% - 13px) 50%; background-size:5px 5px; background-repeat:no-repeat; padding-right:32px; }
.site-links a:first-child { border-bottom:0; padding-bottom:0; }
.site-links a.active { color:#effffd; border-bottom:1px solid #72e3df; padding-bottom:5px; }
.gallery-index { padding:28px; border-radius:18px; background:rgba(2,21,27,.86); }
.gallery-index h1 { margin:0 0 16px; font-size:clamp(30px,4vw,48px); }
.gallery-index-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:28px; }
.gallery-index-grid a { color:#e8f7f3; text-decoration:none; }
.gallery-index-grid img { display:block; width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border-radius:8px; }
body.route-gallery .content, body.route-not-found .content { position:relative; inset:auto; width:min(1200px,calc(100% - 32px)); margin:0 auto; padding:100px 0 90px; text-align:left; }
body.route-gallery main, body.route-not-found main { align-items:flex-start; }
@media (max-width:1024px) {
  .site-header { padding:0 16px; }
  .site-nav { min-height:62px; gap:10px; }
  .site-brand { font-size:13px; letter-spacing:.1em; }
  .site-brand-mark { width:24px; height:24px; margin-right:6px; font-size:8px; }
  .site-links { top:62px; }
  .site-links a.active { border-bottom:0; padding-bottom:12px; }
  .gallery-index-grid { grid-template-columns:1fr; }
  .contact-field { min-width:0; }
  body.route-balkans .content, body.route-mexico .content { padding-top:82px; }
  .balkans-wall { padding-inline:12px; }
  /* A single viewport layout: the list owns scrolling, the map has its own row. */
  body.route-france { overflow:hidden; }
  body.route-france main { height:100dvh; min-height:0; overflow:hidden; padding:0; }
  body.route-france .content { width:100%; height:100dvh; padding:62px 0 0; margin:0; max-width:none; }
  body.route-france #page-content, body.route-france .france-page { height:100%; min-height:0; }
  body.route-france .france-page { padding:0; }
  body.route-france .france-atlas { display:grid; grid-template-rows:minmax(0,1fr) minmax(140px,40%); width:100%; height:100%; margin:0; padding:0; overflow:hidden; border:0; border-radius:0; background:transparent; box-shadow:none; }
  body.route-france .france-atlas-map { grid-row:1; position:relative; inset:auto; order:initial; width:100%; height:100%; min-height:0; margin:0; z-index:1; overflow:hidden; }
  body.route-france .france-atlas .france-map { width:100%; height:100%; min-height:0; border-radius:0; }
  body.route-france .france-cave-list { grid-row:2; position:relative; inset:auto; order:initial; width:100%; min-height:0; height:100%; max-height:none; margin:0; padding:18px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior-y:contain; -webkit-overflow-scrolling:touch; z-index:0; }
  body.route-france .france-atlas .france-place-card { position:absolute; right:10px; bottom:30px; width:calc(100% - 20px); margin:0; padding:12px 14px; border-radius:10px; max-height:calc(100% - 48px); overflow-y:auto; }
  body.route-france .france-place-card h2 { margin:5px 0 4px; font-size:18px; }
  body.route-france .france-place-card p { margin-bottom:8px; font-size:12px; }
  body.route-france .france-place-card a { padding:7px 9px; font-size:10px; }
  body.route-france .france-cave-item { display:block; width:100%; margin:0 0 8px; padding:12px 13px; }
  body.route-france .france-cave-item .france-cave-area { display:block; }
  body.route-france .cave-inventory-page { overflow-y:auto; padding:20px 16px; }
}
