*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: #1f2933;
  background: #ffffff;
}

.hero {
  background: #ffffff;
  color: #111827;
  padding: 32px 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 3vw + 1rem, 2.5rem);
  margin: 0 0 0;
}

.hero-underline {
  width: 80px;
  height: 4px;
  background: #0782f5;
  border-radius: 999px;
  margin: 16px auto 0;
}

.tours-section {
  max-width: 1120px;
  margin: 32px auto 72px;
  padding: 0 16px 0;
}

.tours-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.tours-grid.initial-view {
  max-width: 900px;
  margin: 0 auto;
}

.tours-grid.initial-view .tour-card {
  min-height: 500px;
}

.tours-grid.initial-view .tour-image {
  height: 180px;
}

.tours-grid.initial-view .tour-title-row {
  height: 55px;
}

.tours-grid.initial-view .tour-description {
  height: 80px;
  -webkit-line-clamp: 3;
}

/* Ensure all cards have same height and alignment when not in initial view */
.tours-grid:not(.initial-view) .tour-card {
  height: 100%;
  min-height: 550px;
}

.tours-grid:not(.initial-view) .tour-image {
  height: 200px;
  flex-shrink: 0;
}

.tours-grid:not(.initial-view) .tour-title-row {
  height: 60px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.tours-grid:not(.initial-view) .tour-description {
  height: 90px;
  flex-shrink: 0;
  margin: 0 0 10px;
}

@media (max-width: 1024px) {
  .tours-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tours-grid {
    grid-template-columns: 1fr;
  }
}

.tour-card {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.tour-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.tour-card:hover .tour-image {
  transform: scale(1.05);
}

.tour-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.tour-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  height: 60px;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.tour-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tour-hours {
  font-size: 0.85rem;
  color: #6b7280;
  margin-top: 4px;
  line-height: 1.2;
}

.tour-rating {
  color: #fbbf24;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.tour-description {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.45;
  height: 90px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.tour-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tour-price-label {
  color: #6b7280;
}

.tour-price-value {
  font-weight: 600;
  color: #111827;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background-color 0.12s ease, color 0.12s ease;
  font-family: inherit;
}

.btn-primary {
  background: #0782f5;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(7, 130, 245, 0.35);
}

.btn-primary:hover {
  background: #0782f5;
  transform: translateY(-1px);
  box-shadow: 0 14px 25px rgba(7, 130, 245, 0.4);
}

.btn-outline {
  background: #0782f5;
  color: #ffffff;
  padding-inline: 28px;
}

.btn-outline:hover {
  background: #0782f5;
}

.btn-full {
  width: 100%;
  padding-block: 14px;
  font-size: 1rem;
}

.see-more-wrapper {
  text-align: center;
  margin-top: 32px;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  /* High z-index so the booking form always appears above any page headers/navs */
  z-index: 9999;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  position: relative;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  border-radius: 18px;
  padding: 24px 24px 26px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
}

.modal-title {
  font-family: "Playfair Display", serif;
  margin: 0 0 18px;
  text-align: center;
  color: #111827;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f3f4f6; /* Light gray background by default */
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #6b7280;
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: #0782f5; /* Change background to blue on hover */
  color: #ffffff; /* Change 'x' color to white on hover */
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.two-column {
  gap: 12px;
}

.two-column .form-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 640px) {
  .two-column {
    flex-direction: row;
  }
}

.form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #111827;
}

.form-control {
  width: 100%;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-family: inherit;
  font-size: 0.9rem;
  color: #111827;
  box-sizing: border-box;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select.form-control option {
  white-space: normal;
  padding: 8px;
}

.form-control:focus {
  outline: none;
  border-color: #0782f5;
  box-shadow: 0 0 0 1px rgba(7, 130, 245, 0.25);
}

.textarea {
  resize: vertical;
  min-height: 80px;
}

.price-summary {
  margin-top: 6px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #f3f4f6;
  font-size: 0.9rem;
}

.price-row,
.price-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.price-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-weight: 700;
}

@media (max-width: 600px) {
  .modal {
    max-width: 100%;
    padding: 20px 18px;
    margin: 16px;
  }

  .modal-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
  }

  .booking-form {
    gap: 12px;
  }

  .form-row {
    gap: 5px;
  }

  .two-column {
    flex-direction: column;
    gap: 12px;
  }

  .tour-body {
    padding-inline: 16px;
  }
}


