/* ====== BASE FONTS ====== */
body { font-family: 'Almarai', sans-serif; }
h1,h2,h3,h4,h5,h6 { font-family:'Archivo', serif; font-weight:700; }

/* ====== DESIGN TOKENS ====== */
:root{
  --accent:       #0050c8;
  --accent-dim:   #003c96;
  --accent-glass: rgba(0,80,200,.08);

  --fg:           #111;
  --muted:        rgb(0 0 0 / .60);
  --glass-bg:     rgba(255,255,255,.80);
  --panel:        rgba(255,255,255,.98);
  --border:       rgb(0 0 0 / .10);

  --logo-bg:      #fff;        /* light logo badge */
  --nav-h:        76px;
  --radius-pill:  9999px;
  --radius-10:    10px;
  --blur:         blur(14px);
  --focus:        0 0 0 3px rgba(0,80,200,.28);
  --font-main:    "Inter","Segoe UI",sans-serif;
}

[data-theme="dark"]{
  --fg:        #eee;
  --muted:     rgb(255 255 255 / .62);
  --glass-bg:  rgba(20,20,20,.70);
  --panel:     rgba(18,18,18,.98);
  --border:    rgb(255 255 255 / .10);
  --logo-bg:   #000;           /* dark logo badge */
}

/* ====== RESET/ACCESSIBILITY ====== */
* { box-sizing: border-box; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
body.no-scroll { overflow: hidden; }

/* ======================================== NAVBAR ================================================================== */
.fg-nav{
  position: sticky; top: 0; z-index: 1100; /* raised above content */
  height: var(--nav-h);
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease, background .25s ease;
}
.fg-nav.scrolled{ box-shadow: 0 6px 24px rgb(0 0 0 / .12); }

.fg-wrapper{
  max-width: 1200px; margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | menu | actions */
  align-items: center;
  gap: 1rem;
  padding: 0 1rem;
  font-family: var(--font-main);
}

/* ====== BRAND ====== */
.fg-brand{ display: inline-grid; grid-auto-flow: column; align-items: center; gap: .7rem; text-decoration: none; }
.fg-logo{
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--logo-bg);
  border-radius: 999px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}
.fg-logo-img{ width: 80%; height: 80%; object-fit: contain; display: block; }
.fg-logo-dark{ display: none; }
[data-theme="dark"] .fg-logo-light{ display: none; }
[data-theme="dark"] .fg-logo-dark{ display: block; }

.fg-name{ font: 700 1.15rem/1 var(--font-main); color: var(--fg); white-space: nowrap; }

/* ====== ACTIONS (right) ====== */
.fg-actions{ display: grid; grid-auto-flow: column; align-items: center; gap: .6rem; }

/* Theme button (header) */
.fg-theme{
  width: 40px; height: 40px;
  border: none; border-radius: var(--radius-pill);
  display: grid; place-items: center; cursor: pointer;
  transition: background .25s ease, transform .2s;
}
.fg-theme svg{ width: 20px; height: 20px; }
.fg-moon{ display: none; }
[data-theme="dark"] .fg-sun{ display: none; }
[data-theme="dark"] .fg-moon{ display: block; }

/* Subtle style for the header theme button */
.fg-theme--header{
  background: transparent !important;
  border: 1px solid var(--border);
  color: var(--fg);
}
.fg-theme--header:hover{ background: var(--accent-glass) !important; }

/* Burger */
.fg-burger{
  display: none; cursor: pointer; background: none; border: none;
  width: 28px; height: 22px; position: relative;
}
.fg-burger span, .fg-burger span::before, .fg-burger span::after{
  position: absolute; left: 0; width: 100%; height: 3px; content: "";
  background: var(--fg);
  transition: transform .35s ease, top .35s ease, background .35s ease;
}
.fg-burger span{ top: 50%; transform: translateY(-50%); }
.fg-burger span::before{ top: -8px; }
.fg-burger span::after { top:  8px; }

/* ====== DESKTOP MENU ====== */
.fg-menu{
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 2.2rem; justify-content: center; align-items: center;
}
.fg-item{
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  padding: .35rem 0;
  font: 500 1rem/1 var(--font-main);
  color: var(--fg); text-decoration: none;
  background: transparent; border: 0;
}
.fg-item::after{
  content:""; position:absolute; left:0; bottom:-6px; width:100%; height:2px;
  background: currentColor; transform: scaleX(0); transform-origin:left center;
  transition: transform .25s ease;
}
.fg-item:hover::after, .fg-item:focus-visible::after{ transform: scaleX(1); }

