/* ===== WORDPRESS FIXES ===== */
html, body {
  overflow-x: hidden !important;
}

.xinghe-tour-wrapper {
  position: relative !important;
  z-index: 9 !important;
}

body .main-container {
  height: auto !important;
  min-height: 100vh;
}

/* ===== BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f9f9f9;
  color: #222;
  line-height: 1.6;
  padding: 20px;
}

/* ===== LAYOUT STRUCTURE ===== */
.main-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 40px);
}

.itinerary-column {
  width: 100%;
  overflow-y: auto;
}

.form-column {
  width: 100%;
  overflow-y: auto;
}

/* ===== DAY CARD STYLES ===== */
.day-card {
  background: #fff;
  border-left: 6px solid #0E386F;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  padding: 20px;
  margin-bottom: 25px;
  will-change: transform, opacity;
}

.day-header h2 {
  font-size: 1.2rem;
  color: #0E386F;
  margin-bottom: 15px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.day-text {
  font-size: 14px;
}

.day-text p, 
.cost-description p, 
.modal-body p:not(.modal-qr-code p) {
  margin-bottom: 1em !important;
}

.day-text p + p, 
.cost-description p + p {
  margin-top: 1em !important;
}

.day-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.day-images img {
  width: calc(50% - 5px);
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===== PRICING TABLE STYLES ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 25px 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  padding: 15px;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px;
}

.pricing-table th,
.pricing-table td {
  padding: 12px 15px;
  text-align: center;
  border: 1px solid #ddd;
}

.pricing-table th {
  background: #0E386F;
  color: white;
  font-weight: 500;
}

.pricing-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.pricing-table tr:hover {
  background-color: #f1f5ff;
}

.book-btn {
  background: #0E386F;
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 14px;
}

.book-btn:hover {
  background: #0a294d;
}

/* ===== COST DESCRIPTION STYLES ===== */
.cost-description {
  background: #fff;
  border-left: 6px solid #0E386F;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

.cost-description h3 {
  color: #0E386F;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.cost-description h4 {
  color: #0E386F;
  margin: 20px 0 10px;
  font-size: 1rem;
}

.cost-description ul {
  padding-left: 20px;
  margin-bottom: 15px;
}

.cost-description li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* ===== FORM STYLES ===== */
.free-consult-form {
  background: #fff;
  border-left: none;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: none;
}

.free-consult-form h2 {
  color: #062348;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 800;
  text-align: center;
  margin: 0 auto 15px;
  max-width: 95%;
  display: inline-block;
  padding: 0 10px;
  line-height: 1.3;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #0E386F;
  outline: none;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-btn {
  background: #0E386F;
  color: white;
  border: none;
  padding: 14px;
  width: 100%;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
  margin-top: 5px;
}

.submit-btn:hover {
  background: #0a294d;
}

/* ===== QR CODE SECTION STYLES ===== */
.qr-section {
  background: #fff;
  border-left: 6px solid #0E386F;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  text-align: center;
  margin-top: 30px;
}

.qr-section h3 {
  color: #0E386F;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.qr-codes {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  gap: 15px;
  flex-wrap: wrap;
}

.qr-code {
  text-align: center;
}

.qr-code img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.qr-code p {
  font-size: 14px;
  color: #555;
}

/* ====== Modal Styles ====== */
#bookingModal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 15px;
}

#bookingModal .modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 600px; /* smaller modal width */
  width: 92%;
  padding: 22px 20px;
  position: relative;
  box-shadow: 0 6px 18px rgba(14, 56, 111, 0.1);
  box-sizing: border-box;
  text-align: center;
}

/* ====== Close Button ====== */
#bookingModal .close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  font-weight: bold;
  color: #0e386f;
  cursor: pointer;
  border: none;
  background: none;
}

/* ====== Heading ====== */
.form-container h2 {
  font-size: 1.4rem;
  font-weight: 500;
  color: #0e386f;
  margin-bottom: 15px;
  font-family: 'Georgia', serif;
}
.form-container h2::after {
  content: "";
  width: 40px;
  height: 2px;
  background: #0e386f;
  display: block;
  margin: 8px auto 0 auto;
  border-radius: 2px;
  opacity: 0.6;
}
.form-container h3 {
  font-size: 0.95rem;
  font-weight: 500;
  color: #0e386f;
  margin-bottom: 12px;
  text-align: left;
}

/* ====== Travel Form Layout ====== */
.travel-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
}

.travel-form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  color: #444;
  font-size: 0.88rem;
}

.travel-form label.full-width {
  grid-column: span 2;
}

/* ====== Inputs, Select, Textarea ====== */
.travel-form input[type="text"],
.travel-form input[type="email"],
.travel-form select,
.travel-form textarea {
  width: 100%;
  padding: 6px 10px;
  margin-top: 3px;
  border: 1.3px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.travel-form input[readonly] {
  background-color: #f2f3f5;
  cursor: not-allowed;
}

.travel-form input:focus,
.travel-form select:focus,
.travel-form textarea:focus {
  border-color: #0e386f;
  outline: none;
  box-shadow: 0 0 3px rgba(14, 56, 111, 0.15);
}

/* ====== Checkbox & Submit ====== */
.travel-form input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
}

.travel-form button[type="submit"] {
  background-color: #0e386f;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  padding: 10px 0;
  width: 100%;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.25s ease;
  box-shadow: 0 2px 6px rgba(14, 56, 111, 0.15);
  margin-top: 6px;
}

.travel-form button[type="submit"]:hover {
  background-color: #0a294d;
}

/* ====== Responsive (Mobile) ====== */
@media (max-width: 600px) {
  #bookingModal .modal-content {
    padding: 20px 15px;
  }

  .form-container h2 {
    font-size: 1.2rem;
  }

  .travel-form {
    grid-template-columns: 1fr;
  }

  .travel-form label.full-width {
    grid-column: span 1;
  }
} 


/* ===== RESPONSIVE STYLES ===== */
@media (min-width: 768px) {
  /* Main layout */
  .main-container {
    flex-direction: row;
    gap: 30px;
  }
  
  .itinerary-column {
    flex: 7;
    padding-right: 15px;
  }
  
  .form-column {
    flex: 3;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
  }
  
  .content-wrapper {
    flex-direction: row;
  }
  
  .day-text {
    flex: 1;
    padding-right: 15px;
  }
  
  .day-images {
    flex: 0 0 240px;
    flex-direction: column;
    gap: 15px;
  }
  
  .day-images img {
    width: 100%;
    height: 180px;
  }

  /* Modal adjustments */
  .booking-modal {
    align-items: center;
    padding: 20px;
  }

  /* Form grid layout */
  .travel-form {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .modal-content {
    padding: 30px;
  }
}

@media (max-width: 767px) {
  /* Mobile card adjustments */
  .content-wrapper {
    flex-direction: column;
  }
  
  .day-images {
    flex-direction: row;
  }
  
  .day-images img {
    width: calc(50% - 5px);
  }

  /* Tighten up spacing */
  body {
    padding: 15px;
  }
  
  .day-card,
  .cost-description,
  .free-consult-form,
  .qr-section {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .day-header h2 {
    font-size: 1.1rem;
  }

  /* Modal adjustments */
  .booking-modal {
    padding: 15px 10px;
    align-items: flex-start;
  }

  .modal-content {
    padding: 20px 15px;
  }

  /* Form element sizing */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 12px;
    font-size: 16px;
  }

  .submit-btn {
    padding: 16px;
    font-size: 16px;
  }

  /* QR code sizing */
  .qr-code img {
    width: 100px;
    height: 100px;
  }
}