/* =========================================================
   MADC CONNECTED GALLERY
   v19.1
   - Bahij embedded webfont
   - Gallery arrows below image
   - 3D carousel arrows below cards
   ========================================================= */

/* ---------- Bahij ---------- */

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-ExtraLight.ttf") format("truetype");
  font-weight:200;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-Light.ttf") format("truetype");
  font-weight:300;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-SemiLight.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-SemiBold.ttf") format("truetype");
  font-weight:600;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-Bold.ttf") format("truetype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-ExtraBold.ttf") format("truetype");
  font-weight:800;
  font-style:normal;
  font-display:swap;
}

@font-face{
  font-family:"Bahij";
  src:url("/static/fonts/Bahij_TheSansArabic-Black.ttf") format("truetype");
  font-weight:900;
  font-style:normal;
  font-display:swap;
}

/* Force Bahij across public UI + CMS */
html,
body,
body *,
button,
input,
select,
textarea{
  font-family:"Bahij","Arial",sans-serif !important;
}

/* Connected Gallery v15. Only gallery additions; the MADC identity is unchanged. */

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0
}

#stageHome .start-gallery-content{
  grid-template-rows:auto auto minmax(140px,1fr) auto;
  gap:12px;
  padding-bottom:64px
}

#stageHome .start-gallery-top{
  min-height:82px
}

#stageHome .start-gallery-title h1{
  margin-top:8px
}

.gallery-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  width:100%;
  min-width:0;
  padding-top:6px;
  position:relative;
  z-index:25
}

.gallery-filter-buttons{
  display:flex;
  gap:8px;
  align-items:center;
  min-width:0;
  overflow-x:auto;
  max-width:calc(100% - 170px);
  padding:4px 2px 8px;
  scrollbar-width:thin;
  scrollbar-color:#6c586a transparent
}

.project-filter{
  flex:none;
  display:inline-flex;
  align-items:center;
  gap:14px;
  white-space:nowrap;
  padding:11px 17px;
  border:1px solid #ffffff1b;
  border-radius:999px;
  background:#ffffff04;
  color:#cbbfc9;
  transition:background .2s,border-color .2s,color .2s;
  font-size:13px
}

.project-filter b{
  display:grid;
  place-items:center;
  min-width:22px;
  height:22px;
  border-radius:50%;
  background:#ffffff09;
  color:#b8a48f
}

.project-filter.active{
  background:#b3976720;
  border-color:#b3976770;
  color:#e5cfac
}

.project-filter.active b{
  background:#b3976736;
  color:#f0dfc4
}

.project-filter:hover{
  background:#ffffff0b;
  border-color:#ffffff3b
}

.gallery-sync{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  white-space:nowrap;
  color:#a598a1;
  flex:none
}

.gallery-sync i{
  display:block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#a3af9e
}

.gallery-sync[data-state="error"] i{
  background:#e6aa86
}

.gallery-sync[data-state="error"]{
  color:#e6aa86
}

.gallery-sync[data-state="loading"] i{
  background:#b39767;
  animation:syncpulse 1.1s infinite
}

.gallery-sync button{
  display:grid;
  place-items:center;
  border:1px solid #ffffff18;
  background:#ffffff04;
  color:#d7c8d1;
  border-radius:50%;
  width:32px;
  height:32px;
  margin-inline-start:5px
}

.gallery-sync button:disabled{
  opacity:.5
}

.gallery-mobile-filter{
  display:none
}

#stageHome .start-carousel-wrap{
  transition:opacity .16s ease;
  min-width:0
}

#stageHome .model-info{
  transition:opacity .16s ease;
  padding-bottom:0!important
}

#stageHome.gallery-filtering .start-carousel-wrap,
#stageHome.gallery-filtering .model-info{
  opacity:0;
  pointer-events:none
}

.gallery-no-cover{
  position:absolute;
  top:19px;
  right:22px;
  color:#ffffff72;
  letter-spacing:0;
  font-size:11px;
  padding:7px 10px;
  border:1px solid #ffffff15;
  border-radius:20px;
  background:#0000000a
}

#stageHome .empty-gallery{
  flex-direction:column;
  gap:14px;
  text-align:center;
  padding:20px;
  line-height:1.8
}

#stageHome .empty-gallery strong{
  font-size:22px;
  font-weight:500;
  color:#decdd8
}

#stageHome .empty-gallery span{
  font-size:12px;
  color:#a998a5;
  max-width:380px
}

.gallery-footer-label{
  position:absolute;
  right:6vw;
  bottom:24px;
  display:flex;
  align-items:center;
  gap:14px;
  color:#9d8b9a;
  font-size:11px;
  z-index:5;
  max-width:40vw;
  white-space:nowrap;
  overflow:hidden
}

.gallery-footer-label bdi{
  letter-spacing:1px;
  color:#c6b79f
}

.gallery-footer-label small{
  color:#6c5a69
}

#filteredProjectName{
  overflow:hidden;
  text-overflow:ellipsis
}

.viewer-children .viewer-filter-project{
  flex-basis:100%;
  background:#f1eaf0;
  text-align:right;
  color:#442843
}

.viewer-unit-type{
  font-weight:700;
  margin:0 0 12px!important
}

#loadMessage{
  bottom:6px;
  left:6vw;
  right:auto;
  max-width:85vw;
  color:#e0b396;
  background:#151016c9;
  line-height:1.6;
  border-radius:8px
}

#loadMessage:empty{
  display:none
}

@keyframes syncpulse{
  50%{opacity:.35}
}

@media(max-width:1100px){
  .project-filter{
    padding:10px 13px;
    gap:8px;
    font-size:12px
  }

  #gallerySyncText{
    display:none
  }

  .gallery-filter-buttons{
    max-width:calc(100% - 64px)
  }

  #stageHome .start-gallery-content{
    gap:10px
  }
}

@media(max-width:800px){
  #stageHome .start-gallery-content{
    padding-top:106px;
    padding-bottom:60px;
    gap:10px;
    grid-template-rows:auto auto minmax(110px,1fr) auto
  }

  #stageHome .start-gallery-top{
    min-height:0;
    gap:0
  }

  #stageHome .start-gallery-title h1{
    font-size:40px
  }

  #stageHome .start-gallery-note{
    margin:8px 0 0;
    padding:0
  }

  #stageHome .start-gallery-note p{
    font-size:11px;
    line-height:1.7
  }

  .gallery-controls{
    padding:0;
    gap:8px
  }

  .gallery-footer-label{
    bottom:24px;
    font-size:9px;
    gap:6px;
    max-width:35vw
  }

  .gallery-footer-label small{
    display:none
  }

  #stageHome .model-info{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px!important;
    width:100%
  }

  #stageHome .model-info button{
    grid-column:1/-1;
    justify-self:center;
    min-height:42px;
    padding:10px 25px;
    order:0
  }

  #stageHome .model-info .stat{
    min-width:0!important;
    text-align:center
  }

  .gallery-no-cover{
    font-size:9px;
    top:14px;
    right:14px;
    padding:6px 8px
  }

  #stageHome .card3d .label span{
    font-size:9px
  }

  #stageHome .empty-gallery strong{
    font-size:18px
  }

  #stageHome .carousel{
    height:min(33dvh,360px)
  }

  #stageHome .card3d{
    height:min(25dvh,280px)
  }
}

