/* Portal additions (on top of style.css) */
.tag.t-open{background:#dff3e6;color:#12633a}.tag.t-closed{background:#eceff2;color:#5b6876}
.tender-row.is-closed{opacity:.72}
.ann .side{display:flex;flex-direction:column;align-items:flex-end;gap:6px}
.star{color:var(--gold)}

/* Four entry tiles */
.tiles{background:var(--alt);border-bottom:1px solid var(--line)}
.tiles-in{display:grid;grid-template-columns:repeat(4,1fr);gap:22px;padding-block:28px;margin-top:-72px;position:relative;z-index:2}
.tile{display:flex;align-items:center;gap:18px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:30px 26px;min-height:150px;text-decoration:none;color:inherit;transition:transform .15s,border-color .15s}
.tile:hover{transform:translateY(-3px);border-color:var(--gold)}
.tile .ic{flex:0 0 72px;height:72px;border-radius:18px;background:var(--navy);display:grid;place-items:center}
.tile .ic svg{width:38px;height:38px;stroke:var(--gold)}
.tile b{display:block;color:var(--navy);font-size:21px;line-height:1.4;margin-bottom:4px}.tile small{display:block;color:var(--muted);font-size:15.5px;line-height:1.5}
.hero-in{padding-block:56px 96px}

/* Directorate picker on home */
.req-pick{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.req-pick-card{display:flex;flex-direction:column;align-items:flex-start;gap:12px;padding:22px;text-decoration:none;color:inherit;transition:transform .15s,border-color .15s}
.req-pick-card:hover{transform:translateY(-3px);border-color:var(--gold)}
.req-pick-card .ic{width:48px;height:48px;border-radius:12px;background:var(--navy);display:grid;place-items:center}
.req-pick-card .ic svg{width:26px;height:26px;stroke:var(--gold)}
.req-pick-card strong{font-size:17px;color:var(--navy);line-height:1.5}

/* Directorate cards */
.dept-grid2{grid-template-columns:repeat(auto-fit,minmax(340px,1fr))}
.dept-card{padding:24px;display:flex;flex-direction:column;gap:12px}
.dept-card h3{font-size:18px;color:var(--navy)}.dept-card h3 a{text-decoration:none}.dept-card h3 a:hover{text-decoration:underline}
.dept-card p{margin:0;color:var(--muted);font-size:15px}
.dept-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:6px}
.dept-links .btn{padding:8px 16px;font-size:14px}
.dept-head{display:flex;align-items:center;gap:14px}
.dept-head .ic{width:56px;height:56px;border-radius:14px;background:var(--navy);display:grid;place-items:center;flex-shrink:0}
.dept-head .ic svg{width:30px;height:30px;stroke:var(--gold)}

/* Tabs on directorate page */
.tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:2px solid var(--line);margin-bottom:26px}
.tab{padding:12px 22px;text-decoration:none;color:var(--muted);font-weight:600;border-bottom:3px solid transparent;margin-bottom:-2px}
.tab:hover{color:var(--navy)}.tab.on{color:var(--navy);border-bottom-color:var(--gold)}

