/* navbar */
body {
  margin: 0;
  font-family: "Segoe UI",Arial,sans-serif;
}

.navbar {
  background-color: black;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0;
  height: 50px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
}

.nav-left a{
  display: block;
  color: white;
  justify-content: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 16px;
}

.nav-left a:hover {
  background-color: #7f807e;
  color: black;
}


.dropdown {
  position: relative;
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  text-decoration: none;
}

.dropdown-icon {
  width: 10px;
  height: 10px;
  filter: brightness(0) invert(1);
}

.dropdown:hover > a .dropdown-icon {
  filter: none;
}

.dropdown:hover > a {
  background-color: #7f807e;
  color: black;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 160px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(100, 36, 36, 0.2);
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  background-color: white;
}

.dropdown-content a:hover {
  background-color: #ddd;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.nav-right {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-right a{
  color: #fff;
  height: 100%;
  gap:2px;
}

.logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 0 16px;
  height: 100%;
}

.logout-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.logout-link:hover {
  background-color: #ea2a2a;
}

.logout-link:hover .search-icon {
  filter: brightness(0) invert(1);
}


.menu-toggle {
  display: none;
  font-size: 26px;
  color: white;
  cursor: pointer;
  padding: 10px 16px;
}

/*HOME*/
.parameter{
  text-align: center;
  padding: 50px;
  background-color: #000;
  color: #fff;
  margin-top: 50px;
  font-family: Arial, sans-serif;
}
.box{
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 30px;
}
.card {
  display: flex;
  width: 90%;
  height: 300px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  padding: 20px;
}

.left, .right {
  width: 15%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  color: #000;
}

.center {
  width: 70%;
}

.card .title  {
  font-size: 25px;
  color: #000;
}

.temp {
  font-size: 28px;
  color: red;
}

.status {
  font-size: 14px;
  color: #b36b00;
}
/*CONTROL*/

.control{
  text-align: center;
  padding: 50px;
  background-color: #fff;
  color: #000;
}

/* Switch chế độ */

.mode-switch {
  margin: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 25px;
  margin-right: 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 25px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: #2196F3;
}

input:checked + .slider-switch:before {
  transform: translateX(24px);
}


/* Khung điều khiển */
.control-box {
  display: inline-block;
  padding: 20px;
  border: 2px solid #333;
  border-radius: 10px;
  margin-top: 20px;
  background: white;
  position: relative;
  transition: all 0.3s;
  max-width: 100%;
}

.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Bố cục nút */
.row {
  display: flex;
  justify-content: center;
  margin: 5px;
}

.control-btn {
  width: 80px;
  height: 80px;
  font-size: 20px;
  margin: 5px;
  border: none;
  border-radius: 10px;
  background: #007bff;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

.control-btn:hover {
  background: #0056b3;
}

.power-btn {
  background: #28a745;
}

.power-btn.off {
  background: #dc3545;
}

/* Thanh trượt */
.speed-control {
  margin-top: 20px;
}
/*ABOUT*/

.about{
  text-align: center;
  padding: 50px;
  background-color: #000;
  color: #fff;
}

.title{
  font-family: "Segoe UI",Arial,sans-serif;
  font-weight: 400;
  margin: 10px 0;
  font-size: 30px;
  letter-spacing: 4px;
}

.description {
  font-family: "Segoe UI",Arial,sans-serif;
  max-width: 80%;
  margin: auto;
  padding: 10px;
  text-align: justify;
  font-size: 20px;
}

.slide {
  max-width: 100%;
  height: 70vh;
  overflow: hidden;
  position: relative;
  margin: 10px auto;
}

.slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.slide-item.active {
  opacity: 1;
  z-index: 1;
}

.slide-img {
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.caption {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 3px 6px;
  border-radius: 3px;
}




/*CONTACT*/

.contact-section {
  background-color: white;
  text-align: center;
  padding-top: 60px;
  max-width: 100%;
}

.contact-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  column-gap: 100px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.contact-info {
  text-align: left;
  font-size: 18px;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.form-wrapper {
  flex: 0 0 auto;
  max-width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
}

.contact-form .row {
  display: flex;
  width: 100%;
  gap:10px;
  padding-bottom: 10px;
}

.input-group {
  flex: 1;
}

.full-width {
  flex: 1;
}

.contact-form input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.contact-form .right-align {
  justify-content: flex-end;
  display: flex;
}

.contact-form .right-align button {
  background-color: black;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
}

.contact-form .right-align button:hover {
  background-color: #444;
}

.error-message {
  color: #ff4d00;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.alert-box {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #4caf50;
  color: white;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
}
.close-btn {
  position: absolute;
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
}


.end{
  background-color: white;
  height: 150px;
  width: 100%;
  padding-top: 50px;
}


/* Responsive Design */

/* 1560px */
@media (max-width: 1560px) {
  .card {
    width: 80%;
    height: 350px;
  }
  .description {
    max-width: 100%;
    font-size: 22px;
  }
}


/* ≤1080px (Laptop nhỏ) */
@media (max-width: 1440px) {
  .navbar {
    padding: 0 10px;
  }
  .nav-left a {
    padding: 12px;
    font-size: 15px;
  }
  .card {
    flex-direction: column;
    height: auto;
  }
  .left, .right, .center {
    width: 100%;
  }
  .contact-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    gap: 20px;
    box-sizing: border-box;
  }
}

/* ≤780px (Tablet) */
@media (max-width: 780px) {
   .menu-toggle {
    display: block;
  }

  .nav-container {
    display: none;
    flex-direction: column;
    background: black;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: fit-content;
    padding: 10px 0;
    z-index: 999;
  }

  .nav-container.active {
    display: flex;
  }

  .nav-left, .nav-right {
    flex-direction: column;
    width: 100%;
  }

  .nav-left a, .nav-right a {
    padding: 12px;
    text-align: center;
    color: white;
  }

  .nav-right {
    border-top: 1px solid #444;
  }

  .card {
    width: 95%;
    margin-bottom: 20px;
  }

  .contact-container {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    gap: 20px;
    box-sizing: border-box;
  }


  .description {
    max-width: 90%;
    font-size: 18px;
  }
  .contact-section{
    max-width: 100%;
  }

  .contact-info{
    max-width: 100%;
    font-size: 12px;
  }

  .contact-form .row{
    flex-direction: column;
    max-width: 100%;
  }
}

/* ≤480px (Mobile) */
@media (max-width: 480px) {
  .parameter, .control, .about, .contact-section {
    padding: 20px;
  }
  .card {
    width: 100%;
    padding: 10px;
  }
  .title {
    font-size: 22px;
  }
  .temp {
    font-size: 22px;
  }
  .description {
    font-size: 16px;
    text-align: left;
  }
  .control-btn {
    width: 60px;
    height: 60px;
    font-size: 16px;
  }
  .contact-form input {
    font-size: 14px;
    padding: 8px;
  }
  .contact-form .right-align button {
    font-size: 14px;
    padding: 8px 14px;
  }
}

