/* Jamia Mahmoodia v89 — interaction, gallery and mobile authority
   Loaded after v88. This layer intentionally fixes only proven remaining issues. */

body#jm-site-root.jm-ui-v89{
  --jm89-green:#073f35;
  --jm89-green-2:#0a5848;
  --jm89-ink:#163f36;
  --jm89-gold:#e9b94d;
  --jm89-ivory:#fbfaf5;
  --jm89-line:rgba(7,63,53,.12);
  --jm89-shadow:0 18px 55px rgba(4,48,40,.09);
}

/* --------------------------------------------------------------------------
   1. HEADER — dependable language control + genuinely gapless mega menus
   -------------------------------------------------------------------------- */
body#jm-site-root.jm-ui-v89 .jm70-lang{
  position:relative!important;
  overflow:visible!important;
}
body#jm-site-root.jm-ui-v89 .jm70-lang>i{display:none!important}
body#jm-site-root.jm-ui-v89 .jm89-lang-globe{
  display:block!important;
  width:18px!important;
  height:18px!important;
  flex:0 0 18px!important;
  color:currentColor!important;
  stroke:currentColor!important;
}
body#jm-site-root.jm-ui-v89 .jm70-lang .jm89-lang-code{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:8px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.08em!important;
}

@media (min-width:1121px){
  body#jm-site-root.jm-ui-v89 .jm70-header,
  body#jm-site-root.jm-ui-v89 .jm70-header-inner,
  body#jm-site-root.jm-ui-v89 .jm70-nav,
  body#jm-site-root.jm-ui-v89 .jm70-nav-group{overflow:visible!important}

  /* The menu itself now touches the trigger zone; there is no dead mouse gap. */
  body#jm-site-root.jm-ui-v89 .jm70-mega{
    top:calc(100% - 2px)!important;
    z-index:10050!important;
  }
  /* A broad transparent hover runway catches diagonal pointer movement too. */
  body#jm-site-root.jm-ui-v89 .jm70-nav-group:after{
    content:""!important;
    position:absolute!important;
    z-index:10040!important;
    top:calc(100% - 6px)!important;
    left:50%!important;
    width:calc(100% + 36px)!important;
    height:34px!important;
    transform:translateX(-50%)!important;
    background:transparent!important;
    pointer-events:auto!important;
  }
  body#jm-site-root.jm-ui-v89 .jm70-nav-group:hover>.jm70-mega,
  body#jm-site-root.jm-ui-v89 .jm70-nav-group:focus-within>.jm70-mega,
  body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm87-open>.jm70-mega,
  body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm89-open>.jm70-mega{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translateX(-50%) translateY(0)!important;
    transition-delay:0s!important;
  }
  html[dir="rtl"] body#jm-site-root.jm-ui-v89 .jm70-nav-group:hover>.jm70-mega,
  html[dir="rtl"] body#jm-site-root.jm-ui-v89 .jm70-nav-group:focus-within>.jm70-mega,
  html[dir="rtl"] body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm87-open>.jm70-mega,
  html[dir="rtl"] body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm89-open>.jm70-mega{
    transform:translateX(50%) translateY(0)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm89-open>.jm70-nav-trigger{
    background:#eef5f1!important;
    color:#075443!important;
  }
  body#jm-site-root.jm-ui-v89 .jm70-nav-group.is-jm89-open>.jm70-nav-trigger>i{
    transform:rotate(180deg)!important;
  }
}

/* --------------------------------------------------------------------------
   2. LANGUAGE SHEET — no Font Awesome dependency for the top/mobile trigger,
      and tighter phone geometry for real 360–430 px devices.
   -------------------------------------------------------------------------- */
