/* ============================================================
   TREKKING PAGE — trekking.css
   ============================================================ */

/* ── Page Banner (full definition — shared contact.css not loaded) ── */
.tan-page-banner {
  position: relative;
  height: 500px;
  background: url('../images/t36.jpg') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -120px;
  padding-top: 120px;
}
.tan-page-banner__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 100%);
}
.tan-page-banner__content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.tan-page-banner__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: var(--font-family-primary);
}
.tan-page-banner__breadcrumb a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .85rem;
  transition: color .2s;
}
.tan-page-banner__breadcrumb a:hover { color: var(--primary-color); }
.tan-page-banner__sep { color: rgba(255,255,255,.5); font-size: .7rem; }
.tan-page-banner__breadcrumb span:last-child {
  color: var(--primary-color);
  font-size: .85rem;
  font-weight: 600;
}
.tan-page-banner__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-family: var(--font-family-primary);
  letter-spacing: .5px;
}
.tan-page-banner .tan-page-banner__subtitle {
  color: #e79520 !important;
  font-size: clamp(.8rem, 1.5vw, .95rem);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-family: var(--font-family-primary);
}

/* ── Active nav link ── */
.tan-header__nav-link--active {
  color: var(--primary-color) !important;
}

/* ── Trekking Main Section ── */
.trk-section {
  padding: 60px 0 90px;
  background: #f8f9fa;
}
.trk-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ── Two-column layout ── */
.trk-layout {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.trk-sidebar {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 100px; /* clears compact header (~56px) when scrolled */
}
.trk-listings {
  flex: 1;
  min-width: 0;
}

/* ── Trek Cards Grid ── */
.trk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.trk-card--hidden { display: none !important; }

/* ── Difficulty badge — top-left of card ── */
.trk-difficulty-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-family: var(--font-family-primary);
  pointer-events: none;
}
.trk-difficulty-badge--easy       { background: #22c55e; color: #fff; }
.trk-difficulty-badge--moderate   { background: #f59e0b; color: #fff; }
.trk-difficulty-badge--challenging { background: #ef4444; color: #fff; }
.trk-difficulty-badge--expert     { background: #7c3aed; color: #fff; }

/* ── No-results state ── */
.trk-empty {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}
.trk-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: .4;
}
.trk-empty p {
  font-size: .95rem;
  line-height: 1.6;
  font-family: var(--font-family-primary);
}

/* ── Filter Sidebar Card ── */
.trk-filters {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.trk-filters__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1e39;
  margin: 0 0 24px;
  font-family: var(--font-family-primary);
  padding-bottom: 14px;
  border-bottom: 2px solid #f0f0f0;
  letter-spacing: .3px;
}
.trk-filters__section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}
.trk-filters__section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}
.trk-filters__section-title {
  font-size: .82rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 12px;
  font-family: var(--font-family-primary);
}

/* ── Range display (min label + current value) ── */
.trk-filters__range-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: .82rem;
  color: #6b7280;
  font-family: var(--font-family-primary);
}
.trk-filters__range-val {
  font-weight: 700;
  color: var(--primary-color);
}

/* ── Range slider — orange thumb + filled track ── */
.trk-filters__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 4px;
  /* --val is set by trekking.js to drive the orange fill */
  background: linear-gradient(
    to right,
    var(--primary-color) 0%,
    var(--primary-color) var(--val, 100%),
    #e0e0e0 var(--val, 100%),
    #e0e0e0 100%
  );
  outline: none;
  cursor: pointer;
  margin-top: 4px;
}
.trk-filters__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .15s;
}
.trk-filters__slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.trk-filters__slider::-webkit-slider-thumb:hover { transform: scale(1.15); }
.trk-filters__slider:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; }

/* ── Custom checkboxes ── */
.trk-filters__checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trk-filters__checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.trk-filters__checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.trk-filters__checkbox-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}
.trk-filters__checkbox-box::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.trk-filters__checkbox-item input:checked ~ .trk-filters__checkbox-box {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.trk-filters__checkbox-item input:checked ~ .trk-filters__checkbox-box::after {
  display: block;
}
.trk-filters__checkbox-item:hover .trk-filters__checkbox-box {
  border-color: var(--primary-color);
}
.trk-filters__checkbox-label {
  font-size: .88rem;
  color: #374151;
  font-family: var(--font-family-primary);
}

/* ── Listings Header ── */
.trk-listings__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}
.trk-listings__search-wrap {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.trk-listings__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b8c5;
  font-size: .82rem;
  pointer-events: none;
  transition: color .2s;
}
.trk-listings__search-wrap:focus-within .trk-listings__search-icon {
  color: var(--primary-color);
}
.trk-listings__search {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  font-size: .87rem;
  font-family: var(--font-family-primary);
  color: #374151;
  background: #f8fafc;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  box-sizing: border-box;
}
.trk-listings__search:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(231,149,32,.12);
}
.trk-listings__search::placeholder { color: #b0b8c5; }
.trk-listings__sort-wrap {
  position: relative;
  flex: 0 0 auto;
}
.trk-listings__sort-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: .8rem;
  pointer-events: none;
}
.trk-listings__sort {
  padding: 10px 32px 10px 32px;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-family-primary);
  color: #374151;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23e79520' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  white-space: nowrap;
  box-sizing: border-box;
}
.trk-listings__sort:focus {
  border-color: var(--primary-color);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(231,149,32,.12);
}
.trk-listings__sort:focus { border-color: var(--primary-color); }
.trk-listings__count {
  font-size: .82rem;
  color: #9ca3af;
  margin: 0 0 20px;
  font-family: var(--font-family-primary);
}

