* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  /*  */
  
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/*LOGO BOI*/
.logo {
  font-size: 1rem;
  font-weight: bold;
  margin-right: 15px;
}

.logo h1 {
  font-size: 1.5rem;
}

.logo a {
  text-decoration: none;
  color: #fff;
}

.navbar-container {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
}

.navbar-container img {
  max-width: 40px;
  margin-right: 10px;
}

/*nav bar mobile friendly*/
/* Navbar Styles */
.navbar {
  background-color: #333;
  color: #fff;
  padding: 10px 20px;
}

.navbar .navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}

.navbar .logo {
  font-size: 1.5em;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  margin-left: 12px;
}

.navbar .menu-toggle {
  display: none;
  font-size: 1.5em;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  margin-right: 2px;
  /*  */
  z-index: 11;
  position: relative;
}

.navbar .nav-links a {
  text-decoration: none;
  color: #fff;
  padding: 5px 10px;
  transition: background-color 0.3s;
}

.navbar .nav-links a:hover {
  background-color: #575757;
  border-radius: 5px;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .navbar .menu-toggle {
    display: block;
  }

  .navbar .nav-links {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    padding: 10px 0;
  }

  .navbar .nav-links.active {
    display: flex;
  }

 
}

/**/
/* CAlCulator */

.cal {
  justify-content: center;
  align-items: center;
  z-index: 10;
  position: relative; 
  /*  */
  background-color: #eaf8e6;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  opacity: 0;
  animation: fadeIn 1s forwards;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Container หลัก */
.container {
  margin-top: 40px;
  margin-bottom: 40px;
  text-align: center;
  width: 90%;
  max-width: 900px;
}

.container a {
    text-decoration: none;
}

/* Title */
.title {
  font-size: 3rem;
  color: #3c8c5a;
  margin-bottom: 40px;
}

.title img {
  max-width: 50px;
  margin-right: 10px;
}

/* Grid Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  justify-content: center;
}

/* Category Card */
.category-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.category-card:hover {
  transform: scale(1.05);
}

.category-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.category-card h3 {
  padding: 10px;
  margin: 0;
  font-size: 18px;
  background: #3c8c5a;
  color: white;
}

/* Responsive */
@media (max-width: 600px) {
  .category-card img {
      height: 120px;
  }

  .category-card h3 {
      font-size: 16px;
  }
}


/*  */

@media (max-width: 768px) {
  header h1 {
      font-size: 1.8rem;
  }

  .controls input,
  .controls select {
      width: 150px;
  }

  #blog-container {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}


/**/


footer {
  /* position: fixed;
  width: 100%; */
  text-align: center;
  padding: 1rem;
  background-color: #333;
  color: white;
  position: relative;
  /*  */
  z-index: 5;
}

/*footer link*/
footer a {
  color: #fff;
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 480px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #333;
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
  }

  .nav-links li {
    text-align: center;
    padding: 1rem 0;
  }

  .nav-links.show {
    display: flex;
  }

  .product {
    width: 100%;
    max-width: 300px;
  }

  .logo a {
      font-size: 16px;
  }

}

@media (max-width: 380px) {
  .menu-toggle {
      display: block;
    }
  
    .nav-links {
      display: none;
      flex-direction: column;
      background-color: #333;
      position: absolute;
      top: 100%;
      right: 0;
      width: 200px;
    }
  
    .nav-links li {
      text-align: center;
      padding: 1rem 0;
    }
  
    .nav-links.show {
      display: flex;
    }
  
    .product {
      width: 100%;
      max-width: 200px;
    }

    .logo a {
        font-size: 14px;
    }
  

}



/* Responsive Design */
@media (max-width: 768px) {
  .container {
      flex-direction: column;
  }

  .blog-post {
      flex: 1 1 100%;
  }

  .ad-space {
      flex: 1 1 100%;
  }

  .sidebar {
      flex: 0 0 100%;
      margin: 10px auto;
      max-width: 400px;
  }

  .profile img {
      max-width: 100px;
  }

  .icon-link .link {
      width: 30px;
      height: 30px;
      line-height: 30px;
  }
}

@media (max-width: 480px) {
  .blog-post, .ad-space, .sidebar {
      padding: 10px;
  }


  h3 {
      font-size: 1.8rem;
  }

  h4 {
      font-size: 1.75rem;
  }

  .blog-post p {
      font-size: 1.4rem; /* Larger font for small screens */
  }

  .profile img {
      max-width: 80px;
  }

  .icon-link .link {
      width: 25px;
      height: 25px;
      line-height: 25px;
  }
}


.navbar-container h1 {
  font-size: 1.5rem;
  
}


/* Cookie 4 */

  /* Cookie Consent Container */
  .cookie-consent {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    /* backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1); */
    padding: 20px;
    transition: bottom 0.2s ease-in-out;
    z-index: 1000;
  }

  .cookie-content a {
    color: #00cc00;
    text-decoration: underline;
  }
  
  .cookie-consent.show {
    bottom: 0;
  }
  
  .cookie-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
  }
  
  .cookie-content p {
    margin: 0 0 15px;
    font-size: 14px;
    line-height: 1.5;
    /* color: #6e6e73; */
    color: #fff;
  }
  
  .cookie-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  
  .cookie-button {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
  }
  
  .cookie-button.accept {
    /* background: #007aff; */
    background: #00cc00;
    color: #000;
  }
  
  .cookie-button.reject {
    /* background: transparent; */
    background: #e63946;
    color: #000;
    /* border: 1px solid #007aff; */
  }
  
  .cookie-button.accept:hover {
    transform: scale(1.05);
    background: #009900;
  }

  .cookie-button.reject:hover {
    transform: scale(1.05);
    background: #c92c3a;
  }
  
  /* Responsive Design */
  @media (max-width: 600px) {
    .cookie-content {
      padding: 0 15px;
    }
  
    .cookie-buttons {
      flex-direction: column;
      gap: 10px;
    }
  
    .cookie-button {
      width: 100%;
    }
  }