/* ==========================================================================
   Trekking Nepal — Shared base styles
   Design tokens, reset, layout primitives, navbar, footer, buttons.
   Extracted once and shared by every page (was duplicated per-page in
   the original static export).
   ==========================================================================

/* ==========================================================================
   Trekking Nepal — Base styles, design tokens, reset
   ========================================================================== */

@import url('tokens.css');

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ==========================================================================
   Rich-text content (admin WYSIWYG output, via format_rich_text())
   The global ul/ol reset above strips bullets, numbers, and indentation
   from every list on the site — including real <ul>/<ol> markup authored
   in the trip overview / itinerary day fields. Restore native list
   rendering and paragraph/heading spacing inside those content areas only.
   ========================================================================== */
.lede ul, .lede ol,
.itinerary-item__body ul, .itinerary-item__body ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.lede ul, .itinerary-item__body ul { list-style: disc; }
.lede ol, .itinerary-item__body ol { list-style: decimal; }
.lede ul ul, .lede ol ul, .itinerary-item__body ul ul, .itinerary-item__body ol ul { list-style: circle; }
.lede li, .itinerary-item__body li {
  margin-bottom: 0.5rem;
}
.lede p, .itinerary-item__body p {
  margin: 0 0 1rem;
}
.lede h1, .lede h2, .lede h3, .lede h4, .lede h5, .lede h6,
.itinerary-item__body h1, .itinerary-item__body h2, .itinerary-item__body h3,
.itinerary-item__body h4, .itinerary-item__body h5, .itinerary-item__body h6 {
  margin: 1.5rem 0 0.5rem;
}
.lede > :first-child, .itinerary-item__body > :first-child { margin-top: 0; }
.lede > :last-child, .itinerary-item__body > :last-child { margin-bottom: 0; }

:focus-visible {
  outline: 2px solid var(--pine-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container-page {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

@media (min-width: 640px) {
  .container-page { padding-inline: 2rem; }
}

@media (min-width: 1024px) {
  .container-page { padding-inline: 2.5rem; }
}

.text-balance {
  text-wrap: balance;
}

.section {
  padding-block: 5rem;
}
@media (min-width: 640px) {
  .section { padding-block: 6rem; }
}

.section-tight {
  padding-block: 3.5rem;
}
@media (min-width: 640px) {
  .section-tight { padding-block: 4rem; }
}

.bg-parchment { background-color: var(--parchment); }
.bg-pine-50 { background-color: var(--pine-50); }
.bg-pine-950 { background-color: var(--pine-950); }

.min-h-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.min-h-app > main {
  flex: 1;
}

/* Skip to content */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pine-800);
  color: var(--parchment);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   Section heading
   ========================================================================== */

.section-heading {
  max-width: 42rem;
}
.section-heading--center {
  margin-inline: auto;
  text-align: center;
}
.section-heading__eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--amber-600);
}
.section-heading__title {
  font-size: var(--text-h2);
  font-weight: 600;
  color: var(--pine-950);
}
.section-heading__desc {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
@media (min-width: 640px) {
  .section-heading__desc { font-size: 1.1875rem; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: var(--text-base);
  padding: 0.6rem 1.25rem;
  min-height: 42px;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: var(--text-md);
}
.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: var(--text-sm);
  min-height: 36px;
}
.btn-primary {
  background-color: var(--pine-800);
  color: var(--parchment);
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  background-color: var(--pine-700);
}
.btn-secondary {
  background-color: transparent;
  color: var(--pine-800);
  border: 1px solid var(--pine-800);
}
.btn-secondary:hover {
  background-color: var(--pine-50);
}
.btn-amber {
  background-color: var(--amber-500);
  color: var(--parchment);
  box-shadow: var(--shadow-card);
}
.btn-amber:hover {
  background-color: var(--amber-600);
}
.btn-block {
  width: 100%;
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(18, 51, 34, 0.05);
  background-color: rgba(250, 247, 240, 0.9);
  backdrop-filter: blur(8px);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.5rem;
}
@media (min-width: 640px) {
  .navbar__inner { height: 5.5rem; }
}

/* ==========================================================================
   Brand lockup
   --------------------------------------------------------------------------
   The mark plus a two-line wordmark — "Trekkings" over "Nepal" — matching the
   supplied artwork. Set in the display serif at a size that lets the mark and
   the words read as one unit rather than an icon with a caption.
   ========================================================================== */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--pine-900);
  min-width: 0;
  text-decoration: none;
}
/* The mark is the brand's strongest asset, so it gets real presence rather
   than sitting at icon size. Aspect ratio is preserved by width:auto, and the
   source is served at 2x so it stays crisp on high-density screens. */
