/* =========================================================
   NASHRAH SHIREEN — Global Portal Stylesheet
   Design language: manuscript ivory + emerald tilework + brass gold
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Noto+Nastaliq+Urdu:wght@500;700&family=Noto+Sans:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root{
  --ivory:#F8F1DE;
  --ivory-deep:#EFE3C4;
  --parchment:#FBF6EA;
  --emerald:#0A4A3F;
  --emerald-light:#146356;
  --emerald-pale:#E4EFE9;
  --gold:#B8872E;
  --gold-light:#DDB25C;
  --gold-soft:#F1D999;
  --maroon:#7A1F2B;
  --ink:#1D2620;
  --ink-soft:#4C5A52;
  --line:#D8C79C;

  --font-display:'Cormorant Garamond', 'Noto Nastaliq Urdu', serif;
  --font-urdu:'Noto Nastaliq Urdu', serif;
  --font-body:'Noto Sans', 'Noto Sans Devanagari', sans-serif;

  --frame-w: 16px;
  --topbar-h: 96px;
  --radius: 4px;
  --shadow-soft: 0 6px 24px rgba(15,40,32,.10);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0 22px, var(--gold) 22.5px 23px, transparent 23.5px),
    radial-gradient(circle at 0% 0%, transparent 0 22px, var(--gold) 22.5px 23px, transparent 23.5px),
    radial-gradient(circle at 100% 0%, transparent 0 22px, var(--gold) 22.5px 23px, transparent 23.5px),
    radial-gradient(circle at 0% 100%, transparent 0 22px, var(--gold) 22.5px 23px, transparent 23.5px),
    radial-gradient(circle at 100% 100%, transparent 0 22px, var(--gold) 22.5px 23px, transparent 23.5px);
  background-size: 64px 64px;
  background-position: 0 0;
  background-repeat: repeat;
  background-blend-mode: multiply;
  opacity:1;
  min-height:100vh;
  padding: var(--frame-w);
  position:relative;
}

/* subtle overall wash so the star lattice reads as texture, not noise */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background: linear-gradient(180deg, rgba(248,241,222,.86), rgba(248,241,222,.93));
  pointer-events:none;
  z-index:0;
}

a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
img{ max-width:100%; display:block; }
button{ font-family:inherit; cursor:pointer; }

::selection{ background:var(--gold-soft); color:var(--emerald); }

/* =========================================================
   DECORATIVE PAGE FRAME — mashrabiya lattice border
   ========================================================= */
.page-frame{
  position:fixed;
  inset:0;
  z-index:999;
  pointer-events:none;
}
.frame-edge{
  position:absolute;
  background-image:
    repeating-linear-gradient(45deg, var(--gold) 0 3px, transparent 3px 11px),
    repeating-linear-gradient(-45deg, var(--emerald) 0 3px, transparent 3px 11px);
  box-shadow: inset 0 0 0 1px rgba(184,135,46,.35);
}
.frame-edge.top{ top:0; left:0; right:0; height:var(--frame-w); }
.frame-edge.bottom{ bottom:0; left:0; right:0; height:var(--frame-w); }
.frame-edge.left{ top:0; bottom:0; left:0; width:var(--frame-w); }
.frame-edge.right{ top:0; bottom:0; right:0; width:var(--frame-w); }

.frame-corner{
  position:absolute;
  width:38px; height:38px;
  z-index:2;
}
.frame-corner svg{ width:100%; height:100%; }
.frame-corner.tl{ top:-2px; left:-2px; }
.frame-corner.tr{ top:-2px; right:-2px; transform:scaleX(-1); }
.frame-corner.bl{ bottom:-2px; left:-2px; transform:scaleY(-1); }
.frame-corner.br{ bottom:-2px; right:-2px; transform:scale(-1,-1); }

