/* =====================================================
   LEFT MENU (sidebar)
   ===================================================== */
.menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.menu li {
  padding: 3px 10px;
  background-color: #d8ecf9;
  color: #ffffff;
}
.menu li a { font-size: 14px; }
.menu li.boxtitle {
  padding: 10px;
  background-color: #82c3eb;
  color: black;
  font-weight: bold;
  border-radius: 8px 8px 0 0;
}
.menu li.firstitem { padding-top: 10px; }
.menu li.lastitem { padding-bottom: 10px; }

/* =====================================================
   MAIN CONTENT CONTAINER
   ===================================================== */
.tour-section { margin-bottom: 0 !important; }
.card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 20px;
  margin: 0 0 20px 0;
}
.section-tab-container {
  position: relative;
  margin: 55px 0 0 !important;
}
.section-title-tab {
  position: absolute;
  top: -22px;
  left: 0;
  background: #4682b4;
  color: #fff;
  padding: 6px 14px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
  transform: translateY(-50%);
  z-index: 2;
}

/* Ensure the skip link is completely hidden by default */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* =====================================================
   KEY FACTS BOX
   ===================================================== */
.key-facts-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 30px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 28px auto 0 auto;
}
.fact-item {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  border-bottom: 1px solid #e9ecef;
}
.fact-item:last-child { border-bottom: none; }
.fact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
}
.fact-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1a1a;
}

/* =====================================================
   ASIDE (right sidebar)
   ===================================================== */
.aside {
  background: #fff;
  padding: 2px;
  text-align: center;
}
.boxtitle {
  padding: 6px 10px;
  background-color: #82c3eb;
  color: black;
  font-weight: bold;
  font-size: 13.5px;
  text-align: left;
  border-radius: 8px 8px 0 0;
}
.boxbottomright {
  padding: 6px 10px 6px 10px;
  background-color: #d8ecf9;
  color: #fffffc;
  font-size: 14px;
  text-align: left;
  border-radius: 0 0 8px 8px;
}
.view-cart-link {
  display: flex;
  align-items: center;
  padding: 4px 0;
}
.view-cart-link a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #000;
  font-weight: normal;
}
.view-cart-link .cart-icon {
  vertical-align: middle;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.view-cart-link .cart-text {
  margin-left: 15px;
  font-size: 14px;
  line-height: 20px;
  color: #000;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background-color: #344152;
  color: #82c3eb;
  font-size: 13px;
  padding: 10px 0;
  margin-top: 0 !important;
}
.footer ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.footer li {
  padding: 2px;
  background-color: #344152;
  color: #82c3eb;
}
.footer a { color: #82c3eb !important; }
.footer li.footertextheader a {
  color: #d8ecf9 !important;
  font-weight: normal !important;
}

.copyright {
  color: #F3F3F3;
  text-align: center;
  padding: 20px 0;
}
.logos {
  padding-bottom: 50px !important;
}
.logos td { text-align: center !important; }
.logos img { vertical-align: middle; }

/* =====================================================
   TOUR SCHEDULE
   ===================================================== */
.tour-schedule { margin-top: 5px !important; }
.schedule-item p { padding-bottom: 10px; margin: 0; }
.schedule-item:last-child p { padding-bottom: 0; margin-bottom: 0; }
.schedule-item strong { display: block; margin-bottom: 2px; }
.note {
  margin-bottom: 8px !important;
  padding-bottom: 0 !important;
}

/* =====================================================
   LISTS
   ===================================================== */
.card ul { margin: 0; padding-left: 20px; }
.card li { padding-bottom: 8px; }
.card ul li:last-child { padding-bottom: 0; }

/* =====================================================
   TRANSFER GRID
   ===================================================== */
.transfer-grid {
  display: block;
  margin-top: 8px;
}
.transfer-item { padding: 8px 0; }
.transfer-item[data-price-thb] {
  font-weight: bold;
  color: #4682b4;
  margin-top: -10px;
}
.transfer-location { font-weight: normal; }

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  min-height: 60px;
}
.alert-icon {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  min-width: 20px !important;
  flex-shrink: 0 !important;
  display: block !important;
  margin-right: 20px;
}
.alert-warning {
  background-color: #fff3cd;
  border-left: 5px solid #ffc107;
  margin-top: 20px;
  margin-bottom: 42px !important;
}
.alert-info {
  background-color: #d0e9d2;
  border-left: 5px solid #4caf50;
}
.spaced-text { display: block; margin-top: 8px; }

/* =====================================================
   BOOKING FORM
   ===================================================== */
.booking-card {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 20px;
  margin: 0 0 20px 0;
  min-height: 400px;
}
.tour-name-wrapper {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}
.tour-name-display {
  display: inline-block;
  margin: 0 auto 25px auto;
  background-color: #edf5fa;
  color: #4682b4;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  border-radius: 6px;
}
.booking-form {
  background: transparent;
  padding: 0;
  margin: 0;
  box-shadow: none;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
  align-items: center;
}
.form-col {
  flex: 1;
  min-width: 200px;
  margin-right: 15px;
}
.form-col:last-child { margin-right: 0; }
.form-row.total-row-spacing { align-items: flex-end; }
label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
.tour-date-selects {
  display: flex;
  gap: 8px;
  width: 100%;
}
.tour-date-selects select:nth-child(1) { flex: 1; min-width: 60px; }
.tour-date-selects select:nth-child(2) { flex: 2; min-width: 100px; }
.tour-date-selects select:nth-child(3) { flex: 1; min-width: 60px; }
.tour-date-selects select { flex: 1; min-width: 0; }
.calendar-icon {
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.calendar-icon svg { width: 20px; height: 20px; }
.price-display {
  display: flex;
  gap: 8px;
  align-items: center;
}
.price-new {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff6b35;
}
.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 1.0em;
  margin-left: 13px;
}
input.totalprice {
  text-align: right;
  border: 1px solid #ddd;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 13px;
  font-weight: bold;
  vertical-align: middle;
  padding: 10px;
  width: 100%;
  border-radius: 4px;
}
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.btn-container {
  text-align: center;
  margin: 25px 0 10px 0;
}
.add-to-cart-btn {
  display: inline-block;
  padding: 14px 18px;
  min-width: 120px;
  background-color: #2b5876;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.add-to-cart-btn:hover {
  background-color: #3a6d99;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.total-label { font-weight: bold; }

/* Calendar icon responsiveness */
.calendar-hide-desktop { display: none !important; }
@media (max-width: 768px) {
  .calendar-hide-mobile { display: none !important; }
  .calendar-hide-desktop { display: block !important; }
}

/* =====================================================
   FAQ
   ===================================================== */
.faq-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}
.faq-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}
.faq-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.faq-question {
  padding: 1.25rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}