/* Forms */
.req-form,.track{margin-bottom:22px}
.form-h{font-size:21px;color:var(--navy)}
.form select,.form textarea,.form input[type=file]{font:inherit;color:var(--ink);padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;width:100%}
.form select:disabled{background:var(--alt);color:#8895a3}
.form input{width:100%}
.form input[type=file]{padding:8px}
.form small{color:var(--muted);font-size:13px}
.loc-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.fld{display:grid;gap:6px;align-content:start}.fld input[hidden]{display:none}
.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.hp{position:absolute!important;inset-inline-start:-9999px;width:1px!important;height:1px;opacity:0}
.form-err{margin:0;color:var(--red);font-weight:600;min-height:1.4em}
.file-list{list-style:none;margin:-4px 0 0;padding:0;display:grid;gap:4px;font-size:14px}
.file-list svg{width:16px;height:16px;stroke:var(--navy);vertical-align:-3px}
.ok-box{text-align:center;padding:36px 24px}
.ok-box .ref{font:800 34px/1.2 var(--font-en);color:var(--navy);letter-spacing:2px;margin:10px 0 18px;direction:ltr}
.track-out{min-height:1.4em}.track-out .reply{white-space:pre-line;background:var(--alt);padding:12px 14px;border-radius:10px}
.track-out h3{font-size:16px;color:var(--navy);margin:12px 0 6px}
.page-hero p{max-width:70ch}

@media(max-width:1000px){.tiles-in{grid-template-columns:repeat(2,1fr)}}
@media(max-width:620px){.tiles-in{grid-template-columns:1fr;margin-top:-36px}.loc-grid,.two{grid-template-columns:1fr}.dept-grid2{grid-template-columns:1fr}.hero-in{padding-block:36px 64px}}

/* Header: 6 links + long names -> collapse to burger earlier */
.hero h1{font-size:clamp(26px,3.4vw,40px)}
.brand-text strong{font-size:16px}.brand-text{max-width:min(520px,50vw)}
.nav a{padding:8px 11px;font-size:14.5px}
@media (max-width:1320px){
  .burger{display:flex;margin-inline-start:auto}
  .nav{display:none;position:absolute;inset-inline:0;top:100%;background:var(--navy);flex-direction:column;padding:10px 16px 16px;margin:0;border-top:1px solid rgba(255,255,255,.1)}
  .nav.open{display:flex}
  .lang{order:3}
  .header-in{flex-wrap:wrap;padding-block:8px}
}
html,body{overflow-x:hidden}
.ann{grid-template-columns:92px 1fr auto}
.ann-date span{font-size:11.5px;white-space:nowrap}
@media(max-width:620px){.ann{grid-template-columns:78px 1fr}}
@media(max-width:620px){.brand-text small{display:none}.brand-text strong{font-size:13.5px}.brand img{width:40px;height:40px}}

/* Header: single-line nav + language dropdown */
.header-in{width:min(1360px,100% - 32px);gap:14px}
.brand-text{max-width:340px}.brand-text strong{font-size:15px}
.nav{gap:2px}.nav a{white-space:nowrap;padding:8px 10px;font-size:14.5px}
.lang-dd{flex-shrink:0}
.lang-dd select{background:rgba(255,255,255,.1);color:#fff;border:1px solid rgba(255,255,255,.25);border-radius:10px;padding:7px 12px;font:inherit;font-size:14px;cursor:pointer}
.lang-dd select option{color:#111}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Directorates dropdown in the nav */
.nav-dd{position:relative;display:flex}
.dd-menu{display:none;list-style:none;margin:0;padding:6px;position:absolute;inset-inline-start:0;top:100%;min-width:340px;background:#fff;border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.25);z-index:60}
.nav-dd:hover .dd-menu,.nav-dd:focus-within .dd-menu{display:block}
.dd-menu a{display:block;color:var(--navy)!important;padding:10px 14px!important;border-radius:8px;font-size:14.5px;white-space:normal!important;line-height:1.5}
.dd-menu a:hover{background:var(--alt)!important}
@media (max-width:1320px){.dd-menu{display:block;position:static;box-shadow:none;background:rgba(255,255,255,.08);min-width:0;margin:2px 14px 6px}.dd-menu a{color:#e5edf5!important}.dd-menu a:hover{background:rgba(255,255,255,.12)!important}.nav-dd{flex-direction:column}}

.geo{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.geo small{flex-basis:100%;color:var(--muted);font-size:13px}.geo-out{font-size:14px;color:var(--green);font-weight:600}.geo-out .link{border:0;background:none;color:var(--red);cursor:pointer;font:inherit;text-decoration:underline}

/* animated tile icons */
@keyframes tileFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes tileWiggle{0%,100%{transform:rotate(0) scale(1)}20%{transform:rotate(-10deg) scale(1.12)}40%{transform:rotate(9deg) scale(1.12)}60%{transform:rotate(-5deg) scale(1.06)}80%{transform:rotate(3deg) scale(1)}}
@keyframes tileGlow{0%,100%{box-shadow:0 0 0 0 rgba(212,160,23,.0)}50%{box-shadow:0 0 0 9px rgba(212,160,23,.18)}}
.tile .ic{animation:tileFloat 3s ease-in-out infinite,tileGlow 3s ease-in-out infinite}
.tile .ic svg{animation:tileWiggle 4.5s ease-in-out infinite}
.tile:nth-child(2) .ic,.tile:nth-child(2) .ic svg{animation-delay:.4s}
.tile:nth-child(3) .ic,.tile:nth-child(3) .ic svg{animation-delay:.8s}
.tile:nth-child(4) .ic,.tile:nth-child(4) .ic svg{animation-delay:1.2s}
.tile:hover .ic svg{animation-duration:1s}
@media (prefers-reduced-motion:reduce){.tile .ic,.tile .ic svg{animation:none}}

/* page hero icon + empty state */
.hero-row{display:flex;align-items:center;gap:18px}
.ph-ic{flex:0 0 84px;height:84px;border-radius:20px;background:rgba(255,255,255,.08);border:1px solid rgba(242,183,5,.45);display:grid;place-items:center;animation:tileFloat 3s ease-in-out infinite}
.empty-box{display:flex;flex-direction:column;align-items:center;gap:6px;padding:28px 0}
.empty-box .empty{margin:0}
@media(max-width:620px){.ph-ic{flex-basis:64px;height:64px}}

/* video news */
.play-badge{position:absolute;inset-inline-end:12px;bottom:12px;width:46px;height:46px;border-radius:50%;background:rgba(15,39,66,.85);color:var(--gold);display:grid;place-items:center;font-size:18px;border:2px solid var(--gold);padding-inline-start:3px}
.detail-video{width:100%;max-height:70vh;background:#000;border-radius:var(--radius);display:block}

/* tender flyers: show whole portrait image */
.flyer-link{display:block;margin-bottom:22px}
.hero-img.flyer{aspect-ratio:auto;object-fit:contain;max-width:560px;width:100%;height:auto;margin:0 auto;display:block;border:1px solid var(--line);background:#fff}

/* archive tenders on home */
.arch-note{background:#fff7d6;border:1px solid var(--gold);color:#6b4e00;border-radius:12px;padding:10px 16px;margin:0 0 16px;font-weight:600}
.tender-row.is-arch{position:relative;padding-top:38px}
.arch-ribbon{position:absolute;top:0;inset-inline-start:0;background:var(--gold);color:#1a1a1a;font-weight:700;font-size:13px;padding:5px 16px;border-radius:var(--radius) 0 12px 0}
html[dir=rtl] .arch-ribbon{border-radius:0 var(--radius) 0 12px}

.tender-row.is-closed.is-arch{opacity:1}
.tender-row.is-arch .ann-date{background:var(--navy)}


/* yellow directorate cards */
.dept-card{background:var(--gold);border-color:#d9a000}
.dept-card h3 a,.dept-card p,.dept-card .dept-phone{color:var(--navy)}
.dept-card .dept-head .ic{background:var(--navy)}
.dept-card .btn-gold{background:#fff;color:var(--navy);border-color:#fff}
.dept-card .btn-navy{background:var(--navy);color:#fff}

/* yellow home tiles */
.tile{background:var(--gold);border-color:#d9a000}
.tile:hover{border-color:var(--navy)}
.tile b{color:var(--navy)}
.tile small{color:#3d3200}
@keyframes tileGlowNavy{0%,100%{box-shadow:0 0 0 0 rgba(15,39,66,0)}50%{box-shadow:0 0 0 9px rgba(15,39,66,.16)}}
.tile .ic{animation:tileFloat 3s ease-in-out infinite,tileGlowNavy 3s ease-in-out infinite}

/* archive ribbon on the left */
.arch-ribbon,html[dir=rtl] .arch-ribbon,html[dir=ltr] .arch-ribbon{inset-inline-start:auto;inset-inline-end:auto;left:0;right:auto;border-radius:var(--radius) 0 12px 0}

/* home split: tenders (left quarter, scrolls up) + news (3/4, scrolls left) */
.split{display:grid;grid-template-columns:1fr 3fr;gap:28px;direction:ltr;align-items:start}
.split>div{direction:rtl;min-width:0}
html[dir=ltr] .split>div{direction:ltr}
.split .sec-head{margin-bottom:16px}
.vq{height:520px;overflow-y:auto;scrollbar-width:none;position:relative}
.vq::-webkit-scrollbar{display:none}
.vq-item{padding-bottom:14px}
.tender-mini{display:block;position:relative;padding:14px 16px;text-decoration:none;color:inherit;overflow:hidden}
.tender-mini.is-arch{padding-top:42px}
.tender-mini h3{font-size:16px;line-height:1.5;margin:8px 0;color:var(--navy)}
.tender-mini .mini-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0;font-size:13px;color:var(--muted)}
.tender-mini .deadline{margin:6px 0 0;font-size:12.5px;color:var(--muted)}
.tender-mini:hover{border-color:var(--gold)}
.split .arch-note{font-size:13px;padding:8px 12px}
.split-news .mq-item{flex-basis:300px}
@media(max-width:900px){.split{grid-template-columns:1fr}.vq{height:380px}}

/* align both columns so the bottom buttons sit on the same line */
.split{align-items:stretch}
.split>div{display:flex;flex-direction:column}
.split-tenders .vq-wrap{flex:1;position:relative;min-height:360px}
.split-tenders .vq{position:absolute;inset:0;height:auto}
.split .more{margin-top:auto;padding-top:22px;margin-bottom:0}
.split .mq{margin-bottom:0}
@media(max-width:900px){.split-tenders .vq-wrap{min-height:380px}}

/* lighter yellow for tiles and directorate cards */
.tile,.dept-card{background:#ffe27a;border-color:#f2c94c}
.tile small{color:#4a3d00}

/* waving Kurdistan flag beside the header logo */
.flag-wave{display:inline-flex;align-items:center;flex-shrink:0;margin-inline:2px 4px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.35))}
.flag-wave svg{display:block;width:56px;height:auto}
@media(max-width:620px){.flag-wave svg{width:40px}}

/* home sections use the full screen width (no empty side margins) */
body[data-page=home] .section>.wrap{width:calc(100% - 48px);max-width:none}
@media(max-width:620px){body[data-page=home] .section>.wrap{width:calc(100% - 32px)}}

/* call-number alert badge */
.call-badge{display:inline-flex;align-items:center;gap:6px;background:var(--navy);color:var(--gold);font-weight:800;font-size:14px;border-radius:10px;padding:4px 12px 4px 8px;margin:8px 0 2px;border-inline-start:4px solid var(--gold);box-shadow:0 2px 6px rgba(15,39,66,.25)}

/* unified warm palette: navy + gold + cream */
:root{--alt:#fff8e3;--line:#ebe0bd;--shadow:0 6px 22px rgba(14,42,71,.10)}
.tile,.dept-card{background:linear-gradient(160deg,#ffe88f,#ffd54f);border-color:#f2c230}
.tiles{border-bottom-color:#f2e3a8}
.section.alt{background:var(--alt)}
.arch-note{background:#fff3c4;border-color:#f2b705}

/* Firefox-safe split: columns can never grow wider than their track */
.split{grid-template-columns:minmax(0,1fr) minmax(0,3fr)}
.split>div{min-width:0;max-width:100%;overflow:hidden}
.split-news .mq{width:100%;max-width:100%;min-width:0}
.split-tenders .vq-wrap{min-width:0}
@media(max-width:900px){.split{grid-template-columns:minmax(0,1fr)}}

/* ===== Kurdistan Region flag palette: red / white / green + golden sun ===== */
:root{
  --navy:#0a5a35;      /* deep flag green (was navy) */
  --navy-2:#0f7a47;
  --gold:#fdd005;      /* golden sun */
  --red:#ed1c24;       /* flag red */
  --green:#00a651;     /* flag green */
  --ink:#14231a;
  --muted:#556359;
  --alt:#f3f9f5;
  --line:#d6e6dc;
  --shadow:0 6px 22px rgba(10,90,53,.10);
}
.site-header{position:sticky}
.site-header::after{content:"";position:absolute;inset-inline:0;bottom:-6px;height:6px;background:linear-gradient(#ed1c24 0 33.3%,#fff 33.3% 66.6%,#00a651 66.6% 100%);box-shadow:0 1px 3px rgba(0,0,0,.2)}
.brand-text small{color:#cfeedc}
.page-hero{background:linear-gradient(135deg,var(--navy),var(--navy-2));border-bottom:6px solid var(--gold)}
.page-hero p{color:#dff3e7}
.site-footer{color:#d4eedd;border-top:6px solid;border-image:linear-gradient(90deg,#ed1c24 0 33.3%,#fff 33.3% 66.6%,#00a651 66.6% 100%) 1}
.hero{background-image:linear-gradient(135deg,rgba(6,68,38,.86),rgba(15,122,71,.55)),var(--hero-img,none)}
.road-line{filter:none}
.ann-date span{color:#d4eedd}
.btn-gold{background:var(--gold);color:#17210f;border-color:var(--gold)}
.btn-gold:hover{background:#ffe04a}
.btn-navy{background:var(--navy);color:#fff}
.btn-navy:hover{background:var(--navy-2)}

/* tiles and directorate cards: white with flag-colour edge, no more yellow blocks */
.tile,.dept-card{background:#fff;border:1px solid var(--line);border-top:6px solid var(--green)}
.tile:nth-child(1),.dept-card:nth-child(3n+1){border-top-color:var(--red)}
.tile:nth-child(2),.dept-card:nth-child(3n+2){border-top-color:var(--gold)}
.tile:nth-child(3),.dept-card:nth-child(3n){border-top-color:var(--green)}
.tile:nth-child(4){border-top-color:var(--red)}
.tile:hover{border-color:var(--line);border-top-color:var(--navy)}
.tile b,.dept-card h3 a{color:var(--navy)}
.tile small,.dept-card p,.dept-card .dept-phone{color:var(--muted)}
.dept-card .btn-gold{background:var(--gold);color:#17210f;border-color:var(--gold)}
.dept-card .btn-navy{background:var(--navy);color:#fff}
.tile .ic,.dept-card .dept-head .ic{background:var(--navy)}
@keyframes tileGlowNavy{0%,100%{box-shadow:0 0 0 0 rgba(10,90,53,0)}50%{box-shadow:0 0 0 9px rgba(10,90,53,.16)}}

/* archived tenders: red ribbon + soft red note (closed = red in the flag palette) */
.arch-note{background:#fff2f2;border-color:#ed1c24;color:#8a1015}
.arch-ribbon{background:var(--red);color:#fff}
.call-badge{background:var(--navy);color:var(--gold);border-inline-start-color:var(--red)}
.play-badge{background:rgba(10,90,53,.9);border-color:var(--gold)}
.sec-head h2::after,.sec-head::after{background:var(--red)}

/* theme toggle button (day / night) */
.theme-btn{flex-shrink:0;width:38px;height:38px;border-radius:50%;border:1px solid rgba(255,255,255,.3);background:rgba(255,255,255,.1);color:#ffd60a;cursor:pointer;display:grid;place-items:center;padding:0}
.theme-btn:hover{background:rgba(255,255,255,.2)}
.theme-btn svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.theme-btn .i-moon{display:none}
html.theme-light .theme-btn .i-sun{display:none}
html.theme-light .theme-btn .i-moon{display:block}
html.theme-light .theme-btn{color:#fff}

/* photo gallery under news items */
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin:20px 0}
.gallery a{display:block;border-radius:10px;overflow:hidden}
.gallery img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover}

/* pagination under long lists */
.pager{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;align-items:center;margin:30px 0 6px}
.pg{min-width:40px;height:40px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:#fff;color:#052e1b;font:inherit;font-size:15px;cursor:pointer}
.pg:hover:not(:disabled){border-color:var(--gold);background:#fff8dc}
.pg.on{background:var(--gold);border-color:var(--gold);color:#052e1b;font-weight:700}
.pg:disabled{opacity:.4;cursor:default}
.pg-gap{color:var(--muted);padding:0 4px}
.proj-news{margin-top:44px}.proj-news .sec-sub-title{margin:0 0 18px;font-size:1.4rem}

/* header clock + music button */
.hdr-clock{flex-shrink:0;display:flex;flex-direction:column;align-items:center;line-height:1.25;color:#fff}
.hdr-clock b{font:700 15px/1.2 Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums;color:#ffd60a}
.hdr-clock small{font-size:11px;opacity:.85;white-space:nowrap}
.music-btn .m-off{display:inline}.music-btn .m-on{display:none}
.music-btn.playing .m-on{display:inline}.music-btn.playing .m-off{display:none}

.hdr-clock b{white-space:nowrap}
/* clock + date: floating card, bottom-left */
.hdr-clock{position:fixed;left:20px;bottom:20px;z-index:900;padding:8px 14px;border-radius:14px;background:var(--navy);border:2px solid #ffd60a;box-shadow:0 8px 24px rgba(0,0,0,.35)}
.hdr-clock b{font-size:18px}.hdr-clock small{font-size:12px}
@media(max-width:620px){.hdr-clock{padding:5px 9px;left:12px;bottom:20px}.hdr-clock b{font-size:14px}.hdr-clock small{font-size:10px}}
/* one-line header: make room for the sound button */
@media(min-width:1321px){.header-in{width:min(1360px,100% - 24px);gap:9px}.nav{gap:0}.nav a{padding:8px 6px}.lang-dd select{padding:7px 8px}}
@media(max-width:620px){.header-in{gap:9px}}
.hdr-clock[hidden]{display:none}
/* big clock beside the hero logo (wide screens) or above it (narrower) */
.hero-logo{align-items:center;gap:18px}
.hdr-clock.in-hero{position:static;flex-shrink:0;padding:15px 18px;border-width:2px;border-radius:15px}
.hdr-clock.in-hero b{font-size:36px}.hdr-clock.in-hero small{font-size:16px}
@media(min-width:1280px){.hero-in{grid-template-columns:1.25fr 1fr}.hero-logo img{width:220px;flex-shrink:0}.hdr-clock.in-hero{margin-inline-start:40px}}
@media(max-width:1279px){.hero-logo{flex-direction:column}.hdr-clock.in-hero{order:-1}}
@media(max-width:620px){.hero-logo{gap:14px}.hdr-clock.in-hero{padding:10px 18px}.hdr-clock.in-hero b{font-size:28px}.hdr-clock.in-hero small{font-size:13px}}