.navbar__logo-img {
  height: clamp(2.75rem, 2.1rem + 2vw, 3.75rem);
  width: auto;
  object-fit: contain;
  flex: 0 0 auto;
}
.navbar__logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  /* Tight enough that two lines occupy about the height of the mark. */
  line-height: 0.98;
}
.navbar__logo-line {
  display: block;
  white-space: nowrap;
  font-size: clamp(1.125rem, 0.95rem + 0.75vw, 1.5rem);
}
/* "Nepal" is the shorter word; tracking it out a little squares the block off
   under "Trekkings", the way the artwork does. */
.navbar__logo-line + .navbar__logo-line {
  letter-spacing: 0.055em;
}
/* Below ~380px the wordmark and the two nav actions can't share a row; the
   mark alone still identifies the site. */
@media (max-width: 380px) {
  .navbar__logo-text { display: none; }
}

.navbar__links {
  display: none;
  align-items: center;
  gap: 1.6rem;
}
@media (min-width: 1024px) {
  .navbar__links { display: flex; }
}
/* Navigation was set at 15px, which is small for the primary wayfinding on a
   site people browse at arm's length. */
.navbar__link {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
  padding-block: 0.35rem;
}
.navbar__link:hover,
.navbar__link.is-active {
  color: var(--pine-700);
}
.navbar__link.is-active { font-weight: 600; }

.navbar__actions {
  display: none;
  align-items: center;
  gap: 0.9rem;
}
@media (min-width: 1024px) {
  .navbar__actions { display: flex; }
}
.navbar__login-link {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--ink-soft);
}
.navbar__login-link:hover { color: var(--pine-700); }

/* Logged-in avatar + account dropdown (desktop) */
.navbar__profile {
  position: relative;
}
.navbar__avatar-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: transparent;
  padding: 0.25rem 0.4rem 0.25rem 0.25rem;
  border-radius: 9999px;
  transition: background-color 0.15s ease;
}
.navbar__avatar-btn:hover { background-color: var(--pine-100); }
.navbar__avatar-btn.is-open { background-color: var(--pine-100); }
.navbar__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  object-fit: cover;
  background-color: var(--pine-800);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(18, 51, 34, 0.12);
}
.navbar__avatar-caret {
  color: var(--ink-soft);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.navbar__avatar-btn.is-open .navbar__avatar-caret { transform: rotate(180deg); }

.navbar__dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 19rem;
  max-width: calc(100vw - 2rem);
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(18, 51, 34, 0.08);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 60;
}
.navbar__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.navbar__dropdown-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(18, 51, 34, 0.08);
  margin-bottom: 0.4rem;
}
.navbar__dropdown-head .navbar__avatar { width: 2.75rem; height: 2.75rem; font-size: 1.0625rem; }
.navbar__dropdown-head-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--pine-950);
  line-height: 1.25;
}
.navbar__dropdown-head-role {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber-600);
  background-color: var(--amber-100);
  border-radius: 9999px;
  padding: 0.1rem 0.55rem;
}
.navbar__dropdown-items { display: flex; flex-direction: column; gap: 1px; }
.navbar__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  transition: background-color 0.12s ease;
}
.navbar__dropdown-item svg { color: var(--pine-700); flex-shrink: 0; }
.navbar__dropdown-item:hover { background-color: var(--pine-50); }
.navbar__dropdown-item--danger { color: #b3261e; }
.navbar__dropdown-item--danger svg { color: #b3261e; }
.navbar__dropdown-item--danger:hover { background-color: #fdecea; }
.navbar__dropdown-divider {
  height: 1px;
  background-color: rgba(18, 51, 34, 0.08);
  margin: 0.4rem 0.25rem;
}

/* Logged-in state on mobile panel */
.navbar__mobile-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.5rem;
  border-bottom: 1px solid rgba(18, 51, 34, 0.1);
  margin-bottom: 0.5rem;
}
.navbar__mobile-profile-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--pine-950);
}
.navbar__mobile-profile-role {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--amber-600);
  margin-top: 0.15rem;
}

