/**
 * Home - Categories Section
 */

/* Section wrapper */
.home-categories {
  padding: 50px 0 80px;
  background-color: #ffffff;
}

.home-categories__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / Title part */
.home-categories__header {
  text-align: center;
  margin-bottom: 50px;
}

/* Kicker (EXPLORE) with lines */
.home-categories__kicker {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #f5a623;
}

.home-categories__kicker-line {
  display: inline-block;
  width: 45px;
  height: 2px;
  background-color: #f5a623;
}

.home-categories__kicker-text {
  white-space: nowrap;
}

/* Main title */
.home-categories__title {
  font-size: 40px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 12px;
  color: #152238;
}

/* Subtitle / description */
.home-categories__subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #7b8190;
}

/* Grid layout */
.home-categories__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 48px;
}

/* Card link wrapper */
.home-categories__item {
  text-decoration: none;
  display: block;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

/* Single card */
.home-categories__card {
  background-color: #f5f5f7;
  border-radius: 5px;
  padding: 28px 16px 22px;
  text-align: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
}

.home-categories__card:hover {
  border-color: #f5a623;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  transform: translateY(-3px);
  background-color: #ffffff;
}

/* Icon area */
.home-categories__icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  min-height: 90px;
  width: 100%;
}

.home-categories__icon {
  width: 100px;
  height: 90px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

/* Placeholder jokhon kono image nai */
.home-categories__icon--placeholder {
  width: 70px;
  height: 70px;
  border-radius: 5px;
  background-color: #d5d8e3;
}

/* Category name */
.home-categories__name {
  font-size: 14px;
  font-weight: 600;
  color: #152238;
  text-align: center;
  line-height: 1.35;
  min-height: 38px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  display: block;
}

/* View All button */
.home-categories__button-wrapper {
  text-align: center;
}

.home-categories__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  border-radius: 999px;
  background-color: #000000;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-categories__button:hover {
  background-color: #151515;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(-1px);
}

.home-categories__button-label {
  white-space: nowrap;
}

.home-categories__button-icon {
  font-size: 14px;
  transform: translateY(1px);
}

/* -------------------------
   RESPONSIVE
   ------------------------- */

/* Medium screen: 4 column */
@media (max-width: 1024px) {
  .home-categories__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .home-categories__card {
    padding: 24px 14px 20px;
  }

  .home-categories__icon-wrapper {
    min-height: 84px;
  }

  .home-categories__icon {
    width: 72px;
    height: 72px;
  }
}

/* Tablet: 3 column */
@media (max-width: 900px) {
  .home-categories__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .home-categories__icon-wrapper {
    min-height: 80px;
  }

  .home-categories__icon {
    width: 68px;
    height: 68px;
  }
}

/* Mobile: exactly 4 cards per row */
@media (max-width: 767px) {
  .home-categories {
    padding: 60px 0 60px;
  }

  .home-categories__title {
    font-size: 30px;
  }

  .home-categories__subtitle {
    font-size: 14px;
  }

  .home-categories__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin-bottom: 36px;
  }

  .home-categories__card {
    padding: 10px 3px 9px;
  }

  .home-categories__icon-wrapper {
    margin-bottom: 6px;
    min-height: 40px;
  }

  .home-categories__icon {
    width: 28px;
    height: 28px;
  }

  .home-categories .home-categories__grid .home-categories__item .home-categories__card .home-categories__name {
    font-size: 9px !important;
    line-height: 1.15 !important;
    min-height: 22px !important;
    max-height: none !important;
    padding: 0 1px !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
    display: -webkit-box !important;
    display: box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }

  .home-categories__button {
    padding: 14px 28px;
    font-size: 11px;
    letter-spacing: 0.16em;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .home-categories__inner {
    padding: 0 16px;
  }

  .home-categories__grid {
    gap: 4px;
  }

  .home-categories__card {
    padding: 9px 2px 8px;
  }

  .home-categories__icon-wrapper {
    margin-bottom: 5px;
    min-height: 36px;
  }

  .home-categories__icon {
    width: 24px;
    height: 24px;
  }

  .home-categories .home-categories__grid .home-categories__item .home-categories__card .home-categories__name {
    font-size: 9px !important;
    line-height: 1.1 !important;
    min-height: 20px !important;
    max-height: none !important;
    padding: 0 1px !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto !important;
    display: -webkit-box !important;
    display: box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
}