/* card */
.card-box {
  background-color: #1a1a1a;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  min-height: 250px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  animation: fadeUp 0.6s ease;
}

h2 {
  color: var(--yellow);
}

.card-box:hover {
  transform: translateY(-5px);
}

.card-box-area {
  min-height: 250px;
}

/* img */
.card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #111;
}

.card-img img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.card-box:hover img {
  transform: scale(1.12);
}

/* card info */
.card-info {
  padding: 18px 16px 22px;
  text-align: start;
  position: relative;
}

.card-info h6 {
  color: var(--yellow);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 10px;
  width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-info p {
  font-size: 0.85rem;
  color: var(--light-gray);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 1.35rem;
  color: var(--light-gray);
  transition: var(--transition);
  z-index: 1000;
}

/* hover effect (very soft) */
.fav-icon:hover {
  transform: scale(1.15);
  color: var(--red);
}

/* active (liked) */
.fav-icon.active {
  color: var(--red);
}

#cardsSection {
  padding-top: 80px;
  padding-bottom: 60px;
}

#mealsResult,
#dataResult {
  margin-top: 30px;
  row-gap: 30px;
}

/* rounded cards */
.card-box {
  border-radius: 20px;
}

/* ingredient style */
.card-box.ingredient .card-img img {
  object-fit: contain;
  padding: 20px;
}

/* smaller image for ingredient */
.card-box.ingredient .card-img {
  height: 180px;
}

/* meals image bigger */
.card-box.meal .card-img {
  height: 220px;
}

.nav-link-custom {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  transition: 0.3s;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: #ffc107;
}

.search-wrapper {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 5px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-wrapper input {
  background: transparent;
  border: none;
  color: white;
  padding: 5px 10px;
  outline: none;
  width: 150px;

  font-size: 14px;
}

.search-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-icon {
  color: #ffc107;
}

.menu-toggle {
  font-size: 22px;
  color: white;
  cursor: pointer;
}

.card-img {
  position: relative;
}

.card-img .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 10px;
  /* border-radius: 20px; */
}

.card-img:hover .overlay {
  opacity: 1;
}

/* + icon */
.card-img .plus-icon {
  font-size: 1rem;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffc107;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 10px 10px;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.card-img .plus-icon:hover {
  transform: scale(1.2);
}

.delete-icon {
  color: #fff;
}

@media (max-width: 991px) {
  .nav-actions {
    display: flex !important;
    flex-direction: row !important;

    align-items: center !important;
    gap: 5px !important;

    flex-wrap: nowrap !important;
  }

  .search-wrapper {
    max-width: 80px !important;

    padding: 2px 8px !important;
    margin: 0 !important;
  }

  .search-wrapper input {
    width: 50px !important;

    font-size: 10px !important;
  }

  #userProfile {
    display: flex !important;

    align-items: center !important;
    gap: 5px !important;
  }

  .favourite a {
    font-size: 16px !important;
  }

  #userNameDisplay {
    font-size: 11px !important;

    max-width: 50px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #logoutBtn {
    padding: 2px 6px !important;

    font-size: 9px !important;
  }

  #toggleBtn {
    font-size: 20px !important;
    margin: 0 !important;
  }

  .nav-logo img {
    width: 30px !important;
  }

  .brand-logo {
    font-size: 16px !important;
  }
}
