/* STAVRONNET — Dark Tactical Premium UI
   Rules:
   - Any non-white background => white text
   - White background => black text
   - Gold is accent only
   - No emoji aesthetic
*/
:root{
  --primary-black:#0B0F14;
  --dark-ui:#141A22;
  --gold:#C6A54A;
  --dark-gold:#8A6A2F;
  --light-text:#F5F5F5;
  --ink:#0B0F14;

  --stroke: rgba(245,245,245,.10);
  --stroke2: rgba(245,245,245,.16);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --shadow2: 0 10px 26px rgba(0,0,0,.45);
  --radius: 18px;
  --radius2: 26px;

  --font: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-ui: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html,body{height:100%;}
body{
  font-family: var(--font-ui);
  color: var(--light-text);
  background:
    radial-gradient(1000px 500px at 12% 8%, rgba(198,165,74,.14), transparent 60%),
    radial-gradient(800px 500px at 85% 18%, rgba(198,165,74,.08), transparent 62%),
    radial-gradient(900px 480px at 50% 95%, rgba(0,0,0,.20), transparent 66%),
    linear-gradient(180deg, #070A0E, var(--primary-black));
}

/* Global readability: never grey-on-grey */
.small, small, .small-muted, .text-muted, .text-secondary, .text-body-secondary, .text-body-tertiary,
.form-text, .helptext{
  color: var(--light-text) !important;
  opacity: 1 !important;
}

h1,h2,h3,h4,h5,h6,
.h1,.h2,.h3,.h4,.h5,.h6{
  color: var(--light-text);
  letter-spacing: .04em;
  text-transform: uppercase;
}

a{ color: inherit; text-decoration:none; }
a:hover{ color: var(--gold); }

/* White surface rule */
.bg-white, .bg-light, .hn-white,
.table, .table thead, .table tbody, .table tfoot,
.modal-content, .dropdown-menu{
  background: #ffffff !important;
  color: #000000 !important;
}
.bg-white *, .bg-light *, .hn-white *,
.modal-content *{
  color: #000000 !important;
}

/* Buttons */
.btn{ border-radius: 999px; font-weight: 600; letter-spacing:.02em; }
.btn-primary{
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--ink) !important;
}
.btn-primary:hover{ filter: brightness(1.05); box-shadow: 0 10px 26px rgba(198,165,74,.25); }
.btn-outline-light{
  border-color: rgba(245,245,245,.26) !important;
  color: var(--light-text) !important;
}
.btn-outline-light:hover{ border-color: rgba(198,165,74,.55) !important; color: var(--gold) !important; }
.btn-outline-warning{
  border-color: rgba(198,165,74,.55) !important;
  color: var(--gold) !important;
}
.btn-outline-warning:hover{ background: rgba(198,165,74,.12) !important; }

/* Top nav */
.sn-nav{
  position: sticky; top:0; z-index:1000;
  background: rgba(11,15,20,.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.sn-brand{
  display:flex; align-items:center; gap:.6rem;
}
.sn-brand img{ width:28px; height:28px; }
.sn-brand span{
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

.sn-topsearch .form-control{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--light-text);
  border-radius: 999px;
  padding: .55rem .9rem;
}
.sn-topsearch .form-control::placeholder{ color: rgba(245,245,245,.78); }
.sn-topsearch .form-control:focus{ box-shadow:none; border-color: rgba(198,165,74,.40); }

/* Form controls (dark surfaces) */
.form-control, .form-select{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid var(--stroke) !important;
  color: var(--light-text) !important;
  border-radius: 14px;
}

/* Native select dropdowns: options are usually on white background */
.form-select option{
  background: #ffffff;
  color: #000000;
}

/* Media safety: never let uploaded images explode layout */
.hn-avatar-xl, .hn-avatar-xxl{
  width: 92px;
  height: 92px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--stroke2);
  background: rgba(255,255,255,.04);
  flex: 0 0 auto;
}
.hn-avatar-xxl{ width: 132px; height: 132px; }
.hn-avatar-xl img, .hn-avatar-xxl img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hn-cover-mini{
  width: 100%;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.03);
}
.hn-cover-mini img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* Standard media blocks for posts/trophies/journal */
.hn-media-grid img, .hn-media-grid video,
.hn-media img, .hn-media video,
.hn-post-card img{
  max-width: 100%;
  height: auto;
}

/* Pricing */
.hn-plan{ background: rgba(255,255,255,.04); border:1px solid var(--stroke); box-shadow: var(--shadow2); border-radius: var(--radius2); }
.hn-plan-premium{ border-color: rgba(198,165,74,.35); box-shadow: 0 18px 60px rgba(198,165,74,.10), var(--shadow2); }
.hn-plan-click{ display:block; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.hn-plan-click:hover{ transform: translateY(-2px); border-color: rgba(198,165,74,.55); box-shadow: 0 22px 70px rgba(0,0,0,.55); }
.hn-plan-name{ letter-spacing:.16em; font-weight:800; color: var(--gold); }
.hn-plan-price{ font-size: 2rem; font-weight: 800; margin-top:.25rem; }
.hn-bullets{ margin:0; padding-left: 1.1rem; }
.hn-bullets li{ margin:.35rem 0; }
.hn-kv{ border:1px solid var(--stroke); border-radius: 16px; padding: .75rem .9rem; background: rgba(0,0,0,.18); }
.hn-kv-row{ display:flex; justify-content:space-between; gap: .75rem; padding:.25rem 0; }
.hn-kv-row span{ opacity:.95; }
.form-control::placeholder{ color: rgba(245,245,245,.74) !important; }

/* Dropdown/select OPTION panels are usually rendered on a white surface by the OS/browser.
   Make sure text is BLACK there (user request). */
select option, .form-select option{
  color: #000000;
  background: #ffffff;
}

/* Bootstrap dropdown items: white surface => black text */
.dropdown-menu .dropdown-item{ color:#000 !important; }
.dropdown-menu .dropdown-item:hover{ background: rgba(198,165,74,.10) !important; }

.sn-iconbtn{
  display:inline-flex; align-items:center; justify-content:center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
}
.sn-iconbtn:hover{ border-color: rgba(198,165,74,.45); color: var(--gold); }
.sn-iconbtn svg{ width:18px; height:18px; }

/* Layout B: compact rail + centered content */
.sn-shell{ display:flex; min-height: calc(100vh - 64px); }
.sn-rail{
  width: 84px;
  flex: 0 0 84px;
  border-right: 1px solid var(--stroke);
  background: rgba(20,26,34,.45);
  backdrop-filter: blur(10px);
}
.sn-rail-inner{ position: sticky; top:64px; padding: 14px 10px; }

.sn-main{ flex: 1; }
.sn-container{ max-width: 1180px; margin: 0 auto; padding: 22px 18px; }

/* Rail nav items */
.sn-rail a{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:6px;
  padding: 10px 8px;
  border-radius: 14px;
  color: var(--light-text);
  border: 1px solid transparent;
}
.sn-rail a:hover{ border-color: rgba(198,165,74,.35); background: rgba(255,255,255,.04); }
.sn-rail .sn-ico{
  width: 26px; height: 26px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  display:flex; align-items:center; justify-content:center;
}
.sn-rail .sn-ico svg{ width:16px; height:16px; }
.sn-rail .sn-label{ font-size: .68rem; letter-spacing:.10em; text-transform:uppercase; opacity:.95; }

/* Cards */
.card, .sn-card{
  background: rgba(20,26,34,.70) !important;
  border: 1px solid var(--stroke) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow2);
  color: var(--light-text);
}
.sn-card{ padding: 16px; }

.sn-cardhead{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.sn-title{ font-weight: 800; letter-spacing:.12em; text-transform: uppercase; color: var(--gold); }
.sn-sub{ color: var(--light-text) !important; opacity: .92; }

/* Form controls on dark surfaces */
.form-control, .form-select{
  background: rgba(255,255,255,.06) !important;
  border: 1px solid var(--stroke) !important;
  color: var(--light-text) !important;
  border-radius: 14px;
}
.form-control::placeholder{ color: rgba(245,245,245,.78) !important; }
.form-control:focus, .form-select:focus{
  box-shadow:none !important;
  border-color: rgba(198,165,74,.45) !important;
}
label, .form-label{ color: var(--light-text) !important; font-weight: 600; letter-spacing:.03em; }

/* Alerts */
.alert{ border-radius: var(--radius); border:1px solid var(--stroke); background: rgba(255,255,255,.06); color: var(--light-text); }

/* Footer */
.sn-footer{ border-top:1px solid var(--stroke); padding: 18px 0; color: var(--light-text) !important; opacity: .9; }

/* Hero (home) */
.sn-hero{
  position: relative;
  border-radius: var(--radius2);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(198,165,74,.10), rgba(20,26,34,.70));
  border: 1px solid rgba(198,165,74,.25);
  box-shadow: var(--shadow);
}
.sn-hero::before{
  content:"";
  position:absolute; inset:-2px;
  background: radial-gradient(800px 320px at 20% 10%, rgba(198,165,74,.22), transparent 60%),
              radial-gradient(900px 420px at 90% 20%, rgba(198,165,74,.14), transparent 60%);
  pointer-events:none;
}
.sn-hero-inner{ position:relative; padding: 26px; }
.sn-kicker{ font-size:.75rem; letter-spacing:.22em; text-transform:uppercase; color: rgba(245,245,245,.92); }
.sn-h1{ font-size: 2.3rem; font-weight: 900; letter-spacing:.16em; color: var(--gold); text-transform: uppercase; }
.sn-lead{ max-width: 760px; font-size: 1.05rem; opacity: .95; }

/* Chips */
.sn-chip{
  display:inline-flex; align-items:center; gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--light-text);
}
.sn-pill{
  display:inline-flex; align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(198,165,74,.45);
  color: var(--gold);
  background: rgba(198,165,74,.08);
  font-weight: 700;
  letter-spacing:.08em;
}

/* Responsive: hide rail on small; use offcanvas */
@media (max-width: 991.98px){
  .sn-rail{ display:none; }
}

/* Map */
.hn-map{ height: 70vh; min-height: 420px; border-radius: var(--radius2); overflow:hidden; border:1px solid var(--stroke); box-shadow: var(--shadow2); }
.leaflet-container{ background: #0b0f14; }

/* Generic old-class compatibility */
.hn-glass{ background: rgba(20,26,34,.70) !important; border:1px solid var(--stroke) !important; border-radius: var(--radius); box-shadow: var(--shadow2); }
.hn-cardtitle{ font-weight:800; letter-spacing:.10em; text-transform:uppercase; color: var(--gold); }
.hn-cardsub{ color: var(--light-text) !important; opacity:.92; }
.hn-chip{ display:inline-flex; align-items:center; gap:8px; padding: 8px 12px; border-radius:999px; background: rgba(255,255,255,.06); border:1px solid var(--stroke); color: var(--light-text); }
.hn-pill{ display:inline-flex; padding: 6px 10px; border-radius:999px; border:1px solid rgba(198,165,74,.45); color: var(--gold); background: rgba(198,165,74,.08); font-weight:700; letter-spacing:.08em; }
.nav .nav-link{ color: var(--light-text) !important; border-radius: 12px; padding:.55rem .7rem; }
.nav .nav-link:hover{ background: rgba(255,255,255,.04); border:1px solid rgba(198,165,74,.25); }


/* === MOBILE MENU ICON CLAMP FIX (auto added) === */
@media (max-width: 992px) {
  /* Target the mobile/offcanvas menu area */
  .offcanvas,
  .offcanvas * {
    box-sizing: border-box;
  }

  /* Clamp ANY svg/img icons inside the offcanvas menu so they can't explode */
  .offcanvas a svg,
  .offcanvas button svg,
  .offcanvas a img,
  .offcanvas button img {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex: 0 0 22px !important;
    object-fit: contain !important;
    overflow: hidden !important;
  }

  /* If some icon is still huge due to inline attributes, force it */
  .offcanvas svg {
    max-width: 100% !important;
    max-height: 100% !important;
  }

  /* Prevent weird overlays inside menu */
  .offcanvas {
    overflow: auto !important;
  }
}
/* === END MOBILE MENU ICON CLAMP FIX === */



/* === HOME HERO AVATAR (avoid profile-avatar overlap) === */
.sn-avatar-wrap{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  margin-bottom: 10px;
}
.sn-hero-avatar{
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--ink);
  background: rgba(198,165,74,.95);
  border: 1px solid rgba(245,245,245,.12);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
@media (max-width: 576px){
  .sn-hero-inner{ padding: 18px; }
  .sn-h1{ font-size: 1.85rem; }
}
/* === END HOME HERO AVATAR === */

/* HN_POST_CARD_V4 */
.hn-post-card{margin:24px 0;padding:22px;border-radius:20px;background:rgba(0,0,0,0.35);border:1px solid rgba(255,255,255,0.08);box-shadow:0 12px 28px rgba(0,0,0,0.45);}
.hn-post-header{display:flex;align-items:center;margin-bottom:12px;}
.hn-post-title{font-weight:700;font-size:18px;margin-bottom:10px;}
.hn-post-body{margin-bottom:12px;}
.hn-post-media img,.hn-post-media video{border-radius:16px;}
