/* ==========================================
   ALL CATEGORIES PAGE — categories.css
   ========================================== */

/* ---- Lenis Smooth Scroll ---- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

/* ==========================================
   NAVBAR OVER HERO — transparent state
   ========================================== */
.navbar.nav-over-hero {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
}

.navbar.nav-over-hero .navbar-brand,
.navbar.nav-over-hero .nav-link,
.navbar.nav-over-hero .navbar-text {
  color: #fff !important;
}

.navbar.nav-over-hero .navbar-brand:hover,
.navbar.nav-over-hero .nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

.navbar.nav-over-hero .bi {
  color: #fff !important;
}

.navbar.nav-over-hero .dropdown-menu {
  background: #fff !important;
}

.navbar.nav-over-hero .dropdown-menu .dropdown-item,
.navbar.nav-over-hero .dropdown-menu .bi {
  color: #1a1a17 !important;
}

/* ==========================================
   HERO BANNER — image sits BEHIND the navbar
   ========================================== */
.categories-hero {
  position: relative;
  z-index: 0;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  /* NO negative margin — image naturally sits behind fixed navbar */
  padding-top: 80px;
}

.categories-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.categories-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.categories-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 23, 0.18) 0%,
    rgba(26, 26, 23, 0.35) 40%,
    rgba(26, 26, 23, 0.52) 70%,
    rgba(26, 26, 23, 0.70) 100%
  );
}

.categories-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 0 24px 60px;
  max-width: 700px;
  width: 100%;
}

.categories-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border: 1px dashed rgba(255, 255, 255, 0.30);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.70);
  margin-bottom: 22px;
}

.categories-hero-badge i {
  font-size: 13px;
  color: #f6cdbb;
}

.categories-hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -2.2px;
  line-height: 1.06;
  color: #fff;
  margin: 0 0 14px;
}

.categories-hero-title .italic {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-weight: 500;
}

.categories-hero-sub {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.65);
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Scroll indicator ---- */
.categories-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}

.categories-scroll-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.35), transparent);
  animation: catScrollPulse 2.5s ease-in-out infinite;
}

@keyframes catScrollPulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: 0.15; transform: scaleY(0.35); }
}

/* ==========================================
   CATEGORIES GRID
   ========================================== */
.categories-section {
  background: #f7f7f7;
  padding: 80px 0 100px;
}

.categories-section-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 30px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---- Category Card ---- */
.cat-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  display: block;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  opacity: 0;
  transform: translateY(30px);
}

.cat-card.cat-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat-card:nth-child(1)  { transition-delay: 0.00s; }
.cat-card:nth-child(2)  { transition-delay: 0.07s; }
.cat-card:nth-child(3)  { transition-delay: 0.14s; }
.cat-card:nth-child(4)  { transition-delay: 0.21s; }
.cat-card:nth-child(5)  { transition-delay: 0.06s; }
.cat-card:nth-child(6)  { transition-delay: 0.13s; }
.cat-card:nth-child(7)  { transition-delay: 0.20s; }
.cat-card:nth-child(8)  { transition-delay: 0.27s; }
.cat-card:nth-child(9)  { transition-delay: 0.12s; }
.cat-card:nth-child(10) { transition-delay: 0.19s; }
.cat-card:nth-child(11) { transition-delay: 0.26s; }
.cat-card:nth-child(12) { transition-delay: 0.33s; }

.cat-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.cat-card.cat-visible:hover {
  transform: translateY(-10px);
}

.cat-card-image {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.cat-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cat-card:hover .cat-card-image img {
  transform: scale(1.08);
}

.cat-card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 40%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
}

.cat-card-body {
  padding: 20px 22px 22px;
}

.cat-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  color: #1a1a17;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  line-height: 1.2;
}

.cat-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cat-card-count {
  font-size: 0.8rem;
  color: #888;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 5px;
}

.cat-card-count i {
  font-size: 13px;
  color: #bbb;
}

.cat-card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #1a1a17;
  transition: background 0.3s ease, transform 0.3s ease;
}

.cat-card:hover .cat-card-arrow {
  background: #1a1a17;
  color: #fff;
  transform: translateX(3px);
}

