/* Basic Styling for Homepage */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: red; /* Debugging color */
    background-image: url('images/outside-small.jpg'); /* Default background image */
    background-size: cover;
    background-position: center center;
    background-attachment: scroll; /* Avoid fixed for better performance on mobile */
    position: relative; /* Required for the pseudo-element */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
    z-index: -1; /* Ensure the overlay is behind the content */
}

h1, h2 {
    color: hwb(0 16% 22%);
}

/* Homepage Section */
.homepage {
    text-align: center;
    padding: 40px 20px;
}

.homepage h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff; /* White text for better contrast */
}

.homepage p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #fff; /* White text for better contrast */
}

.homepage-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.homepage-link {
    text-decoration: none;
    width: 280px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    transition: all 0.3s ease;
}

.homepage-link:hover {
    transform: translateY(-5px); /* Slightly lifts the link on hover */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Enhances the shadow effect */
}

.link-box {
    text-align: center;
}

.link-box h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.link-box p {
    font-size: 1rem;
}

/* Products Page Styling */
.products {
    padding: 40px 20px;
}

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.product-item {
    width: 250px;
    text-align: center;
    background-color: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid #c62828; /* Red border */
}

.product-item:hover {
    transform: translateY(-5px); /* Slightly lifts the item on hover */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Enhances the shadow effect */
}

.product-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}

.product-item h2 {
    font-size: 1.5rem;
    margin-top: 15px;
}

.product-item p {
    font-size: 1rem;
    margin-top: 10px;
}

/* Back Link Styling */
.back-link {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 24px;
    background-color: #c62828;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Smooth transition for hover effects */
}

.back-link:hover {
    background-color: #b71c1c; /* Darker red on hover */
    transform: translateY(-3px); /* Slightly lifts the link on hover */
}

/* Section Styling */
.menu {
  padding: 20px;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  color: #c62828;
}

h3 {
  color: red; /* Adjusted category titles to be red */
  text-decoration-line: underline;
  font-size: 2.2rem;
}

/* Centered Flexbox for Flavors */
.menu-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Flavor Button Styling */
.flavor-name {
  background-color: #ffffff;
  color: #4a90e2;
  font-size: 1.2rem;
  border: 2px solid #4a90e2;
  border-radius: 16px;
  padding: 12px;
  flex: 1 1 calc(33.333% - 16px);
  max-width: calc(33.333% - 16px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
  text-align: center;
}

.flavor-name:hover {
  background-color: #4a90e2;
  color: #ffffff;
}

/* Responsive Image Styling */
img {
  max-width: 100%;
  height: auto;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
}

.modal-content .close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Nutrition Button */
.nutrition-button {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background-color: #4a90e2;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.nutrition-button:hover {
  background-color: #357abd;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .flavor-name {
      flex: 1 1 calc(50% - 16px);
      max-width: calc(50% - 16px);
  }
}

@media (max-width: 600px) {
  .flavor-name {
      flex: 1 1 100%;
      max-width: 100%;
  }
}

/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    body {
        background-image: url('images/outside-small.jpg'); /* Smaller image for mobile devices */
        background-size: cover;
        background-position: center center;
    }
}