/* ------------------------------
   1. Global Reset & Base Styles
--------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Times New Roman', Times, serif;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  color: white;
  background-image: url("images/background-cassava.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow-x: hidden; /* prevent horizontal scroll */
}

main {
  flex: 1;
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

/* =========================================
   HEADER NAVIGATION - RESPONSIVE
========================================= */
header {
  background-color: #800000;
  padding: 1em 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

/* Logo */
.logo img {
  max-width: 180px;
  height: auto;
}

/* Navigation Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 12px;
  font-size: 23px;
  font-weight: 900;
}

.nav-links a {
  padding: 8px 14px;
  color: white;
  font-weight: 900;
  border-radius: 5px;
  transition: 0.3s;
  text-decoration: none;
}

.nav-links a:hover {
  background-color: white;
  color: #800000;
}

/* Hamburger Menu Icon */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 200;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
}

/* ------------------------------
   3. Main Section - Products
--------------------------------*/
main h1 {
  font-weight: 900;
  margin-top: 50px;
  margin-bottom: 40px;
  padding: 20px;
  border-radius: 25px;
  background-color: rgba(128, 0, 0, 0.7);
  text-align: center;
  color: white;
  text-shadow: 2px 2px 6px black;
  font-size: 60px;
  letter-spacing: 2px;

  opacity: 0;
  transform: translateY(-50px);
  animation: slideIn 1.5s ease-out forwards;
  backdrop-filter: blur(4px);
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background-color: rgba(236, 204, 204, 0.7);
  border-right: 10px solid #800000;
  border-left: 10px solid #800000;
  border-radius: 40px;
  padding: 20px;
  margin-top: 60px;
  box-shadow: 0 2px 8px rgba(128, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.product-container:hover {
  transform: scale(1.03);
}

.product-text {
  flex: 1 1 55%;
  padding-right: 20px;
  font-size: 1.1rem;
  color: #4d0000;
  text-align: left;
}

.product-text h2 {
  text-shadow: 2px 2px 4px black;
  font-size: 2rem;
  margin-bottom: 12px;
  color: #800000;
}

.product-text p {
  margin-bottom: 8px;
}

.product-text ul {
  margin-top: 5px;
  padding-left: 20px;
}

.product-image {
  flex: 1 1 40%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
}

/* ------------------------------
   4. Footer Section
--------------------------------*/
.footer {
  width: 100%;
  background-color: #530909;
  color: white;
  padding: 40px 0 20px;
  line-height: 1.6;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
}

.footer-logo-container {
  flex-shrink: 0;
  min-width: 180px;
  text-align: center;
}

.footer-logo {
  padding-top: 20px;
  max-height: 90px;
  width: auto;
  object-fit: contain;
}

.footer-sections {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-section h3,
.footer-section h4 {
  color: white;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-size: 0.875rem;
  font-weight: 700;
}

.footer-section p {
  margin: 0 0 8px 0;
  color: #f0f0f0;
  font-size: 0.875rem;
}

.contact-info a {
  color: #f0f0f0;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
  color: white;
}

.footer-follow .social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-follow .social-icons a img {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background-color: rgb(240, 38, 38);
  padding: 5px;
  transition: background-color 0.3s;
}

.footer-follow .social-icons a img:hover {
  background-color: black;
}

.footer-bottom {
  border-top: 2px solid #dcdcdc;
  margin-top: 30px;
  padding: 20px;
  font-size: 0.75rem;
  color: #bfbfbf;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom a {
  color: #f0f0f0;
  text-decoration: none;
  margin-left: 20px;
}

.footer-bottom a:hover {
  color: white;
}

/* ------------------------------
   5. Responsive Design
--------------------------------*/
/* Tablets */
@media (max-width: 1024px) {
  .product-container {
    flex-direction: column;
    padding: 15px;
  }

  .product-text {
    flex: 1 1 100%;
    padding-right: 0;
    margin-bottom: 15px;
  }

  .product-image {
    flex: 1 1 100%;
    justify-content: center;
    margin-bottom: 15px;
  }

  main h1 {
    font-size: 45px;
    padding: 15px;
  }
}

/* Mobile Phones */
@media (max-width: 768px) {
  nav {
    max-width: 100%;
    padding: 0;
    flex-direction: row;
  }

  /* Hamburger stays top-right */
  .nav-toggle {
    display: flex;
    position: absolute;
    right: 20px;
    top: 20px;
  }

  /* Full-screen dropdown menu */
  .nav-links {
    flex-direction: column;
    align-items: center;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background: #800000;
    z-index: 150;
    padding-top: 60px; /* space for hamburger */
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    font-size: 20px;
  }

  .product-image img {
    width: 100%;
    max-width: 320px;
  }
}

/* Footer responsive adjustments */
@media (max-width: 900px) {
  .footer-sections {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-sections {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-follow .social-icons {
    justify-content: center;
    align-items: center;
    gap: 10px;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  main h1 {
    font-size: 35px;
    padding: 10px;
  }

  .product-text h2 {
    font-size: 1.5rem;
  }

  .product-text {
    font-size: 1rem;
  }

  main {
    padding: 0 10px;
  }
}
