/* =========================================================
   GB7 TRAVEL — Unified Stylesheet
   Works for index.php (Stories), about.php, article.php
   Map page keeps its own overlay behavior via header.overlay
   ========================================================= */

/* ---------- Base tokens ---------- */
:root {
  --bg:#0b0b0c; --ink:#eaeaea; --muted:#9aa0a6; --accent:#c6a667;
  --card:#141416; --line:#222; --maxw:1200px;
}
*{ box-sizing:border-box }
html,body{
  margin:0;
  color:var(--ink);
  background:var(--bg);
  font:16px/1.6 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
}
a{ color:var(--ink); text-decoration:none }
a:hover{ color:var(--accent) }

/* =========================================================
   HEADER (shared)
   - Default: sticky bar (Stories/About/Article)
   - Map page: add class="overlay" to <header> to get fixed, glassy bar
   ========================================================= */
header{
  position:sticky; top:0; z-index:9999; isolation:isolate;
  background:rgba(11,11,12,.8);
  border-bottom:1px solid var(--line);
  backdrop-filter:saturate(180%) blur(10px);
}
header.overlay{
  position:fixed; inset:0 0 auto 0; z-index:9999;
  background:rgba(11,11,12,.55);
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter:saturate(160%) blur(10px);
}
.bar{
  max-width:var(--maxw); margin:auto;
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:12px 20px;
}
.logo{ font-weight:700; letter-spacing:.18em; text-transform:uppercase; font-size:14px }
.gold{ color:var(--accent) }

