/* Theme transitions & toggle */
html {
  scroll-behavior: smooth;
}

html.is-theme-transitioning,
html.is-theme-transitioning *,
html.is-theme-transitioning *::before,
html.is-theme-transitioning *::after {
  transition:
    background-color var(--transition-theme),
    background var(--transition-theme),
    color var(--transition-theme),
    border-color var(--transition-theme),
    box-shadow var(--transition-theme),
    fill var(--transition-theme),
    stroke var(--transition-theme) !important;
}

body {
  background-image: var(--gradient-body);
  background-attachment: fixed;
  transition: background-color var(--transition-theme), color var(--transition-theme);
}

/* Header actions row */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Theme toggle switch */
.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.theme-toggle__track {
  position: relative;
  display: block;
  width: 56px;
  height: 30px;
  background: var(--color-toggle-track);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  transition: background var(--transition-theme), border-color var(--transition-theme), box-shadow var(--transition-theme);
}

[data-theme="dark"] .theme-toggle__track {
  box-shadow: var(--shadow-glow);
  border-color: rgba(122, 154, 110, 0.25);
}

.theme-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: var(--color-toggle-thumb);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-bounce), background var(--transition-theme), box-shadow var(--transition-theme);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

[data-theme="dark"] .theme-toggle__thumb {
  transform: translateX(26px);
  box-shadow: 0 0 12px rgba(212, 176, 106, 0.35);
}

.theme-toggle__icon {
  position: absolute;
  width: 14px;
  height: 14px;
  transition: opacity var(--transition-base), transform var(--transition-bounce);
}

.theme-toggle__icon--sun {
  color: var(--color-gold, #C89B3C);
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle__icon--moon {
  color: var(--color-sand, #DCC7A1);
  opacity: 0;
  transform: rotate(-30deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle__icon--sun {
  opacity: 0;
  transform: rotate(30deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle__icon--moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle:hover .theme-toggle__track {
  border-color: var(--color-accent);
}

.theme-toggle:focus-visible .theme-toggle__track {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Night mode ambient glow on key surfaces */
[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .pricing-card:hover,
[data-theme="dark"] .pricing-card--featured,
[data-theme="dark"] .agencies__inner,
[data-theme="dark"] .testimonial-card,
[data-theme="dark"] .contact__form {
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

[data-theme="dark"] .pricing-card--featured {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

[data-theme="dark"] .btn--primary {
  box-shadow: 0 4px 16px rgba(122, 154, 110, 0.25);
}

[data-theme="dark"] .btn--primary:hover {
  box-shadow: 0 6px 24px rgba(122, 154, 110, 0.35);
}

[data-theme="dark"] .hero__title,
[data-theme="dark"] .section__title {
  text-shadow: 0 0 40px rgba(122, 154, 110, 0.08);
}

[data-theme="dark"] .booking {
  box-shadow: inset 0 1px 0 rgba(122, 154, 110, 0.1);
}

[data-theme="dark"] .nature-card {
  box-shadow: inset 0 1px 0 var(--color-glass-border);
}

[data-theme="dark"] .nature-card:hover {
  box-shadow: var(--shadow-glow), inset 0 1px 0 rgba(122, 154, 110, 0.25);
}

[data-theme="dark"] .footer {
  background: var(--gradient-footer);
  box-shadow: inset 0 1px 0 var(--color-footer-border);
}

[data-theme="dark"] .nav-toggle__bar {
  background: var(--color-text);
}

[data-theme="dark"] .gallery__item {
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .gallery__item:hover {
  box-shadow: var(--shadow-glow);
  border-color: var(--color-accent);
}

[data-theme="dark"] .logo img {
  filter: brightness(1.15) saturate(0.9);
}
