/* ==================== Top Nav (map page) ==================== */
:root {
  --nav-h: 64px;
}

.site-nav{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(140%) blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.site-nav .logo{
  font-weight: 700;
  font-size: 1.1rem;
  color: #265b81;
  text-decoration: none;
}

.site-nav .nav-links a{
  text-decoration: none;
  margin: 0 10px;
  font-weight: 600;
  color: #265b81;
}
.site-nav .nav-links a:hover{ color: #3cb371; }
.site-nav .nav-links a.active{ color: #3cb371; }



/* ==================== Global layout ==================== */
html, body{
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  max-width: 100%;
  overflow-x: hidden;
}

/* Only the directory page gets this lock */
body.dir-page{
  padding-top: var(--nav-h);    /* space for fixed nav */
  height: 100vh;                /* lock viewport height */
  overflow-y: hidden;           /* 🔒 no page scroll – sidebar will scroll */
}

/* ====== Directory layout (map + sidebar) ====== */
.dir-layout{
  display: flex;
  height: calc(100vh - var(--nav-h));
}

/* map + sidebar share that height */
#map{
  flex: 0 0 60%;
  height: 100%;
  overflow: hidden;    
  position: relative;           /* 👈 add this */
/* keep Mapbox from causing overflow */
}

/* ==================== Map overlay controls (Near me + Search this area) ==================== */
.map-overlay-controls{
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.map-overlay-controls button{
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  color: #0c3f83;
  backdrop-filter: blur(6px);
  transition: transform .12s ease, box-shadow .18s ease, background .12s ease;
}

.map-overlay-controls button:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.map-overlay-controls button:active{
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}


#sidebar{
  flex: 0 0 40%;
  height: 100%;
  overflow-y: auto;             /* scroll only inside sidebar */
  padding: 1rem;
  background: #fafafa;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

/* Mobile: stack map + sidebar and allow page scroll again */
@media (max-width: 900px){
  body.dir-page{
    height: auto;
    overflow-y: auto;
  }

  .dir-layout{
    display: block;
    height: auto;
  }

  #map{
    width: 100%;
    height: 50vh;
  }

  #sidebar{
    width: 100%;
    height: auto;
    max-width: 100%;
    box-shadow: none;
    border-top: 1px solid rgba(0,0,0,0.08);
  }
}





/* ==================== Search Bar ==================== */
.search-bar{
  display:flex;
  flex-wrap:wrap;
  gap:0.5rem;
  margin-bottom:1rem;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,.06);
  padding: .75rem;
  border-radius: 12px;
}
.search-bar input{
  flex:1;
  padding:0.5rem;
  border:1px solid #ccc;
  border-radius:5px;
}
.search-bar input:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(0,123,255,.15);
  border-color:#8ec5ff;
}
.search-bar button{
  padding:0.5rem 1rem;
  background-color:#007bff;
  color:white;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .2s ease;
  box-shadow:0 6px 14px rgba(0,123,255,.18);
}
.search-bar button:hover{ background-color:#0056b3; }
.search-bar button:active{ transform:translateY(1px); }
.search-bar label{
  font-size:14px;
  margin-top:0.5rem;
}

/* ==================== Submit Profile CTA ==================== */
.submit-profile{
  margin: 0.5rem 0 0.75rem;
  display: block;
  width: 100%;

  border: none;
  cursor: pointer;

  background: linear-gradient(90deg,#1fa33d,#38c172);
  color: #fff;

  text-align: center;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(31,163,61,0.35);
  transition: transform .12s ease, box-shadow .18s ease, opacity .12s ease;
}

.submit-profile:hover{
  opacity: 0.96;
  box-shadow: 0 10px 26px rgba(31,163,61,0.4);
  transform: translateY(-1px);
}

.submit-profile:active{
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(31,163,61,0.3);
}


/* ==================== Profile Card ==================== */
.profile-card{
  display:flex;
  flex-direction:row;
  gap:1rem;
  background: linear-gradient(180deg, #c1dcf3 0%, #ffffff 56%);
  border-radius:16px;
  padding:1rem;
  border:1px solid #e8f1ff;
  box-shadow:0 8px 20px rgba(0,0,0,0.12);
  margin-bottom:1rem;
  transition:all 0.3s ease;
  align-items:flex-start;
  width:100%;
  box-sizing:border-box;
  cursor:pointer;
}
.profile-card:hover{
  transform:translateY(-6px);
  box-shadow:0 14px 32px rgba(0,0,0,.16);
}
.profile-card img{
  width:80px;
  height:80px;
  border-radius:50%;
  object-fit:cover;
}
.profile-info h3{
  margin:0;
  font-size:20px;
  font-weight:bold;
  color:#002f6c;
}
#sidebar .profile-card h3{ color:#0c3f83; }
.profile-info p{
  margin:0.2rem 0;
  font-size:14px;
  color:#444;
}
.profile-card.highlight{
  outline:2px solid #0d6efd;
  outline-offset:2px;
}

/* Buttons inside cards */
a.profile-btn{
  display:inline-block;
  padding:6px 12px;
  border-radius:6px;
  font-size:13px;
  font-weight:bold;
  text-decoration:none;
  color:white;
  margin:4px 4px 0 0;
}
a.btn-blue{ background:#007bff; }
a.btn-green{ background:#28a745; }
a.btn-orange{ background:#f39c12; }
a.btn-blue:hover{ background:#0056b3; }

/* ==================== Popup Preview (desktop helper) ==================== */
#profilePreview{
  position:fixed;
  top:20px;
  right:20px;
  width:320px;
  background:white;
  border-radius:12px;
  box-shadow:0 6px 18px rgba(0,0,0,0.1);
  padding:1rem;
  z-index:999;
  display:none;
  animation:fadeIn 0.3s ease;
}
#profilePreview img{
  width:80px;
  height:80px;
  border-radius:50%;
  object-fit:cover;
  margin-bottom:0.5rem;
}
#profilePreview h3{ margin:0; font-size:18px; }
#profilePreview p{ font-size:14px; margin:4px 0; }

@keyframes fadeIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ==================== Map markers ==================== */
.custom-marker{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:white;
  border:2px solid #007bff;
  box-shadow:0 2px 6px rgba(0,0,0,0.2);
  transition:transform 0.2s ease;
}
.custom-marker:hover{
  transform:scale(1.2);
  border-color:#0056b3;
}
.custom-marker svg{ pointer-events:none; }

/* Active marker style */
.active-marker > div:first-child{
  transform:scale(1.3);
  border:3px solid #ff5722 !important;
  box-shadow:0 0 12px rgba(255,87,34,0.6);
  transition:all 0.2s ease;
}

/* Marker active ring (for Anime bounce) */
.marker-active > div:first-child{
  box-shadow:0 0 0 6px rgba(0,123,255,.18);
  border:3px solid #0d6efd !important;
}

/* ==================== Specialty chips ==================== */
#specialtyChips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#e9f2ff;
  color:#0d47a1;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}
.chip button{
  all:unset;
  cursor:pointer;
  color:#0d47a1;
  font-weight:900;
}

/* ==================== Skeleton placeholders ==================== */
.skeleton-card{
  display:flex;
  gap:1rem;
  background:#fff;
  border-radius:16px;
  padding:1rem;
  border:1px solid rgba(0,0,0,.06);
  overflow:hidden;
  position:relative;
}
.skeleton-avatar{
  width:80px;
  height:80px;
  border-radius:50%;
  background:#eee;
}
.skeleton-lines{
  flex:1;
  display:grid;
  gap:8px;
  align-content:center;
}
.skeleton-line{
  height:12px;
  border-radius:6px;
  background:linear-gradient(90deg, #eee, #f6f6f6, #eee);
  background-size:200% 100%;
  animation:shimmer 1.2s linear infinite;
}
.skeleton-line.w40{ width:40%; }
.skeleton-line.w60{ width:60%; }
.skeleton-line.w80{ width:80%; }
.skeleton-line.w100{ width:100%; }

@keyframes shimmer{
  0%{ background-position:200% 0; }
  100%{ background-position:-200% 0; }
}

/* ==================== Nav underline micro-interaction ==================== */
.site-nav .nav-links a{ position:relative; }
.site-nav .nav-links a::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-8px;
  width:0;
  height:2px;
  background:#3cb371;
  transition:all .25s ease;
}
.site-nav .nav-links a:hover::after,
.site-nav .nav-links a.active::after{
  left:0;
  width:100%;
}

/* ==================== Mapbox popup polish / alignment ==================== */
.mapboxgl-popup{
  z-index:1001;
  background:transparent !important;
}
.mapboxgl-popup-content{
  position: relative;
  padding:0 !important;
  border-radius:0 !important;
  box-shadow:none;
  background:transparent;
  overflow:visible;
}
.mapboxgl-popup-close-button{
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #265b81;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-size: 18px;
  line-height: 22px;
}
.mapboxgl-popup-tip{
  display:none;
}

/* Base popup card */
.lienex-popup-root{
  width: 360px;
  max-width: calc(100vw - 40px);
  padding: 18px 28px 16px 16px;
  margin-top: 2px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
  text-align: center;
  border-radius: 23px;
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f8fbff 40%,
    #d6e7fb 100%
  ) !important;
  border: 1px solid #dfe9fb;
  box-shadow:
    0px 24px 40px rgba(0, 0, 0, 0.10),
    0px 8px 16px rgba(0, 0, 0, 0.06),
    0px 0px 1px rgba(0,0,0,0.10);
  cursor: default;
  transition: box-shadow 0.22s ease, transform 0.12s linear;
}
.lienex-popup-root:hover{
  box-shadow:
    0px 42px 64px rgba(0, 0, 0, 0.12),
    0px 22px 28px rgba(0, 0, 0, 0.08),
    0px 0px 1px rgba(0,0,0,0.10);
}

/* Popup link underline */
.popup-link-underline{
  position: relative;
  display: inline-block;
  text-decoration: none;
}
.popup-link-underline::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-4px;
  width:0;
  height:2px;
  background:#3cb371;
  transition:all .25s ease;
}
.popup-link-underline:hover::after{
  left:0;
  width:100%;
}
.popup-specialty{
  color:#0d6efd;
}
.popup-specialty:hover{
  color:#0056d6;
}

/* ==================== Mobile nav toggle ==================== */
.nav-toggle{
  display:none;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
  margin-left:auto;
}
.nav-toggle span{
  display:block;
  width:22px;
  height:2px;
  border-radius:999px;
  background:#265b81;
  transition:transform .2s ease, opacity .2s ease;
}
.nav-toggle span + span{ margin-top:5px; }

.site-nav.nav-open .nav-toggle span:nth-child(1){
  transform:translateY(7px) rotate(45deg);
}
.site-nav.nav-open .nav-toggle span:nth-child(2){
  opacity:0;
}
.site-nav.nav-open .nav-toggle span:nth-child(3){
  transform:translateY(-7px) rotate(-45deg);
}

@media (max-width: 880px){
  .site-nav{ padding:0 14px; }

  .site-nav .nav-links{
    position:fixed;
    top:var(--nav-h);
    left:0;
    right:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    background:#ffffff;
    padding:12px 18px 16px;
    gap:8px;
    box-shadow:0 10px 24px rgba(0,0,0,.14);
    transform:translateY(-120%);
    opacity:0;
    pointer-events:none;
    transition:transform .25s ease, opacity .25s ease;
    z-index:999;
  }

  .site-nav.nav-open .nav-links{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
  }

  .site-nav .nav-links a{
    margin:0;
    padding:4px 0;
  }

  .nav-toggle{ display:block; }
}

/* ==================== Popup Go row ==================== */
.popup-go-row{
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
}
.popup-go-input{
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #265b81;
  border-radius: 10px;
  font-size: 13px;
  box-sizing: border-box;
}


.popup-go-clear{
  border: none;
  background: #ffffff;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  align-self: center;
  line-height: 1;
}
.popup-go-clear:hover{
  background: #f3f5fb;
}


.popup-go-btn{
  font-family: inherit;
  font-size: 14px;
  background: linear-gradient(to bottom, #4dc7d9 0%, #66a6ff 100%);
  color: white;
  padding: 0.55em 0.9em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.popup-go-btn:focus{
  outline: none;
}
.popup-go-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}
.popup-go-btn:active{
  transform: scale(0.96);
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}
.popup-go-btn span{
  display: block;
  margin-left: 0.35em;
  letter-spacing: 0.03em;
  transition: transform 0.25s ease;
}
.popup-go-btn .svg-wrapper{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  margin-right: 0.2em;
  transition: background-color 0.25s ease;
}
.popup-go-btn svg{
  width: 16px;
  height: 16px;
  fill: white;
  transition: transform 0.25s ease;
}
.popup-go-btn:hover .svg-wrapper{
  background-color: rgba(255, 255, 255, 0.5);
}
.popup-go-btn:hover svg{
  transform: translateX(3px);
}
.popup-go-btn:hover span{
  transform: translateX(2px);
}

/* ==================== SEO headings & intro ==================== */
.dir-heading{
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0c3f83;
}
.dir-tagline{
  font-size: 13px;
  color: #555;
  margin: 4px 0 10px;
}
.dir-intro{
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #555;
}
.dir-intro > summary{
  cursor: pointer;
  font-weight: 600;
  color: #0c3f83;
  list-style: none;
}
.dir-intro > summary::marker{
  content: "";
}
.dir-intro[open] > summary{
  margin-bottom: 6px;
}
.dir-subheading{
  font-size: 13px;
  margin: 0.75rem 0 0.25rem;
  color: #0c3f83;
}
.dir-list{
  margin: 0 0 0.5rem 1.1rem;
  padding: 0;
}
.dir-cities{
  margin: 0 0 0.5rem;
}
/* ========== Submit Profile Modal ========== */
.submit-modal{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;                     /* hidden by default */
  align-items: center;
  justify-content: center;
}

.submit-modal.is-open{
  display: flex;                     /* flex centers the dialog */
}

.submit-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

/* Scroll INSIDE the dialog if it’s taller than the viewport */
.submit-modal__dialog{
  position: relative;
  width: min(520px, 100% - 32px);
  max-height: calc(100vh - 80px);
  overflow-y: auto;

  margin: 0;
  padding: 1.5rem 1.75rem 1.25rem;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(0,0,0,0.25);
  box-sizing: border-box;
}

/* Close “X” button */
.submit-modal__close{
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: #ffffff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  line-height: 24px;
  text-align: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Modal text */
.submit-modal h2{
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
  color: #0c3f83;
}

.submit-modal p{
  margin: 0 0 0.75rem;
  font-size: 13px;
  color: #555;
}

.submit-modal form{
  display: grid;
  gap: 0.65rem;
}

.submit-modal label{
  font-size: 13px;
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 2px;
}

.submit-modal input,
.submit-modal textarea,
.submit-modal select{
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  font-size: 13px;
}

.submit-modal textarea{
  min-height: 70px;
  resize: vertical;
}

/* Pretty submit button inside modal */
.submit-modal button[type="submit"]{
  display: block;
  width: 100%;
  margin-top: 0.5rem;

  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;

  background: linear-gradient(90deg,#1fa33d,#38c172);
  color: #fff;
  font-weight: 700;
  font-size: 14px;

  box-shadow: 0 8px 20px rgba(31,163,61,0.35);
  transition: transform .12s ease, box-shadow .18s ease, opacity .12s ease;
}

.submit-modal button[type="submit"]:hover{
  opacity: 0.96;
  box-shadow: 0 10px 26px rgba(31,163,61,0.4);
  transform: translateY(-1px);
}

.submit-modal button[type="submit"]:active{
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(31,163,61,0.3);
}

/* Slightly tighter on small screens */
@media (max-width: 600px){
  .submit-modal__dialog{
    max-height: calc(100vh - 40px);
  }
}


/* ==================== Language toggle ==================== */
.lang-toggle{
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.lang-btn{
  border-radius: 999px;
  border: 1px solid #ccc;
  background: #fff;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #555;
}

.lang-btn--active{
  background: #265b81;
  color: #fff;
  border-color: #265b81;
}


/* Suggestions under popup origin input */
.origin-suggestions{
  margin-top: 4px;
  max-height: 160px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #dde7f7;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  text-align: left;
  font-size: 12px;
  display: none;
}

.origin-suggestion-item{
  padding: 6px 10px;
  cursor: pointer;
}

.origin-suggestion-item:hover{
  background: #f5f7fb;
}

/* ==================== Back to map (mobile floating button) ==================== */
.back-to-map-btn{
  display: none;              /* hidden on desktop */
  position: fixed;
  right: 14px;
  bottom: 80px;               /* sits above bottom nav / browser bar */
  z-index: 2500;

  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #265b81;
  background: #ffffff;
  color: #265b81;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  cursor: pointer;
}

.back-to-map-btn:hover{
  background: #f5f7fb;
}

/* Show only on mobile */
@media (max-width: 900px){
  .back-to-map-btn{
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
}


/* "Search this area" loading state on map overlay button */
#searchAreaBtn.search-area-btn--loading {
  opacity: 0.95;
  pointer-events: none;
  position: relative;
}

#searchAreaBtn.search-area-btn--loading::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  border-top-color: rgba(255,255,255,0.2);
  animation: searchAreaSpin 0.6s linear infinite;
}

@keyframes searchAreaSpin {
  to {
    transform: rotate(360deg);
  }
}



