/* ===========================================
   LocalLens.Homes – Enhancement Styles
   Animations, Modals, Hotel/Vehicle/Customizer
   =========================================== */

/* ===========================================
   Enhanced Animations
   =========================================== */

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.3); }
  50%  { opacity: 1; transform: scale(1.05); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Staggered fade-in for tour cards */
.tour-card:nth-child(1) { transition-delay: 0.05s; }
.tour-card:nth-child(2) { transition-delay: 0.1s; }
.tour-card:nth-child(3) { transition-delay: 0.15s; }
.tour-card:nth-child(4) { transition-delay: 0.2s; }
.tour-card:nth-child(5) { transition-delay: 0.25s; }
.tour-card:nth-child(6) { transition-delay: 0.3s; }
.tour-card:nth-child(7) { transition-delay: 0.35s; }

/* Enhanced tour card hover */
.tour-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease;
}

.tour-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.tour-card:hover::before {
  left: 150%;
}

/* ===========================================
   Tour Card Header / Tags
   =========================================== */

.tour-card-header {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.tour-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tour-tag--easy    { background: #d4edda; color: #155724; }
.tour-tag--moderate { background: #fff3cd; color: #856404; }
.tour-tag--short   { background: #cce5ff; color: #004085; }
.tour-tag--long    { background: #e2d9f3; color: #4a1e8c; }
.tour-tag--featured { background: gold; color: #5a3e00; }

/* Tour card highlights */
.tour-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.tour-card-highlights span {
  font-size: 0.8rem;
  background: var(--sand, #f8f1e5);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  color: var(--stone, #5a6b7a);
}

/* Tour card actions */
.tour-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
}

.tour-card-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  margin: 0;
}

.btn-itinerary {
  background: transparent;
  border: 2px solid var(--deep, #0f2c3d);
  color: var(--deep, #0f2c3d);
}

.btn-itinerary:hover,
.btn-itinerary:focus {
  background: var(--deep, #0f2c3d);
  color: white;
  box-shadow: 0 4px 12px rgba(15, 44, 61, 0.25);
}

/* ===========================================
   Section Titles
   =========================================== */

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--deep, #0f2c3d);
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--stone, #5a6b7a);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ===========================================
   Hotel Selection Section
   =========================================== */

.hotel-section {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.hotel-card {
  background: white;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
  position: relative;
  text-align: center;
}

.hotel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
}

.hotel-card.selected,
.hotel-card[aria-pressed="true"] {
  border-color: var(--warm, #c4452b);
  box-shadow: 0 8px 30px rgba(196, 69, 43, 0.2);
}

.hotel-card--popular {
  border-color: gold;
}

.hotel-card--popular.selected,
.hotel-card--popular[aria-pressed="true"] {
  border-color: var(--warm, #c4452b);
}

.hotel-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--warm, #c4452b);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

.hotel-stars {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
  color: #c8a600;
}

.hotel-card h3 {
  font-size: 1.25rem;
  color: var(--deep, #0f2c3d);
  margin-bottom: 0.5rem;
}

.hotel-price {
  font-size: 1rem;
  color: var(--stone, #5a6b7a);
  margin-bottom: 1rem;
}

.hotel-price strong {
  color: var(--warm, #c4452b);
  font-size: 1.2rem;
}

.hotel-amenities {
  list-style: none;
  text-align: left;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text, #1a2a3a);
  line-height: 1.8;
}

.hotel-example {
  font-size: 0.82rem;
  color: var(--stone, #5a6b7a);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.btn-select-hotel,
.btn-select-vehicle {
  width: 100%;
  margin: 0;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hotel-card.selected .btn-select-hotel,
.vehicle-card.selected .btn-select-vehicle {
  background: #155724;
  border-color: #155724;
}

.hotel-card.selected .btn-select-hotel::before,
.vehicle-card.selected .btn-select-vehicle::before {
  content: '✓ ';
}

/* ===========================================
   Vehicle Selection Section
   =========================================== */

.vehicle-section {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.vehicle-card {
  background: white;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.2s ease;
  position: relative;
  text-align: center;
}

.vehicle-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.14);
}

.vehicle-card.selected,
.vehicle-card[aria-pressed="true"] {
  border-color: var(--warm, #c4452b);
  box-shadow: 0 8px 30px rgba(196, 69, 43, 0.2);
}

.vehicle-card--popular {
  border-color: var(--deep, #0f2c3d);
}

.vehicle-popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep, #0f2c3d);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

.vehicle-icon {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
  background: var(--deep, #0f2c3d);
  color: white;
  padding: 0.35rem 0.9rem;
  border-radius: 4px;
  animation: none;
  transition: transform 0.3s ease;
}

.vehicle-card:hover .vehicle-icon {
  transform: scale(1.15) rotate(-3deg);
}

.vehicle-card h3 {
  font-size: 1.2rem;
  color: var(--deep, #0f2c3d);
  margin-bottom: 0.25rem;
}

.vehicle-capacity {
  color: var(--stone, #5a6b7a);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.vehicle-price {
  font-size: 1rem;
  color: var(--stone, #5a6b7a);
  margin-bottom: 1rem;
}

.vehicle-price strong {
  color: var(--warm, #c4452b);
  font-size: 1.15rem;
}

.vehicle-features {
  list-style: none;
  text-align: left;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--text, #1a2a3a);
  line-height: 1.85;
}

.vehicle-features li::before {
  content: '• ';
  color: var(--warm, #c4452b);
  font-weight: bold;
}

/* ===========================================
   Tour Customizer Section
   =========================================== */

.customizer-section {
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.customizer-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.customizer-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--deep, #0f2c3d);
  margin-bottom: 0.5rem;
}

.customizer-header p {
  color: var(--stone, #5a6b7a);
  font-size: 1rem;
}

.customizer-form {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.customizer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.customizer-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.customizer-field label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--deep, #0f2c3d);
}

.customizer-field select,
.customizer-field input {
  padding: 0.8rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fafafa;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  color: var(--text, #1a2a3a);
}

.customizer-field select:focus,
.customizer-field input:focus {
  outline: none;
  border-color: var(--warm, #c4452b);
  box-shadow: 0 0 0 3px rgba(196, 69, 43, 0.1);
  background: white;
}

/* Quote output box */
.customizer-quote {
  background: var(--sand, #f8f1e5);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  border-left: 4px solid var(--warm, #c4452b);
  transition: all 0.3s ease;
}

.quote-placeholder {
  color: var(--stone, #5a6b7a);
  font-style: italic;
  font-size: 0.95rem;
}

.quote-result {
  width: 100%;
}

.quote-result .quote-tour-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--deep, #0f2c3d);
  margin-bottom: 0.75rem;
}

.quote-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--stone, #5a6b7a);
}

.quote-breakdown span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.quote-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--warm, #c4452b);
}

.quote-note {
  font-size: 0.8rem;
  color: var(--stone, #5a6b7a);
  margin-top: 0.25rem;
  font-style: italic;
}

.customizer-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.customizer-actions .btn {
  margin: 0;
  flex: 1;
  text-align: center;
  min-width: 160px;
}

.btn-quote {
  background: var(--deep, #0f2c3d);
  border-color: var(--deep, #0f2c3d);
}

.btn-quote:hover,
.btn-quote:focus {
  background: #0a1f2c;
}

/* ===========================================
   Itinerary Modal
   =========================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 1;
  transition: opacity 0.25s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay.modal-closing {
  opacity: 0;
}

.modal-container {
  background: white;
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  margin: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  z-index: 1;
}

.modal-title {
  font-size: 1.4rem;
  color: var(--deep, #0f2c3d);
  margin: 0;
}

.modal-close {
  background: none;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone, #5a6b7a);
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--warm, #c4452b);
  color: white;
  border-color: var(--warm, #c4452b);
}

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  background: white;
  border-radius: 0 0 16px 16px;
}

.modal-footer .btn {
  margin: 0;
}

/* Itinerary content inside modal */
.itinerary-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--sand, #f8f1e5);
  border-radius: 8px;
  font-size: 0.92rem;
}

.itinerary-meta span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--stone, #5a6b7a);
  font-weight: 500;
}

.itinerary-day {
  border-left: 3px solid var(--warm, #c4452b);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fafafa;
  border-radius: 0 8px 8px 0;
  transition: background 0.2s ease;
}

.itinerary-day:hover {
  background: #f5f0e8;
}

.itinerary-day-title {
  font-weight: 700;
  color: var(--deep, #0f2c3d);
  font-size: 1rem;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.itinerary-day-number {
  background: var(--warm, #c4452b);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 12px;
}

.itinerary-day-desc {
  color: var(--text, #1a2a3a);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.itinerary-day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.itinerary-pill {
  font-size: 0.78rem;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  font-weight: 600;
}

.pill-meal  { background: #d4edda; color: #155724; }
.pill-activity { background: #cce5ff; color: #004085; }
.pill-note  { background: #fff3cd; color: #856404; }

.itinerary-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep, #0f2c3d);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--sand, #f8f1e5);
}

.meeting-point-box {
  background: var(--deep, #0f2c3d);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 0.92rem;
  margin-top: 1.5rem;
}

.meeting-point-box strong {
  display: block;
  margin-bottom: 0.25rem;
}

/* ===========================================
   Dark Mode Support for Enhancements
   =========================================== */

[data-theme="dark"] .tour-card-highlights span {
  background: #1e2d3d;
  color: #8ba5bb;
}

[data-theme="dark"] .hotel-card,
[data-theme="dark"] .vehicle-card {
  background: #1a2d3d;
  color: #d8e6f0;
}

[data-theme="dark"] .hotel-card h3,
[data-theme="dark"] .vehicle-card h3 {
  color: #d8e6f0;
}

[data-theme="dark"] .hotel-amenities,
[data-theme="dark"] .vehicle-features {
  color: #d8e6f0;
}

[data-theme="dark"] .customizer-form {
  background: #1a2d3d;
  color: #d8e6f0;
}

[data-theme="dark"] .customizer-field label {
  color: #d8e6f0;
}

[data-theme="dark"] .customizer-field select,
[data-theme="dark"] .customizer-field input {
  background: #243546;
  border-color: #2e4a62;
  color: #d8e6f0;
}

[data-theme="dark"] .customizer-quote {
  background: #1e2d3d;
}

[data-theme="dark"] .modal-container {
  background: #1a2d3d;
  color: #d8e6f0;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
  background: #1a2d3d;
  border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .modal-title {
  color: #d8e6f0;
}

[data-theme="dark"] .modal-close {
  color: #8ba5bb;
  border-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .itinerary-meta {
  background: #1e2d3d;
}

[data-theme="dark"] .itinerary-day {
  background: #1e2d3d;
}

[data-theme="dark"] .itinerary-day:hover {
  background: #243546;
}

[data-theme="dark"] .itinerary-day-title,
[data-theme="dark"] .itinerary-day-desc {
  color: #d8e6f0;
}

[data-theme="dark"] .itinerary-section-title {
  color: #d8e6f0;
  border-color: #2e4a62;
}

[data-theme="dark"] .section-title,
[data-theme="dark"] .customizer-header h2 {
  color: #d8e6f0;
}

/* ===========================================
   Early Booking Discount Badge
   =========================================== */

.early-discount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #28a745, #20863a);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  margin-bottom: 0.85rem;
  animation: pulse 2.5s infinite;
  letter-spacing: 0.2px;
}

.quote-original-price {
  text-decoration: line-through;
  color: var(--stone, #5a6b7a);
  font-size: 1.15rem;
  font-weight: 400;
}

.quote-discounted-price {
  color: #28a745;
  font-size: 1.5rem;
  font-weight: 700;
}

.discount-savings {
  color: #28a745;
  font-size: 0.95rem;
  font-weight: 600;
}

.suv-capacity-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

/* ===========================================
   Enhanced Itinerary Details (early bookers)
   =========================================== */

.itinerary-day--enhanced {
  border-left-color: #28a745;
}

.itinerary-day-time {
  font-size: 0.82rem;
  font-weight: 700;
  color: #28a745;
  margin-bottom: 0.3rem;
  letter-spacing: 0.2px;
}

.itinerary-meal-detail {
  font-size: 0.88rem;
  color: var(--stone, #5a6b7a);
  margin: 0.35rem 0 0.4rem;
}

.itinerary-meal-detail strong {
  color: var(--deep, #0f2c3d);
}

/* ===========================================
   Hotel Names Hidden in Custom Tour Selection
   =========================================== */

.hotel-section .hotel-example {
  display: none;
}

/* Dark mode additions */
[data-theme="dark"] .suv-capacity-warning {
  background: #3a2e00;
  color: #ffc107;
  border-color: #ffc107;
}

[data-theme="dark"] .early-discount-badge {
  background: linear-gradient(135deg, #1e7d35, #155724);
}

[data-theme="dark"] .itinerary-day--enhanced {
  border-left-color: #28a745;
}

[data-theme="dark"] .itinerary-meal-detail {
  color: #8ba5bb;
}

[data-theme="dark"] .itinerary-meal-detail strong {
  color: #d8e6f0;
}



@media (max-width: 768px) {
  .hotel-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .vehicle-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .customizer-form {
    padding: 1.5rem;
  }

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

  .customizer-actions {
    flex-direction: column;
  }

  .modal-container {
    max-height: 95vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1.25rem;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .btn {
    width: 100%;
    text-align: center;
  }

  .tour-card-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .itinerary-meta {
    flex-direction: column;
    gap: 0.6rem;
  }

  .quote-breakdown {
    grid-template-columns: 1fr;
  }
}