/* ==========================================
   BACK TO HOME BUTTON
   ========================================== */
.categories-back-wrap {
  text-align: center;
  margin-top: 56px;
}

.categories-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 7px 7px 28px;
  background: #1a1a17;
  color: #fff;
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.categories-back-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.categories-back-btn .back-arrow {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1a1a17;
  border-radius: 50%;
  font-size: 16px;
}

/* ==========================================
   RESPONSIVE — LARGE TABLET (max 1100px)
   ========================================== */
@media (max-width: 1100px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

  .cat-card-image {
    height: 230px;
  }
}

/* ==========================================
   RESPONSIVE — TABLET (max 820px)
   ========================================== */
@media (max-width: 820px) {
  .categories-hero {
    min-height: 440px;
    padding-top: 72px;
  }

  .categories-hero-content {
    padding-bottom: 50px;
  }

  .categories-section {
    padding: 60px 0 80px;
  }

  .categories-section-inner {
    padding: 0 20px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .cat-card-image {
    height: 210px;
  }

  .cat-card-body {
    padding: 16px 18px 18px;
  }

  .cat-card-name {
    font-size: 1.1rem;
  }
}

/* ==========================================
   RESPONSIVE — PHONE (max 575px)
   ========================================== */
@media (max-width: 575px) {
  .categories-hero {
    min-height: 380px;
    padding-top: 64px;
  }

  .categories-hero-content {
    padding: 0 18px 42px;
  }

  .categories-hero-badge {
    font-size: 11px;
    padding: 5px 11px 5px 9px;
    gap: 7px;
    margin-bottom: 16px;
  }

  .categories-hero-badge i {
    font-size: 11px;
  }

  .categories-hero-title {
    letter-spacing: -1.5px;
  }

  .categories-hero-sub {
    font-size: 0.9rem;
  }

  .categories-scroll-hint {
    bottom: 16px;
  }

  .categories-section {
    padding: 48px 0 70px;
  }

  .categories-section-inner {
    padding: 0 16px;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .cat-card {
    border-radius: 18px;
  }

  .cat-card-image {
    height: 180px;
  }

  .cat-card-body {
    padding: 14px 14px 16px;
  }

  .cat-card-name {
    font-size: 0.95rem;
    letter-spacing: -0.3px;
  }

  .cat-card-count {
    font-size: 0.72rem;
  }

  .cat-card-arrow {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .categories-back-wrap {
    margin-top: 44px;
  }

  .categories-back-btn {
    font-size: 13px;
    padding: 6px 6px 6px 22px;
    gap: 10px;
  }

  .categories-back-btn .back-arrow {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}

/* ==========================================
   RESPONSIVE — SMALL PHONE (max 400px)
   ========================================== */
@media (max-width: 400px) {
  .categories-hero {
    min-height: 340px;
    padding-top: 58px;
  }

  .categories-hero-content {
    padding: 0 14px 36px;
  }

  .categories-hero-title {
    font-size: clamp(2rem, 9vw, 2.6rem);
    letter-spacing: -1.2px;
  }

  .categories-hero-sub {
    font-size: 0.85rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cat-card-image {
    height: 220px;
  }

  .cat-card-name {
    font-size: 1.05rem;
  }
}

/* ==========================================
   RESPONSIVE — VERY SMALL (max 340px)
   ========================================== */
@media (max-width: 340px) {
  .categories-hero {
    min-height: 300px;
    padding-top: 54px;
  }

  .categories-hero-title {
    font-size: 1.85rem;
  }

  .cat-card-image {
    height: 200px;
  }

  .cat-card-body {
    padding: 12px 12px 14px;
  }
}

/* ==========================================
   LANDSCAPE PHONE FIX
   ========================================== */
@media (max-height: 500px) and (orientation: landscape) {
  .categories-hero {
    min-height: 260px;
    padding-top: 60px;
  }

  .categories-hero-badge {
    display: none;
  }

  .categories-scroll-hint {
    display: none;
  }

  .cat-card-image {
    height: 160px;
  }
}