/* ==============================================================================
   IVY CENTRAL - THE IVY HUB (Full-Width Expanding 9-Image Interactive Gallery)
   Specifications:
   - Full-width 100vw, no horizontal padding, gap: 6px
   - Default: Card 02 (Co-working Space) active (12fr : 1fr x 8)
   - Active: ~60% width (12fr), 8 remaining cards: ~40% width (1fr each)
   - Desktop height: clamp(480px, 65vh, 720px)
   - Transition: 650ms cubic-bezier(0.22, 1, 0.36, 1)
   - Vertical rotated label on shrunk strip (01..09, line, short text)
   - Bottom expanded editorial text with smooth bottom navy gradient
   - Mobile (<1024px): 88-90vw horizontal scroll-snap, Card 02 centered by default
   ============================================================================== */

/* Section Outer Ambiance */
#ivy-hub {
  background-color: #11254D !important;
  background-image: radial-gradient(
    ellipse at 50% 0%,
    rgba(8, 68, 181, 0.55) 0%,
    rgba(8, 68, 181, 0.20) 40%,
    rgba(8, 68, 181, 0) 75%
  ) !important;
  background-repeat: no-repeat !important;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Background Ambient Glow - Replaced by modern radial-gradient */
#ivy-hub::before {
  display: none;
}

