/* Qatar Linux header (.qlh) + footer (.qlf).
 Moved out of the custom modules (mod-custom191 / mod-custom190) into the template. */

.qlh{
  --ink:#5f0e36; --ink-2:#5b2a40; --maroon:#cf3f6a; --maroon-2:#b0204b; --rose:#ffab3f; --sand:#f1e4d0;
  --text:#ecdfe4; --muted:#b39aa4; --line:rgba(255,255,255,.1);
  position:relative; isolation:isolate; overflow:hidden; color:var(--text); direction:rtl; text-align:right;
  font-family:"Tajawal","Segoe UI",Tahoma,"Helvetica Neue",Arial,sans-serif;
  background:linear-gradient(165deg,var(--ink-2) 0%,var(--ink) 70%);
  box-sizing:border-box;
}
.qlh *,.qlh *::before,.qlh *::after{box-sizing:border-box}

/* ---------- background effects ---------- */
/* Qatar flag serrated edge, along the bottom */
.qlh-serrate{
  position:absolute; bottom:0; left:0; right:0; height:10px; z-index:-1;
  background:linear-gradient(45deg,#fff 50%,transparent 50%) 0 0/10px 10px repeat-x,
             linear-gradient(315deg,#fff 50%,transparent 50%) 0 0/10px 10px repeat-x;
}
/* drifting glows */
.qlh-glow{position:absolute; z-index:-1; border-radius:50%; filter:blur(90px); pointer-events:none; will-change:transform}
.qlh-glow.g1{width:420px; height:420px; bottom:-260px; left:-120px; background:var(--maroon); opacity:.5; animation:qlh-drift1 16s ease-in-out infinite}
.qlh-glow.g2{width:300px; height:300px; top:-220px; right:30%; background:var(--maroon-2); opacity:.25; animation:qlh-drift2 20s ease-in-out infinite}
@keyframes qlh-drift1{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(260px,-30px) scale(1.15)}}
@keyframes qlh-drift2{0%,100%{transform:translate(0,0)}50%{transform:translate(-220px,40px) scale(1.2)}}
/* light sweeping along the serrated edge */
.qlh-shine{
  position:absolute; bottom:10px; left:0; right:0; height:1px; z-index:-1;
  background:linear-gradient(90deg,transparent,var(--rose),var(--sand),var(--rose),transparent);
  background-size:200% 100%; animation:qlh-shine 7s linear infinite; opacity:.55;
}
@keyframes qlh-shine{to{background-position:-200% 0}}

.qlh-wrap{max-width:1200px; margin:0 auto; padding:14px 24px 24px; display:flex; align-items:center; gap:28px; flex-wrap:wrap}

/* ---------- logo ---------- */
.qlh-logo{display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:#fff; animation:qlh-in .6s ease both}
.qlh-logo-mark{
  position:relative; overflow:hidden; display:grid; place-items:center; width:40px; height:40px; border-radius:12px; flex:none;
  background:linear-gradient(135deg,var(--maroon-2),var(--maroon)); color:#fff;
  box-shadow:0 8px 20px -8px rgba(176,32,75,.7);
  transition:transform .35s cubic-bezier(.34,1.56,.64,1);
}
.qlh-logo-mark::after{ /* periodic glint */
  content:""; position:absolute; top:0; left:-150%; width:60%; height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.45),transparent);
  transform:skewX(-20deg); animation:qlh-glint 5s ease-in-out infinite;
}
@keyframes qlh-glint{0%,70%{left:-150%}100%{left:180%}}
.qlh-logo:hover .qlh-logo-mark{transform:rotate(-8deg) scale(1.08)}
.qlh-logo-mark svg{width:22px; height:22px}
.qlh-logo-mark .cur{animation:qlh-blink 1.1s steps(1) infinite}
@keyframes qlh-blink{50%{opacity:0}}
.qlh-logo-name{font-size:21px; font-weight:800; direction:ltr}
.qlh-logo-name em{
  font-style:normal; background:linear-gradient(90deg,var(--rose),var(--sand),var(--rose));
  background-size:200% 100%; -webkit-background-clip:text; background-clip:text; color:transparent;
  animation:qlh-shine 6s linear infinite;
}

