.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
}

.btn-accent {
  background: var(--color-accent);
  color: #fff;
}

.btn-accent:hover {
  background: #b85f08;
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-border-hover);
  color: var(--color-text);
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-large {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
}

.link-more {
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}

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

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 2rem 1rem 4rem;
  max-width: 800px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5vw, 3rem);
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin-bottom: 1.75rem;
}

.search-bar-section {
  position: relative;
  z-index: 3;
  margin: -4rem auto 3rem;
  width: min(1100px, 100% - 2rem);
}

.search-form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
}

.search-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--color-text-muted);
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  background: var(--color-bg);
}

.search-submit {
  align-self: end;
}

@media (min-width: 768px) {
  .search-form {
    grid-template-columns: repeat(3, 1fr) auto;
    align-items: end;
  }

  .search-field:nth-child(4),
  .search-field:nth-child(5) {
    grid-column: span 1;
  }

  .search-submit {
    grid-row: span 1;
  }
}

@media (min-width: 1024px) {
  .search-form {
    grid-template-columns: repeat(5, 1fr) auto;
  }
}

.destinations-grid,
.ideas-grid,
.steps-grid,
.articles-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .destinations-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.destination-card,
.article-card,
.trip-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.destination-card:hover,
.article-card:hover,
.trip-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.destination-card a,
.article-card a,
.trip-card a {
  text-decoration: none;
  color: inherit;
}

.trip-body-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.trip-card-image > a {
  display: block;
  height: 100%;
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
}

.card-body {
  padding: 1rem 1.1rem 1.25rem;
}

.card-title {
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}

.card-price {
  margin: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.popular-destinations,
.weekend-ideas,
.how-it-works,
.testimonials,
.latest-articles,
.newsletter-section {
  padding: 3rem 0;
}

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

@media (min-width: 768px) {
  .ideas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.idea-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.idea-card:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-card);
}

.idea-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  overflow: visible;
}

.idea-icon path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.idea-label {
  font-weight: 600;
  text-align: center;
}

.steps-grid {
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
  padding: 1rem;
}

.step-number {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  line-height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
}

.testimonials-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.testimonial-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  background: var(--color-bg-card);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.testimonial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
}

.rating {
  color: var(--color-accent);
  letter-spacing: 2px;
  font-size: 0.95rem;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--color-border);
  cursor: pointer;
  padding: 0;
}

.slider-dots button.is-active {
  background: var(--color-primary);
}

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

@media (min-width: 768px) {
  .articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-body {
  padding: 1rem 1.1rem 1.25rem;
}

.article-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
}

.newsletter-section {
  background: var(--color-primary-dark);
  color: #fff;
}

.newsletter-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.newsletter-form .form-group {
  flex: 1 1 180px;
  max-width: 240px;
}

.newsletter-form input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.form-note {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
}

.field-error {
  display: block;
  color: #b00020;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.form-checkbox label {
  font-weight: 400;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  display: flex;
}

.modal-overlay:not(.is-open) {
  display: none;
}

.modal {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow-hover);
}

.modal h2 {
  margin-top: 0;
}

#ai-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8000;
}

#ai-chat-toggle {
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

#ai-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

#ai-chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: min(360px, calc(100vw - 2rem));
  height: 500px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#ai-chat-panel[hidden] {
  display: none !important;
}

.ai-chat-header {
  padding: 14px 16px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.ai-chat-title {
  flex: 1;
}

.ai-chat-title span {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
}

#ai-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.25rem;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  max-width: 82%;
}

.ai-message--bot {
  align-self: flex-start;
}

.ai-message--user {
  align-self: flex-end;
}

.ai-message p {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.ai-message--bot p {
  background: var(--color-bg);
  color: var(--color-text);
}

.ai-message--user p {
  background: var(--color-primary);
  color: #fff;
}

.ai-message--typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-text-muted);
  border-radius: 50%;
  margin: 0 2px;
  animation: typing-dot 1.2s ease-in-out infinite;
}

.ai-message--typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-message--typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-dot {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }

  30% {
    opacity: 1;
  }
}

.ai-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
}

.ai-chat-input-area input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background: var(--color-bg);
}

.ai-chat-input-area input:focus {
  border-color: var(--color-primary);
}

#ai-chat-send {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

#ai-chat-send:hover {
  background: var(--color-primary-dark);
}

@media (max-width: 639px) {
  #ai-chat-panel {
    width: 280px;
    height: 460px;
  }
}

.wishlist-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.wishlist-btn svg {
  overflow: visible;
}

.wishlist-btn path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wishlist-btn.is-saved svg {
  fill: var(--color-accent);
  stroke: var(--color-accent);
}
