/* ==========================================================================
   Our Expertise (Interactive Card Showcase Deck — Small Rounded Style, No Shadow)
   ========================================================================== */

.expertise-slider-section {
  height: calc(var(--vh, 1vh) * 100);
  position: relative;
  overflow: hidden;
  background-color: var(--primary-bg, #0E1420);
}

/* Background Cross-fade Container */
.expertise-bg-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.expertise-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: bottom center;
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.expertise-bg.active {
  opacity: 1;
}

/* Dark overlay */
.expertise-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right,
      rgba(14, 20, 32, 0.96) 0%,
      rgba(14, 20, 32, 0.82) 40%,
      rgba(14, 20, 32, 0.45) 70%,
      rgba(14, 20, 32, 0.15) 100%),
    linear-gradient(to top,
      rgba(14, 20, 32, 0.92) 0%,
      rgba(14, 20, 32, 0) 25%);
  z-index: 2;
  pointer-events: none;
}

/* Content Container */
.expertise-container {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 90px 0 48px max(80px, calc((100vw - var(--container-max-width)) / 2));
}

/* Section label */
.expertise-section-title {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
}

/* Main row */
.expertise-main-content {
  display: flex;
  align-items: flex-end;
  flex: 1;
  gap: 0;
  min-height: 0;
  width: 100%;
  padding-top: 10%;
  padding-bottom: 20px;
}

/* Left Panel */
.expertise-active-info {
  flex: 0 0 32%;
  max-width: 32%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-right: 4%;
  padding-bottom: 4px;
}

.active-category {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.22em;
  margin-bottom: 20px;
}

.active-title {
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -2.5px;
  color: #FFFFFF;
  margin-bottom: 22px;
}

.active-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-dim);
  margin-bottom: 36px;
  max-width: 420px;
}

.active-actions {
  display: flex;
  gap: 16px;
}

/* Back-to-hub button — deliberately distinct from the prev/next arrow
   controls (text label + left-pointing icon, outlined pill) so it never
   reads as "just another arrow". Hidden by default (hub state); revealed
   only in detail state via .expertise-slider-section.is-detail below. */
.btn-exp-back {
  display: none;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-dim, #C9CDD6);
  padding: 11px 20px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-exp-back svg {
  flex-shrink: 0;
}

.btn-exp-back:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.03);
}

/* Right Panel */
.expertise-cards-wrapper {
  flex: 0 0 68%;
  max-width: 68%;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  overflow: visible;
  padding-right: 0;
  min-height: 0;
}

.expertise-cards-track {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding-right: 0;
  margin-right: -40px;
}

/* Individual Service Card — Flat Small Rounded 8px, No Shadow */
.exp-card {
  position: relative;
  width: 172px;
  height: 340px;
  flex-shrink: 0;
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none !important;
  background: var(--surface-color, #0A0F1A);
  transition: transform 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.exp-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-gold);
  background: var(--surface-mid, #1A2540);
  box-shadow: none !important;
}

.exp-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 0.6s ease;
}

.exp-card:hover .exp-card-bg {
  transform: scale(1.05);
}

.exp-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(14, 20, 32, 0.95) 0%,
      rgba(14, 20, 32, 0.55) 45%,
      rgba(14, 20, 32, 0.08) 100%);
  z-index: 1;
}

.exp-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px;
  z-index: 2;
}

.exp-card-category {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.18em;
  display: block;
  margin-bottom: 8px;
}

.exp-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.3px;
}

.exp-card-detail {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 6px 0 0;
  letter-spacing: 0.01em;
}

/* Detail Gallery Cards — Clickable to preview in Lightbox Modal */
.exp-card--static {
  cursor: pointer;
}

