/* Site header — Sacred Canvas redesign */

:root {
  --header-h: 72px;
  --header-h-mobile: 60px;
  --announcement-h: 36px;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  z-index: 1002;
  pointer-events: none;
  transition: width 0.12s linear, top 0.25s ease;
}

body.has-announcement .progress-bar {
  top: var(--announcement-h);
}

body.has-site-header.site-header-solid {
  padding-top: var(--header-h);
}

body.has-site-header.site-header-solid.has-announcement {
  padding-top: calc(var(--header-h) + var(--announcement-h));
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  background: transparent;
}

body.has-announcement .site-header {
  top: var(--announcement-h);
}

.site-header.is-scrolled,
.site-header.site-header--solid {
  background: rgba(255, 248, 240, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(122, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #c9a227);
  color: #1a0a00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-logo:hover .logo-icon {
  transform: scale(1.08) rotate(5deg);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.6);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark, var(--ink));
  transition: color 0.35s ease;
}

.logo-tagline {
  font-size: 0.68rem;
  color: var(--text-muted, var(--muted));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.35s ease;
}

.site-header.site-header--transparent:not(.is-scrolled) .logo-name,
.site-header.site-header--transparent:not(.is-scrolled) .logo-tagline {
  color: rgba(255, 255, 255, 0.92);
}

.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  min-height: 44px;
  justify-content: center;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark, var(--ink));
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.25s ease, background 0.25s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--red);
  background: rgba(122, 0, 0, 0.06);
}

.nav-link--active {
  color: var(--red);
  font-weight: 600;
}

.nav-link--active::after {
  transform: translateX(-50%) scale(1);
}

.site-header.site-header--transparent:not(.is-scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.88);
}

.site-header.site-header--transparent:not(.is-scrolled) .nav-link:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.1);
}

.site-header.site-header--transparent:not(.is-scrolled) .nav-link--active {
  color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark, var(--ink));
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
  position: relative;
  text-decoration: none;
}

.header-icon-btn:hover {
  background: rgba(122, 0, 0, 0.08);
  color: var(--red);
  transform: scale(1.05);
}

.site-header.site-header--transparent:not(.is-scrolled) .header-icon-btn {
  color: rgba(255, 255, 255, 0.88);
}

.site-header.site-header--transparent:not(.is-scrolled) .header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--gold);
}

.header-wa-btn:hover {
  background: rgba(37, 211, 102, 0.12) !important;
  color: #25d366 !important;
}

.header-lang {
  display: none;
}

@media (min-width: 980px) {
  .header-lang {
    display: flex;
  }
  .header-lang .lang-switcher {
    gap: 4px;
  }
  .header-lang .lang-switch-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    min-height: 32px;
    border-radius: 20px;
    border: 1px solid rgba(122, 0, 0, 0.15);
    background: transparent;
    color: inherit;
    cursor: pointer;
  }
  .header-lang .lang-switch-btn.active {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
  }
  .site-header.site-header--transparent:not(.is-scrolled) .header-lang .lang-switch-btn {
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
  }
  .site-header.site-header--transparent:not(.is-scrolled) .header-lang .lang-switch-btn.active {
    background: var(--gold);
    color: #1a0a00;
    border-color: var(--gold);
  }
}

.header-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  padding: 8px;
  transition: background 0.25s ease;
}

.header-hamburger:hover {
  background: rgba(122, 0, 0, 0.08);
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark, var(--ink));
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.35s ease;
  transform-origin: center;
  margin: 0 auto;
}

.site-header.site-header--transparent:not(.is-scrolled) .hamburger-line {
  background: rgba(255, 255, 255, 0.9);
}

.header-hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header-hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.header-hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header-search-bar {
  background: rgba(255, 248, 240, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 12px 0;
  animation: searchSlideDown 0.25s ease;
}

.header-search-bar[hidden] {
  display: none !important;
}

@keyframes searchSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 50px;
  padding: 6px 6px 6px 20px;
  box-shadow: 0 2px 16px rgba(122, 0, 0, 0.08);
}

.header-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-family: var(--sans);
  color: var(--text-dark, var(--ink));
  outline: none;
  padding: 4px 0;
  min-width: 0;
}

.header-search-input::placeholder {
  color: var(--text-muted, var(--muted));
}

.header-search-submit,
.header-search-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.header-search-submit {
  background: var(--red);
  color: #fff;
}

.header-search-submit:hover {
  background: #5a0000;
}

.header-search-close {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted, var(--muted));
  font-size: 1rem;
}

.header-search-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9998;
}

.mobile-drawer[hidden] {
  display: none !important;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 3, 0, 0.65);
  backdrop-filter: blur(2px);
  animation: headerFadeIn 0.3s ease;
}