/* app wrapper sits above frame content-wise but inside the border padding */
.app-shell{
  position:relative;
  z-index:1;
  min-height:calc(100vh - (2 * var(--frame-w)));
  background:var(--parchment);
  border:1px solid var(--line);
  border-radius:2px;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar{
  position:sticky; top:0; z-index:60;
  display:flex; align-items:center; gap:18px;
  min-height:var(--topbar-h);
  padding:10px 22px;
  background: linear-gradient(180deg, var(--emerald) 0%, var(--emerald-light) 100%);
  color:var(--ivory);
  border-bottom:3px solid var(--gold);
}
.topbar-left{ display:flex; align-items:center; gap:14px; flex:1; min-width:0; }
.hamburger{
  display:none;
  flex-direction:column; gap:5px;
  background:transparent; border:1px solid rgba(255,255,255,.35);
  border-radius:3px; padding:9px 10px;
}
.hamburger span{ width:20px; height:2px; background:var(--gold-light); display:block; }

.brand{ display:flex; align-items:center; gap:12px; min-width:0; }
.brand-mark{
  width:44px; height:44px; flex:0 0 auto;
  border:2px solid var(--gold);
  border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle, var(--emerald-light), var(--emerald));
}
.brand-mark svg{ width:26px; height:26px; }
.brand-text{ min-width:0; }
.brand-text .en{
  font-family:var(--font-display); font-weight:700; font-size:1.5rem;
  letter-spacing:.02em; color:var(--parchment); line-height:1.05;
  white-space:nowrap;
}
.brand-text .sub{
  font-size:.68rem; letter-spacing:.16em; text-transform:uppercase;
  color:var(--gold-light); white-space:nowrap;
}

.topbar-center{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  font-family:var(--font-display); color:var(--gold-soft);
  min-width:150px; text-align:center;
}
.topbar-center .clock{ font-size:1.15rem; font-weight:700; letter-spacing:.03em; }
.topbar-center .datestr{ font-size:.72rem; color:var(--ivory-deep); letter-spacing:.05em; }

.topbar-right{
  display:flex; align-items:center; gap:16px; flex-wrap:nowrap;
  font-size:.82rem;
}
.topbar-right a{
  display:flex; align-items:center; gap:6px;
  padding:7px 12px; border:1px solid rgba(255,255,255,.3); border-radius:999px;
  color:var(--parchment); white-space:nowrap; transition:.2s;
}
.topbar-right a:hover{ background:rgba(255,255,255,.12); border-color:var(--gold); }
.topbar-right svg{ width:14px; height:14px; flex:0 0 auto; }

/* =========================================================
   LAYOUT: sidebar + main
   ========================================================= */
.layout{ display:flex; align-items:flex-start; }

.sidebar{
  width:290px; flex:0 0 290px;
  background:var(--emerald);
  color:var(--ivory-deep);
  min-height:calc(100vh - var(--topbar-h) - (2 * var(--frame-w)) - 2px);
  border-right:3px solid var(--gold);
  overflow-y:auto;
  position:sticky; top:var(--topbar-h);
  max-height:calc(100vh - var(--topbar-h));
}
.sidebar-inner{ padding:18px 14px 40px; }
.sidebar-title{
  font-family:var(--font-display); font-size:.78rem; letter-spacing:.18em;
  text-transform:uppercase; color:var(--gold-light);
  padding:6px 8px 14px; border-bottom:1px solid rgba(221,178,92,.25); margin-bottom:8px;
}

.folder{
  border-bottom:1px solid rgba(221,178,92,.15);
}
.folder-btn{
  width:100%; display:flex; align-items:center; gap:10px;
  background:transparent; border:0; color:var(--ivory);
  padding:12px 8px; font-size:.92rem; font-weight:600;
  text-align:left;
}
.folder-btn svg.folder-icon{ width:17px; height:17px; color:var(--gold-light); flex:0 0 auto; }
.folder-btn .chev{ margin-left:auto; width:12px; height:12px; transition:transform .2s; color:var(--gold-light); }
.folder.open .folder-btn .chev{ transform:rotate(90deg); }

.folder-panel{
  max-height:0; overflow:hidden; transition:max-height .28s ease;
}
.folder.open .folder-panel{ max-height:1400px; }