/* ── Reset button ── */
.trk-filters__reset {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  background: #fff;
  color: #6b7280;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-family-primary);
  cursor: pointer;
  transition: border-color .2s, color .2s;
  letter-spacing: .3px;
}
.trk-filters__reset:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ── CTA Section ── */
.trk-cta {
  position: relative;
  background: url('../images/t9.jpg') center center / cover no-repeat;
  padding: 80px 0;
  overflow: hidden;
}
.trk-cta__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,15,40,.88) 0%, rgba(10,15,40,.72) 100%);
}
.trk-cta__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}
.trk-cta__inner {
  display: flex;
  align-items: stretch;
  gap: 60px;
}
.trk-cta__left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.trk-cta__right {
  flex-shrink: 0;
  width: 380px;
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.trk-cta__img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  display: block;
}

/* Badge */
.trk-cta__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(231,149,32,.15);
  border: 1px solid rgba(231,149,32,.4);
  color: var(--primary-color);
  padding: 7px 16px;
  border-radius: 30px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-family-primary);
  margin-bottom: 20px;
}

/* Heading */
.trk-cta__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 16px;
  font-family: var(--font-family-primary);
}

/* Description */
.trk-cta__description {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  line-height: 1.7;
  margin: 0 0 32px;
  font-family: var(--font-family-primary);
  max-width: 520px;
}

/* Button */
.trk-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 700;
  font-family: var(--font-family-primary);
  text-decoration: none !important;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(231,149,32,.35);
}
.trk-cta__btn:hover {
  background: #d4841a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(231,149,32,.45);
}
.trk-cta__btn i { transition: transform .2s; }
.trk-cta__btn:hover i { transform: translateX(4px); }

/* ── Filter sidebar close button (desktop: hidden) ── */
.trk-filters__close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #374151;
  transition: background .15s;
  z-index: 1;
}
.trk-filters__close:hover { background: #e5e7eb; }

/* ── Mobile Filter FAB (desktop: hidden) ── */
.trk-filter-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1003;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 22px;
  gap: 8px;
  font-size: .88rem;
  font-weight: 700;
  font-family: var(--font-family-primary);
  cursor: pointer;
  align-items: center;
  box-shadow: 0 4px 20px rgba(231,149,32,.5);
  transition: transform .2s, box-shadow .2s;
}
.trk-filter-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(231,149,32,.6);
}

/* ── Backdrop ── */
.trk-filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.trk-filter-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Pagination ── */
.trk-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.trk-pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
}
.trk-pagination__btn,
.trk-pagination__page {
  min-width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-family-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  transition: all .2s;
  white-space: nowrap;
}
.trk-pagination__btn:hover:not(:disabled),
.trk-pagination__page:hover:not(.trk-pagination__page--active) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.trk-pagination__btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.trk-pagination__page--active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .trk-container { padding: 0 24px; }
  .trk-sidebar { width: 240px; }
  .trk-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .tan-page-banner { height: 320px; margin-top: -60px; padding-top: 60px; }
  .trk-section { padding: 40px 0 60px; }

  /* Sidebar becomes fixed slide-in panel — removed from flex flow */
  .trk-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0;
    width: min(300px, 85vw);
    height: 100vh;
    overflow-y: auto;
    background: #fff;
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    border-radius: 0 16px 16px 0;
    box-shadow: 4px 0 32px rgba(0,0,0,.2);
    top: 0 !important;
    padding: 0;
  }
  .trk-sidebar--open { transform: translateX(0); }

  /* Strip card styling from filters inside the panel */
  .trk-sidebar .trk-filters {
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 64px 24px 32px;
  }

  /* Show close button and FAB */
  .trk-filters__close { display: flex; }
  .trk-filter-fab { display: flex; }
  .trk-filter-backdrop { display: block; }

  /* Listings take full width (sidebar is out of flow) */
  .trk-layout { display: block; }
  .trk-listings { width: 100%; }

  /* 2-col grid on mobile */
  .trk-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Shorter cards on mobile */
  .trk-card.tan-trek__card { height: 280px; }

  .trk-cta { padding: 60px 0; }
  .trk-cta__container { padding: 0 24px; }
  .trk-cta__inner { flex-direction: column; gap: 36px; }
  .trk-cta__right { width: 100%; }
  .trk-cta__img { height: 240px; }
}

@media (max-width: 640px) {
  .tan-page-banner { height: 280px; }
  .tan-page-banner__title { font-size: 1.8rem; }
  .trk-container { padding: 0 16px; }
  .trk-cta__container { padding: 0 16px; }
  .trk-listings__header { flex-wrap: nowrap; gap: 8px; }
  .trk-listings__sort { font-size: .78rem; padding: 9px 28px 9px 28px; }
}
