/* =========================================================
   /public_html/assets/css/header.css
   Production-ready (Lang + Theme + Drawer)
========================================================= */

/* ========== Base ========== */
.sr-skip{
  position:absolute;
  left:-9999px;
  top:auto;
}
.sr-skip:focus{
  left:16px;
  top:16px;
  z-index:99999;
  background:#111827;
  color:#fff;
  padding:8px 12px;
  border-radius:10px;
}

.sr-header{
  position:sticky;
  top:0;
  z-index:3000;
  background:#ffffff;
  border-bottom:1px solid rgba(17,24,39,.08);
}

.sr-header__inner{
  max-width:1200px;
  margin:0 auto;
  padding:12px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

/* Scroll lock when drawer is open */
body.sr-lock{
  overflow:hidden;
}

/* ========== Brand ========== */
.sr-brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#111827;
}
.sr-brand__logo{
  height:44px;
  object-fit:contain;
}
.sr-brand__sub{
  font-size:12px;
  font-weight:800;
  color:#6b7280;
}

/* ========== Desktop Nav ========== */
.sr-nav{
  display:flex;
  align-items:center;
  gap:26px;
}

.sr-nav__link{
  position:relative;
  font-weight:900;
  font-size:15px;
  color:#111827;
  text-decoration:none;
  padding:6px 4px;
  transition:.15s ease;
}
.sr-nav__link:hover{
  color:#e86800;
}

/* Active underline */
.sr-nav__link.is-active{
  color:#111827;
}
.sr-nav__link.is-active::after{
  content:"";
  position:absolute;
  left:4px;
  right:4px;
  bottom:-12px;
  height:3px;
  border-radius:999px;
  background:#e86800;
}

/* ========== Dropdown ========== */
.sr-nav__dropdown{
  position:relative;
}
.sr-nav__link--hasdrop{
  display:flex;
  align-items:center;
  gap:6px;
}
.sr-nav__chev{
  font-size:12px;
  transition:.2s ease;
}

.sr-nav__drop{
  position:absolute;
  top:calc(100% + 14px);
  left:0;
  min-width:210px;
  background:#fff;
  border-radius:14px;
  border:1px solid rgba(17,24,39,.08);
  box-shadow:0 16px 50px rgba(0,0,0,.08);
  padding:10px;
  display:none;
  flex-direction:column;
  gap:4px;
}

.sr-nav__dropdown:hover .sr-nav__drop,
.sr-nav__dropdown:focus-within .sr-nav__drop{
  display:flex;
}

.sr-nav__dropdown:hover .sr-nav__chev,
.sr-nav__dropdown:focus-within .sr-nav__chev{
  transform:rotate(180deg);
}

.sr-nav__sublink{
  display:block;
  padding:8px 10px;
  border-radius:10px;
  font-size:14px;
  font-weight:800;
  color:#111827;
  text-decoration:none;
  transition:.15s ease;
}
.sr-nav__sublink:hover{
  background:rgba(232,104,0,.08);
  color:#e86800;
}
.sr-nav__sublink.is-active{
  background:rgba(232,104,0,.12);
  color:#e86800;
}

/* ========== Controls ========== */
.sr-actions{
  display:flex;
  align-items:center;
  gap:12px;
}

.sr-lang,
.sr-theme{
  display:flex;
  gap:8px;
}

/* Chips */
.sr-chip{
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  font-weight:900;
  font-size:13px;
  cursor:pointer;
  transition:.15s ease;
  color:#111827;
}
.sr-chip:hover{
  background:#fafafa;
}
.sr-chip[aria-pressed="true"]{
  border-color:rgba(232,104,0,.42);
  background:rgba(232,104,0,.10);
  color:#e86800;
}