.folder-list{ padding:2px 8px 14px 16px; display:flex; flex-direction:column; gap:2px; }
.folder-list a{
  display:flex; align-items:center; gap:8px;
  padding:7px 10px; border-radius:999px; font-size:.85rem;
  color:var(--ivory-deep); border:1px solid transparent;
}
.folder-list a:hover{ background:rgba(221,178,92,.14); border-color:rgba(221,178,92,.4); color:var(--gold-soft); }
.folder-list a::before{ content:"›"; color:var(--gold-light); font-weight:700; }

.subfolder-label{
  padding:10px 10px 2px; font-size:.7rem; letter-spacing:.12em; text-transform:uppercase;
  color:var(--gold-light); opacity:.85;
}

.sidebar-overlay{
  display:none;
  position:fixed; inset:0; background:rgba(10,20,16,.55); z-index:55;
}

main{ flex:1; min-width:0; }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position:relative;
  padding:56px 6vw 60px;
  text-align:center;
  background:
    radial-gradient(ellipse at 50% -10%, var(--emerald-pale) 0%, transparent 60%),
    var(--parchment);
  overflow:hidden;
  border-bottom:1px solid var(--line);
}
.hero-arch{
  max-width:760px; margin:0 auto;
  position:relative;
}
.arch-frame{
  border: 2px solid var(--gold);
  border-bottom:none;
  border-radius: 220px 220px 10px 10px / 140px 140px 10px 10px;
  padding:46px 34px 30px;
  background: linear-gradient(180deg, rgba(228,239,233,.5), rgba(251,246,234,.9));
  position:relative;
}
.arch-frame::before{
  content:"";
  position:absolute; inset:10px 10px auto 10px; height:calc(100% - 20px);
  border:1px solid var(--gold-light);
  border-bottom:none;
  border-radius: 200px 200px 6px 6px / 128px 128px 6px 6px;
  pointer-events:none;
}

.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.72rem; letter-spacing:.22em; text-transform:uppercase;
  color:var(--maroon); margin-bottom:14px;
}
.eyebrow .rule{ width:26px; height:1px; background:var(--maroon); display:inline-block; }

h1.wordmark{
  font-family:var(--font-display); font-weight:700;
  font-size:clamp(2.4rem, 6vw, 3.6rem);
  color:var(--emerald); margin:0 0 6px; line-height:1.05;
}
.wordmark .script{
  display:block; font-family:var(--font-urdu); font-size:.5em; color:var(--gold);
  margin-top:6px; font-weight:700;
}

.tagline-switch{
  min-height:32px;
  display:flex; align-items:center; justify-content:center; gap:10px;
  color:var(--ink-soft); font-size:1.02rem; margin:10px 0 26px;
}
.tagline-switch #taglineText{ font-family:var(--font-display); font-style:italic; font-size:1.15rem; }
.lang-pill{
  border:1px solid var(--gold); background:transparent; color:var(--emerald);
  border-radius:999px; padding:4px 12px; font-size:.72rem; letter-spacing:.08em;
}
.lang-pill:hover{ background:var(--gold-soft); }

/* Search / browser badge — Google-style multi-service hub */
.hub-badge{
  display:inline-flex; align-items:center; gap:8px;
  background:var(--emerald); color:var(--gold-soft);
  border:1px solid var(--gold); border-radius:999px;
  padding:6px 16px 6px 10px; font-size:.76rem; letter-spacing:.04em;
  margin-bottom:20px;
}
.hub-badge .dot{ width:8px; height:8px; border-radius:50%; background:var(--gold); box-shadow:0 0 0 3px rgba(184,135,46,.25); }
.hub-badge b{ color:var(--parchment); }

.portal-search{
  max-width:560px; margin:0 auto 22px;
  display:flex; align-items:center; gap:10px;
  background:var(--parchment);
  border:1.5px solid var(--gold);
  border-radius:999px;
  padding:8px 8px 8px 20px;
  box-shadow: var(--shadow-soft);
}
.portal-search svg{ width:18px; height:18px; color:var(--emerald); flex:0 0 auto; }
.portal-search input{
  flex:1; border:0; outline:0; background:transparent;
  font-family:var(--font-body); font-size:.95rem; color:var(--ink);
  min-width:0;
}
.portal-search button{
  background:var(--emerald); color:var(--gold-soft); border:0;
  border-radius:999px; padding:9px 18px; font-size:.82rem; font-weight:600;
  letter-spacing:.03em; white-space:nowrap;
}
.portal-search button:hover{ background:var(--emerald-light); }