@media(max-width:640px){
  .gallery-filter-buttons{
    display:none
  }

  .gallery-mobile-filter{
    display:flex;
    align-items:center;
    gap:12px;
    flex:1;
    min-width:0;
    padding:9px 12px;
    border:1px solid #ffffff20;
    border-radius:14px;
    background:#ffffff04;
    font-size:11px;
    color:#ab9aa7
  }

  .gallery-mobile-filter select{
    flex:1;
    width:100%;
    min-width:0;
    border:0;
    background:transparent;
    color:#e6d5b9;
    outline-offset:4px;
    font-size:12px
  }

  .gallery-mobile-filter option{
    color:#eee;
    background:#241a25
  }

  .gallery-sync{
    gap:8px
  }
}

@media(max-height:740px) and (min-width:801px){
  #stageHome .start-gallery-content{
    padding-top:102px;
    gap:6px;
    padding-bottom:55px
  }

  #stageHome .start-gallery-title h1{
    font-size:45px
  }

  #stageHome .start-gallery-top{
    min-height:66px
  }

  #stageHome .start-gallery-note{
    padding-top:0
  }

  #stageHome .carousel{
    height:35vh
  }

  #stageHome .card3d{
    height:29vh;
    top:10px
  }

  .project-filter{
    padding:7px 13px
  }
}

@media(max-height:640px) and (max-width:800px){
  #stageHome .start-gallery-content{
    padding-top:92px;
    padding-bottom:48px;
    gap:6px
  }

  #stageHome .start-gallery-note{
    display:none
  }

  #stageHome .start-gallery-title h1{
    font-size:30px;
    margin-top:4px
  }

  #stageHome .start-gallery-top .eyebrow{
    font-size:9px
  }

  #stageHome .carousel{
    height:29dvh
  }

  #stageHome .card3d{
    height:23dvh;
    top:10px
  }

  #stageHome .model-info button{
    min-height:34px;
    padding:8px 22px
  }

  #stageHome .model-info{
    gap:6px!important
  }
}

@media(max-height:480px) and (orientation:landscape){
  #stageHome .start-gallery-content{
    padding-top:83px;
    padding-bottom:38px;
    grid-template-rows:auto minmax(70px,1fr) auto;
    gap:2px
  }

  #stageHome .start-gallery-top{
    display:none
  }

  .gallery-controls{
    max-height:42px
  }

  #stageHome .carousel{
    height:39dvh
  }

  #stageHome .card3d{
    height:33dvh;
    top:4px;
    width:45vw
  }

  #stageHome .card3d .label h3{
    font-size:23px
  }

  #stageHome .card3d .label{
    bottom:10px
  }

  .gallery-no-cover{
    display:none
  }

  #stageHome .model-info{
    display:flex;
    gap:16px!important;
    align-items:center
  }

  #stageHome .model-info button{
    min-height:32px;
    padding:7px 14px
  }

  .gallery-footer-label{
    bottom:13px
  }

  .presentation-nav{
    bottom:10px
  }
}

@media(prefers-reduced-motion:reduce){
  .project-filter,
  #stageHome .start-carousel-wrap,
  #stageHome .model-info{
    transition:none
  }

  .gallery-sync[data-state="loading"] i{
    animation:none
  }
}

/* ---------- v17 background video ---------- */

#stageHome .gallery-background-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  z-index:0;
  opacity:.14;
  filter:saturate(.72) brightness(.46) contrast(.9);
  pointer-events:none;
  transition:opacity .45s ease
}

#stageHome .stage-bg{
  z-index:-1
}

#stageHome .stage-overlay{
  z-index:1;
  background:
    linear-gradient(
      90deg,
      rgba(18,14,18,.74),
      rgba(18,14,18,.38) 48%,
      rgba(18,14,18,.72)
    ),
    radial-gradient(
      circle at 50% 48%,
      rgba(74,46,67,.18),
      rgba(15,12,16,.48) 70%
    )
}

#stageHome .stage-content{
  z-index:2
}

/* ---------- Source-backed villa information ---------- */

.source-facts{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #eadfe5
}

.source-facts h3{
  margin:0 0 10px;
  font-size:15px
}

.source-fact-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px
}

.source-fact-grid div{
  background:#f7f3f5;
  border:1px solid #eee4e9;
  border-radius:12px;
  padding:11px
}

.source-fact-grid small{
  display:block;
  color:#88747f;
  margin-bottom:3px
}

.source-fact-grid strong{
  font-size:14px
}

.source-note{
  font-size:12px!important;
  color:#8a7982!important;
  margin:10px 0 0!important
}

/* ---------- Smooth image gallery ---------- */

.image-viewer{

  position:relative!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  overflow:hidden!important;

  /* كان فيه إحساس خلفية داكنة */
  background:transparent!important;

  border-radius:24px!important;
  touch-action:pan-y!important;
  user-select:none!important;
}

.image-track.dragging{
  transition:none
}

.image-slide{

  position:relative!important;
  flex:0 0 100%!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 8px!important;
  box-sizing:border-box!important;

  /* مهم جدًا لنعومة الزوايا */
  border-radius:26px!important;
  overflow:hidden!important;

  /* إزالة أي خلفية سوداء */
  background:transparent!important;

  opacity:.35!important;
  transform:translateZ(0) scale(.96)!important;

  filter:
    brightness(.86)
    saturate(.78)
    !important;

  transition:
    opacity .48s ease,
    transform .58s cubic-bezier(.22,.8,.2,1),
    filter .48s ease
    !important;

  backface-visibility:hidden!important;
  -webkit-backface-visibility:hidden!important;
  -webkit-mask-image:-webkit-radial-gradient(white, black);
}

/*
   IMPORTANT:
   Arrows are now OUTSIDE the image,
   under it, centered and close together.
*/
.viewer-controls{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  transform:none!important;

  width:max-content!important;
  max-width:100%;

  display:flex!important;
  align-items:center!important;
  justify-content:center!important;

  direction:rtl;

  gap:8px!important;

  margin:10px auto 0!important;
  padding:0!important;

  background:transparent!important;
  color:#3d213d!important;

  z-index:5
}

