.divpad {
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.divpad img {
  width: 150px;
}

.header-typeA {
  color: #ff8a80;
}

.A {
  background-color: #fff8e1;
  margin-top: 20px;
}

.B {
  border-color: #ff8a80;
  background-color: #e3f2fd;
  margin-top: 20px;
}

.C {
  margin-top: 20px;
  background-color: #f1f8e9;
  padding: 20px;
}

.D {
  background-color: #fce4ec;
}

.cardbackground {
  background-color: #ffffff;
  border-color: #ffd54f;
  border-width: 3px;
}

.card_title_text {
  text-align: center;
  margin-bottom: 10px;
  min-height: 100px;
}

.card_link {
  text-align: center;
}

.card-body {
  display: flex;
  flex-direction: column;
  color: #333333;
}

.card-body .card-title,
.card-body .card-text {
  flex-grow: 1;
}

.card-link {
  margin-top: auto;
}

.card-btn {
  background-color: #ffb74d;
  color: #ffffff;
}

.card-btn:hover {
  background-color: #ffa726;
  color: #3e2723;
}

.hidden {
  visibility: hidden;
}

.A,
.B,
.C,
.D,
.col-md-3.d-flex {
  margin-top: 30px;
  border: 3px solid #ffd54f;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* --- Section C card style --- */
.sectionC-card {
  background-color: #fff8e1; /* light warm yellow */
  border: 3px solid #ffd54f; /* same as .cardbackground border */
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.sectionC-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* --- Section C text color adjustments --- */
.sectionC-card h3 {
  color: #3e2723; /* deep brown like header text */
}

.sectionC-card p {
  color: #5d4037; /* slightly lighter brown for body text */
}

.sectionC-card a {
  color: #6d4c41; /* softer brown */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sectionC-card a:hover {
  color: #8d6e63; /* warmer brown on hover */
  text-decoration: underline;
}

.sectionC-card img {
  transition: transform 0.4s ease;
  border-radius: 8px;
}

.sectionC-card:hover img {
  transform: scale(1.05);
}

.col-md-3 {
  background-color: #fff8e1;
  border: 3px solid #ffd54f;
  border-radius: 10px;
  padding: 15px;
}

.col-md-3.d-flex .divpad img {
  transition: transform 0.4s ease;
  border-radius: 8px;
}

.col-md-3.d-flex .divpad:hover img {
  transform: scale(1.05);
}

.major-category-slider-wrapper {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.major-category-slider {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;

  gap: 1rem;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  /* Desktop: 3 cards
  3 cards x 10rem + 2 gaps x 1rem = 32rem*/
  flex: 0 0 32rem;
  width: 32rem;
  max-width: 32rem;

  padding: 10px 0;
}

/* Large desktop: 5 cards */
.major-category-card {
  flex: 0 0 10rem;
  width: 10rem;
  min-width: 10rem;
  max-width: 10rem;

  padding: 5px;
  cursor: pointer;
  color: inherit;

  scroll-snap-align: start;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.major-category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.major-category-img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.major-category-card .card-body {
  padding: 0.5rem;
}

.major-category-card .card-title {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.slider-arrow {
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;

  width: 40px;
  flex: 0 0 40px;

  padding: 5px;
}

.slider-arrow:hover {
  transform: scale(1.15);
}

/* =========================================
   RESPONSIVE SLIDER
   ========================================= */

/*
  Large screen

  col-md-6 has enough room for:

  ‹ [1] [2] [3] ›
*/
@media (min-width: 1200px) {
  .major-category-slider {
    flex-basis: 32rem;
    width: 32rem;
    max-width: 32rem;
  }
}

/*
  Medium desktop / laptop

  2 cards × 10rem
  + 1 gap
  = 21rem

  ‹ [1] [2] ›
*/
@media (min-width: 768px) and (max-width: 1199.98px) {
  .major-category-slider {
    flex-basis: 21rem;
    width: 21rem;
    max-width: 21rem;
  }
}

/*
  Below Bootstrap md:

  col-md-6 becomes full-width, but keeping
  two cards gives a cleaner layout.

  ‹ [1] [2] ›
*/
@media (min-width: 576px) and (max-width: 767.98px) {
  .major-category-slider {
    flex-basis: 21rem;
    width: 21rem;
    max-width: 21rem;
  }
}

/*
  Mobile

  One fixed-width card.

  ‹ [1] ›
*/
@media (max-width: 575.98px) {
  .major-category-slider {
    flex-basis: 10rem;
    width: 10rem;
    max-width: 10rem;
  }

  .slider-arrow {
    width: 30px;
    flex: 0 0 30px;

    font-size: 1.5rem;

    padding: 2px;
  }
}