/* Nav pills */
.nav{ display:flex; gap:8px; align-items:center; white-space:nowrap }
.nav a{
  display:inline-flex; align-items:center; gap:8px;
  height:36px; padding:0 12px;
  border:1px solid var(--line); border-radius:999px;
  background:#101013; color:var(--ink);
  font-size:14px; line-height:1; text-decoration:none;
  transition:transform .15s ease, border-color .15s ease, background .15s ease;
}
.nav a:hover{ border-color:#333; transform:translateY(-1px) }
.nav a.cta{ background:linear-gradient(180deg,#2a2418,#1d1a12); border-color:#3a2f1a; color:#f1e7d0 }
.nav a[aria-current="page"]{ background:linear-gradient(180deg,#1b1b1e,#141416); border-color:#333; color:#fff }
.nav a .emoji{ display:block; line-height:1; font-size:16px; transform:translateY(-1px) }
.nav a:focus-visible{ outline:2px solid rgba(198,166,103,.35); outline-offset:2px }

/* =========================================================
   MAP-ONLY ELEMENTS (unchanged behavior)
   - Only used on map.php which sets <header class="overlay">
   ========================================================= */
#gmap{ position:fixed; inset:0; width:100vw; height:100vh; z-index:0; }

/* Floating search on map */
.search-wrap{
  position:fixed; z-index:11; left:50%; transform:translateX(-50%);
  top:70px; width:min(720px,92vw);
}
.search-card{
  background:rgba(20,20,22,.88); border:1px solid rgba(255,255,255,.08);
  border-radius:16px; padding:10px; box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.search{
  display:flex; align-items:center; gap:12px;
  background:#0f0f11; border:1px solid var(--line); border-radius:999px; padding:12px 16px;
}
.search input{
  flex:1; background:transparent; border:0; outline:none; color:var(--ink);
  font:16px system-ui,-apple-system,Segoe UI,Roboto;
}
.search .icon{
  flex-shrink:0; width:20px; height:20px; opacity:.9; background:#9aa0a6;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5zM9.5 14A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z"/></svg>') center/contain no-repeat;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5zM9.5 14A4.5 4.5 0 1 1 14 9.5 4.5 4.5 0 0 1 9.5 14z"/></svg>') center/contain no-repeat;
}
.count{ margin-top:6px; font-size:12px; color:var(--muted); text-align:right; padding:0 6px }

/* Polaroid pins */
.polaroid{
  position:absolute; width:96px; background:#fff; border-radius:6px;
  box-shadow:0 8px 24px rgba(0,0,0,.35);
  transform-origin:50% 100%; cursor:pointer; transition:.15s;
}
.polaroid:hover{ transform:translate(-50%,-100%) scale(1.04) rotate(var(--rot)); box-shadow:0 12px 30px rgba(0,0,0,.45) }
.polaroid .photo{ width:100%; height:72px; overflow:hidden; border-radius:6px 6px 0 0 }
.polaroid img{ width:100%; height:100%; object-fit:cover }
.polaroid .cap{
  font:600 10px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  padding:6px; text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Map footer (kept) */
footer.overlay{
  position:fixed; inset:auto 0 0 0; z-index:10;
  background:linear-gradient(180deg, rgba(11,11,12,0), rgba(11,11,12,.7) 40%, rgba(11,11,12,.85));
  color:#cfcfcf; border-top:1px solid rgba(255,255,255,.06);
}
.footbar{ max-width:var(--maxw); margin:auto; padding:12px 20px; font-size:13px; }

@media (max-width:640px){
  .search-wrap{ top:66px; }
}

/* =========================================================
   GENERAL CONTENT (Stories / About / Article)
   ========================================================= */
main{
  max-width:var(--maxw);
  margin:24px auto 80px;
  padding:0 20px;
}
.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  overflow:hidden;
}
.pad{ padding:22px 20px }

/* Headings (scoped; no global h1 to avoid layout surprises) */
.panel > h1,
.panel .panel-title,
.search-panel .inner > h1{
  font-size:28px;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin:0;
  padding:18px 20px;
  border-bottom:1px solid var(--line);
}

/* ---------- Stories: search box (boxed) ---------- */
.search-panel{ max-width:var(--maxw); margin:20px auto; padding:0 20px }
.search-panel .inner{
  background:var(--card); border:1px solid var(--line);
  border-radius:20px; overflow:hidden; padding-top:10px;
}
.search-row{ display:flex; gap:10px; align-items:center; padding:14px 16px }
.search-panel .search{
  flex:1; display:flex; align-items:center; gap:10px;
  background:#0f0f11; border:1px solid var(--line);
  border-radius:999px; padding:12px 16px;
}
.search-panel .search input{
  flex:1; background:transparent; border:0; outline:none; color:var(--ink);
  font:16px system-ui,-apple-system,Segoe UI,Roboto;
}
.search-panel .search .icon{
  flex-shrink:0; width:20px; height:20px; opacity:.8; background:#9aa0a6;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5zM9.5 14C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') center/contain no-repeat;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5zM9.5 14C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') center/contain no-repeat;
}
.search-panel .count{ color:var(--muted); font-size:12px; padding:0 16px 16px; text-align:right }

/* ---------- Stories list cards ---------- */
.card.post{
  display:grid; grid-template-columns:1fr; gap:10px;
  padding:16px; border-bottom:1px solid var(--line);
}
.thumb{ width:100%; height:180px; background:#101012; border:1px solid var(--line); border-radius:12px; overflow:hidden }
.thumb img{ width:100%; height:100%; object-fit:cover }
.no-results{ text-align:center; color:var(--muted); padding:24px 0 }

/* ---------- Pagination ---------- */
.pagination{
  display:flex; gap:8px; justify-content:center;
  padding:16px; border-top:1px solid var(--line);
}
.pagination a, .pagination span{
  padding:8px 12px; border:1px solid var(--line);
  border-radius:10px; font-size:14px; color:var(--ink);
}
.pagination a:hover{ color:var(--accent) }
.pagination .current{ background:#0f0f11; color:#cfcfcf; border-color:#333; cursor:default }
.pagination .disabled{ opacity:.5; cursor:not-allowed }
.pagination .dots{ border-color:transparent; padding:8px 4px }

/* ---------- Article specifics ---------- */
.place{ color:var(--muted) }
.heroimg{
  width:100%; height:420px; object-fit:cover; display:block;
  border-radius:14px; border:1px solid var(--line);
}
.breadcrumb{ margin:10px 0 14px; font-size:13px; color:var(--muted) }
.breadcrumb nav{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.breadcrumb a{ color:var(--muted) }
.breadcrumb a:hover{ color:var(--accent) }
.breadcrumb .sep{ opacity:.5; padding:0 6px }
.breadcrumb .current{ color:#cfcfcf }
.notfound{ color:#e0565b }

/* ---------- About/General blocks ---------- */
.grid{ display:grid; grid-template-columns:repeat(2,minmax(280px,1fr)); gap:18px }
.card{ background:#101013; border:1px solid var(--line); border-radius:16px; padding:18px }
.card h3{ margin:0 0 6px; font-size:18px; letter-spacing:.02em }
.muted{ color:var(--muted) }
.hero-band{
  background:radial-gradient(1200px 400px at 20% -10%, rgba(198,166,103,.08), transparent 60%),
             radial-gradient(1200px 400px at 80% 110%, rgba(198,166,103,.06), transparent 60%);
  border-bottom:1px solid var(--line);
}
.cta-block{
  margin-top:18px; padding:18px; border-radius:14px;
  background:linear-gradient(180deg,#1b1b1e,#141416);
  border:1px solid #2a2a2e;
  display:flex; flex-wrap:wrap; align-items:center; gap:12px; justify-content:space-between;
}
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 14px; border-radius:999px; border:1px solid #3a2f1a;
  background:linear-gradient(180deg,#2a2418,#1d1a12); color:#f1e7d0; text-decoration:none;
}
.btn:hover{ filter:brightness(1.05) }

/* ===== Enhanced professional footer ===== */
.site-footer {
  max-width: var(--maxw);
  margin: 60px auto 40px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 24px;
}

.foot-logo {
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--ink);
}

.copy {
  margin-top: 6px;
  font-size: 13px;
  color: #cfcfcf;
}

.madeby {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.madeby a {
  color: var(--accent);
  text-decoration: none;
}
.madeby a:hover {
  text-decoration: underline;
}

/* Footer nav */
.foot-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.foot-links a {
  color: #cfcfcf;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color .15s ease, transform .15s ease;
}
.foot-links a:hover {
  border-color: #333;
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .foot-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .foot-links {
    justify-content: flex-start;
    padding-top: 8px;
  }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width:820px){
  .grid{ grid-template-columns:1fr }
}