.viewer-controls button{
  position:static!important;
  inset:auto!important;
  transform:none!important;

  display:grid!important;
  place-items:center!important;

  width:42px!important;
  height:42px!important;

  padding:0!important;
  margin:0!important;

  border-radius:50%!important;
  border:1px solid #d5c5d1!important;

  background:#fff!important;
  color:#3d213d!important;

  font-size:22px!important;

  box-shadow:0 5px 16px rgba(44,28,40,.08)
}

.viewer-controls button:hover{
  transform:scale(1.04)!important;
  background:#f7f2f5!important
}

.viewer-controls small{
  min-width:48px;
  text-align:center;
  color:#84747d!important
}

.image-viewer.is-dragging{
  cursor:grabbing
}

@media(max-width:760px){
  .source-fact-grid{
    grid-template-columns:1fr
  }

  .image-slide img{
    height:52vh
  }

  .viewer-controls{
    gap:7px!important;
    margin-top:8px!important
  }

  .viewer-controls button{
    width:40px!important;
    height:40px!important
  }
}

/* ---------- v18 Property Presentation ---------- */

.lux-overview{
  max-width:1180px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:22px;
  color:#241a22
}

.lux-hero{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:24px;
  background:#fff;
  border:1px solid #eadfe4;
  border-radius:24px;
  padding:18px;
  box-shadow:0 24px 70px rgba(50,28,46,.07)
}

.lux-hero-visual{
  min-height:390px;
  border-radius:19px;
  background:linear-gradient(135deg,#b8aea8,#5a5055);
  background-size:cover;
  background-position:center;
  position:relative;
  overflow:hidden
}

.lux-hero-visual:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    180deg,
    transparent 55%,
    rgba(19,13,18,.22)
  )
}

.lux-project-chip{
  position:absolute;
  z-index:2;
  right:16px;
  top:16px;
  background:rgba(28,18,27,.72);
  backdrop-filter:blur(12px);
  color:white;
  border:1px solid rgba(255,255,255,.16);
  padding:8px 12px;
  border-radius:999px;
  font-size:11px
}

.lux-hero-copy{
  padding:28px 18px 22px;
  display:flex;
  flex-direction:column;
  justify-content:center
}

.lux-hero-copy h3{
  font-size:42px;
  margin:7px 0 10px
}

.lux-hero-copy>p{
  line-height:1.9;
  color:#7b6e76;
  margin:0 0 18px
}

.lux-stat-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px
}

.lux-stat-grid div{
  background:#f7f3f5;
  border:1px solid #eee4e9;
  border-radius:14px;
  padding:13px
}

.lux-stat-grid small,
.lux-stat-grid strong{
  display:block
}

.lux-stat-grid small{
  font-size:11px;
  color:#927d88;
  margin-bottom:4px
}

.lux-stat-grid strong{
  font-size:17px;
  color:#321f2e
}

.lux-actions{
  display:flex;
  gap:9px;
  margin-top:16px;
  flex-wrap:wrap
}

.lux-action{
  border:1px solid #d9cbd2;
  background:#fff;
  color:#4c2b45;
  border-radius:999px;
  padding:10px 15px;
  font-weight:800
}

.lux-action.primary-lite{
  background:#4c2948;
  color:#fff;
  border-color:#4c2948
}

.lux-section{
  background:#fff;
  border:1px solid #eadfe4;
  border-radius:22px;
  padding:22px
}

.lux-section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:15px
}

.lux-section-head small{
  display:block;
  color:#b39767;
  font-weight:900;
  letter-spacing:1.5px;
  font-size:9px
}

.lux-section-head h3{
  font-size:25px;
  margin:4px 0 0
}

.lux-section-head>span{
  font-size:11px;
  color:#917f88
}

.lux-floor-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px
}

.lux-floor-card{
  display:flex;
  align-items:center;
  gap:12px;
  background:#f7f3f5;
  border:1px solid #eee4e9;
  border-radius:15px;
  padding:14px
}

.lux-floor-card>span{
  font-size:10px;
  color:#b39767;
  border-left:1px solid #dfd3d9;
  padding-left:10px
}

.lux-floor-card small,
.lux-floor-card strong{
  display:block
}

.lux-floor-card small{
  font-size:11px;
  color:#86747e
}

.lux-floor-card strong{
  font-size:18px;
  margin-top:3px
}

.lux-plan-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}

.lux-plan-card{
  border:0;
  background:#f5f1f3;
  border-radius:17px;
  padding:0;
  overflow:hidden;
  text-align:right;
  cursor:zoom-in;
  box-shadow:inset 0 0 0 1px #ebe1e6;
  transition:.3s
}

.lux-plan-card:hover{
  transform:translateY(-3px);
  box-shadow:
    0 15px 35px rgba(52,31,46,.09),
    inset 0 0 0 1px #e1d3da
}

.lux-plan-card img{
  width:100%;
  height:250px;
  object-fit:contain;
  background:#fff;
  display:block
}

.lux-plan-card>span{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px
}

.lux-plan-card b,
.lux-plan-card small{
  display:block
}

.lux-plan-card small{
  color:#8e7a84
}

.lux-warranty-section{
  background:linear-gradient(145deg,#382334,#251921);
  color:white;
  border-color:transparent
}

.lux-warranty-section .lux-section-head h3{
  color:white
}

.lux-max-warranty{
  font-size:23px;
  color:#dcc698
}

.lux-warranty-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:9px
}

.lux-warranty-grid div{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.09);
  border-radius:14px;
  padding:13px
}

.lux-warranty-grid small,
.lux-warranty-grid strong{
  display:block
}

.lux-warranty-grid small{
  color:rgba(255,255,255,.63);
  font-size:10px;
  line-height:1.5
}

.lux-warranty-grid strong{
  font-size:17px;
  color:#fff;
  margin-top:4px
}

.lux-warranty-full{
  margin-top:13px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.07);
  color:#fff;
  border-radius:999px;
  padding:10px 15px
}

.lux-source-note{
  text-align:center;
  color:#917f88;
  font-size:10px;
  padding-bottom:4px
}

.brochure-reference-lightbox{
  position:fixed;
  inset:0;
  z-index:900;
  background:rgba(13,9,12,.88);
  backdrop-filter:blur(13px);
  display:grid;
  place-items:center;
  padding:4vw
}

.brochure-reference-lightbox>button{
  position:absolute;
  top:22px;
  left:24px;
  width:46px;
  height:46px;
  border-radius:50%;
  border:0;
  background:white;
  font-size:28px
}

.brochure-reference-lightbox>div{
  max-width:min(1100px,92vw);
  max-height:88vh;
  display:flex;
  flex-direction:column;
  gap:10px;
  color:white
}

.brochure-reference-lightbox h3{
  margin:0
}

.brochure-reference-lightbox img{
  max-width:100%;
  max-height:80vh;
  object-fit:contain;
  border-radius:14px;
  background:white
}

