/* ══════════════════════════════════════════════════════════════
   designs.css — Selected Brand & UI/UX Designs Showcase Section
   Header (Badge, Title, Subtitle, Button) ABOVE Parabolic Gallery
   ══════════════════════════════════════════════════════════════ */

#designs-section {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 24px 84px;
  background: transparent;
  z-index: 20;
  box-sizing: border-box;
  scroll-margin-top: 70px;
  overflow: visible !important;
}

#designs-section.has-expanded-design,
#designs-section:has(.is-expanded) {
  z-index: 80 !important;
}

/* Elegant top separator matching other sections */
#designs-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(to right,
      transparent 0%,
      rgba(7, 25, 27, 0.08) 20%,
      rgba(7, 25, 27, 0.16) 50%,
      rgba(7, 25, 27, 0.08) 80%,
      transparent 100%);
  pointer-events: none;
  z-index: 10;
}

body.dark #designs-section::before {
  background: linear-gradient(to right,
      transparent 0%,
      rgba(0, 255, 165, 0.15) 20%,
      rgba(0, 255, 165, 0.38) 50%,
      rgba(0, 255, 165, 0.15) 80%,
      transparent 100%);
  box-shadow: 0 0 12px rgba(0, 255, 165, 0.2);
}

/* ══════════════════════════════════════════════════════════════
   1. SECTION HEADER (ABOVE PHOTOS)
   Badge (No Dot) + Title + Subtitle + Clean Button
   ══════════════════════════════════════════════════════════════ */
.designs-header {
  text-align: center;
  margin: 0 auto 0;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 35;
  transform: translateY(38px);
}

/* Badge Pill — Matches Hero tag-chip */
.designs-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  color: var(--ink-2);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all .2s ease;
  margin-bottom: 16px;
  cursor: default;
}

.designs-badge-pill:hover {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

body.dark .designs-badge-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e2ede8;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.dark .designs-badge-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(0, 255, 165, 0.4);
  box-shadow: 0 4px 16px rgba(0, 255, 165, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

body.lang-ar .designs-badge-pill,
html[lang="ar"] .designs-badge-pill {
  font-family: var(--pf-text-face), 'Thmanyah Serif Text', 'Thmanyah Sans', sans-serif !important;
  font-weight: 600;
  letter-spacing: 0;
}

.designs-title {
  font-family: var(--font-foreign);
  font-size: clamp(2.0rem, 3.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #07191b;
  margin: 0 0 14px;
}

body.dark .designs-title {
  color: #ffffff;
}

.designs-title .designs-accent {
  color: #059669;
}

body.dark .designs-title .designs-accent {
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}

.designs-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 1.3vw, 1.05rem);
  font-weight: 400;
  line-height: 1.62;
  color: #555555;
  max-width: 540px;
  margin: 0 auto 24px;
}

body.dark .designs-desc {
  color: #94a3b8;
}

/* ── CTA Button — نفس ستايل testi-cta-btn ── */
.designs-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  z-index: 40;
}

.designs-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s ease,
    background 0.25s ease;
  cursor: pointer;
  position: relative;
  z-index: 50;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
}

.designs-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.32);
  background: #1e293b;
}

body.dark .designs-cta-btn {
  background: #ffffff;
  color: #030504;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

body.dark .designs-cta-btn:hover {
  background: #00ffa5;
  color: #030504;
  box-shadow: 0 6px 26px rgba(0, 255, 165, 0.4);
}

/* ══════════════════════════════════════════════════════════════
   2. PARABOLIC ARCHED MOSAIC GALLERY (8 Columns Below Header)
   ══════════════════════════════════════════════════════════════ */
.designs-mosaic-wrapper {
  position: relative;
  width: 100%;
  padding: 10px 4px 16px;
  overflow: visible !important;
  margin-top: -105px;
  z-index: 20;
  pointer-events: none;
}

.designs-mosaic {
  display: flex;
  gap: 14px;
  width: 100%;
  align-items: center;
  box-sizing: border-box;
  pointer-events: none;
}

.mosaic-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: flex 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
              width 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
              max-width 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
              transform 0.4s ease,
              opacity 0.35s ease,
              filter 0.35s ease;
  will-change: flex, width;
  position: relative;
}

.mosaic-col.is-expanded {
  z-index: 90 !important;
}

.designs-mosaic.has-active-col .mosaic-col.is-dimmed {
  opacity: 0.68;
  filter: saturate(85%);
}

