/*
Theme Name: Namaste Earth Adventure
Theme URI: https://example.com/namasteearth
Author: Namaste Earth
Description: Custom WordPress theme for adventure and hiking treks.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: namasteearth
*/

:root {
  --bg: #f7fbf8;
  --card: #ffffff;
  --text: #173024;
  --muted: #5b6f66;
  --accent: #2e7d5f;
  --border: #dbe9e1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: #123628;
  color: #fff;
  padding: 24px 16px;
}

.site-header h1 {
  margin: 0;
  font-size: 26px;
}

.wrapper {
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 18px;
}

.trek-title {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
}

.trek-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}

.meta-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fcfffd;
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  font-size: 16px;
  font-weight: 600;
}

.section-title {
  margin: 0 0 8px;
  font-size: 22px;
}

.trek-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 960px) {
  .trek-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.reviews-list {
  margin: 0;
  padding-left: 20px;
}

.empty-note {
  color: var(--muted);
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.archive-list li {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
}

.top-header {
  background: #f2f2f2;
  border-bottom: 1px solid #e4e4e4;
  padding: 8px 16px;
}

.top-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d5e3d8;
  color: #123628;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.search-pill {
  flex: 1;
  background: #ddd;
  color: #555;
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 40px;
}

.top-nav {
  display: flex;
  gap: 16px;
  color: #222;
  font-weight: 600;
  font-size: 14px;
}

.trek-page {
  max-width: 1180px;
}

.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  color: #304a3d;
}

.back-link {
  font-weight: 700;
  text-decoration: underline;
  color: #173024;
}

.crumb-sep {
  color: #667a71;
}

.crumb-current {
  font-weight: 700;
}

.title-block {
  margin-bottom: 14px;
}

.title-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 20px;
  align-items: center;
}

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.section-tabs a {
  color: #34463e;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
}

.section-tabs a:hover {
  background: #ecf5f0;
  text-decoration: none;
}

.gallery-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.gallery-main,
.gallery-thumb {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ecf0ed;
}

.gallery-main {
  min-height: 400px;
}

.gallery-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.gallery-thumb {
  min-height: 195px;
}

.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 16px;
}

.gallery-placeholder.small {
  min-height: 80px;
}

.trail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.fact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.fact-label {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 12px;
  margin-bottom: 4px;
}

.fact-value {
  font-size: 20px;
  font-weight: 700;
}

.content-sections {
  display: grid;
  gap: 12px;
}

.section-card {
  scroll-margin-top: 70px;
}

.description-content p:first-child {
  margin-top: 0;
}

@media (max-width: 900px) {
  .top-nav {
    display: none;
  }

  .gallery-section {
    grid-template-columns: 1fr;
  }

  .gallery-main {
    min-height: 250px;
  }

  .gallery-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .trail-facts {
    grid-template-columns: 1fr;
  }

  .title-meta-line {
    font-size: 16px;
  }
}

/* ===== HOMEPAGE ===== */

.home-header {
  background: #2c2c2c;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.home-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

.home-brand:hover {
  text-decoration: none;
}

.brand-icon {
  color: #63d37e;
  font-size: 22px;
  line-height: 1;
}

.brand-name {
  letter-spacing: -0.3px;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.home-nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.home-nav a:hover {
  text-decoration: underline;
}

.btn-login {
  border: 1.5px solid #fff !important;
  border-radius: 999px;
  padding: 6px 18px !important;
}

/* HERO */

.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3a5a44 url() center/cover no-repeat;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .40);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 720px;
  padding: 40px 20px;
}

.hero-heading {
  color: #fff;
  font-size: 56px;
  font-weight: 800;
  margin: 0 0 28px;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.hero-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 6px 20px;
  gap: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
}

.search-icon {
  font-size: 18px;
  color: #888;
  flex-shrink: 0;
}

.hero-search input[type="search"] {
  border: none;
  outline: none;
  flex: 1;
  font-size: 16px;
  padding: 12px 0;
  background: transparent;
  color: #222;
}

.hero-explore-link {
  display: inline-block;
  margin-top: 18px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: underline;
}

.hero-explore-link:hover {
  color: #c5f5d2;
}

/* FAVORITES */

.home-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

.favorites-heading {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 24px;
  color: #1a1a1a;
}

.trek-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trek-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: #fff;
  border: 1px solid #e8e8e8;
  transition: box-shadow .2s, transform .15s;
}

.trek-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
  transform: translateY(-2px);
  text-decoration: none;
}

.trek-card-img {
  position: relative;
  aspect-ratio: 4/3;
  background: #dfe8e2;
  overflow: hidden;
}

.trek-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trek-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c6ddd1, #a3c4b5);
}

.trek-card-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  line-height: 1;
}

.trek-card-body {
  padding: 12px 14px 16px;
}

.trek-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.trek-card-location {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.trek-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #444;
}

.trek-card-difficulty {
  background: #ecf5f0;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 12px;
  color: var(--accent);
}

.trek-card-rating {
  font-weight: 600;
}

.review-count {
  font-weight: 400;
  color: var(--muted);
}

/* FOOTER */

.home-footer {
  background: #2c2c2c;
  color: #aaa;
  padding: 24px;
  text-align: center;
  font-size: 14px;
}

.home-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.home-footer p {
  margin: 0;
}

/* RESPONSIVE */

@media (max-width: 1100px) {
  .trek-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .trek-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-heading {
    font-size: 36px;
  }

  .hero {
    min-height: 380px;
  }

  .home-nav {
    gap: 14px;
  }

  .btn-login {
    display: none;
  }
}

@media (max-width: 480px) {
  .trek-cards {
    grid-template-columns: 1fr;
  }

  .home-nav a:not(.btn-login) {
    font-size: 12px;
  }

  .hero-heading {
    font-size: 28px;
  }

  .favorites-heading {
    font-size: 22px;
  }
}