@media(max-width:800px){
  .lux-hero{
    grid-template-columns:1fr
  }

  .lux-hero-visual{
    min-height:260px
  }

  .lux-hero-copy{
    padding:14px 8px
  }

  .lux-hero-copy h3{
    font-size:32px
  }

  .lux-floor-grid{
    grid-template-columns:1fr
  }

  .lux-plan-grid{
    grid-template-columns:1fr
  }

  .lux-plan-card img{
    height:220px
  }

  .lux-warranty-grid{
    grid-template-columns:1fr 1fr
  }

  .lux-section-head{
    align-items:flex-start;
    flex-direction:column
  }

  .lux-max-warranty{
    font-size:20px
  }
}

/* ---------- v19 Production Polish ---------- */

:root{
  --safe-top:env(safe-area-inset-top,0px);
  --safe-right:env(safe-area-inset-right,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --safe-left:env(safe-area-inset-left,0px)
}

html{
  background:#171217
}

body{
  overscroll-behavior:none
}

/* Branded boot screen */

.app-boot{
  position:fixed;
  inset:0;
  z-index:2000;
  display:grid;
  place-items:center;
  background:
    radial-gradient(
      circle at 50% 42%,
      #3b2939 0,
      #211820 34%,
      #120f13 72%
    );
  color:#fff;
  opacity:1;
  visibility:visible;
  transition:
    opacity .62s cubic-bezier(.16,1,.3,1),
    visibility .62s;
  pointer-events:auto
}

.app-boot.ready{
  opacity:0;
  visibility:hidden;
  pointer-events:none
}

.app-boot-inner{
  width:min(360px,76vw);
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center
}

.app-boot img{
  width:132px;
  height:118px;
  object-fit:contain;
  margin-bottom:18px;
  filter:drop-shadow(0 18px 35px #0005)
}

.app-boot span{
  font-weight:600;
  font-size:10px;
  line-height:1.4;
  letter-spacing:3px;
  color:#d9c5d3
}

.app-boot small{
  font-size:11px;
  color:#a895a4;
  margin-top:12px
}

.app-boot-line{
  width:100%;
  height:1px;
  background:#ffffff13;
  overflow:hidden;
  margin-top:17px;
  position:relative
}

.app-boot-line i{
  position:absolute;
  inset:0 auto 0 0;
  width:34%;
  background:
    linear-gradient(
      90deg,
      transparent,
      #b39767,
      #f1dfbd,
      transparent
    );
  animation:bootline 1.35s ease-in-out infinite;
  transform:translateX(-100%)
}

@keyframes bootline{
  to{
    transform:translateX(300%)
  }
}

/* Header refinement */

.topbar{
  padding-top:var(--safe-top);
  padding-left:max(5vw,var(--safe-left));
  padding-right:max(5vw,var(--safe-right))
}

.topbar:after{
  content:"";
  position:absolute;
  right:5vw;
  left:5vw;
  bottom:0;
  height:1px;
  background:
    linear-gradient(
      90deg,
      transparent,
      #ffffff10 25%,
      #ffffff10 75%,
      transparent
    );
  opacity:.5
}

.topbar nav a{
  position:relative
}

.topbar nav a:after{
  content:"";
  position:absolute;
  right:0;
  left:100%;
  bottom:-8px;
  height:1px;
  background:#b39767;
  transition:left .28s ease
}

.topbar nav a:hover:after{
  left:0
}

/* Home */

#stageHome .start-gallery-title h1{
  letter-spacing:-.025em
}

.gallery-controls{
  backdrop-filter:saturate(1.1)
}

#stageHome .card3d{
  box-shadow:0 36px 95px #0006
}

.card3d .label{
  text-shadow:0 2px 14px #0008
}

.project-filter,
.nav-arrow,
.slide-arrow{
  touch-action:manipulation
}

/* Popup */

.generic-popup{
  padding:max(18px,2.4vw);
  background:rgba(11,8,11,.72);
  backdrop-filter:blur(18px) saturate(.82)
}

.generic-popup .popup-card{
  width:min(1420px,96vw);
  height:min(920px,94dvh);
  border-radius:30px;
  overflow:hidden;
  background:#f5f2f0;
  box-shadow:0 40px 130px #0008;
  border:1px solid #ffffff30;
  transform:translateY(26px) scale(.985)
}

.generic-popup.open .popup-card{
  transform:none
}

.popup-card .close-popup{
  top:18px;
  left:18px;
  width:48px;
  height:48px;
  box-shadow:0 7px 26px #0002;
  transition:transform .2s,background .2s
}

.popup-card .close-popup:hover{
  transform:rotate(5deg) scale(1.04);
  background:#fff
}

.entity-view-head{
  padding:28px 36px 15px 82px;
  position:relative;
  z-index:3
}

.viewer-tabs{
  overflow-x:auto;
  flex-wrap:nowrap;
  padding-bottom:2px;
  scrollbar-width:none
}

.viewer-tabs::-webkit-scrollbar{
  display:none
}

.viewer-tabs button{
  flex:none
}

.viewer-body{
  padding:24px 32px 34px;
  scrollbar-color:#cbbfc6 transparent;
  scrollbar-width:thin;
  overscroll-behavior:contain
}

/* Premium overview */

.lux-overview{
  max-width:1260px;
  gap:18px
}

.lux-hero{
  grid-template-columns:1.25fr .75fr;
  padding:14px;
  gap:20px;
  border-radius:26px
}

.lux-hero-visual{
  min-height:420px;
  border-radius:21px
}

.lux-hero-copy{
  padding:26px 20px
}

.lux-hero-copy h3{
  font-size:46px;
  line-height:1.08
}

.lux-stat-grid div{
  transition:transform .22s ease,border-color .22s ease
}

.lux-stat-grid div:hover{
  transform:translateY(-2px);
  border-color:#d8c8d0
}

.lux-section{
  padding:21px;
  border-radius:20px
}

.lux-floor-card{
  min-height:74px
}

.lux-plan-card img{
  height:280px
}

.lux-plan-card:focus-visible,
.lux-action:focus-visible,
.lux-warranty-full:focus-visible{
  outline:2px solid #b39767;
  outline-offset:3px
}

.lux-warranty-section{
  background:
    radial-gradient(
      circle at 85% 0,
      #543b4e 0,
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #382334,
      #21171e
    )
}

/* Image viewer */

.image-viewer:after{
  content:"اسحب للتنقل";
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  padding:6px 11px;
  border-radius:999px;
  background:#0f0c10aa;
  color:#ffffff86;
  font-size:9px;
  pointer-events:none;
  backdrop-filter:blur(10px)
}

/* Plans */

.brochure-reference-lightbox{
  padding:max(18px,3vw)
}

.brochure-reference-lightbox>div{
  align-items:center;
  width:100%
}

.brochure-reference-lightbox h3{
  align-self:flex-start
}

