/* ==========================================================================
   layout.css — हेडर, ब्रँड, 3D नेव्हिगेशन बटणं, मोबाईल हॅमबर्गर
   hеडरचं मार्कअप js/core/ui.js मधून एकदाच तयार होतं.
   ========================================================================== */

header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #c2410c, #9a3412, #d9560a, #7c2d12);
  background-size: 300% 300%;
  animation: flow 10s ease infinite;
  color: #fff;
}

@keyframes flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* केशरी लाटा रंगवणारं canvas */
#hbg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hwrap {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  margin: auto;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1.15rem;
}

.brand svg {
  width: 52px;
  height: 52px;
  flex: none;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding-bottom: 5px;
  perspective: 600px;
}

/* 3D "भरलेलं" नेव्हिगेशन बटण */
nav a {
  position: relative;
  display: inline-block;
  color: #7c2d12;
  text-decoration: none;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #fff8e1 0%, #ffd98a 55%, #ffb347 100%);
  border: 1.5px solid #ffe9a8;
  box-shadow: 0 3px 0 #8f3a0c, 0 6px 10px rgba(0, 0, 0, 0.28), inset 0 -2px 4px rgba(124, 45, 18, 0.25);
  transition: transform 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}

nav a:hover {
  transform: translateY(-2px);
}

header .brand:hover {
  opacity: .92;
}

nav a:active,
nav a.on {
  transform: translateY(2px);
  color: #ffe08a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: linear-gradient(180deg, #a3480f, #6b2308);
  border-color: #ffcf6b;
  box-shadow: 0 1px 0 #3d1304, 0 3px 6px rgba(0, 0, 0, .5), inset 0 3px 8px rgba(0, 0, 0, .5);
}

/* मोबाईल हॅमबर्गर */
#hamb {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1.5px solid #ffe9a8;
  background: linear-gradient(180deg, #fff8e1, #ffd98a 55%, #ffb347);
  color: #7c2d12;
  box-shadow: 0 3px 0 #8f3a0c, 0 6px 10px rgba(0, 0, 0, .3);
  cursor: pointer;
}

#hamb:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #8f3a0c;
}

#hamb svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 640px) {
  .brand-name {
    font-size: 0;
    width: 0;
    overflow: hidden;
  }

  .hwrap {
    padding: 6px 10px;
    gap: 8px;
  }

  #hamb {
    display: flex;
  }

  nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 6px 0 14px;
    margin: 0;
  }

  nav.open {
    display: flex;
  }

  nav a {
    font-size: .95rem;
    padding: 9px 16px;
    text-align: center;
  }

  main {
    padding: 18px 12px 40px;
  }

  h1 {
    font-size: 1.5rem;
  }
}

/* ---------- पानातील दृश्यं (view) ---------- */
.view[hidden] {
  display: none !important;
}

.page-head {
  margin-bottom: 8px;
}

/* ---------- खालचा पट्टा ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 16px;
  font-size: .85rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- सूचना (toast) ---------- */
#toastHost {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: #2b1a0a;
  color: #fff5e6;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: .88rem;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  animation: toastIn .22s ease-out;
  max-width: min(92vw, 420px);
  text-align: center;
}

.toast.ok {
  background: #1f6b3f;
}

.toast.err {
  background: #9c2b1c;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
