/*  
    Author: Genesis Lee
    Assignment: Website
    Last Revised: 11-30-2025
    Description: Stylesheet for the Home page of Tea Thyme and Dainties website.
*/
/* this * selector is universal and applies to all elements */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* ensures padding and border are included in element's total width and height */
}

body {
  font-family: "Georgia", serif;
  background-color: #f8f5ed; /* cream background */
  color: #333; /* dark text for readability */
}

/* Navigation bar  */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #5c614c;
  color: #fff;
  padding: 1rem 2rem;
  position: sticky; /* makes nav bar stay at the top while scrolling */
  top: 0;
  flex-wrap: wrap; /* allows wrapping on smaller screens */
}

.website-title {
  font-family: "Brush Script MT", cursive;
  font-size: 2rem;
  text-align: center;
  position: relative;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
/*default nav link styles*/
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}
/* nav link becomes lavender on hover */
.nav-links a:hover {
  color: #d6d6ff;
}

/* Hamburger Icon (hidden until mobile view) */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
}

/*  Image slider section  */
.slider {
  position: relative;
  max-width: 100%;
  height: 500px;
  overflow: hidden; /* hides overflow content */
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
  position: absolute; /* positions slides on top of each other */
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*caption overlay box */
.caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(92, 97, 76, 0.8);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-align: center;
  max-width: 90%;
}
/*manages caption title size and spacing*/
.caption h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
/*slide image fade in animation*/
.fade {
  animation: fadeEffect 1s ease-in-out;
}

@keyframes fadeEffect {
  from { opacity: 0.9; }
  to { opacity: 1; }
}

/*  HOME CONTENT  */
.home-content {
  padding: 3rem 2rem;
  text-align: center;
}

.welcome h2 {
  color: #5c614c;
  margin-bottom: 1rem;
  font-size: 2rem;
}

.welcome p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}
/* grid of the feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
/* individual feature card styles */
.feature {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  transition: transform 0.3s ease;
}

.feature:hover { transform: scale(1.03); } /* slight zoom and life on hover */

/*sizing for the picture in each feature card*/
.feature img {
  width: 100%;
  border-radius: 10px;
  height: 180px;
  object-fit: cover;
}
/* heading styles in each feature card */
.feature h3 {
  color: #5c614c;
  margin-top: 1rem;
}

/* paragraph spacing in each feature card */
.feature p {
  margin: 1rem 0;
  flex-grow: 1;
}

/* styled link button for each feature card to internal pages on website */
.feature-link {
  display: inline-block;
  color: #5c614c;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid #5c614c;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  transition: all 0.3s ease;
}
/*changes link color on hover*/
.feature-link:hover {
  background-color: #5c614c;
  color: #fff;
}

/*  footer styling  */
footer {
  background-color: #5c614c;
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

footer a {
  color: #d6d6ff;
  text-decoration: none;
}
/* underline footer link on hover */
footer a:hover {
  text-decoration: underline;
}

/*  RESPONSIVE  */

/* Tablets and below (Hamburger menu active) */
@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
    color: #fff;
  }
/* Adjust nav links for smaller screens */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #4c5041;
    border-radius: 5px;
    margin-top: 0.5rem;
    padding: 0;
    transition: max-height 0.3s ease;
  }
/* shows nav links when hamburger menu is clicked */
  .nav-links.active {
    display: flex;
    padding: 0.8rem 1rem;
    gap: 0.5rem;
  }
/* centers nav links text */
  .nav-links li {
    text-align: center;
  }
/* centers website title */
  .website-title {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }
}

/* Phones */
@media (max-width: 768px) {
  .navbar {
    position: relative;
    width: 100%;
    padding-right: 2.5rem;

}
  
/* Hamburger menu styles for phones */
  .menu-toggle {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
    z-index: 999;
  }
/* centers website title */
  .website-title {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
  }

  /* Prevents overlap with hamburger menu */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #4c5041;
    margin-top: 3.5rem;
    padding: 1rem 0;
    border-radius: 5px;;
  }
  /* shows nav links when hamburger menu is clicked */
  .nav-links.active {
    align-items: center;
  }
}