.brochure-reference-lightbox img{
  box-shadow:0 30px 90px #0008
}

.lux-plan-card img{
  transition:transform .35s ease
}

.lux-plan-card:hover img{
  transform:scale(1.012)
}

/* Loading */

.lux-hero-visual,
.project-image,
.overview-cover{
  background-color:#ded7d4
}

/* Accessibility */

button:focus-visible,
a:focus-visible,
select:focus-visible{
  outline:2px solid #b39767;
  outline-offset:3px
}

/* =========================================================
   3D CAROUSEL ARROWS
   Move them BELOW the cards and keep them close together.
   ========================================================= */

#stageHome .start-carousel-wrap{
  display:grid!important;
  grid-template-columns:1fr auto auto 1fr!important;
  grid-template-rows:minmax(0,1fr) 48px!important;

  column-gap:8px!important;
  row-gap:4px!important;

  align-items:center!important;

  overflow:visible!important
}

#stageHome .start-carousel-wrap > .carousel{
  grid-column:1 / -1!important;
  grid-row:1!important;

  width:100%!important
}

#stageHome .start-carousel-wrap > .nav-arrow{
  position:relative!important;

  top:auto!important;
  bottom:auto!important;
  right:auto!important;
  left:auto!important;
  inset:auto!important;

  transform:none!important;

  margin:0!important;

  grid-row:2!important;

  align-self:center!important;
  justify-self:center!important;

  z-index:26!important
}

#stageHome .start-carousel-wrap > .nav-arrow.prev{
  grid-column:2!important
}

#stageHome .start-carousel-wrap > .nav-arrow.next{
  grid-column:3!important
}

#stageHome .start-carousel-wrap > .nav-arrow:hover{
  transform:scale(1.05)!important
}

/* ---------- Mobile ---------- */

@media(max-width:900px){

  .generic-popup{
    padding:0
  }

  .generic-popup .popup-card{
    width:100vw;
    height:100dvh;
    max-height:none;
    border-radius:0;
    border:0
  }

  .popup-card .close-popup{
    top:max(13px,var(--safe-top));
    left:max(13px,var(--safe-left));
    width:44px;
    height:44px
  }

  .entity-view-head{
    padding:
      calc(20px + var(--safe-top))
      18px
      12px
      66px
  }

  .entity-view-head h2{
    font-size:30px
  }

  .viewer-body{
    padding:
      16px
      14px
      calc(22px + var(--safe-bottom))
  }

  .viewer-tabs{
    margin-top:12px
  }

  .viewer-tabs button{
    font-size:11px;
    padding:8px 11px
  }

  .lux-overview{
    gap:13px
  }

  .lux-hero{
    padding:10px;
    border-radius:20px;
    gap:10px
  }

  .lux-hero-visual{
    min-height:250px
  }

  .lux-hero-copy h3{
    font-size:31px
  }

  .lux-section{
    padding:16px;
    border-radius:18px
  }

  .lux-section-head h3{
    font-size:21px
  }

  .lux-floor-card{
    min-height:64px
  }

  .lux-plan-card img{
    height:235px
  }

  .lux-warranty-grid{
    gap:7px
  }

  /*
     Mobile image gallery:
     controls definitely under the image.
  */

  .image-viewer{
    border-radius:14px!important;
    overflow:visible!important
  }

  .image-track{
    border-radius:14px!important;
    overflow:hidden!important
  }

  .image-slide{
    padding:8px
  }

  .image-slide img{
    height:min(65dvh,580px);
    border-radius:10px
  }

  .viewer-controls{
    margin:8px auto 0!important;
    padding-bottom:calc(6px + var(--safe-bottom))!important
  }

  .viewer-controls button{
    width:40px!important;
    height:40px!important
  }

  .image-viewer:after{
    top:9px
  }

  /*
     Mobile 3D arrows:
     directly under the carousel,
     centered and close.
  */

  #stageHome .start-carousel-wrap{
    grid-template-rows:minmax(0,1fr) 44px!important;
    column-gap:7px!important;
    row-gap:2px!important
  }

  #stageHome .start-carousel-wrap > .nav-arrow{
    width:42px!important;
    height:42px!important;
    font-size:24px!important
  }
}

@media(max-width:560px){

  .app-boot img{
    width:105px;
    height:94px
  }

  .app-boot span{
    font-size:8px;
    letter-spacing:2.3px
  }

  .lux-stat-grid{
    grid-template-columns:1fr 1fr
  }

  .lux-stat-grid strong{
    font-size:15px
  }

  .lux-warranty-grid{
    grid-template-columns:1fr 1fr
  }

  .lux-actions{
    display:grid;
    grid-template-columns:1fr
  }

  .lux-action{
    text-align:center
  }

  .lux-plan-card img{
    height:205px
  }
}

@media(max-height:700px) and (min-width:901px){

  .generic-popup .popup-card{
    height:96dvh
  }

  .lux-hero-visual{
    min-height:315px
  }

  .lux-plan-card img{
    height:220px
  }
}

@media(prefers-reduced-motion:reduce){

  .app-boot-line i{
    animation:none
  }

  .generic-popup .popup-card,
  .lux-stat-grid div,
  .lux-plan-card img,
  .viewer-controls button{
    transition:none
  }

  .image-viewer:after{
    display:none
  }
}
/* =========================================================
   FIX v19.2 — Smooth image gallery
   ========================================================= */

/* الـ Viewer هو الذي يقص الصور خارج الإطار */
.image-viewer{
  position:relative !important;
  overflow:hidden !important;
  width:100% !important;
  min-width:0 !important;
}

/* ممنوع قص الصور داخل الـ Track نفسه */
.image-track{
  overflow:visible !important;
  width:100% !important;
  min-width:100% !important;
}

/* كل صورة تأخذ عرض الشاشة بالكامل */
.image-slide{
  flex:0 0 100% !important;
  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;
}

/* منع أي Scroll أفقي أثناء الحركة */
#viewerBody,
#genericPopupContent,
.entity-view{
  overflow-x:hidden !important;
}

/* عداد الصور يظهر 2 / 10 وليس 10 / 2 */
#imageCounter{
  direction:ltr !important;
  unicode-bidi:isolate !important;
  display:inline-block !important;
}

/* الأسهم تظل تحت الصورة */
.viewer-controls{
  position:relative !important;
  width:max-content !important;
  margin:10px auto 0 !important;
  overflow:visible !important;
  flex-shrink:0 !important;
}

@media(max-width:900px){

  .image-viewer{
    overflow:hidden !important;
  }

  .image-track{
    overflow:visible !important;
  }

  .viewer-controls{
    margin-top:8px !important;
  }
}
/* =========================================================
   MADC v19.3 — Premium Image Gallery
   Full image + previous/next image peeks
   ========================================================= */