.faq-question:hover { background-color: #ffffff; }
.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: #0066cc;
  transition: transform 0.3s ease;
}
details[open] .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: #555;
  line-height: 1.7;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
#faq { margin-top: 0 !important; }

/* =====================================================
   RELATED TOURS
   ===================================================== */
.related-tours {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  margin-left: -10px !important;
  margin-right: -10px !important;
  width: calc(100% + 20px) !important;
}
.related-tours-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.related-tour-card {
  background: white;
  padding: 8px 8px 0 8px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  margin-bottom: 0;
  margin-top: 10px;
  flex: 0 0 auto;
  width: 340px;
  max-width: 100%;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.related-tour-card img {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
}
.related-section-title-tab {
  position: absolute;
  top: -20px;
  left: 0 !important;
  background: #4682b4;
  color: #fff;
  padding: 6px 14px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
  transform: translateY(-50%);
  z-index: 2;
  text-align: center;
}
.tour-image-container {
  height: 246px;
  overflow: hidden;
  position: relative;
}
.tour-image-container img { position: absolute; }
.tour-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tour-name {
  padding: 15px 15px 5px;
  text-align: center;
  color: #4682b4;
  font-weight: 600;
}

.tour-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 80%;
}

/* =====================================================
   UNIFIED SECTION SPACING - No bottom margins, consistent top margins
   ===================================================== */
.tour-section {
  margin-bottom: 0 !important;
}

.section-tab-container {
  margin: 55px 0 0 !important;
}

.alert-warning {
  margin-bottom: 42px !important;
}

/* Booking Form – no extra bottom margin needed */
.tour-section:has(.booking-card) .section-tab-container {
  margin-bottom: 0 !important;
}

/* =====================================================
   PERFORMANCE: content-visibility for off-screen sections
   ===================================================== */
#faq,
.related-tours,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 400px;
}
.related-tours { contain-intrinsic-size: 600px; }
.footer { contain-intrinsic-size: 400px; }

/* =====================================================
   FEATURED TOURS
   ===================================================== */
.featured-tour-card {
    width: 100%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 2rem;
}
.featured-tour-image {
    background-color: #f0f0f0;
    height: 0px;
    padding-bottom: 56.25%;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.featured-tour-image__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.featured-tour-content {
    padding: 1.5rem 2rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.featured-tour-title {
    margin: 0;
    padding: 0;
    line-height: 1.3;
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}
.featured-tour-description {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    font-size: 13px;
}
.featured-tour-features {
    margin: 1rem 0;
    min-height: 2.5em;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.featured-tour-feature {
    background: #f0f8ff;
    color: #0066cc;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    white-space: nowrap;
}
.featured-tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.featured-price-container {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.price-prefix {
    font-size: 0.9rem;
    color: #666;
}
.featured-tour-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6b35;
}
.featured-tour-price-old {
    font-size: 1.0rem;
    text-decoration: line-through;
    color: #767676;
    margin-left: 0.5rem;
}
.book-btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background: #4682b4;
    color: white !important;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 13px;
}
.book-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(70, 130, 180, 0.3);
    color: white;
    text-decoration: none;
}
/* Mobile Responsive */
@media (max-width: 768px) {
    .featured-tour-content {
        padding: 1.5rem;
    }
        .featured-tour-title {
        font-size: 1.1rem;
    }
        .featured-tour-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
        .featured-price-container {
        justify-content: center;
    }
        .book-btn {
        width: 100%;
        text-align: center;
    }
}