.search-results{
  max-width:560px; margin:-8px auto 22px; text-align:left;
  display:flex; flex-direction:column; gap:4px;
}
.search-results a{
  font-size:.85rem; padding:8px 14px; border:1px solid var(--line);
  border-radius:999px; background:var(--parchment); color:var(--ink-soft);
  display:flex; justify-content:space-between; gap:10px;
}
.search-results a span.tag{ color:var(--gold); font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; }
.search-results a:hover{ border-color:var(--gold); color:var(--emerald); }

.hero-ctas{ display:flex; flex-wrap:wrap; gap:12px; justify-content:center; margin-top:6px; }

/* generic pill / arch button (used everywhere instead of boxes) */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 20px; border-radius:999px; font-size:.86rem; font-weight:600;
  border:1.5px solid var(--emerald); color:var(--emerald); background:transparent;
  transition:.18s ease;
}
.btn svg{ width:15px; height:15px; }
.btn:hover{ background:var(--emerald); color:var(--gold-soft); transform:translateY(-1px); }
.btn.gold{ border-color:var(--gold); color:var(--maroon); }
.btn.gold:hover{ background:var(--gold); color:var(--emerald); }
.btn.solid{ background:var(--emerald); color:var(--gold-soft); }
.btn.solid:hover{ background:var(--emerald-light); }

/* App grid — like a search engine's "our products" strip */
.app-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:12px; max-width:900px; margin:34px auto 0;
}
.app-chip{
  display:flex; flex-direction:column; align-items:center; gap:8px;
  padding:16px 8px; border-radius:16px;
  border:1px solid var(--line); background:var(--parchment);
  font-size:.78rem; font-weight:600; color:var(--ink-soft);
  transition:.18s ease;
}
.app-chip .ic{
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--emerald-pale); color:var(--emerald);
  border:1px solid var(--gold-light);
}
.app-chip .ic svg{ width:19px; height:19px; }
.app-chip:hover{ border-color:var(--gold); transform:translateY(-3px); box-shadow:var(--shadow-soft); color:var(--emerald); }

/* =========================================================
   SECTIONS
   ========================================================= */
section.block{ padding:54px 6vw; border-bottom:1px solid var(--line); }
section.block:nth-of-type(even){ background:var(--emerald-pale); }

.block-head{ max-width:900px; margin:0 auto 30px; text-align:center; }
.block-head .kicker{
  font-size:.72rem; letter-spacing:.2em; text-transform:uppercase; color:var(--maroon);
  display:flex; align-items:center; justify-content:center; gap:10px; margin-bottom:10px;
}
.block-head .kicker::before, .block-head .kicker::after{ content:""; width:34px; height:1px; background:var(--gold); }
.block-head h2{
  font-family:var(--font-display); font-size:clamp(1.7rem,3.6vw,2.3rem);
  color:var(--emerald); margin:0 0 8px; font-weight:700;
}
.block-head p{ color:var(--ink-soft); max-width:640px; margin:0 auto; font-size:.96rem; }

.pill-grid{
  display:flex; flex-wrap:wrap; gap:12px; justify-content:center; max-width:1100px; margin:0 auto;
}
.pill-grid.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:12px; max-width:820px; }
@media (max-width:640px){ .pill-grid.two-col{ grid-template-columns:1fr; } }

.service-pill{
  display:flex; align-items:center; gap:10px;
  padding:13px 18px; border-radius:14px;
  border:1px solid var(--gold-light);
  background:var(--parchment);
  color:var(--ink);
  font-size:.9rem; font-weight:600;
  flex:1 1 260px; max-width:100%;
}
.service-pill .num{
  font-family:var(--font-display); color:var(--gold); font-weight:700; font-size:1rem;
  flex:0 0 auto;
}
.service-pill small{ display:block; font-weight:400; color:var(--ink-soft); font-size:.76rem; margin-top:2px; }
.service-pill:hover{ border-color:var(--emerald); background:var(--emerald); color:var(--gold-soft); }
.service-pill:hover small{ color:var(--gold-soft); }
.service-pill:hover .num{ color:var(--gold-light); }