body#jm-site-root.jm-ui-v89 .jm84-language-modal{
  z-index:100000!important;
}
body#jm-site-root.jm-ui-v89 .jm84-language-sheet{
  border:1px solid rgba(255,255,255,.12)!important;
}
@media(max-width:900px){
  body#jm-site-root.jm-ui-v89 .jm70-lang{
    width:46px!important;
    min-width:46px!important;
    height:46px!important;
    min-height:46px!important;
    padding:0!important;
    border-radius:14px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  body#jm-site-root.jm-ui-v89 .jm70-lang .jm89-lang-globe{
    width:21px!important;
    height:21px!important;
    flex-basis:21px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm70-lang .jm89-lang-code{display:none!important}

  body#jm-site-root.jm-ui-v89 .jm84-language-modal{
    align-items:flex-end!important;
    justify-content:center!important;
    padding:12px!important;
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-language-sheet{
    width:100%!important;
    max-width:560px!important;
    max-height:min(82dvh,720px)!important;
    overflow:auto!important;
    border-radius:26px!important;
    padding:18px!important;
    box-shadow:0 -22px 70px rgba(0,0,0,.28)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-language-top{margin-bottom:18px!important}
  body#jm-site-root.jm-ui-v89 .jm84-language-brand b{font-size:15px!important}
  body#jm-site-root.jm-ui-v89 .jm84-language-copy h2{
    font-size:clamp(31px,9vw,40px)!important;
    line-height:1!important;
    margin:7px 0 8px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-language-copy p{font-size:12px!important;line-height:1.55!important}
  body#jm-site-root.jm-ui-v89 .jm84-language-list{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:16px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-language-list>button{
    min-height:72px!important;
    grid-template-columns:46px minmax(0,1fr) 30px!important;
    gap:12px!important;
    padding:10px 12px!important;
    border-radius:17px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-language-text b{font-size:17px!important}
  body#jm-site-root.jm-ui-v89 .jm84-language-text small{font-size:10px!important;line-height:1.4!important}
  body#jm-site-root.jm-ui-v89 .jm84-language-foot{margin-top:12px!important;font-size:9px!important}
}

/* --------------------------------------------------------------------------
   3. HOMEPAGE PHONE POLISH — the About/Story composition is converted from
      overlapping poster cards into clean flow content on phones.
   -------------------------------------------------------------------------- */
@media(max-width:640px){
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story{
    padding:50px 0 54px!important;
    background:linear-gradient(180deg,#fffdf9 0%,#f8f4eb 100%)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:26px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-copy{
    min-width:0!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-principles{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:20px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-principles>span{
    min-height:58px!important;
    padding:10px!important;
    border-radius:15px!important;
    background:#fff!important;
    border:1px solid var(--jm89-line)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-principles b{font-size:9px!important}
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-inline-actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:18px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-inline-actions>a{
    min-height:48px!important;
    padding:0 12px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:15px!important;
    font-size:10px!important;
    text-align:center!important;
  }

  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-visual{
    position:relative!important;
    min-height:0!important;
    height:auto!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
    filter:none!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main{
    position:relative!important;
    inset:auto!important;
    grid-column:1/3!important;
    width:100%!important;
    height:auto!important;
    border-radius:22px!important;
    overflow:hidden!important;
    box-shadow:0 18px 42px rgba(4,48,40,.12)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/10!important;
    object-fit:cover!important;
    object-position:center!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main:after{
    content:""!important;
    position:absolute!important;
    inset:45% 0 0!important;
    background:linear-gradient(0deg,rgba(3,38,31,.82),transparent)!important;
    pointer-events:none!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main figcaption{
    z-index:2!important;
    left:16px!important;
    right:16px!important;
    bottom:14px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main figcaption small{font-size:6px!important;color:#f0c96e!important}
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-main figcaption b{font-size:18px!important;line-height:1.05!important;color:#fff!important}

  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-founded,
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-seal{
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:none!important;
    min-height:92px!important;
    transform:none!important;
    border-radius:18px!important;
    margin:0!important;
    box-shadow:0 12px 28px rgba(4,48,40,.08)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-founded{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    grid-template-rows:auto 1fr!important;
    align-items:end!important;
    padding:14px!important;
    background:linear-gradient(145deg,#efbd4f,#e5aa34)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-founded small{
    grid-column:1/3!important;
    font-size:6px!important;
    letter-spacing:.14em!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-founded>b{
    font-size:38px!important;
    line-height:.85!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-founded>span{font-size:7px!important;line-height:1.4!important}

  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-seal{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    padding:14px!important;
    background:linear-gradient(145deg,#0a4d40,#063b32)!important;
    color:#fff!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-seal img{
    width:42px!important;
    height:42px!important;
    flex:0 0 42px!important;
    border-radius:50%!important;
    background:#fff!important;
    padding:4px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-seal small{font-size:5.5px!important;color:#efc76a!important}
  body#jm-site-root.jm-ui-v89 .jm72-home .jm70-story-seal b{font-size:9px!important;color:#fff!important}
}

/* --------------------------------------------------------------------------
   4. PHOTO GALLERY — consistent editorial grid instead of oversized/broken
      mosaic rows. New supplied photos remain gallery-only.
   -------------------------------------------------------------------------- */
body#jm-site-root.jm-ui-v89 .jm84-gallery{
  background:linear-gradient(180deg,#fbfaf5 0%,#f6f3eb 100%)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery .jm76-gallery-shell{
  width:min(1480px,calc(100% - 56px))!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-intro{
  padding:68px 0 54px!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(232,185,77,.12),transparent 28%),
    linear-gradient(145deg,#073f35,#052d27)!important;
  border-bottom:0!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-hero{
  grid-template-columns:minmax(0,.85fr) minmax(520px,1.15fr)!important;
  gap:54px!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-lead{
  border-radius:24px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  box-shadow:0 28px 70px rgba(0,0,0,.24)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-lead>a{height:420px!important}
body#jm-site-root.jm-ui-v89 .jm84-gallery-copy h1{max-width:620px!important}
body#jm-site-root.jm-ui-v89 .jm84-gallery-nav{
  top:92px!important;
  box-shadow:0 10px 32px rgba(4,48,40,.05)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-nav>div{gap:6px!important;padding:7px 0!important}
body#jm-site-root.jm-ui-v89 .jm84-gallery-nav a{
  border:0!important;
  border-radius:13px!important;
  min-height:50px!important;
  background:transparent!important;
  font-size:10px!important;
  font-weight:800!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-nav a:hover,
body#jm-site-root.jm-ui-v89 .jm84-gallery-nav a:focus-visible{
  background:#fff!important;
  box-shadow:0 8px 24px rgba(4,48,40,.07)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-gallery-shell{padding-top:28px!important;padding-bottom:70px!important}
body#jm-site-root.jm-ui-v89 .jm84-photo-section{
  padding:46px 0 54px!important;
  border-bottom:1px solid rgba(7,63,53,.10)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo-section>header{
  margin-bottom:22px!important;
  padding:0 2px!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo-section>header>div>small{
  display:inline-flex!important;
  align-items:center!important;
  min-height:24px!important;
  padding:0 9px!important;
  border-radius:999px!important;
  background:#f1e4c5!important;
  color:#86621e!important;
  font-size:7px!important;
  font-weight:900!important;
  letter-spacing:.12em!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo-section>header>span{
  min-width:46px!important;
  min-height:46px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#fff!important;
  border:1px solid var(--jm89-line)!important;
  color:#6f827b!important;
  font-family:Newsreader,"Source Serif 4",serif!important;
  font-size:21px!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:18px!important;
  grid-auto-flow:row!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-wide,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-tall,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-panorama{
  grid-column:auto!important;
  grid-row:auto!important;
  margin:0!important;
  overflow:hidden!important;
  border-radius:20px!important;
  background:#fff!important;
  border:1px solid rgba(7,63,53,.09)!important;
  box-shadow:0 12px 34px rgba(4,48,40,.065)!important;
  transition:transform .22s ease,box-shadow .22s ease!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo:hover{
  transform:translateY(-3px)!important;
  box-shadow:0 20px 46px rgba(4,48,40,.11)!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo>a,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-wide>a,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-tall>a,
body#jm-site-root.jm-ui-v89 .jm84-photo.is-panorama>a{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:4/3!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo img{width:100%!important;height:100%!important;object-fit:cover!important}
body#jm-site-root.jm-ui-v89 .jm84-photo figcaption{
  min-height:58px!important;
  padding:12px 14px!important;
  color:#244c42!important;
  font-size:10px!important;
  font-weight:700!important;
  background:#fff!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo figcaption small{
  min-width:28px!important;
  height:28px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:50%!important;
  background:#f5f0e3!important;
  color:#8b6c2b!important;
  font-size:7px!important;
}
body#jm-site-root.jm-ui-v89 .jm84-photo .jm76-expand{
  width:38px!important;
  height:38px!important;
  right:12px!important;
  bottom:12px!important;
  font-size:14px!important;
  background:rgba(5,55,46,.82)!important;
}

@media(min-width:641px) and (max-width:1050px){
  body#jm-site-root.jm-ui-v89 .jm84-gallery .jm76-gallery-shell{width:calc(100% - 40px)!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-hero{grid-template-columns:1fr!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-lead>a{height:420px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:640px){
  body#jm-site-root.jm-ui-v89 .jm84-gallery .jm76-gallery-shell{
    width:calc(100% - 24px)!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-intro{padding:0 0 30px!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-hero{
    display:flex!important;
    flex-direction:column!important;
    gap:0!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-lead{
    order:0!important;
    width:100vw!important;
    margin-left:calc(50% - 50vw)!important;
    border:0!important;
    border-radius:0 0 26px 26px!important;
    box-shadow:none!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-lead>a{height:235px!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-lead figcaption{
    left:16px!important;
    right:16px!important;
    bottom:14px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-copy{
    order:1!important;
    padding:25px 2px 0!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-copy h1{
    font-size:clamp(40px,12vw,50px)!important;
    margin:8px 0 14px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-copy>p{font-size:13px!important;line-height:1.7!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-meta{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:7px!important;
    margin-top:20px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-meta>span,
  body#jm-site-root.jm-ui-v89 .jm84-gallery-meta>a{
    min-height:62px!important;
    border-radius:14px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-meta>a{grid-column:1/3!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-nav{top:72px!important}
  body#jm-site-root.jm-ui-v89 .jm84-gallery-nav>div{
    width:max-content!important;
    min-width:100%!important;
    display:flex!important;
    gap:6px!important;
    padding:7px 12px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-nav a{
    min-width:auto!important;
    min-height:42px!important;
    padding:0 12px!important;
    border:1px solid rgba(7,63,53,.08)!important;
    background:#fff!important;
    white-space:nowrap!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-gallery-shell{padding-top:10px!important;padding-bottom:46px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo-section{padding:32px 0 38px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo-section>header{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:12px!important;
    align-items:end!important;
    margin-bottom:15px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm84-photo-section>header h2{font-size:33px!important;line-height:1!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo-section>header p{display:block!important;font-size:11px!important;line-height:1.5!important;margin-top:7px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo-grid{grid-template-columns:1fr!important;gap:12px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-wide,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-tall,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-panorama{border-radius:18px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo>a,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-wide>a,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-tall>a,
  body#jm-site-root.jm-ui-v89 .jm84-photo.is-panorama>a{aspect-ratio:4/3!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo figcaption{min-height:54px!important;padding:10px 12px!important;font-size:9.5px!important}
  body#jm-site-root.jm-ui-v89 .jm84-photo .jm76-expand{width:36px!important;height:36px!important}

  body#jm-site-root.jm-ui-v89 .jm76-lightbox{
    width:calc(100vw - 12px)!important;
    max-height:calc(100dvh - 18px)!important;
    padding:54px 6px 12px!important;
    border-radius:18px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm76-lightbox-stage{
    grid-template-columns:38px minmax(0,1fr) 38px!important;
    gap:3px!important;
  }
  body#jm-site-root.jm-ui-v89 .jm76-lightbox-stage img{height:64dvh!important}
  body#jm-site-root.jm-ui-v89 .jm76-lightbox button{min-width:38px!important;width:38px!important;height:38px!important;font-size:18px!important}
}

@media(prefers-reduced-motion:reduce){
  body#jm-site-root.jm-ui-v89 .jm84-photo{transition:none!important}
}
