/* ============================================================
   Riaz Developers — Services Filmstrip Widget
   PANELS ONLY — no header, no footer button. This widget renders
   just the .riaz-filmstrip row; place native Elementor Heading/
   Text/Button widgets above or below it for header/footer content.

   Critical fixes baked in:
   - flex-wrap: nowrap !important — survives theme flex-wrap resets
   - min-width: 0 on panels — without this, flex items refuse to
     shrink below their content's natural width (long titles), which
     breaks the whole expand/collapse ratio
   - flex values use !important — survives theme button/card CSS
     that may target generic block/flex children with higher specificity
   ============================================================ */

.riaz-filmstrip * ,
.riaz-filmstrip *::before,
.riaz-filmstrip *::after {
  box-sizing: border-box;
}

.riaz-filmstrip {
  display: flex;
  flex-wrap: nowrap !important;
  height: 520px;
  gap: 2px;
  width: 100%;
  font-family: 'Urbanist', sans-serif;
}

.riaz-strip-panel {
  position: relative;
  flex: 1 1 0% !important;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  background-color: #0e1c34;
  border-right: 1px solid rgba(240,237,230,0.12);
}
.riaz-strip-panel:last-child {
  border-right: none;
}

.riaz-strip-panel.active {
  flex: 3.4 1 0% !important;
}

.riaz-strip-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.7) brightness(0.5);
  transition: filter 0.5s ease;
}
.riaz-strip-panel.active img {
  filter: saturate(0.8) brightness(0.34);
}

.riaz-panel-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(8, 14, 28, 0.96) 0%,
    rgba(8, 14, 28, 0.82) 22%,
    rgba(8, 14, 28, 0.40) 50%,
    rgba(8, 14, 28, 0.15) 75%,
    rgba(8, 14, 28, 0.30) 100%
  );
  pointer-events: none;
}

/* ── COLLAPSED LABEL ── */
.riaz-panel-label {
  position: absolute;
  bottom: 36px;
  left: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 1;
  transition: opacity 0.3s ease 0.15s;
  pointer-events: none;
}
.riaz-strip-panel.active .riaz-panel-label {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.riaz-panel-index {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: #C09A45;
  writing-mode: vertical-rl;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.riaz-panel-title-collapsed {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 600;
  color: #F0EDE6;
  writing-mode: vertical-rl;
  white-space: nowrap;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ── EXPANDED CONTENT ── */
.riaz-panel-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 44px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
  pointer-events: none;
  min-width: 320px;
}
.riaz-strip-panel.active .riaz-panel-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.riaz-panel-index-h {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 14px;
  color: #C09A45;
  margin-bottom: 14px;
  display: block;
}

.riaz-panel-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 600;
  color: #F0EDE6;
  line-height: 1.2;
  margin: 0 0 16px;
  max-width: 440px;
  text-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.riaz-panel-content p {
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(240,237,230,0.85);
  max-width: 420px;
  margin: 0 0 26px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

.riaz-panel-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C09A45;
  text-decoration: none;
  border-bottom: 1px solid rgba(192,154,69,0.4);
  padding-bottom: 6px;
  transition: gap 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.riaz-panel-link:hover {
  gap: 16px;
}

/* ============================================================
   RESPONSIVE — structural fallback breakpoints
   ============================================================ */
@media (max-width: 900px) {
  .riaz-filmstrip {
    flex-direction: column;
    flex-wrap: nowrap !important;
    height: auto !important;
  }
  .riaz-strip-panel {
    flex: none !important;
    width: 100%;
    height: 96px;
    border-right: none;
    border-bottom: 1px solid rgba(240,237,230,0.12);
  }
  .riaz-strip-panel:last-child {
    border-bottom: none;
  }
  .riaz-strip-panel.active {
    height: 420px;
  }
  .riaz-panel-label {
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
    justify-content: flex-start;
  }
  .riaz-panel-index,
  .riaz-panel-title-collapsed {
    writing-mode: horizontal-tb;
  }
  .riaz-panel-content {
    padding: 28px;
    min-width: 0;
  }
}

@media (max-width: 767px) {
  .riaz-panel-content h3 {
    font-size: 24px;
  }
}