.image-viewer{
  position:relative !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;

  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(255,255,255,.96),
      rgba(246,242,244,.96)
    ) !important;

  touch-action:pan-y;
  user-select:none;
}


/* ---------------------------------------------------------
   IMAGE TRACK

   Important:
   Track is 84% of the viewer.
   Because every slide is 100% of the track,
   the existing JS translateX(100%) continues working.
   --------------------------------------------------------- */

.image-track{
  position:relative !important;

  width:84% !important;
  max-width:84% !important;

  margin:0 auto !important;

  display:flex !important;
  flex:1 1 auto !important;

  direction:ltr !important;

  min-height:0 !important;

  overflow:visible !important;

  will-change:transform;

  transition:
    transform .72s cubic-bezier(.22,.8,.2,1) !important;
}


.image-track.dragging{
  transition:none !important;
}


/* ---------------------------------------------------------
   EACH SLIDE
   --------------------------------------------------------- */

.image-slide{
  flex:0 0 100% !important;

  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:10px 10px 4px !important;

  box-sizing:border-box !important;

  opacity:.48;

  transform:scale(.94);

  transition:
    opacity .55s cubic-bezier(.22,.8,.2,1),
    transform .65s cubic-bezier(.22,.8,.2,1);
}


/*
  The slide in the middle visually appears full strength.
  Adjacent slides appear only as elegant edge previews.
*/

.image-slide img{
  display:block !important;

  width:100% !important;
  max-width:100% !important;

  height:min(64vh,690px) !important;
  max-height:min(64vh,690px) !important;

  object-fit:contain !important;

  border-radius:18px !important;

  background:#171317 !important;

  box-shadow:
    0 20px 55px rgba(37,23,34,.15);

  pointer-events:none !important;

  user-select:none !important;
  -webkit-user-drag:none !important;
}


/* ---------------------------------------------------------
   VIEWPORT SIDE MASKS

   Makes the previous/next previews subtle and premium.
   --------------------------------------------------------- */

.image-viewer::before,
.image-viewer::after{
  content:"";

  position:absolute;

  top:0;
  bottom:64px;

  width:8.5%;

  z-index:4;

  pointer-events:none;
}


.image-viewer::before{
  left:0;

  background:
    linear-gradient(
      90deg,
      rgba(247,244,245,.92) 0%,
      rgba(247,244,245,.42) 44%,
      transparent 100%
    );
}


.image-viewer::after{
  right:0;

  background:
    linear-gradient(
      270deg,
      rgba(247,244,245,.92) 0%,
      rgba(247,244,245,.42) 44%,
      transparent 100%
    );
}


/* ---------------------------------------------------------
   SWIPE HINT
   --------------------------------------------------------- */

.image-viewer > .image-track::before{
  content:"اسحب للتنقل";

  position:fixed;

  left:50%;
  top:auto;

  transform:translateX(-50%);

  margin-top:14px;

  z-index:8;

  padding:7px 13px;

  border-radius:999px;

  background:rgba(29,23,29,.70);

  backdrop-filter:blur(10px);

  color:rgba(255,255,255,.88);

  font-size:10px;

  pointer-events:none;
}


/*
  Disable the older hint so only one hint appears.
*/

.image-viewer:after{
  content:"" !important;
}


/* ---------------------------------------------------------
   NAVIGATION AREA
   --------------------------------------------------------- */

.viewer-controls{
  position:relative !important;

  inset:auto !important;

  left:auto !important;
  right:auto !important;
  top:auto !important;
  bottom:auto !important;

  transform:none !important;

  flex:0 0 auto !important;

  display:flex !important;

  align-items:center !important;
  justify-content:center !important;

  width:max-content !important;

  margin:8px auto 12px !important;

  padding:0 !important;

  gap:8px !important;

  direction:ltr !important;

  background:transparent !important;

  z-index:20 !important;
}


/* Counter between arrows */

#imageCounter{
  min-width:52px !important;

  display:inline-flex !important;

  align-items:center !important;
  justify-content:center !important;

  direction:ltr !important;

  unicode-bidi:isolate !important;

  color:#887985 !important;

  font-size:12px !important;

  letter-spacing:.4px !important;
}


/* Navigation arrows */

.viewer-controls button{
  position:relative !important;

  inset:auto !important;

  transform:none !important;

  width:44px !important;
  height:44px !important;

  margin:0 !important;
  padding:0 !important;

  display:grid !important;

  place-items:center !important;

  border-radius:50% !important;

  border:1px solid rgba(88,54,81,.17) !important;

  background:#ffffff !important;

  color:#4c2948 !important;

  font-size:21px !important;

  box-shadow:
    0 7px 20px rgba(44,29,41,.09) !important;

  transition:
    transform .2s ease,
    background .2s ease,
    color .2s ease,
    box-shadow .2s ease !important;
}


.viewer-controls button:hover{
  transform:translateY(-1px) scale(1.045) !important;

  background:#4c2948 !important;

  color:#fff !important;

  box-shadow:
    0 10px 25px rgba(61,33,61,.18) !important;
}


/* ---------------------------------------------------------
   BODY CLIPPING
   Prevent horizontal browser scrollbar.
   --------------------------------------------------------- */

