 * {
    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; }
}

/* Container หลัก */
.container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* Title */
.title {
    font-size: 24px;
    color: #3c8c5a;
    margin-bottom: 10px;
}

/* Description */
.description {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

/* Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form label {
    text-align: left;
    font-size: 14px;
    color: #333;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.contact-form button {
    background: #3c8c5a;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.contact-form button:hover {
    background: #2f6e46;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        width: 90%;
    }
}


  /*  */

/*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;
    height: 100vh;
    opacity: 0;
    animation: fadeIn 1s forwards;
  }

 

@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;
    }
}

/* ตาราง */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
thead {
  background-color: #444;
  color: white;
}
th, td {
  text-align: left;
  padding: 12px;
  border: 1px solid #666;
}
tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
tbody tr:hover {
  background-color: #f1f1f1;
}
th {
  text-transform: uppercase;
}

.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%;
    }
  }