.sitename {
  font-size: 4em;
  letter-spacing: 0.1ch;
}

@media (max-width: 768px) {
  .sitename {
    font-size: 2.5em;
  }
}

.strapline {
  letter-spacing: 1ch;
  font-size: 1em;
}

@media (max-width: 768px) {
  .strapline {
    font-size: 0.8em;
    letter-spacing: 0.5ch;
  }
}

main {
  /* Capped to our 800px-wide image derivative so carousel images (w-100)
     display at native resolution rather than upscaling. */
  max-width: 800px;
  margin: auto;
}

.image-to-primary {
  filter: invert(37%) sepia(100%) saturate(2766%) hue-rotate(314deg)
    brightness(96%) contrast(83%);
}

@media (max-width: 768px) {
  .image-to-primary {
    height: 60px !important;
  }
}

.trip-detail ul {
  padding: 0;
  margin: 0;
}

.trip-detail li {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* Mobile-friendly search form improvements */
.search .form-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.search .form-control,
.search .form-select {
  border-radius: 0.375rem;
}

.search .btn {
  border-radius: 0.375rem;
  font-weight: 500;
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
  .search .form-control,
  .search .form-select,
  .search .btn {
    min-height: 44px; /* iOS recommended touch target size */
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .search .form-label {
    font-size: 14px;
  }
  
  /* Improve spacing for mobile */
  .search .row {
    margin-bottom: 0.5rem;
  }
  
  .search .col-12 {
    margin-bottom: 0.5rem;
  }
  
  /* Better mobile layout for search form */
  .search .col-md-6 {
    margin-bottom: 1rem;
  }
  
  /* Stack form elements better on mobile */
  .search .row.g-3 {
    margin: 0;
  }
  
  .search .row.g-3 > .col-12,
  .search .row.g-3 > .col-md-6 {
    padding: 0 0.5rem;
    margin-bottom: 1rem;
  }
}

/* Improve carousel responsiveness */
.carousel {
  border-radius: 0.375rem;
  overflow: hidden;
}

.carousel img {
  object-fit: cover;
  height: 300px;
}

@media (max-width: 768px) {
  .carousel img {
    height: 200px;
  }
}

/* Improve search results responsiveness */
.search-result .row {
  margin: 0;
}

@media (max-width: 768px) {
  .search-result .col-8 {
    width: 100%;
  }
  
  .search-result .col-4 {
    width: 100%;
    margin-top: 1rem;
  }
  
  /* Single column for result key facts; two columns wrapped too much text. */
  .search-result ul {
    display: block;
  }
  
  /* Better mobile layout for search results */
  .search-result .border {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .search-result .container.p-2 {
    padding: 1rem !important;
  }
  
  .search-result h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  
  .search-result .display-5 {
    font-size: 1.5rem;
    margin: 1rem 0;
  }
  
  .search-result .btn-lg {
    width: 100%;
    margin-top: 1rem;
  }
}

/* Improve trip detail responsiveness */
@media (max-width: 768px) {
  .trip-detail .container {
    padding: 0.5rem;
  }
  
  .trip-detail h2 {
    font-size: 1.5rem;
  }
  
  .trip-detail h3 {
    font-size: 1.25rem;
  }
  
  /* Better mobile layout for trip details */
  .trip-detail .border {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
  }
  
  .trip-detail .container.p-2 {
    padding: 1rem !important;
  }
  
  .trip-detail .row {
    margin: 0;
  }
  
  .trip-detail .col-12 {
    padding: 0.5rem;
  }
  
  /* Improve trip rows layout on mobile */
  .trip-detail #trip-rows .row {
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
  }
  
  .trip-detail #trip-rows .col-1 {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .trip-detail #trip-rows .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Improve button responsiveness */
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .btn-lg {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Additional mobile improvements */
@media (max-width: 768px) {
  /* Improve header spacing */
  header {
    padding: 1rem 0;
  }
  
  /* Improve main content spacing */
  main {
    padding: 0 0.5rem;
  }
  
  /* Improve footer spacing */
  footer {
    padding: 1rem 0;
  }
  
  /* Better form spacing */
  .search {
    margin-bottom: 2rem;
  }
  
  /* Improve results spacing */
  #results h2 {
    font-size: 1.5rem;
  }
}

#results h2 {
  margin: 0.75rem;
}

/* General UI/UX improvements */
.search-result,
.trip-detail {
  transition: all 0.3s ease;
}

.search-result:hover,
.trip-detail:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Better button styling */
.btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
  border: none;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

/* Improved carousel styling */
.carousel {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-indicators {
  bottom: 10px;
}

.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 3px;
}

/* Better typography */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.2;
}

/* Improved spacing */
.container {
  max-width: 1200px;
}

/* Better color scheme */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

/* Improve accessibility */
.search .form-control:focus,
.search .form-select:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Improve visual hierarchy */
.search .form-label {
  color: #495057;
}

.search .text-muted {
  font-size: 0.875rem;
}

/* Room image styling */
.room-image-container {
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 0.375rem;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.375rem;
}

.lazy-room-image {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.lazy-room-image[src] {
  opacity: 1;
}

/* Mobile improvements for room images */
@media (max-width: 768px) {
  .room-image-container {
    height: 100px;
    margin-bottom: 0.5rem;
  }
  
  .trip-detail .col-3 {
    width: 100%;
  }
  
  .trip-detail .col-8 {
    width: 100%;
  }
}

/* Filter and sort controls styling */
.trip-detail h4 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #495057;
}

.trip-detail .form-label {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.trip-detail .form-select {
  border-radius: 0.375rem;
  font-size: 0.9rem;
}

.trip-detail .btn-outline-secondary {
  border-radius: 0.375rem;
  font-size: 0.9rem;
}

/* Mobile improvements for filter controls */
@media (max-width: 768px) {
  .trip-detail h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .trip-detail .form-label {
    font-size: 0.85rem;
  }
  
  .trip-detail .form-select,
  .trip-detail .btn-outline-secondary {
    font-size: 0.85rem;
    min-height: 44px;
  }
  
  .trip-detail .col-md-6 {
    margin-bottom: 0.5rem;
  }
}