#viewerBody,
#genericPopupContent,
.entity-view{
  overflow-x:hidden !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media(max-width:900px){

  .image-track{
    width:88% !important;
    max-width:88% !important;
  }


  .image-slide{
    padding:7px 7px 3px !important;
  }


  .image-slide img{
    height:min(57dvh,570px) !important;
    max-height:min(57dvh,570px) !important;

    border-radius:14px !important;
  }


  .image-viewer::before,
  .image-viewer::after{
    width:6.5%;
  }


  .viewer-controls{
    margin:
      7px auto
      calc(8px + var(--safe-bottom))
      !important;
  }


  .viewer-controls button{
    width:41px !important;
    height:41px !important;

    font-size:20px !important;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media(max-width:560px){

  /*
    Slightly more of the neighbouring cards is visible
    on narrow phones.
  */

  .image-track{
    width:86% !important;
    max-width:86% !important;
  }


  .image-slide{
    padding:5px !important;
  }


  .image-slide img{
    width:100% !important;

    height:auto !important;
    max-height:52dvh !important;

    aspect-ratio:auto !important;

    object-fit:contain !important;

    border-radius:13px !important;
  }


  .image-viewer::before,
  .image-viewer::after{
    width:7.5%;

    bottom:56px;
  }


  .viewer-controls{
    gap:7px !important;

    margin:
      7px auto
      calc(7px + var(--safe-bottom))
      !important;
  }


  .viewer-controls button{
    width:40px !important;
    height:40px !important;
  }


  #imageCounter{
    min-width:46px !important;

    font-size:11px !important;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media(prefers-reduced-motion:reduce){

  .image-track,
  .image-slide,
  .viewer-controls button{
    transition:none !important;
  }

}
/* =========================================================
   MADC v19.4 — SAFE GALLERY FIX
   Full image + clean side peeks
   ========================================================= */

/* إزالة كل الـ overlays التي سببت الشكل البيضاوي والتعتيم */
.image-viewer::before,
.image-viewer::after,
.image-track::before,
.image-track::after{
  content:none !important;
  display:none !important;
}

/* الإطار الخارجي */
.image-viewer{
  position:relative !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;

  display:flex !important;
  flex-direction:column !important;

  overflow:hidden !important;

  background:#f5f2f0 !important;

  touch-action:pan-y !important;
  user-select:none !important;
}

/* المسار أصغر قليلًا من مساحة العرض
   ليظهر جزء من الصورة السابقة والتالية */
.image-track{
  position:relative !important;

  display:flex !important;
  direction:ltr !important;

  width:88% !important;
  max-width:88% !important;
  min-width:88% !important;

  margin-left:auto !important;
  margin-right:auto !important;

  flex:1 1 auto !important;
  min-height:0 !important;

  overflow:visible !important;

  will-change:transform !important;

  transition:
    transform .62s cubic-bezier(.22,.8,.2,1) !important;
}

.image-track.dragging{
  transition:none !important;
}

/* كل صورة = عرض المسار بالكامل */
.image-slide{
  flex:0 0 100% !important;

  width:100% !important;
  min-width:100% !important;
  max-width:100% !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  padding:8px !important;

  opacity:1 !important;
  transform:none !important;

  box-sizing:border-box !important;
}

/* الحفاظ على الصورة بالكامل */
.image-slide img{
  display:block !important;

  width:100% !important;
  max-width:100% !important;

  height:min(64vh,690px) !important;
  max-height:min(64vh,690px) !important;

  object-fit:contain !important;

  background:#171317 !important;

  border-radius:18px !important;

  box-shadow:
    0 16px 42px rgba(35,23,32,.14) !important;

  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-drag:none !important;
}

/* منع السكرول الأفقي */
#viewerBody,
#genericPopupContent,
.entity-view{
  overflow-x:hidden !important;
}

/* الأسهم والعداد أسفل الصورة */
.viewer-controls{
  position:relative !important;

  inset:auto !important;
  top:auto !important;
  right:auto !important;
  bottom:auto !important;
  left:auto !important;

  transform:none !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;

  flex:0 0 auto !important;

  width:max-content !important;

  margin:8px auto 12px !important;
  padding:0 !important;

  gap:8px !important;

  direction:ltr !important;

  background:transparent !important;

  z-index:30 !important;
}

/* العداد */
#imageCounter{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  min-width:52px !important;

  direction:ltr !important;
  unicode-bidi:isolate !important;

  color:#877984 !important;

  font-size:12px !important;
}

/* الأسهم */
.viewer-controls button{
  position:static !important;

  width:42px !important;
  height:42px !important;

  margin:0 !important;
  padding:0 !important;

  display:grid !important;
  place-items:center !important;

  border-radius:50% !important;

  border:1px solid #ded2d9 !important;

  background:#fff !important;

  color:#4c2948 !important;

  font-size:21px !important;

  box-shadow:
    0 5px 16px rgba(45,29,41,.08) !important;

  transform:none !important;
}

.viewer-controls button:hover{
  background:#4c2948 !important;
  color:#fff !important;
  transform:scale(1.04) !important;
}

/* الهاتف */
@media(max-width:900px){

  .image-track{
    width:90% !important;
    max-width:90% !important;
    min-width:90% !important;
  }

  .image-slide{
    padding:5px !important;
  }

  .image-slide img{
    height:min(56dvh,560px) !important;
    max-height:min(56dvh,560px) !important;

    border-radius:14px !important;
  }

  .viewer-controls{
    margin:
      7px auto
      calc(8px + var(--safe-bottom))
      !important;
  }

  .viewer-controls button{
    width:40px !important;
    height:40px !important;
  }
}

@media(max-width:560px){

  .image-track{
    width:88% !important;
    max-width:88% !important;
    min-width:88% !important;
  }

  .image-slide img{
    width:100% !important;
    height:auto !important;
    max-height:51dvh !important;

    object-fit:contain !important;
  }

  #imageCounter{
    min-width:46px !important;
    font-size:11px !important;
  }
}
/* =========================================================
   MADC v19.5 — UNIFIED RESPONSIVE IMAGE GALLERY
   Desktop + Tablet + Mobile
   ========================================================= */


/* Kill all old experimental overlays */

.image-viewer::before,
.image-viewer::after,
.image-track::before,
.image-track::after{
  display:none!important;
  content:none!important;
}


/* Gallery body */

#viewerBody:has(> .image-viewer){

  display:flex!important;

  align-items:center!important;

  justify-content:center!important;

  overflow:hidden!important;

  padding-top:14px!important;

  padding-bottom:14px!important;

}


/* Main gallery container */

.image-viewer{

  position:relative!important;

  width:100%!important;

  height:auto!important;

  min-height:0!important;

  display:flex!important;

  flex-direction:column!important;

  justify-content:center!important;

  overflow:hidden!important;

  background:#f7f4f2!important;

  border-radius:20px!important;

  touch-action:pan-y!important;

  user-select:none!important;

}


/* Swipe hint */

.image-gallery-hint{

  position:absolute!important;

  top:18px!important;

  left:50%!important;

  transform:translateX(-50%)!important;

  z-index:20!important;

  display:block!important;

  padding:7px 13px!important;

  border-radius:999px!important;

  background:rgba(29,23,29,.68)!important;

  backdrop-filter:blur(10px)!important;

  color:rgba(255,255,255,.9)!important;

  font-size:10px!important;

  pointer-events:none!important;

}


/* Track width creates the side peeks */

.image-track{

  position:relative!important;

  display:flex!important;

  align-items:stretch!important;

  flex:0 0 auto!important;

  direction:ltr!important;

  width:min(86%,1180px)!important;

  max-width:86%!important;

  min-width:0!important;

  aspect-ratio:16/9!important;

  margin:0 auto!important;

  overflow:visible!important;

  will-change:transform!important;

  transition:
    transform .68s
    cubic-bezier(.22,.8,.2,1)
    !important;

}


/* No transition while finger/mouse is following */

.image-track.dragging{

  transition:none!important;

}


/* Individual slides */

.image-slide{

  position:relative!important;

  flex:0 0 100%!important;

  width:100%!important;

  min-width:100%!important;

  max-width:100%!important;

  height:100%!important;

  display:flex!important;

  align-items:center!important;

  justify-content:center!important;

  padding:0 7px!important;

  box-sizing:border-box!important;

  opacity:.35!important;

  transform:scale(.96)!important;

  filter:
    brightness(.86)
    saturate(.78)
    !important;

  transition:
    opacity .48s ease,
    transform .58s cubic-bezier(.22,.8,.2,1),
    filter .48s ease
    !important;

}


/* Previous and next image */

.image-slide.is-neighbor{
  opacity:.60!important;
  transform:translateZ(0) scale(.975)!important;
  filter:
    brightness(.92)
    saturate(.88)
    !important;
}


/* Current image */

.image-slide.is-active{
  opacity:1!important;
  transform:translateZ(0) scale(1)!important;
  filter:none!important;
  z-index:4!important;
}


/* Image itself */

.image-slide img{

  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;

  object-fit:contain!important;

  /* حذف الخلفية السوداء نهائيًا */
  background:transparent!important;

  /* نعومة الزوايا */
  border-radius:inherit!important;

  box-shadow:
    0 14px 34px rgba(37,24,35,.10)
    !important;

  pointer-events:none!important;
  user-select:none!important;
  -webkit-user-drag:none!important;

  backface-visibility:hidden!important;
  -webkit-backface-visibility:hidden!important;
  transform:translateZ(0)!important;
}


/* Controls below image */

.viewer-controls{

  position:relative!important;

  inset:auto!important;

  left:auto!important;

  right:auto!important;

  top:auto!important;

  bottom:auto!important;

  transform:none!important;

  flex:0 0 auto!important;

  display:flex!important;

  align-items:center!important;

  justify-content:center!important;

  direction:rtl!important;

  width:max-content!important;

  max-width:100%!important;

  gap:8px!important;

  margin:11px auto 4px!important;

  padding:0!important;

  background:transparent!important;

  z-index:30!important;

}


/* Counter */

#imageCounter{

  display:inline-flex!important;

  align-items:center!important;

  justify-content:center!important;

  min-width:52px!important;

  direction:ltr!important;

  unicode-bidi:isolate!important;

  color:#897a84!important;

  font-size:12px!important;

  letter-spacing:.3px!important;

}