/* Parabolic Arch Offsets: Center columns peak, sides slope down */
.mosaic-col-1 {
  transform: translateY(20px);
}

.mosaic-col-2 {
  transform: translateY(14px);
}

.mosaic-col-3 {
  transform: translateY(55px);
}

.mosaic-col-4 {
  transform: translateY(130px);
}

.mosaic-col-5 {
  transform: translateY(130px);
}

.mosaic-col-6 {
  transform: translateY(55px);
}

.mosaic-col-7 {
  transform: translateY(14px);
}

.mosaic-col-8 {
  transform: translateY(20px);
}

/* ── Individual Design Pill Card ── */
.design-pill {
  position: relative;
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  pointer-events: auto !important;
  background: rgba(7, 25, 27, 0.04);
  border: 1px solid rgba(7, 25, 27, 0.10);
  box-shadow: 0 4px 18px rgba(7, 25, 27, 0.05);
  box-sizing: border-box;
  z-index: 1;
  transition: height 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease,
              opacity 0.35s ease,
              filter 0.35s ease;
  will-change: height;
}

.design-pill.is-active-pill {
  box-shadow: 0 16px 42px rgba(7, 25, 27, 0.18);
  border-color: rgba(7, 25, 27, 0.28);
  z-index: 100 !important;
}

.design-pill.is-sibling-pill {
  opacity: 0.82;
  filter: saturate(88%);
}

body.dark .design-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

body.dark .design-pill.is-active-pill {
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.75), 0 0 24px rgba(0, 255, 165, 0.25);
  border-color: rgba(0, 255, 165, 0.45);
}

body.dark .design-pill.is-sibling-pill {
  opacity: 0.75;
}

/* Card Height Variations */
.pill-h-sm {
  height: 130px;
}

.pill-h-md {
  height: 180px;
}

.pill-h-lg {
  height: 300px;
}

.pill-h-xl {
  height: 300px;
}

/* Full Color Images (No Grayscale) */
.design-pill-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.35s ease;
}

/* Active Pill: 100% UNCLIPPED FULL IMAGE FITTING THE HALO EDGE-TO-EDGE */
.design-pill.is-active-pill .design-pill-img {
  object-fit: cover !important;
  object-position: center !important;
  background-color: transparent !important;
}

body.dark .design-pill.is-active-pill .design-pill-img {
  background-color: transparent !important;
}

.design-pill::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.32) 0%,
      rgba(255, 255, 255, 0.04) 40%,
      transparent 100%);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.design-pill.is-active-pill::after {
  opacity: 0.12;
}

body.dark .design-pill::after {
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(255, 255, 255, 0.02) 40%,
      transparent 100%);
}


/* ══════════════════════════════════════════════════════════════
   3. ARABIC TYPOGRAPHY OVERRIDE — THMANYAH SERIF TEXT (SITE FONT)
   ══════════════════════════════════════════════════════════════ */
body.lang-ar #designs-section,
body.lang-ar #designs-section *,
html[lang="ar"] #designs-section,
html[lang="ar"] #designs-section * {
  font-family: var(--pf-text-face), 'Thmanyah Serif Text', 'Thmanyah Sans', sans-serif !important;
}

body.lang-ar .designs-title {
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 700;
}

body.lang-ar .designs-desc {
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 1.65;
}

body.lang-ar .designs-cta-btn {
  direction: rtl;
  font-family: var(--pf-text-face), 'Thmanyah Serif Text', 'Thmanyah Sans', sans-serif !important;
}