/* ---------- nav ---------- */
.qlh-nav{display:flex; align-items:center; gap:4px; list-style:none; margin:0; padding:0}
.qlh-nav li{margin:0; padding:0; background:none}
.qlh-nav li::before{content:none; display:none}
.qlh-nav a,.qlh-nav .qlh-sep{
  position:relative; display:block; padding:8px 14px; border-radius:999px; font-size:15px; font-weight:600;
  color:var(--muted); text-decoration:none; transition:color .25s ease, background .25s ease;
}
.qlh-nav a:link,.qlh-nav a:visited{color:var(--muted); text-decoration:none}
.qlh-nav a::after{
  content:""; position:absolute; right:14px; left:14px; bottom:3px; height:2px; border-radius:2px;
  background:linear-gradient(270deg,var(--rose),var(--maroon-2));
  transform:scaleX(0); transform-origin:right; transition:transform .3s ease;
}
.qlh-nav a:hover{color:#fff; background:rgba(255,255,255,.05)}
.qlh-nav a:hover::after,.qlh-nav a.active::after{transform:scaleX(1)}
.qlh-nav a.active,.qlh-nav a.active:link,.qlh-nav a.active:visited{color:#fff}

/* ---------- buttons ---------- */
.qlh-btns{display:flex; gap:8px; margin-right:auto}
.qlh-btn{
  position:relative; overflow:hidden; display:inline-flex; align-items:center; gap:7px; padding:8px 18px; border-radius:999px;
  font-weight:700; font-size:14px; text-decoration:none; color:#fff; white-space:nowrap;
  background:linear-gradient(135deg,var(--maroon-2),var(--maroon));
  transition:transform .25s ease, box-shadow .25s ease;
}
.qlh-btn::after{ /* shine sweep on hover */
  content:""; position:absolute; top:0; right:-120%; width:60%; height:100%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.4),transparent);
  transform:skewX(-20deg); transition:right .6s ease;
}
.qlh-btn:hover{transform:translateY(-2px); box-shadow:0 10px 22px -8px rgba(176,32,75,.8)}
.qlh-btn:hover::after{right:140%}
.qlh-btn:not(.ghost){animation:qlh-pulse 3s ease-in-out infinite}
.qlh-btn:not(.ghost):hover{animation:none}
@keyframes qlh-pulse{0%,100%{box-shadow:0 0 0 0 rgba(226,85,125,.45)}50%{box-shadow:0 0 0 7px rgba(226,85,125,0)}}
.qlh-btn svg{width:15px; height:15px}
.qlh-btn.ghost{background:transparent; color:var(--sand); border:1px solid rgba(241,228,208,.35)}
.qlh-btn.ghost:hover{background:rgba(241,228,208,.08); box-shadow:none}
.qlh a:focus-visible,.qlh-check:focus-visible + .qlh-toggle{outline:2px solid var(--rose); outline-offset:3px}

/* ---------- hamburger (no JS) ---------- */
.qlh-check{position:absolute; opacity:0; pointer-events:none}
.qlh-toggle{
  position:relative; display:none; width:42px; height:42px; margin-right:auto; border-radius:12px; cursor:pointer;
  border:1px solid var(--line); background:rgba(255,255,255,.04);
  transition:background .3s ease, border-color .3s ease, transform .2s ease;
}
.qlh-toggle:active{transform:scale(.92)}
.qlh-toggle span{
  position:absolute; left:11px; width:18px; height:2px; border-radius:2px; background:var(--sand);
  transition:transform .4s cubic-bezier(.68,-.55,.27,1.55), opacity .25s ease, top .3s ease, width .3s ease;
}
.qlh-toggle span:nth-child(1){top:14px}
.qlh-toggle span:nth-child(2){top:20px; width:12px; left:17px}
.qlh-toggle span:nth-child(3){top:26px}
.qlh-toggle:hover span:nth-child(2){width:18px; left:11px}
.qlh-check:checked + .qlh-toggle{background:var(--maroon); border-color:var(--maroon-2)}
.qlh-check:checked + .qlh-toggle span:nth-child(1){top:20px; transform:rotate(45deg)}
.qlh-check:checked + .qlh-toggle span:nth-child(2){opacity:0; transform:translateX(-12px)}
.qlh-check:checked + .qlh-toggle span:nth-child(3){top:20px; transform:rotate(-45deg)}