/* Desktop dropdown */
.fg-drop{ position: relative; }
.fg-item-chevron{ display:none; }
.fg-sublist{
  position: absolute; top: calc(100% + .75rem); left: 50%;
  transform: translateX(-50%);
  min-width: 200px; list-style: none; padding: .5rem 0; margin: 0;
  border-radius: var(--radius-10);
  background: var(--glass-bg); backdrop-filter: var(--blur);
  box-shadow: 0 10px 28px rgb(0 0 0 / .16);
  display: none;
}
.fg-sublist a{
  display: block; padding: .6rem 1rem;
  font: 500 .95rem/1.2 var(--font-main);
  color: var(--fg); text-decoration: none;
}
.fg-sublist a:hover,
.fg-sublist a:focus-visible{
  background: var(--accent-dim);
  color: #fff;
}
@media (min-width: 769px){
  .fg-drop:hover .fg-sublist,
  .fg-drop:focus-within .fg-sublist{ display: block; }
  .fg-menu-header, .fg-menu-footer{ display:none !important; }
}

/* ====== SCRIM LAYERING ====== */
.fg-scrim{
  position: fixed; inset: 0; background: rgb(0 0 0 / .45);
  opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 1101;
}
.fg-menu{ z-index: 1102; } /* sheet above scrim */

/* ====== MID SCREENS TUNING ====== */
@media (max-width: 1024px){
  .fg-wrapper { gap: .75rem; padding: 0 .75rem; }
  .fg-menu { gap: 1.6rem; }
  .fg-name { font-size: 1rem; }
}

/* ====== MOBILE (≤768px): full-screen top sheet ====== */
@media (max-width:768px){
  .fg-burger{ display: inline-block; }

  .fg-menu{
    position: fixed; inset: 0;
    width: 100vw;
    height: 100svh; /* stable viewport on iOS/Android */
    display: flex; flex-direction: column;
    padding: 12px 16px 20px;
    background: var(--panel);
    transform: translateY(-110%);
    transition: transform .32s ease;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .fg-nav.is-open .fg-menu{ transform: translateY(0); }
  .fg-nav.is-open .fg-scrim{ opacity: 1; pointer-events: auto; }

  /* animate burger to X */
  .fg-nav.is-open .fg-burger span{ background: transparent; }
  .fg-nav.is-open .fg-burger span::before{ top: 0; transform: rotate(45deg); }
  .fg-nav.is-open .fg-burger span::after { top: 0; transform: rotate(-45deg); }

  /* sheet header */
  .fg-menu-header{
    display: grid; grid-template-columns: 1fr auto; align-items: center;
    padding: 6px 0 14px; margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
  }
  .fg-menu-title{ font: 700 1.05rem/1 var(--font-main); color: var(--muted); }
  .fg-close{
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); background: transparent; color: var(--fg);
  }

  /* large tap targets */
  .fg-menu > li > a,
  .fg-menu > li > button{
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 2px; margin: 0; border: 0; background: transparent;
    color: var(--fg); text-decoration: none; font: 700 1.1rem/1.3 var(--font-main);
  }
  .fg-menu > li + li{ border-top: 1px solid var(--border); }
  .fg-item-chevron{ width: 18px; height: 18px; fill: currentColor; opacity: .55; display: inline-block; }

  /* dropdown → accordion */
  .fg-drop > .fg-item{ cursor: pointer; }
  .fg-sublist{
    list-style: none; margin: 4px 0 8px 0; padding: 0 0 0 10px;
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
    border-left: 2px solid var(--border);
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
  }
  .fg-drop.open .fg-sublist{ max-height: 320px; }
  .fg-subitem{ display: block; padding: 10px 0 10px 14px; color: var(--fg); text-decoration: none; }

  /* sheet footer (mobile) */
  .fg-menu-footer{
    display: flex; gap: .75rem; padding-top: 14px; margin-top: 10px;
    border-top: 1px solid var(--border);
  }
}

/* ====== SMALL PHONES ====== */
@media (max-width:420px){
  .fg-name{ display: none; }
}

/* ====== SCROLL LOCK ====== */
html.no-scroll, body.no-scroll { overflow: hidden; }

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce){
  .fg-menu, .fg-burger span, .fg-sublist, .fg-scrim, .fg-item::after { transition: none !important; }
}