@keyframes headerFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scope to mobile-drawer — avoids legacy .drawer-panel rules in style.css */
.mobile-drawer .drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: auto;
  bottom: 0;
  height: 100%;
  width: min(85vw, 320px);
  max-width: 320px;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  gap: 0;
  transform: none;
  animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.3);
}

.mobile-drawer .drawer-panel a,
.mobile-drawer .drawer-link,
.mobile-drawer .drawer-logo {
  opacity: 1;
  transform: none;
  visibility: visible;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-drawer .drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  background: linear-gradient(135deg, var(--red), #5a0000);
  flex-shrink: 0;
}

.mobile-drawer .drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  border-bottom: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

.drawer-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.25);
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.drawer-logo-name {
  display: block;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.drawer-logo-tagline {
  display: block;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mobile-drawer .drawer-close {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  margin-bottom: 0;
  font-size: inherit;
  transition: background 0.2s ease;
}

.mobile-drawer .drawer-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-drawer .drawer-divider {
  height: 1px;
  background: rgba(122, 0, 0, 0.1);
  margin: 8px 20px;
  flex-shrink: 0;
}

.mobile-drawer .drawer-nav {
  list-style: none;
  margin: 4px 0;
  padding: 0 12px;
  flex: 1 1 auto;
}

.mobile-drawer .drawer-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-drawer .drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-dark, var(--ink));
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  margin-bottom: 2px;
  border-bottom: none;
  border-left: none;
}

.mobile-drawer .drawer-link:hover {
  background: rgba(122, 0, 0, 0.06);
  color: var(--red);
  padding-left: 14px;
}

.mobile-drawer .drawer-link--active {
  background: rgba(122, 0, 0, 0.08);
  color: var(--red);
  font-weight: 600;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
}

.drawer-icon {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-drawer .drawer-lang {
  padding: 8px 16px;
  flex-shrink: 0;
}

.mobile-drawer .drawer-footer-stack {
  margin-top: auto;
  flex-shrink: 0;
}

.drawer-lang .lang-switcher {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.drawer-lang .lang-switch-btn {
  flex: 1;
  padding: 10px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(122, 0, 0, 0.15);
  background: #fff;
  font-family: var(--sans);
  cursor: pointer;
}

.drawer-lang .lang-switch-btn.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.drawer-cta {
  padding: 8px 16px;
}

.drawer-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  min-height: 44px;
  background: #25d366;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.25s ease, transform 0.2s ease;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.drawer-wa-btn:hover {
  background: #20bc5a;
  transform: translateY(-1px);
}

.drawer-social {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  justify-content: center;
}

.drawer-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(122, 0, 0, 0.06);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}

.drawer-social-btn:hover {
  background: var(--red);
  color: #fff;
  transform: scale(1.08);
}

.mobile-drawer .drawer-blessing {
  text-align: center;
  padding: 12px 16px 24px;
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--text-muted, var(--muted));
  font-style: italic;
  flex-shrink: 0;
}

.mobile-drawer .drawer-cta,
.mobile-drawer .drawer-social {
  flex-shrink: 0;
}

.announcement-bar {
  background: var(--red);
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
  padding: 8px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.announcement-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px 10px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.announcement-close:hover {
  color: #fff;
}

.site-header.is-search-open .header-nav {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .nav-link {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  body.has-site-header.site-header-solid {
    padding-top: var(--header-h-mobile);
  }

  body.has-site-header.site-header-solid.has-announcement {
    padding-top: calc(var(--header-h-mobile) + var(--announcement-h));
  }

  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    height: var(--header-h-mobile);
    gap: 8px;
  }

  .header-nav {
    display: none;
  }

  .header-hamburger {
    display: flex;
    grid-column: 1;
  }

  .header-logo {
    grid-column: 2;
    justify-self: center;
  }

  .header-actions {
    grid-column: 3;
    justify-self: end;
  }

  .header-lang {
    display: none !important;
  }

  .header-wa-btn {
    display: none;
  }

  .logo-tagline {
    display: none;
  }

  .header-search-bar {
    position: fixed;
    top: var(--header-h-mobile);
    left: 0;
    right: 0;
    z-index: 999;
    padding: 10px 16px;
  }

  body.has-announcement .header-search-bar {
    top: calc(var(--header-h-mobile) + var(--announcement-h));
  }

  .header-search-input::placeholder {
    content: 'Khojein...';
  }
}

@media (max-width: 380px) {
  .logo-icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .logo-name {
    font-size: 0.88rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .drawer-panel,
  .header-search-bar,
  .drawer-backdrop {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