.navbar__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(18, 51, 34, 0.14);
  background: transparent;
  color: var(--pine-900);
  cursor: pointer;
  flex: 0 0 auto;
}
.navbar__toggle:hover { background: var(--pine-50); }
@media (min-width: 1024px) {
  .navbar__toggle { display: none; }
}

.navbar__mobile {
  display: none;
  border-top: 1px solid rgba(18, 51, 34, 0.05);
  background-color: var(--parchment);
}
.navbar__mobile.is-open {
  display: block;
}
@media (min-width: 1024px) {
  .navbar__mobile { display: none !important; }
}
.navbar__mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-block: 1rem;
}
.navbar__mobile-link {
  display: block;
  border-radius: 0.5rem;
  /* 48px of vertical target: this is the primary navigation on a phone. */
  padding: 0.8rem 0.6rem;
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink-soft);
}
.navbar__mobile-link:hover,
.navbar__mobile-link.is-active { background: var(--pine-50); color: var(--pine-800); }
.navbar__mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid rgba(18, 51, 34, 0.1);
  padding: 1rem 0.5rem 0;
}
.navbar__mobile-actions .btn {
  width: 100%;
}
.navbar__mobile-login {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--ink-soft);
}

body.menu-open {
  overflow: hidden;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--pine-950);
  color: var(--pine-100);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-block: 3.5rem;
}
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { padding-block: 4rem; }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

.footer__brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--parchment);
}
.footer__brand-mark {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  /* Light backdrop behind the mark — the real logo's dark green line art has
     almost no contrast directly against the footer's near-black green
     background, so it gets the same light circle the icon glyph used to
     sit in instead of floating on the dark footer directly. */
  background-color: var(--pine-100);
  overflow: hidden;
}
.footer__brand-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}
.footer__brand-desc {
  margin-top: 1rem;
  max-width: 20rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(240, 243, 240, 0.7);
}
.footer__contact {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9375rem;
}
.footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(240, 243, 240, 0.8);
}
.footer__contact a:hover { color: var(--parchment); }

.footer__col-title {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(240, 243, 240, 0.6);
}
.footer__col-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.footer__col-list a {
  font-size: 0.9375rem;
  color: rgba(240, 243, 240, 0.8);
  transition: color 0.15s ease;
}
.footer__col-list a:hover { color: var(--parchment); }

.footer__bottom {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(240, 243, 240, 0.1);
  padding-block: 1.5rem;
}
@media (min-width: 640px) {
  .footer__bottom { flex-direction: row; justify-content: space-between; }
}
.footer__copy {
  font-size: 0.8125rem;
  color: rgba(240, 243, 240, 0.6);
}
.footer__social {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: rgba(240, 243, 240, 0.1);
  color: rgba(240, 243, 240, 0.8);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.footer__social a:hover {
  background-color: rgba(240, 243, 240, 0.2);
  color: var(--parchment);
}

/* ==========================================================================

/* ==========================================================================
   Shared: portal switcher (customer / guide login toggle)
   ========================================================================== */
.portal-switch {
  display: flex;
  gap: 0.25rem;
  margin: 1.5rem auto 0;
  max-width: fit-content;
  background-color: var(--pine-50);
  border-radius: 9999px;
  padding: 0.25rem;
}
.portal-switch__option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.portal-switch__option:hover { color: var(--pine-800); }
.portal-switch__option.is-active {
  background-color: #fff;
  color: var(--pine-900);
  box-shadow: 0 1px 2px rgba(20, 30, 20, 0.08);
}

/* Success notice, mirroring .form-error — used by the register/apply form. */
.form-success {
  border-radius: 0.5rem;
  background-color: #e6f4ea;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  color: #1e7a3d;
  margin-bottom: 1rem;
}
.auth-card__hint {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Rating line on a trek card. .star-rating itself is defined in trip.css,
   which the trek pages load; these are the card-specific bits. */
.trip-card__rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.4rem 0 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.trip-card__rating strong { color: var(--pine-950); }
.trip-card__rating-count { color: var(--ink-soft); }
.star-rating { display: inline-flex; gap: 0.05rem; color: rgba(18, 51, 34, 0.18); line-height: 0; }
.star-rating .is-filled { color: var(--amber-500); }