/* 
/* --- NAV LAYOUT --- */
/* .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 1.75rem; 
  background-color: var(--nav-bg);
  border-bottom: 0px solid #ccc;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
} */
/* --- BRAND HEADING --- */
/* .brand {
  margin: 0;             
  line-height: 1;
  font-size: 2rem;        
  font-weight: 200;
  letter-spacing: -0.5px; 
}

.brand-link {
  text-decoration: none;
  color: var(--fg);
  transition: color .25s ease;
}

.brand-link:hover {
  color: var(--accent);   
} */

/* shrink a bit on small screens */
/* @media (max-width: 768px) {
  .brand { font-size: 1.5rem; }
} */


/* links */
/* .nav-link {
  position: relative;
  text-decoration: none;
  font-size: 1rem;
  color: var(--fg);
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: black;
} */

/* underline effect */
/* .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;          
  width: 100%;
  height: 2px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}  */

/* --- THEME BUTTON (kept from your sheet, unchanged) --- */

/* --- MOBILE NAV --- */
/* .nav-toggle,
.hamburger {
  display: none; 
} */

/* small screens */
/* @media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  /* show burger */
  /* .hamburger {
    display: block;
    cursor: pointer;
    width: 24px;
    height: 18px;
    position: relative;
  }
  .hamburger span,
  .hamburger span::before,
  .hamburger span::after {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--fg);
    transition: transform .3s ease;
  }
  .hamburger span::before   { content: ""; top: -6px; }
  .hamburger span::after    { content: ""; top:  6px; } */

  /* menu collapsed by default */
  /* .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
    display: none;
  } */

  /* reveal when checkbox checked */
  /* .nav-toggle:checked ~ .nav-menu {
    display: flex;
  } */

  /* animate burger to “X” */
  /* .nav-toggle:checked + .hamburger span {
    background: transparent;
  }
  .nav-toggle:checked + .hamburger span::before {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle:checked + .hamburger span::after {
    transform: translateY(-6px) rotate(-45deg);
  } */

/* --- LOGIN PILL BUTTON --- */
/* .btn-login {
  background-color: #000;
  color: #fff;
  padding: 0.45rem 1.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 9999px;      
  text-decoration: none;
  display: inline-block;
  transition: background-color .25s ease, transform .15s ease;
}
.btn-login a{
  color: #fff;
  text-decoration: none;
}

.btn-login:hover {
  background-color: #222;
  transform: translateY(-2px);
} */

/* make sure brand + button sit nicely */
/* .navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* MOBILE: keep the pill visible, links collapse as before */
/* @media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }
  .btn-login {
    order: 1;                 
    margin-top: 0.5rem;
  }
} */



/* RESPONSIVENESS */
/* @media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar-right {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    margin-top: 10px;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  .dropdown-content a {
    padding: 10px;
    border-top: 1px solid #ccc;
  }

  .dropbtn {
    width: 100%;
    text-align: left;
  }
} */







/* ========== FOOTER =================================================== */
:root {
  --footer-bg: #111;
  --footer-fg: #eee;
  --footer-link: #cdd2ff;
  --footer-accent: #0d3f8f;
}

[data-theme="dark"] {
  --footer-bg: #0e0e0e;
  --footer-fg: #ddd;
  --footer-link: #89a4ff;
  --footer-accent: #6c8eff;
}

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding: 4rem 1rem 2rem;
  font-family: "Almarai", sans-serif;
  position: relative;
  overflow: hidden;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto 3rem;
  display: grid;
  gap: 3rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-col h4 {
  font-family: "Libre Baskerville", serif;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--footer-link);
}

.footer-logo {
  width: 130px;
  margin-bottom: 1rem;
}

.footer-links,
.legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li + li,
.legal-links li + li {
  margin-top: 0.6rem;
}

.footer-links a,
.legal-links a {
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.25s;
}

.footer-links a:hover,
.legal-links a:hover {
  color: #fff;
}

.footer-social {
  margin-top: 1.2rem;
}

.footer-social a {
  color: var(--footer-link);
  font-size: 1.1rem;
  margin-right: 0.9rem;
  transition: color 0.25s;
}

