/* =====================================================
   HEADER — MAGAZINE STYLE (PRO VERSION)
===================================================== */

/* ===============================
   HEADER
=============================== */

.jy-header {
  padding: 16px 0;
  border-bottom: 1px solid #E2E8F0;
  background: var(--color-bg);
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.jy-header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}


/* ===============================
   LOGO
=============================== */

.jy-site {
  display: flex;
  align-items: center;
  gap: 10px;
}


.jy-site-title {
  font-weight: 700;
  font-size: 20px;
  color: var(--color-text);
  text-decoration: none;
}


/* ===============================
   DESKTOP NAV
=============================== */

.jy-nav {
  display: flex;
  align-items: center;
}

.jy-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jy-menu li {
  display: inline-block;
  margin-left: 18px;
  font-weight: 600;
}

.jy-menu a {
  text-decoration: none;
  color: var(--color-text);
}

.jy-menu a:hover {
  color: var(--color-accent);
}

/* Slash separators */

.jy-menu li::after {
  content: "/";
  margin-left: 18px;
  color: #94A3B8;
}

.jy-menu li:last-child::after {
  content: "";
}

/* Show first 3 only */

.jy-menu-desktop li:nth-child(n+4) {
  display: none;
}


/* ===============================
   MORE BUTTON
=============================== */

.jy-more-btn {
  margin-left: 18px;
  background: none;
  border: none;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text);
  font-size: 18px;
}

.jy-more-btn:active {
  transform: scale(.95);
}


/* ===============================
   HAMBURGER BUTTON
=============================== */

.jy-menu-toggle {
  display: none;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.jy-menu-toggle::before,
.jy-menu-toggle::after,
.jy-menu-toggle span {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-text);
}

.jy-menu-toggle::before { top: 0; }
.jy-menu-toggle span    { top: 50%; transform: translateY(-50%); }
.jy-menu-toggle::after  { bottom: 0; }

.jy-menu-toggle:active {
  transform: scale(.95);
}


/* ===============================
   OFF-CANVAS OVERLAY
=============================== */

.jy-offcanvas {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 99999;
  overflow-y: auto;
}

.jy-offcanvas-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(380px, 100%);
  height: 100%;
  background: linear-gradient(180deg,#FFFFFF 0%,#60A5FA 100%);
  color: var(--color-text);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .35s ease;
  will-change: transform;
}

.jy-offcanvas.open {
  opacity: 1;
  pointer-events: auto;
}

.jy-offcanvas.open .jy-offcanvas-panel {
  transform: translateX(0);
}


/* ===============================
   OFF-CANVAS CONTENT
=============================== */

.jy-offcanvas-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jy-offcanvas-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--color-text);
}

.jy-offcanvas-close:hover,
.jy-offcanvas-close:focus {
  color: var(--color-primary);
}

.jy-offcanvas-search {
  margin: 20px 0;
}

.jy-offcanvas-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.jy-offcanvas-menu li {
  border-bottom: 1px solid rgba(0,0,0,.1);
}

.jy-offcanvas-menu a {
  position: relative;
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

/* Left accent bar on hover */

.jy-offcanvas-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity .2s ease;
}

.jy-offcanvas-menu a:hover::before {
  opacity: 1;
}

.jy-offcanvas-menu a:hover {
  background: var(--color-muted);
}


/* ===============================
   MOBILE
=============================== */

@media (max-width: 768px) {

  .jy-nav { display: none; }

  .jy-header-inner {
    justify-content: space-between;
  }

  .jy-menu-toggle { display: block; }

  /* SAFE horizontal scroll prevention */
  body {
    overflow-x: hidden;
  }

}


/* ===============================
   SEARCH
=============================== */

.jy-search-form {
  position: relative;
  width: 100%;
  margin: 20px 0;
}

.jy-search-input {
  width: 100%;
  height: 52px;
  padding: 0 52px 0 18px;
  border-radius: 10px;
  border: none;
  background: #E5E7EB;
  color: var(--color-text);
  font-size: 16px;
  outline: none;
}

.jy-search-input::placeholder {
  color: #6B7280;
}

.jy-search-input:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.jy-search-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
}

.jy-search-btn::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239CA3AF' viewBox='0 0 24 24'%3E%3Cpath d='M10 2a8 8 0 105.29 14.29l4.7 4.7 1.41-1.41-4.7-4.7A8 8 0 0010 2zm0 2a6 6 0 110 12 6 6 0 010-12z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
}


/* ===============================
   AUTH ICON
=============================== */

.jy-auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E5E7EB;
  color: var(--color-text);
  text-decoration: none;
  transition: background .2s ease, transform .15s ease;
}

.jy-auth-icon:hover {
  background: var(--color-primary);
  color: white;
}

.jy-auth-icon:active {
  transform: scale(.95);
}


/* ===============================
   LOGIN MODAL
=============================== */

.jy-login-modal {
  position: fixed !important;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: .3s;
  z-index: 999999;
}

.jy-login-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.jy-login-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 360px;
  background: #fff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
}


/* ===== LOGIN FORM STYLE FIX ===== */

.jy-login-box form p {
  margin: 0 0 14px;
}

.jy-login-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

/* Inputs */

.jy-login-box input[type="text"],
.jy-login-box input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 14px;
}

/* Remember me */

.jy-login-box .login-remember {
  font-size: 14px;
}

/* Button */

.jy-login-box input[type="submit"] {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #2563EB; /* or var(--color-primary) */
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* ===== PROPER SCROLL LOCK ===== */

html.jy-lock-scroll,
body.jy-lock-scroll {
  overflow: hidden;
}


/* ===============================
   ACCESSIBILITY UTILITIES
=============================== */

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

a:focus,
button:focus,
input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}