/* ---------- entrance ---------- */
@keyframes qlh-in{from{opacity:0; transform:translateY(-8px)}to{opacity:1; transform:none}}

@media (min-width:861px){
  .qlh-menu{display:flex; flex:1}
  .qlh-menu-in{display:flex; align-items:center; gap:28px; flex:1}
  .qlh-nav li,.qlh-btns{animation:qlh-in .6s ease both}
  .qlh-nav li:nth-child(1){animation-delay:.08s}
  .qlh-nav li:nth-child(2){animation-delay:.16s}
  .qlh-nav li:nth-child(3){animation-delay:.24s}
  .qlh-nav li:nth-child(4){animation-delay:.32s}
  .qlh-nav li:nth-child(5){animation-delay:.4s}
  .qlh-nav li:nth-child(6){animation-delay:.48s}
  .qlh-nav li:nth-child(n+7){animation-delay:.56s}
  .qlh-btns{animation-delay:.4s}
}
@media (max-width:860px){
  .qlh-wrap{padding:12px 16px 22px; gap:0 12px}
  .qlh-toggle{display:block}
  /* slide-down drawer */
  .qlh-menu{
    display:grid; grid-template-rows:0fr; flex-basis:100%; opacity:0;
    transition:grid-template-rows .45s cubic-bezier(.4,0,.2,1), opacity .3s ease;
  }
  .qlh-menu-in{overflow:hidden; min-height:0; display:flex; flex-direction:column; gap:14px}
  .qlh-check:checked ~ .qlh-menu{grid-template-rows:1fr; opacity:1}
  .qlh-nav{flex-direction:column; align-items:stretch; padding-top:12px}
  .qlh-nav a{border-radius:10px}
  .qlh-nav a::after{display:none}
  .qlh-btns{margin:0 0 2px}
  .qlh-btns .qlh-btn{flex:1; justify-content:center}
  /* items slide in one after another */
  .qlh-nav li,.qlh-btns{opacity:0; transform:translateX(24px); transition:opacity .3s ease, transform .35s ease}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li,
  .qlh-check:checked ~ .qlh-menu .qlh-btns{opacity:1; transform:none}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(1){transition-delay:.1s}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(2){transition-delay:.15s}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(3){transition-delay:.2s}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(4){transition-delay:.25s}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(5){transition-delay:.3s}
  .qlh-check:checked ~ .qlh-menu .qlh-nav li:nth-child(n+6){transition-delay:.35s}
  .qlh-check:checked ~ .qlh-menu .qlh-btns{transition-delay:.3s}
}
@media (prefers-reduced-motion:reduce){
  .qlh *,.qlh *::before,.qlh *::after{animation:none!important; transition:none!important}
}

.qlf{
  --ink:#5f0e36; --ink-2:#5b2a40; --maroon:#cf3f6a; --maroon-2:#b0204b; --rose:#ffab3f; --sand:#f1e4d0;
  --text:#ecdfe4; --muted:#b39aa4; --line:rgba(255,255,255,.1);
  position:relative; isolation:isolate; overflow:hidden; color:var(--text); direction:rtl; text-align:right;
  font-family:"Tajawal","Segoe UI",Tahoma,"Helvetica Neue",Arial,sans-serif;
  background:linear-gradient(165deg,var(--ink-2) 0%,var(--ink) 70%);
  box-sizing:border-box;
}
.qlf *,.qlf *::before,.qlf *::after{box-sizing:border-box}