/* Tools accordion groups within main content */
.tool-groups{ max-width:1000px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
.tool-group{ border:1px solid var(--gold-light); border-radius:14px; overflow:hidden; background:var(--parchment); }
.tool-group-head{
  width:100%; display:flex; align-items:center; gap:12px; text-align:left;
  padding:16px 20px; background:linear-gradient(90deg, var(--emerald), var(--emerald-light));
  color:var(--gold-soft); border:0; font-family:var(--font-display); font-size:1.08rem; font-weight:700;
}
.tool-group-head .chev{ margin-left:auto; width:14px; height:14px; transition:transform .2s; }
.tool-group.open .tool-group-head .chev{ transform:rotate(90deg); }
.tool-group-body{ max-height:0; overflow:hidden; transition:max-height .3s ease; }
.tool-group.open .tool-group-body{ max-height:900px; }
.tool-group-body-inner{ padding:18px 20px; display:flex; flex-wrap:wrap; gap:10px; }
.tool-tag{
  padding:8px 14px; border-radius:999px; font-size:.82rem; font-weight:600;
  border:1px solid var(--line); color:var(--ink-soft);
}
.tool-tag:hover{ border-color:var(--gold); color:var(--maroon); background:var(--gold-soft); }

/* =========================================================
   FOOTER
   ========================================================= */
footer{
  background:var(--emerald); color:var(--ivory-deep);
  padding:48px 6vw 26px; border-top:3px solid var(--gold);
}
.footer-grid{
  display:grid; grid-template-columns: 1.3fr 1fr 1fr; gap:36px;
  max-width:1100px; margin:0 auto 30px;
}
@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr; gap:26px; } }
.footer-grid h4{
  font-family:var(--font-display); color:var(--gold-light); font-size:1rem;
  letter-spacing:.05em; margin:0 0 12px;
}
.footer-grid ul{ display:flex; flex-direction:column; gap:8px; }
.footer-grid a{ font-size:.86rem; color:var(--ivory-deep); }
.footer-grid a:hover{ color:var(--gold-soft); }
.footer-contact{ display:flex; align-items:center; gap:8px; font-size:.86rem; }
.footer-contact svg{ width:14px; height:14px; color:var(--gold-light); flex:0 0 auto; }

.footer-bottom{
  max-width:1100px; margin:0 auto; padding-top:20px; border-top:1px solid rgba(221,178,92,.25);
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:.76rem; color:var(--ivory-deep);
}
.footer-bottom .script{ font-family:var(--font-urdu); color:var(--gold-light); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:980px){
  .sidebar{
    position:fixed; top:0; left:0; bottom:0; height:100%;
    max-height:none; z-index:70;
    transform:translateX(-102%);
    transition:transform .28s ease;
    border-right:3px solid var(--gold);
    width:82vw; max-width:320px;
  }
  .sidebar.open{ transform:translateX(0); }
  .sidebar-overlay.show{ display:block; }
  .hamburger{ display:flex; }
  .topbar-center{ display:none; }
}

@media (max-width:640px){
  :root{ --frame-w:10px; --topbar-h:76px; }
  .topbar{ padding:8px 12px; gap:10px; }
  .brand-text .en{ font-size:1.15rem; }
  .brand-text .sub{ font-size:.58rem; }
  .topbar-right a span.label{ display:none; }
  .topbar-right a{ padding:8px; }
  .hero{ padding:38px 5vw 40px; }
  .arch-frame{ padding:32px 18px 22px; border-radius:120px 120px 8px 8px / 90px 90px 8px 8px; }
  .arch-frame::before{ border-radius:110px 110px 4px 4px / 82px 82px 4px 4px; }
  section.block{ padding:40px 5vw; }
  .service-pill{ flex:1 1 100%; }
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible{
  outline:2px solid var(--maroon); outline-offset:2px;
}

@media (prefers-reduced-motion: reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}