.footer-social a:hover { color: #fff; }

/* newsletter */
.newsletter label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--footer-link);
}
.news-wrap {
  display: flex;
  gap: 0;
}
.news-wrap input {
  flex: 1;
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 0.95rem;
}
.news-wrap button {
  background: var(--footer-accent);
  border: none;
  color: #fff;
  padding: 0 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background 0.25s;
}
.news-wrap button:hover { background: #06327f; }

/* bottom bar */
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .footer-bar {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   FOOTER PATCH  •  visibility + responsive tweaks
   ========================================================= */

/* ── 1.  Ensure variables exist per theme  ──────────────── */
/* LIGHT MODE  (html data-theme=light or no attribute) */
:root,
[data-theme="light"] {
  --footer-bg: #111;               /* keep dark footer for contrast  */
  --footer-fg: #f7f7f7;
  --footer-link: #cbd5ff;
  --footer-accent: #1154b5;
}

/* DARK MODE  */
[data-theme="dark"] {
  --footer-bg: #101010;
  --footer-fg: #e4e4e4;
  --footer-link: #9db7ff;
  --footer-accent: #6c8eff;
}

/* ── 2.  Apply variables directly to footer so they win  ── */
.site-footer {
  background-color: var(--footer-bg) !important;
  color: var(--footer-fg) !important;
}

/* links / small text */
.site-footer a,
.site-footer p,
.site-footer span,
.site-footer li  { color: var(--footer-fg); }

/* hover, focus */
.site-footer a:hover,
.site-footer a:focus { color: #fff; }

/* newsletter colours */
.news-wrap input  { background:#fff; color:#000; }
.news-wrap button { background: var(--footer-accent); }
.news-wrap button:hover { background: shade(var(--footer-accent), 15%); }

/* ── 3.  Improved grid breakpoints  ─────────────────────── */
/* 4-col desktop → 2-col tablet → 1-col phone */
.footer-inner {
  display:grid;
  gap:3rem 2rem;
  grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
}

/* force single column on tiny phones */
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-col   { text-align:center; }
  .footer-logo  { margin-left:auto; margin-right:auto; }
  .footer-social{ justify-content:center; }
}

/* bottom bar stack */
@media (max-width: 600px) {
  .footer-bar {
    flex-direction:column;
    text-align:center;
    gap:0.8rem;
  }
}

/* === Footer brand tweaks ============================================ */
.footer-brand-link {
  display: flex;
  flex-direction: column;          /* logo on top, text below */
  align-items: flex-start;         /* left-aligned on desktop */
  gap: 1rem;
  text-decoration: none;
  color: var(--footer-fg);
  transition: color 0.25s;
}

.footer-brand-link:hover { color:#fff; }

/* round logo with hover zoom */
.footer-logo {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.35s ease;
}

.footer-brand-link:hover .footer-logo {
  transform: scale(1.08);
}

/* brand name typography */
.footer-brand-name {
  font-family: "Libre Baskerville", serif;
  font-size: 1.45rem;              /* larger than default text */
  font-weight: 700;
  line-height: 1.2;
}

/* center on small phones */
@media (max-width:600px) {
  .footer-brand-link { align-items:center; text-align:center; }
}















/* ------------ FOOTER SECTION --------------*/
/* :root {
  --footer-bg: #f0f0f0;
  --footer-text: #111;
  --footer-link: #333;
  --footer-link-hover: #000;
  --footer-border: #ccc;
}

[data-theme="dark"] {
  --footer-bg: #111;
  --footer-text: #eee;
  --footer-link: #aaa;
  --footer-link-hover: #fff;
  --footer-border: #333;
}

.footer-section {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer-logo img {
  border: 2px solid var(--footer-text);
}

.social-icons a {
  color: var(--footer-link);
}

.footer-column ul li a {
  color: var(--footer-link);
}

.footer-column ul li a:hover {
  color: var(--footer-link-hover);
}

.footer-bottom {
  border-top: 1px solid var(--footer-border);
}

.footer-bottom ul li a {
  color: var(--footer-link);
}

.footer-bottom ul li a:hover {
  color: var(--footer-link-hover);
} */


/* ------------------------ Footer Section -------------------------------*/
/* .footer-section {
    background-color: #111;
    color: #fff;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    gap: 2rem;
}

.footer-logo {
    text-align: center;
    margin-right: 0.9rem; /* Adds space between logo and footer links */
/* }

.footer-logo img {
    width: 150px;
    margin-bottom: 1rem;
    border-radius: 50%;
    border: 2px solid #fff;
}

.social-icons a {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0.5rem;
    text-decoration: none;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: #fff;
    text-decoration: none;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}

/* Footer Bottom */
/* .footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
} */

/* .footer-bottom ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.footer-bottom ul li a {
    color: #aaa;
    text-decoration: none;
}

.footer-bottom ul li a:hover {
    color: #fff;
}  */

/* Responsive Styles */
/* @media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .footer-logo {
        margin-right: 4rem; /* Extra spacing on larger screens */
        /* text-align: left; */
    /* } */
/* }  */