/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #f9f9f9;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #42d787;
}

.logo {
  width: 170px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 20px;
  border-radius: 10px;
  display: flex;
  background-color: #42d787;
}

nav ul li {
  margin: 0 15px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

header > * {
  z-index: 2;
}

.sidebar,
.open-sidebar-btn {
  display: none;
}

/* Benefits Section - NEW */
.benefits-section {
  margin-bottom: 50px;
  text-align: center;
}

.benefits-section h2 {
  color: #42d787;
  margin-bottom: 30px;
  font-size: 28px;
  font-weight: 600;
}

.benefits-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.benefit-card {
  background-color: white;
  border-radius: 10px;
  padding: 30px 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  width: calc(25% - 30px);
  min-width: 220px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  font-size: 36px;
  color: #42d787;
  margin-bottom: 15px;
}

.benefit-card h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 600;
}

.benefit-card p {
  color: #666;
  font-size: 14px;
}

/* Main Content Styles */
main {
  padding: 50px 0;
  min-height: calc(100vh - 300px);
}

.travel-form-container {
  display: flex;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

/* Sidebar with Image */
.sidebarForm {
  width: 220px;
  background-color: #42D787;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Travel Form Styles */
.travel-form {
  flex: 1;
  padding: 40px;
}

.travel-form h2 {
  color: #2ecc71;
  margin-bottom: 30px;
  font-size: 24px;
  font-weight: 600;
}

.travel-form h3 {
  color: #2ecc71;
  margin: 25px 0 15px;
  font-size: 20px;
  font-weight: 500;
}

.form-group {
  margin-bottom: 15px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  transition: border-color 0.3s;
  background-color: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2ecc71;
}

.date-inputs,
.passenger-inputs {
  display: flex;
  gap: 20px;
}

.date-inputs .form-group,
.passenger-inputs .form-group {
  flex: 1;
}

.date-input {
  position: relative;
}

.date-input i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* Checkbox styles - NEW */
.checkbox-group {
  margin-bottom: 20px;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 4px;
  transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #2ecc71;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.btn-kirim {
  display: block;
  width: 100%;
  padding: 14px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 5px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 30px;
}

.btn-kirim:hover {
  background-color: #27ae60;
}

/* Footer Styles */
footer {
  background-color: #2ecc71;
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 50px;
}

.footer-logo {
  width: 30%;
}

.footer-logo h2 {
  font-size: 24px;
  margin-bottom: 15px;
}

.footer-logo span {
  font-weight: 800;
}

.footer-logo p {
  font-size: 14px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-column h3 {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  font-size: 14px;
  transition: opacity 0.3s;
}

.footer-column ul li a:hover {
  opacity: 0.8;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
}

@media screen and (min-width: 769px) {
  .navbar {
    display: flex;
    justify-content: center;
    gap: 30px;
    box-shadow: 3px 2px 10px gray;
    padding: 15px 0;
    border-radius: 20px;
  }

  .navbar a {
    color: white;
    text-decoration: none;
    font-size: 18px;
  }

  .navbar a:hover {
    text-decoration: underline;
  }
}

/* Responsive Styles */
@media (max-width: 992px) {
  .benefits-container {
    gap: 20px;
  }

  .benefit-card {
    width: calc(50% - 20px);
  }

  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-logo {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .travel-form-container {
    flex-direction: column;
  }

  .sidebarForm {
    width: 100%;
    height: 200px;
  }

  .sidebar-image {
    object-fit: cover;
    object-position: center;
  }

  .date-inputs,
  .passenger-inputs {
    flex-direction: column;
    gap: 15px;
  }

  .footer-links {
    flex-direction: column;
    gap: 30px;
  }

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

  .navbar {
    display: none;
  }

  header {
    padding: 20px 30px;
  }

  .open-sidebar-btn {
    display: block;
    font-size: 30px;
    cursor: pointer;
    background-color: #42d787;
    color: white;
    padding: 10px 15px;
    border-radius: 100%;
    border: none;
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1000;
  }

  .sidebar {
    display: block;
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
    text-align: center;
  }

  .sidebar a {
    padding: 8px 8px 20px 8px;
    text-decoration: none;
    font-size: 30px;
    color: #f1f1f1;
    display: block;
    transition: 0.3s;
  }

  .sidebar a:hover {
    text-decoration: underline;
  }

  .closebtn {
    position: absolute;
    top: 15px;
    left: 35px;
    font-size: 40px;
  }

  .benefits-container {
    flex-direction: column;
    align-items: center;
  }

  .benefit-card {
    width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  nav ul {
    flex-wrap: wrap;
  }

  nav ul li {
    margin: 5px 10px;
  }

  .benefit-card {
    padding: 20px 15px;
  }
}

/* Error styling */
#message-container { /* Styling dasar untuk container */
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  display: none; /* Awalnya disembunyikan */
  font-weight: 500;
}

#message-container.error { /* Styling saat ada error */
  background-color: #ffebee;
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

#message-container.success { /* Styling saat sukses */
  background-color: #e8f5e9;
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

#message-container ul {
  margin: 0;
  padding-left: 20px;
}

#message-container ul li {
  margin-bottom: 5px;
  list-style-type: disc;
}

#message-container ul li:last-child {
  margin-bottom: 0;
}

.error-input { /* Styling untuk input yang tidak valid */
  border-color: #e74c3c !important; /* !important untuk override jika ada style lain */
  background-color: rgba(231, 76, 60, 0.05);
}