/* ══════════════════════════════════════════════════════════════
   6. RESPONSIVE BREAKPOINTS (TABLET & MOBILE ONLY — <= 1080px)
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  #designs-section {
    padding: 38px 14px 48px;
  }

  .designs-header {
    margin: 0 auto 28px;
    max-width: 100%;
    transform: none;
  }

  .designs-title {
    font-size: clamp(1.75rem, 6.5vw, 2.3rem);
    line-height: 1.25;
    margin-bottom: 10px;
  }

  .designs-desc {
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
    line-height: 1.55;
    margin-bottom: 18px;
    padding: 0 10px;
  }

  /* Compact button width — precisely as requested by user */
  .designs-cta-btn {
    width: auto !important;
    min-width: 150px !important;
    max-width: 210px !important;
    padding: 10px 22px !important;
    font-size: 0.90rem !important;
    margin: 0 auto !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18) !important;
    position: relative !important;
    z-index: 50 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  .designs-mosaic-wrapper {
    margin-top: 0;
    padding: 0;
    overflow: visible;
  }

  /* Prevent browser auto-scroll anchoring from moving the page during accordion shifts */
  #designs-section,
  .designs-mosaic,
  .mobile-stream-col,
  .design-pill {
    overflow-anchor: none !important;
  }

  /* Two continuous columns matching the reference photo with Interactive Accordion Displacement */
  .designs-mosaic.has-mobile-stream {
    display: flex !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    align-items: flex-start !important;
  }

  .mobile-stream-col {
    flex: 1 1 0%;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    transition: flex 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
                opacity 0.35s ease,
                filter 0.35s ease !important;
    will-change: flex;
    box-sizing: border-box !important;
  }

  .mobile-stream-col.is-expanded {
    z-index: 10 !important;
  }

  .mobile-stream-col.is-dimmed {
    opacity: 0.70 !important;
    filter: saturate(85%) !important;
  }

  /* Fallback in case has-mobile-stream is not yet ready */
  .designs-mosaic:not(.has-mobile-stream) {
    column-count: 2 !important;
    column-gap: 12px !important;
    display: block !important;
  }

  .mosaic-col {
    display: contents !important;
  }

  .mosaic-col-1,
  .mosaic-col-2,
  .mosaic-col-3,
  .mosaic-col-4,
  .mosaic-col-5,
  .mosaic-col-6,
  .mosaic-col-7,
  .mosaic-col-8 {
    transform: none !important;
    display: contents !important;
    opacity: 1 !important;
    filter: none !important;
  }

  /* Smooth rounded corners & staggered card heights matching the iOS layout */
  .design-pill {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transform: none !important;
    background: rgba(7, 25, 27, 0.04) !important;
    border: 1px solid rgba(7, 25, 27, 0.08) !important;
    box-shadow: 0 3px 12px rgba(7, 25, 27, 0.05) !important;
    transition: height 0.45s cubic-bezier(0.2, 0.9, 0.3, 1),
                margin 0.35s ease,
                box-shadow 0.35s ease,
                border-color 0.35s ease,
                opacity 0.35s ease,
                filter 0.35s ease !important;
    will-change: height, margin;
    position: relative !important;
    min-height: 0 !important;
  }

  body.dark .design-pill {
    background: #111417 !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
  }

  .design-pill:not(.is-active-pill):active {
    transform: scale(0.98) !important;
  }

  /* Active pill: zero extra margin to preserve perfect top and bottom bounding, elevated shadow */
  .design-pill.is-active-pill {
    z-index: 20 !important;
    transform: none !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    border-color: rgba(7, 25, 27, 0.35) !important;
    box-shadow: 0 14px 38px rgba(7, 25, 27, 0.22) !important;
  }

  body.dark .design-pill.is-active-pill {
    background: transparent !important;
    border-color: rgba(0, 255, 165, 0.60) !important;
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.75), 0 0 20px rgba(0, 255, 165, 0.30) !important;
  }

  .design-pill.is-sibling-pill {
    opacity: 0.75 !important;
    filter: saturate(85%) !important;
  }

  /* Design image is 100% of the card dimensions edge-to-edge: ZERO halo around it */
  .design-pill-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    background-color: transparent !important;
    border-radius: inherit !important;
    display: block !important;
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
  }

  /* Active design displays 100% of its full length anchored from top center with zero cropping */
  .design-pill.is-active-pill .design-pill-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    background-color: transparent !important;
    border-radius: inherit !important;
    display: block !important;
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) !important;
  }

  /* Varied card heights mimicking the staggered Pinterest / iOS photo stream in the image */
  .pill-h-sm {
    height: 135px;
  }

  .pill-h-md {
    height: 185px;
  }

  .pill-h-lg {
    height: 240px;
  }

  .pill-h-xl {
    height: 260px;
  }
}

@media (max-width: 420px) {
  #designs-section {
    padding: 32px 10px 42px !important;
  }

  .designs-mosaic.has-mobile-stream {
    gap: 10px !important;
  }

  .mobile-stream-col {
    gap: 10px !important;
  }

  .designs-mosaic:not(.has-mobile-stream) {
    column-count: 2 !important;
    column-gap: 10px !important;
  }

  .design-pill {
    margin-bottom: 0 !important;
    border-radius: 18px !important;
    min-height: 0 !important;
  }

  .design-pill.is-active-pill {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .pill-h-sm {
    height: 125px;
  }

  .pill-h-md {
    height: 170px;
  }

  .pill-h-lg {
    height: 220px;
  }

  .pill-h-xl {
    height: 240px;
  }
}