/* own text colors, so the site template can't override them */
.qlf, .qlf p, .qlf li, .qlf div, .qlf span{color:var(--text) !important}
.qlf h3, .qlf .qlf-logo, .qlf .qlf-logo-name{color:#fff !important}
.qlf .qlf-logo-name em{color:var(--rose) !important}
.qlf .qlf-col a{color:var(--muted) !important}
.qlf .qlf-col a:hover{color:var(--rose) !important}
.qlf .qlf-btn, .qlf .qlf-btn span, .qlf .qlf-logo-mark{color:#fff !important}
.qlf .qlf-btn.ghost{color:var(--sand) !important}
.qlf .qlf-bottom{color:var(--muted) !important}

/* Qatar flag serrated edge, along the top */
.qlf-serrate{
  position:absolute; top:0; left:0; right:0; height:10px; z-index:-1;
  background:linear-gradient(135deg,#fff 50%,transparent 50%) 0 0/10px 10px repeat-x,
             linear-gradient(225deg,#fff 50%,transparent 50%) 0 0/10px 10px repeat-x;
}
.qlf-glow{
  position:absolute; z-index:-1; width:420px; height:420px; border-radius:50%; top:-220px; right:-120px;
  background:var(--maroon); opacity:.45; filter:blur(90px); pointer-events:none;
}

.qlf-wrap{max-width:1200px; margin:0 auto; padding:40px 24px 0}
.qlf-main{display:flex; justify-content:space-between; align-items:flex-start; gap:32px; flex-wrap:wrap}

/* brand */
.qlf-brand{display:flex; flex-direction:column; gap:16px}
.qlf-logo{display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:#fff}
.qlf-logo-mark{
  display:grid; place-items:center; width:40px; height:40px; border-radius:12px; flex:none;
  background:linear-gradient(135deg,var(--maroon-2),var(--maroon)); color:#fff;
  box-shadow:0 8px 20px -8px rgba(176,32,75,.7);
}
.qlf-logo-mark svg{width:22px; height:22px}
.qlf-logo-name{font-size:21px; font-weight:800; direction:ltr}
.qlf-logo-name em{font-style:normal; color:var(--rose)}
.qlf-btns{display:flex; gap:8px; flex-wrap:wrap}
.qlf-btn{
  display:inline-flex; align-items:center; gap:7px; padding:8px 18px; border-radius:999px;
  font-weight:700; font-size:14px; text-decoration:none; color:#fff;
  background:linear-gradient(135deg,var(--maroon-2),var(--maroon));
  transition:transform .2s ease, box-shadow .2s ease;
}
.qlf-btn:hover{transform:translateY(-2px); box-shadow:0 10px 22px -8px rgba(176,32,75,.8)}
.qlf-btn svg{width:15px; height:15px}
.qlf-btn.ghost{background:transparent; color:var(--sand); border:1px solid rgba(241,228,208,.35)}
.qlf-btn.ghost:hover{background:rgba(241,228,208,.08); box-shadow:none}

/* link columns */
.qlf-cols{display:flex; gap:56px; flex-wrap:wrap}
.qlf-col h3{margin:0 0 10px; font-size:14px; font-weight:800; color:#fff}
.qlf-col ul{list-style:none; margin:0; padding:0}
.qlf-col li{margin:0 0 4px}
.qlf-col a{color:var(--muted); text-decoration:none; font-size:14px; transition:color .2s ease}
.qlf-col a:hover{color:var(--rose)}
.qlf a:focus-visible{outline:2px solid var(--rose); outline-offset:3px; border-radius:4px}

.qlf-bottom{
  margin-top:32px; padding:16px 0 18px; border-top:1px solid var(--line);
  text-align:center; font-size:13px; color:var(--muted);
}

@media (max-width:640px){
  .qlf-wrap{padding:36px 16px 0}
  .qlf-main{flex-direction:column; gap:28px}
  .qlf-cols{gap:32px}
}

/* ---------- template-integration extras ---------- */
/* Joomla menu modules can output separators/headings and get the template's list styling */
.qlf-col li{padding:0; background:none}
.qlf-col li::before{content:none; display:none}
.qlf .qlf-col .qlf-sep{color:var(--muted) !important; font-size:14px}
.qlf .qlf-col a.active{color:#fff !important}
