/* ELBOSSILY Books — 3D literary masthead with subtle, real moving flames.
   Local preview only: scoped to the header branding; all book/store data untouched. */
body .site-header .brand {
  min-width: 0;
  gap: clamp(.7rem, 1.1vw, 1.15rem);
  overflow: visible;
}
body .site-header .brand > span:last-child {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15px;
  padding-bottom: 5px;
  min-width: 0;
  isolation: isolate;
  overflow: visible;
}
body .site-header .brand strong[data-i18n="brandTitle"] {
  position: relative;
  z-index: 2;
  display: block;
  width: max-content;
  max-width: 100%;
  color: #762819 !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: clamp(1.6rem, 2vw, 2.05rem) !important;
  line-height: 1.2 !important;
  letter-spacing: .012em !important;
  font-weight: 900 !important;
  text-shadow:
    0 -1px 0 #ffe7aa,
    1px 1px 0 #c88648,
    2px 2px 0 #a55c32,
    3px 3px 0 #793821,
    4px 4px 0 #4d241c,
    5px 7px 8px rgba(67, 33, 20, .32),
    0 0 16px rgba(247, 164, 55, .08) !important;
  transition: filter .28s ease;
}
body .site-header .brand:hover strong[data-i18n="brandTitle"] {
  filter: brightness(1.08);
}
body .site-header .brand small[data-i18n="brandSubtitle"] {
  position: relative;
  z-index: 3;
  display: block;
  margin-top: .42rem !important;
  font-size: clamp(.8rem, .9vw, .98rem) !important;
  line-height: 1.4 !important;
  color: #334b60 !important;
  text-shadow: none !important;
}
/* These are separate decorative elements; the title text itself is never split,
   so Arabic letter shaping and the existing language switch remain intact. */
body .site-header .brand .elb-fire-crown {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: -15px;
  height: 43px;
  overflow: visible;
  pointer-events: none;
  contain: none;
}
body .site-header .brand .elb-fire-crown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 12px;
  background: linear-gradient(90deg, transparent 0%, rgba(250,161,39,.25) 11%, rgba(255,202,88,.42) 40%, rgba(245,116,32,.20) 75%, transparent 100%);
  filter: blur(7px);
  border-radius: 50%;
}
body .site-header .brand .elb-fire-crown > i {
  position: absolute;
  display: block;
  left: var(--fire-x);
  bottom: 0;
  width: var(--fire-w);
  height: var(--fire-h);
  transform-origin: 50% 100%;
  transform: rotate(var(--fire-r,0deg));
  border-radius: 65% 65% 48% 48%;
  background: linear-gradient(to top,
    rgba(255,229,127,.96) 0%,
    rgba(255,190,58,.94) 27%,
    rgba(246,119,35,.87) 61%,
    rgba(218,59,29,.67) 82%,
    rgba(218,59,29,0) 100%);
  clip-path: polygon(49% 0%, 63% 20%, 69% 36%, 89% 54%, 99% 77%, 81% 93%, 66% 100%, 33% 100%, 15% 92%, 3% 73%, 20% 48%, 33% 30%);
  opacity: .89;
  filter: drop-shadow(0 0 4px rgba(255,154,37,.25));
  animation: elb-actual-flame var(--fire-time,1.7s) ease-in-out var(--fire-delay,0s) infinite alternate;
}
body .site-header .brand .elb-fire-crown > i::after {
  content:"";
  position:absolute;
  inset: 35% 34% 2%;
  background: linear-gradient(to top,rgba(255,251,210,.96),rgba(255,235,137,.15));
  border-radius: 60% 60% 20% 20%;
}
@keyframes elb-actual-flame {
  0%   {transform: translateY(0) scaleX(.85) rotate(calc(var(--fire-r,0deg) - 5deg)); opacity:.7;}
  28%  {transform: translateY(-4px) scaleX(1.08) rotate(calc(var(--fire-r,0deg) + 4deg)); opacity:1;}
  65%  {transform: translateY(-7px) scaleX(.79) rotate(calc(var(--fire-r,0deg) - 2deg)); opacity:.79;}
  100% {transform: translateY(-11px) scaleX(.98) rotate(calc(var(--fire-r,0deg) + 8deg)); opacity:.93;}
}
body.lang-ar .site-header .brand strong[data-i18n="brandTitle"] {
  font-family: 'Noto Kufi Arabic', Tahoma, Arial, sans-serif !important;
  font-size: clamp(1.6rem, 2vw, 2.05rem) !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}
body.lang-ar .site-header .brand > span:last-child {align-items:flex-end;}
body.lang-ar .site-header .brand .elb-fire-crown {direction:ltr;}
@media (max-width: 1110px) {
  body .site-header {flex-wrap:wrap;}
  body .site-header .brand strong[data-i18n="brandTitle"] {font-size:clamp(1.55rem,2.6vw,1.9rem) !important;}
  body .site-header .top-nav {margin-left:auto;}
}
@media (max-width: 700px) {
  body .site-header .brand > span:last-child {padding-top:14px;}
  body .site-header .brand strong[data-i18n="brandTitle"],
  body.lang-ar .site-header .brand strong[data-i18n="brandTitle"] {
    font-size:clamp(1.35rem,4.2vw,1.8rem) !important;
  }
  body .site-header .brand .elb-fire-crown {top:-10px;height:35px;}
  body .site-header .brand .elb-fire-crown > i {height:calc(var(--fire-h) * .7);width:calc(var(--fire-w) * .7);}
  body .site-header .brand small[data-i18n="brandSubtitle"] {font-size:.77rem !important;}
}
@media (prefers-reduced-motion:reduce) {
  body .site-header .brand .elb-fire-crown > i {animation:none !important;opacity:.45;}
  body .site-header .brand strong[data-i18n="brandTitle"] {transition:none !important;}
}
