* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
body{
  background: #f3edee;
}
  
/* ----- header ------- */
.header {
  position: relative;
  text-align: center;
  padding: 2rem;
  color:#0e275c;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
  
/* ----- header text------- */
.header h1 {
  font-size: 3rem;
  font-weight: 400;
}

/* ----- header back button------- */
.back-section {
  position: absolute;
  top: 35%;
  left: 5%;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #0e275c;
  font-size: 1.8rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.back-section:hover {
  color: #1d5b77;
  transform: scale(1.1);
}

.back-section img {
  width: 20%;
  /* height: 20%; */
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.back-section p {
  font-size: 1.5rem;
  font-weight: 200;
  margin: 0;
}

  
/* ----- categories ------- */
#categories {
  height: auto;
  max-width: 80%;
  margin: 0 auto;
  padding: 5%;
}

#categories .container h1 {
  color: #0e275c;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: left;
  margin-bottom: 2rem;

}

.categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2%;
}

.categories-list a {
  position: relative;
  display: block;
  width: 100%;
  height: 50vh;
  text-decoration: none;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  overflow: hidden;
  transition: transform 0.3s ease-in-out;
}

.categories-list a:hover {
  transform: translateY(-5px);
}

.category-item {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 5%;
  border-radius: 5px 5px 0 0;
  background-size: cover;
  background-position: center;
}

.category-item::before {
  content: none !important;
}

.categories-text {
  position: absolute;  
  left: 0;
  right: 0;
  bottom: 0;
  height: 70px;
  margin: 0;
  padding: 1rem;
  background-color: #fff;
  color: #0e275c;
  border-radius: 0 0 5px 5px;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: center;
  z-index: 2;
}


.categories-text h2 {
  margin: 0;
}

  

/* ============================== Mobile ============================== */
@media (max-width: 768px) {

  .header h1 {
    font-size: 1.5rem;
  }

  .back-section img {
    width: 18%;
    margin-right: 1px;
    transition: transform 0.2s ease;
  }
  
  .back-section p {
    font-weight: 200;
    font-size: 1rem;
  }
  
  #categories {
    padding: 5% 5%;
  }
  
  .categories-list {
    grid-template-columns: 1fr;
    gap: 3%;
  }
  
  .categories-list a {
    height: 35vh;
  }
  
  /* Adjust the text overlay styling */
  .categories-text {
    height: 20%;
    font-size: 1rem;
    font-weight: lighter;
    padding: 1rem;
  }
}