/* Buttons */

.viewer-controls button{

  position:static!important;

  inset:auto!important;

  transform:none!important;

  display:grid!important;

  place-items:center!important;

  width:43px!important;

  height:43px!important;

  margin:0!important;

  padding:0!important;

  border-radius:50%!important;

  border:
    1px solid
    rgba(76,41,72,.16)
    !important;

  background:#fff!important;

  color:#4c2948!important;

  font-size:21px!important;

  box-shadow:
    0 6px 20px
    rgba(41,25,37,.08)
    !important;

  transition:
    transform .2s ease,
    background .2s ease,
    color .2s ease
    !important;

}


.viewer-controls button:hover{

  transform:
    translateY(-1px)
    scale(1.045)
    !important;

  background:#4c2948!important;

  color:#fff!important;

}


/* Prevent global horizontal scroll */

#viewerBody,
#genericPopupContent,
.entity-view{

  overflow-x:hidden!important;

}


/* ==========================
   TABLET
   ========================== */

@media(max-width:900px){

  #viewerBody:has(> .image-viewer){

    padding:
      14px 0
      calc(14px + var(--safe-bottom))
      !important;

  }


  .image-viewer{

    border-radius:16px!important;

  }


  .image-track{

    width:86%!important;

    max-width:86%!important;

  }


  .image-slide{

    padding:0 5px!important;

  }


  .image-slide img{

    border-radius:14px!important;

  }


  .image-gallery-hint{

    top:12px!important;

    padding:6px 11px!important;

    font-size:9px!important;

  }


  .viewer-controls{

    margin:
      9px auto
      2px
      !important;

  }


  .viewer-controls button{

    width:41px!important;

    height:41px!important;

  }

}


/* ==========================
   MOBILE PORTRAIT
   ========================== */

@media(max-width:560px){

  /*
    84% central image gives about
    8% preview on each side.
  */

  .image-track{

    width:84%!important;

    max-width:84%!important;

    aspect-ratio:16/9!important;

  }


  .image-slide{

    padding:0 4px!important;

  }


  .image-slide img{

    width:100%!important;

    height:100%!important;

    object-fit:contain!important;

    border-radius:13px!important;

  }


  .viewer-controls{

    gap:7px!important;

    margin:
      9px auto
      0
      !important;

  }


  .viewer-controls button{

    width:40px!important;

    height:40px!important;

    font-size:20px!important;

  }


  #imageCounter{

    min-width:47px!important;

    font-size:11px!important;

  }

}


/* ==========================
   MOBILE LANDSCAPE
   ========================== */

@media(
  max-height:560px
)
and
(
  orientation:landscape
){

  .image-track{

    width:76%!important;

    max-width:76%!important;

  }


  .image-gallery-hint{

    display:none!important;

  }


  .viewer-controls{

    margin-top:5px!important;

  }

}


/* Reduced motion */

@media(prefers-reduced-motion:reduce){

  .image-track,
  .image-slide,
  .viewer-controls button{

    transition:none!important;

  }

}
.image-track{
  background:transparent!important;
}

#viewerBody:has(> .image-viewer){
  background:transparent!important;
}

.image-viewer::before,
.image-viewer::after,
.image-track::before,
.image-track::after{
  background:none!important;
}
/* MADC — Final gallery corner radius */

.image-slide{
  border-radius:18px !important;
  overflow:hidden !important;
}

.image-slide img{
  border-radius:18px !important;
}

@media(max-width:900px){
  .image-slide,
  .image-slide img{
    border-radius:16px !important;
  }
}

@media(max-width:560px){
  .image-slide,
  .image-slide img{
    border-radius:14px !important;
  }
}
/* =========================================================
   MADC v19.6 — 3D Carousel Entrance
   ========================================================= */

#stageHome .start-carousel-wrap.carousel-intro-prep{
  opacity:0;

  transform:
    translate3d(0,22px,0)
    scale(.92);

  filter:blur(6px);

  transform-origin:50% 52%;

  will-change:
    transform,
    opacity,
    filter;
}


#stageHome .start-carousel-wrap.carousel-intro-prep.carousel-intro-ready{
  opacity:1;

  transform:
    translate3d(0,0,0)
    scale(1);

  filter:blur(0);

  transition:
    transform 1.15s cubic-bezier(.16,1,.3,1),
    opacity .72s ease,
    filter .8s ease;
}


/* الهاتف: Zoom أخف */
@media(max-width:900px){

  #stageHome .start-carousel-wrap.carousel-intro-prep{
    transform:
      translate3d(0,14px,0)
      scale(.955);

    filter:blur(4px);
  }

}


/* احترام إعداد تقليل الحركة */
@media(prefers-reduced-motion:reduce){

  #stageHome .start-carousel-wrap.carousel-intro-prep{
    opacity:1;
    transform:none;
    filter:none;
  }

}