/* =========================================================
   Bali Moon Bike — Theme layer (modernization)
   Loaded AFTER main.min.css, style.css and utilities.css.
   Uses CSS custom properties so future palette tweaks stay in one place.
   ========================================================= */

:root {
  /* Brand palette (preserved) */
  --brand-primary: #ff914d;
  --brand-primary-600: #f47936;
  --brand-primary-100: rgba(255, 145, 77, 0.12);
  --brand-secondary: #6e6960;
  --brand-success: #38b6ff;
  --brand-info: #00bf63;
  --brand-warning: #ffde59;
  --brand-danger: #ff3131;
  --brand-dark: #2d2d2d;
  --brand-muted: #6c757d;

  /* Surfaces */
  --surface-page: #f7f7f5;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(0, 0, 0, 0.55);

  /* Typography */
  --font-heading: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', sans-serif;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.15);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-med: 320ms;
}

/* -------- Base typography -------- */
body {
  font-family: var(--font-body);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
}

/* Sections keep white cards but with softer shadow */
section .container,
#section .container {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* -------- Skip link (a11y) -------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-dark);
  color: #fff;
  padding: 10px 16px;
  z-index: 2000;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  outline: 3px solid var(--brand-primary);
}

/* -------- Navbar refresh -------- */
.navbar.fixed-top {
  background-color: rgba(255, 255, 255, 0.92) !important;
  transition: box-shadow var(--dur-med) var(--ease-out),
    background-color var(--dur-med) var(--ease-out);
}

/* Backdrop-filter is applied ONLY at ≥ lg breakpoint because it creates a new
   containing block that would trap the mobile offcanvas (position: fixed
   descendant) inside the 75px navbar. On mobile the offcanvas must anchor to
   the viewport, so we drop the blur below the navbar-expand-lg breakpoint. */
@media (min-width: 992px) {
  .navbar.fixed-top {
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
  }
}

.navbar.fixed-top.is-scrolled {
  box-shadow: var(--shadow-md);
}

.navbar .nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--brand-dark);
}

.navbar .nav-link.active {
  color: var(--brand-primary) !important;
}

/* -------- Language switcher (bigger, clearer) -------- */
.lang {
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  font-weight: 600;
  color: var(--brand-dark);
}

.lang:hover,
.lang[aria-expanded="true"] {
  background-color: var(--brand-primary-100);
  border-color: var(--brand-primary);
  color: var(--brand-dark);
}

.lang img {
  width: 20px !important;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  margin-left: 0;
}

.lang-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-weight: 500;
}

.lang-dropdown .dropdown-item img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* -------- Buttons -------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.btn-primary {
  box-shadow: 0 4px 14px rgba(255, 145, 77, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(255, 145, 77, 0.45);
}

.btn-outline-primary:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 2px;
}

/* -------- Cards refresh -------- */
.card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card .card-img-top {
  transition: transform var(--dur-med) var(--ease-out);
}

.card:hover .card-img-top {
  transform: scale(1.03);
}

.card .card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--brand-dark);
}

.card .card-text {
  color: var(--brand-muted);
}

/* -------- Hero refresh -------- */
#hero .hero-header h1 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

#hero .hero-header .lead {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

#hero::after {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-success));
}

/* -------- Fallback (missing translation) banner -------- */
.fallback-notice {
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--brand-primary);
  background: linear-gradient(90deg, rgba(255, 145, 77, 0.12), rgba(255, 145, 77, 0.03));
  color: var(--brand-dark);
  padding: 12px 16px;
  margin: 16px 0;
  font-family: var(--font-body);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-xs);
}

.fallback-notice .fallback-notice__icon {
  color: var(--brand-primary);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.fallback-notice .fallback-notice__body {
  flex: 1;
  line-height: 1.5;
}

.fallback-notice .fallback-notice__body strong {
  font-weight: 600;
}

/* Small badge shown on listing items available only in one language */
.lang-only-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--brand-warning);
  color: var(--brand-dark);
  vertical-align: middle;
}

/* -------- Scroll-to-top button -------- */
.scroll-top-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--brand-primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 1030;
  transition: transform var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.scroll-top-btn.is-visible {
  display: inline-flex;
}

.scroll-top-btn:hover,
.scroll-top-btn:focus-visible {
  background: var(--brand-primary-600);
  transform: translateY(-2px);
}

.scroll-top-btn:focus-visible {
  outline: 3px solid rgba(255, 145, 77, 0.35);
  outline-offset: 2px;
}

/* -------- Footer refresh -------- */
#bottom {
  background: linear-gradient(180deg, #2d2d2d 0%, #1c1c1c 100%);
  color: rgba(255, 255, 255, 0.75);
}

#bottom h4 {
  font-family: var(--font-heading);
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
}

#bottom a {
  color: rgba(255, 255, 255, 0.75);
  transition: color var(--dur-fast) var(--ease-out);
}

#bottom a:hover {
  color: var(--brand-primary);
}

.socmed a {
  display: inline-block;
  margin-right: 12px;
  transition: transform var(--dur-fast) var(--ease-out);
}

.socmed a:hover {
  transform: translateY(-3px);
}

/* -------- Breadcrumb refresh -------- */
.breadcrumb {
  background: transparent;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.87rem;
}

.breadcrumb-item+.breadcrumb-item::before {
  color: var(--brand-muted);
}

.breadcrumb-item a {
  color: var(--brand-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--brand-primary);
}

.breadcrumb-item.active {
  color: var(--brand-dark);
  font-weight: 500;
}

/* -------- Form focus -------- */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.2rem var(--brand-primary-100);
}

/* -------- Reduce motion for accessibility -------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* -------- Utility helpers -------- */
.text-brand {
  color: var(--brand-primary) !important;
}

.bg-brand {
  background-color: var(--brand-primary) !important;
}

.rounded-brand {
  border-radius: var(--radius-md) !important;
}

.shadow-brand {
  box-shadow: var(--shadow-md) !important;
}

/* Form textarea height utility (replaces inline style="height:150px"). */
.form-textarea-md {
  height: 150px !important;
}