/* ==================== FULL-WIDTH GALLERY CONTAINER ==================== */
.ivy-hub-gallery {
  position: relative;
  width: 100vw;
  max-width: 100%;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: clamp(480px, 65vh, 720px);
  display: flex;
  gap: 6px;
  padding: 0;
  background-color: #04102E;
  user-select: none;
  contain: layout style;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .ivy-hub-gallery {
    margin-left: 0;
    margin-right: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
}

/* ==================== INDIVIDUAL CARD ==================== */
.ivy-hub-card {
  position: relative;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  background-color: #04102E;
  outline: none;
  border: none;
  box-sizing: border-box;

  /* 650ms transition with cubic-bezier(0.22, 1, 0.36, 1) */
  flex: 1 1 0%;
  transition: flex 650ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: flex;
  transform: translateZ(0);
}

.ivy-hub-card:focus-visible {
  outline: 2px solid #C5A859;
  outline-offset: -2px;
  z-index: 30;
}

/* ==================== FLEX EXPANSION RATIOS (12fr : 1fr x 8) ==================== */
.ivy-hub-gallery[data-active="1"] .ivy-hub-card[data-index="1"],
.ivy-hub-gallery[data-active="2"] .ivy-hub-card[data-index="2"],
.ivy-hub-gallery[data-active="3"] .ivy-hub-card[data-index="3"],
.ivy-hub-gallery[data-active="4"] .ivy-hub-card[data-index="4"],
.ivy-hub-gallery[data-active="5"] .ivy-hub-card[data-index="5"],
.ivy-hub-gallery[data-active="6"] .ivy-hub-card[data-index="6"],
.ivy-hub-gallery[data-active="7"] .ivy-hub-card[data-index="7"],
.ivy-hub-gallery[data-active="8"] .ivy-hub-card[data-index="8"],
.ivy-hub-gallery[data-active="9"] .ivy-hub-card[data-index="9"] {
  flex: 12 1 0%;
}

/* Instant hover support with :has() on desktop */
@media (hover: hover) and (min-width: 1024px) {
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card[data-index="1"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card[data-index="2"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card[data-index="3"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card[data-index="4"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card[data-index="5"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card[data-index="6"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card[data-index="7"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card[data-index="8"] { flex: 12 1 0% !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card { flex: 1 1 0%; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card[data-index="9"] { flex: 12 1 0% !important; }
}

/* ==================== CARD IMAGES ==================== */
.ivy-hub-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: translateZ(0);
}

.ivy-hub-card[data-index="1"] .ivy-hub-img { object-position: center center; }
.ivy-hub-card[data-index="2"] .ivy-hub-img { object-position: center center; }
.ivy-hub-card[data-index="3"] .ivy-hub-img { object-position: 70% center; }
.ivy-hub-card[data-index="4"] .ivy-hub-img { object-position: center 30%; }
.ivy-hub-card[data-index="5"] .ivy-hub-img { object-position: center center; }
.ivy-hub-card[data-index="6"] .ivy-hub-img { object-position: center center; }
.ivy-hub-card[data-index="7"] .ivy-hub-img { object-position: center 35%; }
.ivy-hub-card[data-index="8"] .ivy-hub-img { object-position: center center; }
.ivy-hub-card[data-index="9"] .ivy-hub-img { object-position: center center; }

/* ==================== GRADIENT OVERLAYS ==================== */
/* Bottom dark gradient for expanded text legibility (top remains bright & airy) */
.ivy-hub-overlay-bottom {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(4, 16, 46, 0.95) 0%,
    rgba(4, 16, 46, 0.76) 32%,
    rgba(4, 16, 46, 0.22) 55%,
    rgba(4, 16, 46, 0) 100%
  );
  opacity: 0;
  transition: opacity 400ms ease;
  z-index: 10;
}

/* Shrunk strip gradient overlay to enhance vertical label readability */
.ivy-hub-overlay-strip {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(4, 16, 46, 0.85) 0%,
    rgba(4, 16, 46, 0.45) 40%,
    rgba(4, 16, 46, 0.80) 100%
  );
  opacity: 1;
  transition: opacity 400ms ease;
  z-index: 10;
}

/* ==================== SHRUNK VERTICAL LABELS ==================== */
.ivy-hub-shrunk-vertical {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  transition: opacity 220ms ease;
}

.ivy-hub-shrunk-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #C5A859;
  line-height: 1;
  letter-spacing: 0.05em;
  font-variant-numeric: lining-nums tabular-nums;
  text-shadow: 0 2px 8px rgba(4, 16, 46, 0.85);
}

.ivy-hub-shrunk-line {
  width: 1px;
  height: 32px;
  background: rgba(197, 168, 89, 0.55);
  margin: 12px auto 16px;
}

.ivy-hub-shrunk-text {
  writing-mode: vertical-rl;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(4, 16, 46, 0.9);
}

/* ==================== EXPANDED EDITORIAL TEXT ==================== */
.ivy-hub-expanded-body {
  position: absolute;
  bottom: clamp(28px, 3.5vw, 40px);
  left: clamp(32px, 3.8vw, 64px);
  right: clamp(28px, 3.5vw, 40px);
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.ivy-hub-expanded-tag {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #C5A859;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(4, 16, 46, 0.8);
}

.ivy-hub-expanded-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 700;
  color: #FFFDF9;
  line-height: 1.18;
  margin: 0;
  text-shadow: 0 2px 14px rgba(4, 16, 46, 0.7);
}

.ivy-hub-expanded-sub {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(14px, 1.05vw, 15.5px);
  font-weight: 500;
  color: #FFFFFF;
  line-height: 1.45;
  margin: 0;
  text-shadow: 0 2px 8px rgba(4, 16, 46, 0.6);
}

.ivy-hub-expanded-desc {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(14.5px, 1.02vw, 16px);
  font-weight: 400;
  line-height: 1.6;
  color: rgba(244, 247, 253, 0.94);
  margin: 2px 0 0;
  text-shadow: 0 2px 8px rgba(4, 16, 46, 0.75);
}

/* ==================== ACTIVE STATE VISIBILITY ==================== */
/* When a card is active via data-active (1..9) */
.ivy-hub-gallery[data-active="1"] .ivy-hub-card[data-index="1"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="2"] .ivy-hub-card[data-index="2"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="3"] .ivy-hub-card[data-index="3"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="4"] .ivy-hub-card[data-index="4"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="5"] .ivy-hub-card[data-index="5"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="6"] .ivy-hub-card[data-index="6"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="7"] .ivy-hub-card[data-index="7"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="8"] .ivy-hub-card[data-index="8"] .ivy-hub-overlay-bottom,
.ivy-hub-gallery[data-active="9"] .ivy-hub-card[data-index="9"] .ivy-hub-overlay-bottom {
  opacity: 1;
}

.ivy-hub-gallery[data-active="1"] .ivy-hub-card[data-index="1"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="2"] .ivy-hub-card[data-index="2"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="3"] .ivy-hub-card[data-index="3"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="4"] .ivy-hub-card[data-index="4"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="5"] .ivy-hub-card[data-index="5"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="6"] .ivy-hub-card[data-index="6"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="7"] .ivy-hub-card[data-index="7"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="8"] .ivy-hub-card[data-index="8"] .ivy-hub-overlay-strip,
.ivy-hub-gallery[data-active="9"] .ivy-hub-card[data-index="9"] .ivy-hub-overlay-strip {
  opacity: 0;
}

.ivy-hub-gallery[data-active="1"] .ivy-hub-card[data-index="1"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="2"] .ivy-hub-card[data-index="2"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="3"] .ivy-hub-card[data-index="3"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="4"] .ivy-hub-card[data-index="4"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="5"] .ivy-hub-card[data-index="5"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="6"] .ivy-hub-card[data-index="6"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="7"] .ivy-hub-card[data-index="7"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="8"] .ivy-hub-card[data-index="8"] .ivy-hub-shrunk-vertical,
.ivy-hub-gallery[data-active="9"] .ivy-hub-card[data-index="9"] .ivy-hub-shrunk-vertical {
  opacity: 0;
  transition-delay: 0ms;
}

.ivy-hub-gallery[data-active="1"] .ivy-hub-card[data-index="1"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="2"] .ivy-hub-card[data-index="2"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="3"] .ivy-hub-card[data-index="3"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="4"] .ivy-hub-card[data-index="4"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="5"] .ivy-hub-card[data-index="5"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="6"] .ivy-hub-card[data-index="6"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="7"] .ivy-hub-card[data-index="7"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="8"] .ivy-hub-card[data-index="8"] .ivy-hub-expanded-body,
.ivy-hub-gallery[data-active="9"] .ivy-hub-card[data-index="9"] .ivy-hub-expanded-body {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 350ms cubic-bezier(0.22, 1, 0.36, 1) 220ms, transform 350ms cubic-bezier(0.22, 1, 0.36, 1) 220ms;
}

/* Hover-based overrides with :has() on desktop */
@media (hover: hover) and (min-width: 1024px) {
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card[data-index="1"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card[data-index="1"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card[data-index="1"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="1"]:hover) .ivy-hub-card[data-index="1"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card[data-index="2"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card[data-index="2"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card[data-index="2"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="2"]:hover) .ivy-hub-card[data-index="2"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card[data-index="3"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card[data-index="3"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card[data-index="3"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="3"]:hover) .ivy-hub-card[data-index="3"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card[data-index="4"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card[data-index="4"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card[data-index="4"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="4"]:hover) .ivy-hub-card[data-index="4"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card[data-index="5"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card[data-index="5"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card[data-index="5"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="5"]:hover) .ivy-hub-card[data-index="5"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card[data-index="6"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card[data-index="6"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card[data-index="6"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="6"]:hover) .ivy-hub-card[data-index="6"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card[data-index="7"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card[data-index="7"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card[data-index="7"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="7"]:hover) .ivy-hub-card[data-index="7"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card[data-index="8"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card[data-index="8"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card[data-index="8"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="8"]:hover) .ivy-hub-card[data-index="8"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }

  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card[data-index="9"] .ivy-hub-overlay-bottom { opacity: 1 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card[data-index="9"] .ivy-hub-overlay-strip { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card[data-index="9"] .ivy-hub-shrunk-vertical { opacity: 0 !important; }
  .ivy-hub-gallery:has(.ivy-hub-card[data-index="9"]:hover) .ivy-hub-card[data-index="9"] .ivy-hub-expanded-body { opacity: 1 !important; transform: translateY(0) !important; pointer-events: auto !important; transition-delay: 220ms !important; }
}

/* ==================== MOBILE & TABLET LAYOUT (< 1024px) ==================== */
@media (max-width: 1023px) {
  .ivy-hub-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    height: clamp(440px, 60vh, 560px);
    gap: 12px;
    padding: 0 20px;
    margin-left: 0;
    margin-right: 0;
    left: 0;
    right: 0;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(197, 168, 89, 0.4) transparent;
  }

  .ivy-hub-gallery::-webkit-scrollbar {
    height: 4px;
  }
  .ivy-hub-gallery::-webkit-scrollbar-thumb {
    background: rgba(197, 168, 89, 0.4);
    border-radius: 4px;
  }

  .ivy-hub-card {
    flex: 0 0 88vw !important;
    max-width: 440px;
    height: 100%;
    scroll-snap-align: center;
    border-radius: 12px;
  }

  .ivy-hub-card .ivy-hub-shrunk-vertical {
    display: none !important;
  }

  .ivy-hub-card .ivy-hub-overlay-strip {
    display: none !important;
  }

  .ivy-hub-card .ivy-hub-overlay-bottom {
    opacity: 1 !important;
  }

  .ivy-hub-card .ivy-hub-expanded-body {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 100%;
  }

  .ivy-hub-card .ivy-hub-expanded-title {
    font-size: 26px;
    line-height: 1.2;
  }

  .ivy-hub-card .ivy-hub-expanded-sub {
    font-size: 13.5px;
  }

  .ivy-hub-card .ivy-hub-expanded-desc {
    font-size: 13.5px;
    line-height: 1.55;
  }
}

/* ==================== ACCESSIBILITY: REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  .ivy-hub-card,
  .ivy-hub-overlay-bottom,
  .ivy-hub-overlay-strip,
  .ivy-hub-shrunk-vertical,
  .ivy-hub-expanded-body {
    transition: none !important;
  }
}