.exp-card--static:hover {
  transform: translateY(-8px);
  border-color: var(--accent-gold);
  background: var(--surface-mid, #1A2540);
}

.exp-card--static:hover .exp-card-bg {
  transform: scale(1.08);
}

.exp-card--static .exp-card-overlay {
  background: linear-gradient(to top,
      rgba(14, 20, 32, 0.70) 0%,
      rgba(14, 20, 32, 0.20) 40%,
      rgba(14, 20, 32, 0.05) 100%);
  transition: background 0.3s ease;
}

.exp-card--static:hover .exp-card-overlay {
  background: linear-gradient(to top,
      rgba(14, 20, 32, 0.85) 0%,
      rgba(14, 20, 32, 0.35) 50%,
      rgba(14, 20, 32, 0.15) 100%);
}

/* Floating Zoom/Preview Badge on Gallery Card */
.exp-card-zoom-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(14, 20, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.exp-card--static:hover .exp-card-zoom-badge {
  opacity: 1;
  transform: scale(1);
  border-color: var(--accent-gold);
  background: rgba(14, 20, 32, 0.95);
}

/* Controls — Bottom bar */
.expertise-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: max(80px, calc((100vw - var(--container-max-width)) / 2));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.control-arrows {
  display: flex;
  gap: 10px;
}

.ctrl-btn {
  background: var(--surface-color, #0A0F1A);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: none !important;
}

.ctrl-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: var(--surface-mid, #1A2540);
  box-shadow: none !important;
}

.control-number {
  font-size: 28px;
  font-weight: 900;
  color: rgba(216, 207, 195, 0.25);
  font-family: var(--font-sans);
  letter-spacing: -1px;
  line-height: 1;
  user-select: none;
}

/* ==========================================================================
   State toggles: Hub (default, no service selected) vs Detail (a service
   is active). JS toggles the `is-detail` class on the section root — see
   setExpertiseSectionMode() in main.js.
   ========================================================================== */

/* Detail state: reveal the arrow+number controls and the back button */
.expertise-slider-section.is-detail .expertise-controls {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.expertise-slider-section.is-detail .btn-exp-back {
  display: inline-flex;
}

/* Responsive */
@media (min-width: 1400px) {
  .exp-card {
    width: 195px;
    height: 380px;
  }
}

@media (max-width: 1200px) {
  .expertise-container {
    padding-left: 48px;
  }

  .expertise-active-info {
    flex: 0 0 34%;
    max-width: 34%;
    padding-right: 3%;
  }

  .expertise-cards-wrapper {
    flex: 0 0 66%;
    max-width: 66%;
  }

  .exp-card {
    width: 148px;
    height: 290px;
  }

  .expertise-controls {
    padding-right: 48px;
  }
}

/* ── Laptop Viewports (Height <= 880px) ─────────────────────────────────── */
@media (min-width: 992px) and (max-height: 880px) {
  .expertise-container {
    padding: 70px 0 28px max(48px, calc((100vw - var(--container-max-width)) / 2));
  }

  .expertise-section-title {
    top: 20px;
  }

  .expertise-main-content {
    padding-top: 15px;
    padding-bottom: 10px;
  }

  .active-category {
    margin-bottom: 10px;
    font-size: 10px;
  }

  .active-title {
    font-size: clamp(28px, 3.2vw, 46px);
    margin-bottom: 12px;
    letter-spacing: -1.5px;
  }

  .active-desc {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .exp-card {
    width: 140px;
    height: 265px;
  }

  .exp-card-content {
    padding: 12px 10px;
  }

  .exp-card-title {
    font-size: 13px;
  }

  .exp-card-detail {
    font-size: 10px;
    margin-top: 4px;
  }

  .ctrl-btn {
    width: 38px;
    height: 38px;
  }

  .control-number {
    font-size: 22px;
  }
}

/* ── Ultra-Compact Laptop Viewports (Height <= 720px) ──────────────────── */
@media (min-width: 992px) and (max-height: 720px) {
  .expertise-container {
    padding: 60px 0 20px max(40px, calc((100vw - var(--container-max-width)) / 2));
  }

  .active-title {
    font-size: clamp(24px, 2.8vw, 36px);
    margin-bottom: 8px;
  }

  .active-desc {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 14px;
  }

  .exp-card {
    width: 125px;
    height: 230px;
  }
}

@media (max-width: 991px) {
  .expertise-slider-section {
    height: auto;
    min-height: 100svh;
  }

  .expertise-container {
    position: relative;
    inset: auto;
    height: 100svh;
    padding: 80px 0 40px 24px;
  }

  .expertise-active-info {
    flex: none;
    max-width: 100%;
    padding-right: 24px;
    padding-bottom: 32px;
  }

  .active-title {
    letter-spacing: -1.5px;
  }

  .expertise-main-content {
    flex-direction: column;
    gap: 28px;
    align-items: stretch;
  }

  .expertise-cards-wrapper {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    margin-right: -24px;
    touch-action: pan-x;
  }

  .expertise-cards-wrapper::-webkit-scrollbar {
    display: none;
  }

  .expertise-cards-track {
    margin-right: 0;
    padding-right: 24px;
    align-items: stretch;
    height: 210px;
    gap: 12px;
  }

  .exp-card {
    width: 135px;
    height: 210px;
    align-self: auto;
    flex-shrink: 0;
    border-radius: var(--radius-sm, 6px);
    transition: transform 0.25s ease, border-color 0.25s ease;
  }

  .exp-card.active-card {
    border-color: var(--accent-gold);
    transform: scale(1.02);
  }

  .expertise-controls {
    padding-right: 24px;
    margin-top: 16px;
  }

  .ctrl-btn {
    width: 48px;
    height: 48px;
  }
}

.expertise-zoom-overlay {
  box-shadow: none !important;
  will-change: top, left, width, height, border-radius;
  border-radius: var(--radius-md, 8px) !important;
}

/* ==========================================================================
   Expertise Gallery Lightbox Modal
   ========================================================================== */
.exp-gallery-modal-box {
  max-width: 840px !important;
  width: 92% !important;
  padding: 0 !important;
  overflow: hidden;
  background: var(--surface-color, #0A0F1A) !important;
  border: 1px solid rgba(196, 147, 45, 0.35) !important;
  border-radius: var(--radius-sm, 6px) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
}

.exp-gallery-modal-img-wrap {
  width: 100%;
  height: 480px;
  max-height: 65vh;
  background: #05080E;
  position: relative;
  overflow: hidden;
}

.exp-gallery-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  user-select: none;
}

.exp-gallery-modal-footer {
  padding: 22px 28px;
  background: rgba(14, 20, 32, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.exp-gallery-modal-info {
  flex: 1;
  min-width: 240px;
}

.exp-gallery-modal-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 4px;
}

.exp-gallery-modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0 0 4px 0;
  letter-spacing: -0.4px;
}

.exp-gallery-modal-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim, #C9CDD6);
  margin: 0;
}

.exp-gallery-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Button 1: Close */
.btn-exp-modal-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-dim, #C9CDD6);
  padding: 10px 20px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-exp-modal-close:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.05);
}

/* Button 2: CTA */
.btn-exp-modal-cta {
  background: var(--accent-gold, #C4932D);
  border: 1px solid var(--accent-gold, #C4932D);
  color: #0E1420;
  padding: 10px 22px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(196, 147, 45, 0.25);
}

.btn-exp-modal-cta:hover {
  background: #d4a33d;
  border-color: #d4a33d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 147, 45, 0.4);
  color: #0E1420;
}

@media (max-width: 640px) {
  .exp-gallery-modal-img-wrap {
    height: 280px;
  }

  .exp-gallery-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px 20px;
  }

  .exp-gallery-modal-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .btn-exp-modal-close,
  .btn-exp-modal-cta {
    flex: 1;
    justify-content: center;
    text-align: center;
    padding: 11px 16px;
  }
}