/* Island Theme - Teals, sandy beiges, ocean blues */
:root {
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-secondary: #f59e0b;
  --color-accent: #0ea5e9;
  --color-bg: #fefce8;
  --color-surface: #ffffff;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* Header */
.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
}

/* Hero */
.hero {
  background: url('/static/img/hero.jpg') center/cover no-repeat;
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero-content {
  background: rgba(0, 0, 0, 0.3);
}

.hero-content h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 32px;
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn-primary:hover {
  background: #d97706;
  transform: translateY(-2px);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  padding: 60px 0;
}

.feature {
  text-align: center;
  padding: 32px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature h3 {
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* Tours Grid */
.page-header {
  padding: 40px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.filters {
  display: flex;
  gap: 12px;
}

.filters select {
  padding: 8px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: 14px;
}

.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding-bottom: 60px;
}

.tour-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.tour-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--color-border);
}

.tour-card-content {
  padding: 20px;
}

.tour-card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.tour-card-location {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.tour-card-description {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.tour-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tour-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-secondary);
}

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 2px dashed var(--color-border);
  box-shadow: var(--shadow);
}

.no-results p:first-child {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.no-results p:last-child {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* About */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 0 60px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--color-text);
}

.about-image {
  display: flex;
  align-items: center;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Contact */
.contact-content {
  padding: 40px 0 60px;
  max-width: 700px;
}

.contact-content > p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
  color: var(--color-text);
}

.contact-info {
  background: var(--color-surface);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-info h3 {
  color: var(--color-primary);
  margin-bottom: 24px;
  font-size: 20px;
}

.contact-item {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-label {
  font-weight: 600;
  color: var(--color-primary);
  min-width: 120px;
}

.contact-value {
  color: var(--color-text);
}

.contact-link {
  color: var(--color-primary);
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

/* Footer Nav */
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-link {
  color: var(--color-surface);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-link:hover {
  opacity: 0.8;
}

/* Tour Detail */
.tour-detail {
  padding: 40px 0 60px;
  max-width: 61.8%;
  margin: 0 auto;
}

.tour-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.tour-detail-image {
  width: 100%;
  height: 400px;
  min-height: 250px;
  max-height: 450px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-border);
}

.tour-detail-info h1 {
  font-size: clamp(28px, 5vw, 36px);
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.tour-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.tour-detail-price {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 24px;
}

.tour-detail-description {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 100%;
  overflow-wrap: break-word;
}

.tour-detail-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.tour-detail-section h3 {
  color: var(--color-primary);
  margin-bottom: 16px;
  font-size: clamp(18px, 3vw, 20px);
}

.tour-detail-section ul {
  list-style: none;
}

.tour-detail-section li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
}

.tour-detail-section li::before {
  content: "-";
  position: absolute;
  left: 8px;
  color: var(--color-secondary);
}

.booking-section {
  background: var(--color-surface);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 40px;
}

.booking-section h3 {
  margin-bottom: 24px;
  color: var(--color-primary);
}

/* Checkout */
.checkout-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 0;
}

.checkout-summary {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.checkout-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.checkout-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: white;
}

.checkout-hero-overlay h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.checkout-hero-overlay p {
  margin: 4px 0 0;
  font-size: 14px;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.checkout-tour-details {
  padding: 24px;
}

.checkout-detail-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-detail-item:last-of-type {
  border-bottom: none;
}

.checkout-detail-label {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.checkout-detail-value {
  font-weight: 600;
  color: var(--color-primary);
}

.checkout-detail-section {
  margin-top: 20px;
}

.checkout-detail-section h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

.checkout-detail-section p {
  margin: 0;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

.checkout-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checkout-detail-list li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
  color: var(--color-text-secondary);
}

.checkout-detail-list li:before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--color-secondary);
  font-weight: bold;
}

.checkout-form {
  background: var(--color-surface);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.checkout-form h2 {
  margin-top: 24px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
}

.price-summary {
  margin: 24px 0;
  padding: 20px;
  background: var(--color-bg);
  border-radius: var(--radius);
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
}

.price-row.total {
  border-top: 1px solid var(--color-border);
  margin-top: 8px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-secondary);
}

.hidden {
  display: none !important;
}

/* Confirmation */
.confirmation {
  text-align: center;
  padding: 80px 20px;
}

.confirmation p {
  margin: 16px 0;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: var(--color-primary);
  border-radius: 50%;
  position: relative;
}

.confirmation-icon::after {
  content: "";
  position: absolute;
  left: 28px;
  top: 15px;
  width: 24px;
  height: 40px;
  border: solid white;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

.info-text {
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Confirmation Loading State */
.confirmation-loading {
  text-align: center;
  padding: 100px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 24px;
  border: 4px solid rgba(34, 197, 94, 0.2);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.confirmation-loading h2 {
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 12px;
}

.confirmation-loading p {
  color: var(--color-text-muted);
  font-size: 16px;
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: var(--color-surface);
  text-align: center;
  padding: 24px 0;
  margin-top: auto;
}

/* Autocomplete */
.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Hide when empty */
.autocomplete-suggestions:empty {
  display: none;
}

.suggestion-item {
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: var(--color-bg);
}

.suggestion-loading,
.suggestion-no-results {
  padding: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Views */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* Form Validation */
.error-message {
  display: block;
  font-size: 12px;
  color: #22c55e;
  margin-top: 4px;
}

.form-group input.invalid,
.form-group select.invalid {
  border-color: #22c55e;
}

.form-group input.invalid:focus,
.form-group select.invalid:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Skeleton Loading */
.skeleton-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  color: transparent !important;
  border-radius: 4px;
  display: inline-block;
  min-width: 60px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Validation Errors */
.validation-errors {
  margin: 16px 0;
  padding: 12px 16px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  color: #166534;
  font-size: 14px;
}

.validation-errors p {
  margin: 0 0 8px 0;
  font-weight: 600;
}

.validation-errors ul {
  margin: 0;
  padding-left: 20px;
}

.validation-errors li {
  margin: 4px 0;
}

/* Participant Rows */
.participants-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

#add-participant-btn {
  margin-top: 8px;
}

.participant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.participant-row input {
  flex: 1;
}

.participant-row .remove-participant {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-body {
  padding: 24px;
}

@media (max-width: 900px) {
  .tour-detail-header {
    gap: 24px;
  }

  .tour-detail-sections {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .tour-detail-header,
  .tour-detail-sections,
  .checkout-page,
  .about-content {
    grid-template-columns: 1fr;
  }

  .tour-detail {
    max-width: 100%;
  }

  .tour-detail-header {
    gap: 24px;
  }

  .tour-detail-image {
    height: 280px;
  }

  .tour-detail-info h1 {
    font-size: 28px;
  }

  .tour-detail-meta {
    font-size: 13px;
    gap: 6px 12px;
  }

  .tour-detail-price {
    font-size: 24px;
  }

  .tour-detail-description {
    font-size: 15px;
  }

  .tour-detail-sections {
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .tours-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }
}