/* ========== Mobile Burger ========== */
.sr-burger{
  display:none;
  flex-direction:column;
  gap:5px;
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.sr-burger__line{
  width:18px;
  height:2px;
  background:#111827;
  border-radius:2px;
}

/* ========== Drawer ========== */
.sr-drawer{
  position:fixed;
  inset:0;
  z-index:4000;
  pointer-events:none;
}
.sr-drawer.is-open{
  pointer-events:auto;
}

.sr-drawer__overlay{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
  opacity:0;
  transition:.2s ease;
}
.sr-drawer.is-open .sr-drawer__overlay{
  opacity:1;
}

.sr-drawer__panel{
  position:absolute;
  top:0;
  right:0;
  width:82%;
  max-width:340px;
  height:100%;
  background:#fff;
  border-left:1px solid rgba(17,24,39,.08);
  box-shadow:-10px 0 40px rgba(0,0,0,.1);
  transform:translateX(100%);
  transition:.25s ease;
  display:flex;
  flex-direction:column;
  padding:20px 18px;
  outline:none;
}
.sr-drawer.is-open .sr-drawer__panel{
  transform:translateX(0);
}

.sr-drawer__top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:18px;
}
.sr-drawer__title{
  font-weight:1000;
  font-size:18px;
  letter-spacing:.3px;
}
.sr-drawer__close{
  font-size:22px;
  background:none;
  border:none;
  cursor:pointer;
  color:#111827;
}

/* Drawer Nav */
.sr-drawer__nav{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sr-drawer__link{
  font-weight:900;
  font-size:16px;
  text-decoration:none;
  color:#111827;
  padding:6px 2px;
}
.sr-drawer__link.is-active{
  color:#e86800;
}

.sr-drawer__group{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sr-drawer__sub{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding-left:12px;
}

.sr-drawer__sublink{
  font-size:14px;
  font-weight:800;
  text-decoration:none;
  color:#374151;
}
.sr-drawer__sublink.is-active{
  color:#e86800;
}

.sr-drawer__bottom{
  margin-top:auto;
  padding-top:16px;
  border-top:1px solid rgba(17,24,39,.08);
}
.sr-drawer__controls{
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* ========== Responsive ========== */
@media (max-width: 760px){
  .sr-only-desktop{ display:none !important; }
  .sr-burger{ display:flex; }
}
@media (min-width: 761px){
  .sr-only-mobile{ display:none !important; }
}

/* =========================================================
   Dark theme overrides
   - root[data-theme="dark"] is set by JS
========================================================= */
:root[data-theme="dark"] .sr-header{
  background:#0b1220;
  border-bottom:1px solid rgba(255,255,255,.08);
}
:root[data-theme="dark"] .sr-brand,
:root[data-theme="dark"] .sr-nav__link,
:root[data-theme="dark"] .sr-drawer__link{
  color:#e5e7eb;
}
:root[data-theme="dark"] .sr-brand__sub{
  color:#9ca3af;
}
:root[data-theme="dark"] .sr-nav__link.is-active{
  color:#e5e7eb;
}
:root[data-theme="dark"] .sr-nav__drop,
:root[data-theme="dark"] .sr-drawer__panel{
  background:#0f172a;
  border-color:rgba(255,255,255,.10);
}
:root[data-theme="dark"] .sr-nav__sublink{
  color:#e5e7eb;
}
:root[data-theme="dark"] .sr-nav__sublink:hover{
  background:rgba(232,104,0,.14);
}
:root[data-theme="dark"] .sr-chip,
:root[data-theme="dark"] .sr-burger{
  background:#0f172a;
  color:#e5e7eb;
  border-color:rgba(255,255,255,.12);
}
:root[data-theme="dark"] .sr-chip:hover{
  background:#111c34;
}
:root[data-theme="dark"] .sr-burger__line{
  background:#e5e7eb;
}
:root[data-theme="dark"] .sr-drawer__close{
  color:#e5e7eb;
}
:root[data-theme="dark"] .sr-drawer__sublink{
  color:#cbd5e1;
}
:root[data-theme="dark"] .sr-drawer__bottom{
  border-top-color:rgba(255,255,255,.10);
}
