/* ==========================================================================
   PN Tree - Public Styles
   Singular Trees: Single & Archive templates
   ========================================================================== */

/* --------------------------------------------------------------------------
   SINGLE TEMPLATE
   -------------------------------------------------------------------------- */

/* Layout */
.pn-tree-single-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Navigation */
.pn-tree-single-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.pn-tree-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--pn-tree-color-main, #2e7d32);
  font-weight: 500;
  transition: opacity .2s;
}

.pn-tree-back-link:hover {
  opacity: .7;
}

.pn-tree-edit-link {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pn-tree-color-main, #2e7d32);
  transition: all .2s;
  padding: 0;
  line-height: 1;
}

.pn-tree-edit-link i {
  font-size: 22px;
  color: inherit;
  line-height: 1;
}

.pn-tree-edit-link:hover {
  background: rgba(46,125,50,.08);
}

.pn-tree-gpx-link {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--pn-tree-color-main, #2e7d32);
  transition: all .2s;
  padding: 0;
  line-height: 1;
}

.pn-tree-gpx-link i {
  font-size: 22px;
  color: inherit;
  line-height: 1;
}

.pn-tree-gpx-link:hover {
  background: rgba(46,125,50,.08);
}

/* Hero */
.pn-tree-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
}

.pn-tree-hero-image {
  position: absolute;
  inset: 0;
}

.pn-tree-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-tree-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}

.pn-tree-hero-content {
  position: relative;
  z-index: 1;
  padding: 40px;
  color: #fff;
  width: 100%;
}

.pn-tree-hero-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
}

.pn-tree-hero-species {
  font-size: 1.2rem;
  margin: 0 0 4px;
  opacity: .9;
}

.pn-tree-hero-common {
  font-size: 1rem;
  margin: 0 0 16px;
  opacity: .8;
}

.pn-tree-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pn-tree-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
}

.pn-tree-badge i {
  font-size: 16px;
}

.pn-tree-badge-catalog {
  background-color: var(--pn-tree-color-main-blue, #6e6eff);
}

.pn-tree-hero-rating {
  display: flex;
  gap: 2px;
}

.pn-tree-hero-rating i {
  font-size: 22px;
  color: #ffc107;
}

/* Info Cards */
.pn-tree-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.pn-tree-info-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .25s, transform .25s;
}

.pn-tree-info-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  transform: translateY(-2px);
}

.pn-tree-info-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--pn-tree-color-main-grey, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.pn-tree-info-card-icon i {
  font-size: 24px;
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-info-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-info-card p {
  font-size: .9rem;
  margin: 0 0 6px;
  color: #555;
  line-height: 1.5;
}

.pn-tree-info-card p strong {
  color: var(--pn-tree-color-main-alt, #232323);
}

/* Description */
.pn-tree-description {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  line-height: 1.8;
  font-size: 1rem;
  color: #444;
}

.pn-tree-description p:last-child {
  margin-bottom: 0;
}

/* Map Section */
.pn-tree-map-section {
  margin-bottom: 40px;
}

.pn-tree-map-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-map-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

#pn-tree-map {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  z-index: 1;
}

.pn-tree-map-marker {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  background: var(--pn-tree-color-main, #2e7d32);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  margin-left: 0 !important;
  margin-top: 0 !important;
}

.pn-tree-map-marker i {
  color: #fff;
  font-size: 20px;
}

/* Favorite marker: red border */
.pn-tree-map-marker-fav {
  border-color: #e53935 !important;
  box-shadow: 0 2px 8px rgba(229,57,53,.4);
}

/* Visited marker: blue border */
.pn-tree-map-marker-visited {
  border-color: #1e88e5 !important;
  box-shadow: 0 2px 8px rgba(30,136,229,.4);
}

/* Favorite + Visited: gold border */
.pn-tree-map-marker-fav-visited {
  border-color: #ffc107 !important;
  box-shadow: 0 2px 8px rgba(255,193,7,.5);
}

/* Gallery Section */
.pn-tree-gallery-section {
  margin-bottom: 40px;
}

.pn-tree-gallery-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-gallery-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.pn-tree-gallery-item {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}

.pn-tree-gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.pn-tree-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.pn-tree-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.9);
  align-items: center;
  justify-content: center;
}

.pn-tree-lightbox.pn-tree-lightbox-active {
  display: flex;
}

.pn-tree-lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pn-tree-lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  object-fit: contain;
}

.pn-tree-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .2s;
}

.pn-tree-lightbox-close:hover {
  background: rgba(255,255,255,.15);
}

.pn-tree-lightbox-prev,
.pn-tree-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  border: none;
  color: #fff;
  cursor: pointer;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 1;
}

.pn-tree-lightbox-prev { left: 20px; }
.pn-tree-lightbox-next { right: 20px; }

.pn-tree-lightbox-prev:hover,
.pn-tree-lightbox-next:hover {
  background: rgba(255,255,255,.25);
}

.pn-tree-lightbox-prev i,
.pn-tree-lightbox-next i {
  font-size: 28px;
}

/* Directions Section */
.pn-tree-directions-section {
  margin-bottom: 40px;
}

.pn-tree-directions-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-directions-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-directions-content {
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  line-height: 1.7;
  color: #444;
}

/* Directions Button */
.pn-tree-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--pn-tree-color-main, #2e7d32);
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 2px 8px rgba(46,125,50,.3);
}

.pn-tree-directions-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46,125,50,.4);
  color: #fff;
}

.pn-tree-directions-btn i {
  font-size: 20px;
}

/* Videos Section */
.pn-tree-videos-section {
  margin-bottom: 40px;
}

.pn-tree-videos-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-videos-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

.pn-tree-video-item {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.pn-tree-video-item video {
  width: 100%;
  display: block;
}

/* Documents Section */
.pn-tree-documents-section {
  margin-bottom: 40px;
}

.pn-tree-documents-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-documents-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-documents-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pn-tree-document-item {
  margin-bottom: 8px;
}

.pn-tree-document-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none;
  color: var(--pn-tree-color-main-alt, #232323);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .25s, transform .25s;
}

.pn-tree-document-item a:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
  transform: translateY(-1px);
}

.pn-tree-document-item i {
  color: var(--pn-tree-color-main, #2e7d32);
  font-size: 22px;
}

/* --------------------------------------------------------------------------
   GLOBAL MAP SHORTCODE
   -------------------------------------------------------------------------- */

#pn-tree-global-map {
  width: 100%;
  height: 600px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  z-index: 1;
}

.pn-tree-global-map-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.pn-tree-map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.pn-tree-map-filters-label {
  font-weight: 600;
  font-size: .9rem;
  color: var(--pn-tree-color-main-alt, #232323);
  margin-right: 4px;
}

.pn-tree-map-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: #fff !important;
  color: #555;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.pn-tree-map-filter-btn:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-map-filter-btn.pn-tree-filter-active {
  background: var(--pn-tree-color-main, #2e7d32) !important;
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: #fff;
}

.pn-tree-map-filters-separator {
  width: 1px;
  height: 24px;
  background: #ccc;
  margin: 0 4px;
}

.pn-tree-map-user-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.pn-tree-map-user-filter-btn i {
  font-size: 16px;
}

.pn-tree-map-user-filter-btn:hover {
  border-color: #e53935;
  color: #e53935;
}

.pn-tree-map-user-filter-btn[data-user-filter="visited"]:hover {
  border-color: #1e88e5;
  color: #1e88e5;
}

.pn-tree-map-user-filter-btn.pn-tree-user-filter-active[data-user-filter="favorites"] {
  background: #e53935 !important;
  border-color: #e53935;
  color: #fff;
}

.pn-tree-map-user-filter-btn.pn-tree-user-filter-active[data-user-filter="visited"] {
  background: #1e88e5 !important;
  border-color: #1e88e5;
  color: #fff;
}

/* Map Popup */
.pn-tree-map-popup {
  min-width: 200px;
  max-width: 260px;
}

.pn-tree-map-popup-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.pn-tree-map-popup-title {
  font-size: .95rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-map-popup-title a {
  color: inherit;
  text-decoration: none;
}

.pn-tree-map-popup-title a:hover {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-map-popup-species {
  font-size: .8rem;
  color: #777;
  margin: 0 0 4px;
  font-style: italic;
}

.pn-tree-map-popup-location {
  font-size: .8rem;
  color: #888;
  margin: 0 0 6px;
}

.pn-tree-map-popup-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
}

.pn-tree-map-popup-rating {
  margin-top: 4px;
  color: #ffc107;
  font-size: 14px;
}

/* --------------------------------------------------------------------------
   ROUTE SINGLE TEMPLATE
   -------------------------------------------------------------------------- */

.pn-tree-route-single-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.pn-tree-route-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  min-height: 350px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.pn-tree-route-hero-image {
  position: absolute;
  inset: 0;
}

.pn-tree-route-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-tree-route-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}

.pn-tree-route-hero-content {
  position: relative;
  z-index: 1;
  padding: 40px;
  color: #fff;
  width: 100%;
}

.pn-tree-route-hero-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.2;
}

.pn-tree-route-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pn-tree-route-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,.2);
}

.pn-tree-route-badge i {
  font-size: 16px;
}

.pn-tree-route-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.pn-tree-route-description {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  line-height: 1.8;
  font-size: 1rem;
  color: #444;
}

.pn-tree-route-map-section {
  margin-bottom: 40px;
}

.pn-tree-route-map-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-route-map-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

#pn-tree-route-map {
  width: 100%;
  height: 450px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  z-index: 1;
}

.pn-tree-route-trees-section {
  margin-bottom: 40px;
}

.pn-tree-route-trees-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  margin: 0 0 16px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-route-trees-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-route-trees-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* --------------------------------------------------------------------------
   ROUTE ARCHIVE TEMPLATE
   -------------------------------------------------------------------------- */

.pn-tree-route-archive-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

.pn-tree-route-archive-header {
  text-align: center;
  margin-bottom: 40px;
}

.pn-tree-route-archive-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-route-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: .8rem;
  color: #888;
}

.pn-tree-route-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pn-tree-route-card-meta i {
  font-size: 15px;
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-route-difficulty-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
}

/* --------------------------------------------------------------------------
   ARCHIVE TEMPLATE
   -------------------------------------------------------------------------- */

.pn-tree-archive-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* Header */
.pn-tree-archive-header {
  text-align: center;
  margin-bottom: 40px;
}

.pn-tree-archive-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-archive-search {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.pn-tree-archive-search .pn-tree-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 22px;
  pointer-events: none;
}

.pn-tree-archive-search input {
  width: 100%;
  padding: 14px 96px 14px 48px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}

.pn-tree-archive-search input:focus {
  outline: none;
  border-color: var(--pn-tree-color-main, #2e7d32);
  box-shadow: 0 0 0 3px rgba(46,125,50,.15);
}

/* Search action buttons (filter + sort) */
.pn-tree-search-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
}

.pn-tree-search-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: background .2s, color .2s;
  position: relative;
}

.pn-tree-search-action-btn:hover {
  background: rgba(46,125,50,.08) !important;
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-search-action-btn.pn-tree-dropdown-open {
  background: var(--pn-tree-color-main, #2e7d32) !important;
  color: #fff;
}

.pn-tree-search-action-btn i {
  font-size: 20px;
}

/* Filter badge */
.pn-tree-filter-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 4px;
  box-sizing: border-box;
}

/* Grid */
.pn-tree-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card */
.pn-tree-archive-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: box-shadow .25s, transform .25s;
}

/* Card overlay — matches image area for button positioning */
.pn-tree-archive-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  aspect-ratio: 4/3;
  pointer-events: none;
  z-index: 3;
}

.pn-tree-archive-card-overlay > button,
.pn-tree-archive-card-overlay > a {
  pointer-events: auto;
}

.pn-tree-archive-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  transform: translateY(-4px);
}

.pn-tree-archive-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pn-tree-archive-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.pn-tree-archive-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.pn-tree-archive-card:hover .pn-tree-archive-card-img {
  transform: scale(1.05);
}

.pn-tree-archive-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
}

.pn-tree-archive-card-body {
  padding: 16px 20px 20px;
}

.pn-tree-archive-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-archive-card-species {
  font-size: .85rem;
  margin: 0 0 8px;
  color: #777;
}

.pn-tree-archive-card-location {
  font-size: .85rem;
  margin: 0 0 8px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pn-tree-archive-card-location i {
  font-size: 16px;
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-archive-card-rating {
  display: flex;
  gap: 1px;
}

.pn-tree-archive-card-rating i {
  font-size: 16px;
  color: #ffc107;
}

/* Add Card */
.pn-tree-archive-card-add {
  border: 2px dashed #ccc;
  background: transparent;
  box-shadow: none;
}

.pn-tree-archive-card-add:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
  box-shadow: none;
  transform: none;
}

.pn-tree-archive-card-add-link {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.pn-tree-archive-card-add-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #999;
  transition: color .2s;
}

.pn-tree-archive-card-add:hover .pn-tree-archive-card-add-content {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-archive-card-add-content i {
  font-size: 48px;
}

.pn-tree-archive-card-add-content span {
  font-size: 1rem;
  font-weight: 500;
}

/* Empty State */
.pn-tree-archive-empty {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.pn-tree-archive-empty i {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

.pn-tree-archive-empty p {
  font-size: 1.1rem;
}

.pn-tree-archive-empty-action {
  text-align: center;
  margin-top: 20px;
}

/* Archive Filters */
.pn-tree-archive-filters {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Dropdown panels */
.pn-tree-dropdown-panel {
  width: 100%;
  max-width: 800px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  padding: 16px 20px;
  margin-top: 8px;
  animation: pnTreeFadeIn .2s ease;
}

.pn-tree-dropdown-category {
  margin-bottom: 12px;
}

.pn-tree-dropdown-category:last-child {
  margin-bottom: 0;
}

.pn-tree-dropdown-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #999;
  margin-bottom: 8px;
}

.pn-tree-dropdown-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@keyframes pnTreeFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Individual chip */
.pn-tree-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}

.pn-tree-chip:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-chip.pn-tree-chip-active {
  background: var(--pn-tree-color-main, #2e7d32);
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: #fff;
}

.pn-tree-chip-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pn-tree-chip.pn-tree-chip-active .pn-tree-chip-dot {
  border: 2px solid #fff;
  width: 8px;
  height: 8px;
}

/* Active filters summary */
.pn-tree-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 12px 0 0;
  animation: pnTreeFadeIn .2s ease;
}

.pn-tree-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(46,125,50,.1);
  color: var(--pn-tree-color-main, #2e7d32);
  border-radius: 16px;
  font-size: .82rem;
  font-weight: 500;
}

.pn-tree-active-filter-remove {
  background: none;
  border: none;
  color: var(--pn-tree-color-main, #2e7d32);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  opacity: .7;
  transition: opacity .15s;
}

.pn-tree-active-filter-remove:hover {
  opacity: 1;
}

.pn-tree-active-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: none;
  border: 1px solid #c62828;
  border-radius: 16px;
  color: #c62828;
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.pn-tree-active-filter-clear:hover {
  background: #c62828;
  color: #fff;
}

/* Pagination */
.pn-tree-archive-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pn-tree-archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  font-size: .9rem;
  font-weight: 500;
  transition: border-color .2s, color .2s, background .2s;
}

.pn-tree-archive-pagination .page-numbers:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-archive-pagination .page-numbers.current {
  background: var(--pn-tree-color-main, #2e7d32);
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: #fff;
}

.pn-tree-archive-pagination .page-numbers.dots {
  border: none;
  cursor: default;
}

.pn-tree-archive-pagination .page-numbers.prev,
.pn-tree-archive-pagination .page-numbers.next {
  border: none;
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-archive-pagination .page-numbers i {
  font-size: 22px;
}

/* --------------------------------------------------------------------------
   FAVORITES
   -------------------------------------------------------------------------- */

/* Single nav actions wrapper */
.pn-tree-single-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Favorite button - single */
button.pn-tree-favorite-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  color: var(--pn-tree-color-main, #2e7d32) !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

button.pn-tree-favorite-btn i {
  font-size: 22px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

button.pn-tree-favorite-btn:hover {
  background: rgba(46,125,50,.08) !important;
}

button.pn-tree-favorite-btn.pn-tree-favorite-active,
button.pn-tree-favorite-btn.pn-tree-favorite-active:hover {
  color: #e53935 !important;
  background: rgba(229,57,53,.08) !important;
}

button.pn-tree-favorite-btn.pn-tree-favorite-active i {
  color: #e53935 !important;
}

/* Visited button - single */
button.pn-tree-visited-btn {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  color: var(--pn-tree-color-main, #2e7d32) !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

button.pn-tree-visited-btn i {
  font-size: 22px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

button.pn-tree-visited-btn:hover {
  background: rgba(46,125,50,.08) !important;
}

button.pn-tree-visited-btn.pn-tree-visited-active,
button.pn-tree-visited-btn.pn-tree-visited-active:hover {
  color: #2e7d32 !important;
  background: rgba(46,125,50,.12) !important;
}

button.pn-tree-visited-btn.pn-tree-visited-active i {
  color: #2e7d32 !important;
}

/* Favorite button - archive card overlay */
.pn-tree-archive-wrapper button.pn-tree-archive-favorite-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #666 !important;
  transition: all .2s;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.pn-tree-archive-wrapper button.pn-tree-archive-favorite-btn i {
  font-size: 20px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.pn-tree-archive-wrapper button.pn-tree-archive-favorite-btn:hover {
  background: #fff !important;
  color: #e53935 !important;
}

.pn-tree-archive-wrapper button.pn-tree-archive-favorite-btn.pn-tree-favorite-active {
  color: #e53935 !important;
}

.pn-tree-archive-wrapper button.pn-tree-archive-favorite-btn.pn-tree-favorite-active i {
  color: #e53935 !important;
}

/* Visited button - archive card overlay */
button.pn-tree-archive-visited-btn {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #666 !important;
  transition: all .2s;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

button.pn-tree-archive-visited-btn i {
  font-size: 18px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

button.pn-tree-archive-visited-btn:hover {
  background: #fff !important;
  color: #2e7d32 !important;
}

button.pn-tree-archive-visited-btn.pn-tree-visited-active {
  color: #2e7d32 !important;
}

button.pn-tree-archive-visited-btn.pn-tree-visited-active i {
  color: #2e7d32 !important;
}

/* Favorite button - route archive card overlay */
button.pn-tree-archive-route-favorite-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #666 !important;
  transition: all .2s;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

button.pn-tree-archive-route-favorite-btn i {
  font-size: 20px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

button.pn-tree-archive-route-favorite-btn:hover {
  background: #fff !important;
  color: #e53935 !important;
}

button.pn-tree-archive-route-favorite-btn.pn-tree-favorite-active {
  color: #e53935 !important;
}

button.pn-tree-archive-route-favorite-btn.pn-tree-favorite-active i {
  color: #e53935 !important;
}

/* Edit button - archive card overlay */
a.pn-tree-archive-edit-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 2;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50% !important;
  border: none !important;
  background: rgba(255,255,255,.85) !important;
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #666 !important;
  transition: all .2s;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  box-shadow: none !important;
  text-decoration: none !important;
}

a.pn-tree-archive-edit-btn i {
  font-size: 18px !important;
  color: inherit !important;
  line-height: 1;
  margin: 0;
  padding: 0;
}

a.pn-tree-archive-edit-btn:hover {
  background: #fff !important;
  color: #1976d2 !important;
}

/* --------------------------------------------------------------------------
   COMMENTS SECTION
   -------------------------------------------------------------------------- */

.pn-tree-comments-section {
  margin-top: 64px;
}

.pn-tree-comments-section h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--pn-tree-color-main-alt, #232323);
}

.pn-tree-comments-section h2 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

/* Comment form */
.pn-tree-comment-form-wrapper {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.pn-tree-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pn-tree-comment-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pn-tree-comment-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-family: inherit;
  font-size: .95rem;
  resize: vertical;
  transition: border-color .2s;
  box-sizing: border-box;
}

.pn-tree-comment-textarea:focus {
  border-color: var(--pn-tree-color-main, #2e7d32);
  outline: none;
}

.pn-tree-comment-submit-btn {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--pn-tree-color-main, #2e7d32) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .2s;
  box-shadow: none !important;
}

.pn-tree-comment-submit-btn:hover {
  opacity: .9;
}

.pn-tree-comment-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Login CTA */
.pn-tree-comment-login-cta {
  text-align: center;
  padding: 32px;
  background: #f5f5f5;
  border-radius: 16px;
  margin-bottom: 32px;
}

.pn-tree-comment-login-cta .material-icons-outlined {
  font-size: 36px;
  color: #999;
}

.pn-tree-comment-login-cta p {
  margin: 8px 0 0;
  color: #666;
}

.pn-tree-comment-login-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
}

.pn-tree-comment-login-btn,
.pn-tree-comment-register-btn {
  padding: 10px 24px;
  border-radius: 8px;
  border: none !important;
  cursor: pointer;
  font-size: .9rem;
  transition: opacity .2s;
  box-shadow: none !important;
}

.pn-tree-comment-login-btn {
  background: var(--pn-tree-color-main, #2e7d32) !important;
  color: #fff !important;
}

.pn-tree-comment-register-btn {
  background: #fff !important;
  color: var(--pn-tree-color-main, #2e7d32) !important;
  border: 2px solid var(--pn-tree-color-main, #2e7d32) !important;
}

.pn-tree-comment-login-btn:hover,
.pn-tree-comment-register-btn:hover {
  opacity: .85;
}

/* Comment items */
.pn-tree-comment {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.pn-tree-comment:last-child {
  border-bottom: none;
}

.pn-tree-comment-body {
  flex: 1;
}

.pn-tree-comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pn-tree-comment-author {
  font-weight: 600;
  font-size: .95rem;
}

.pn-tree-comment-date {
  font-size: .8rem;
  color: #999;
}

.pn-tree-comment-content {
  font-size: .95rem;
  line-height: 1.5;
  color: #444;
}

/* Comment action bar (media buttons + submit) */
.pn-tree-comment-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pn-tree-comment-media-btns {
  display: flex;
  gap: 4px;
}

.pn-tree-comment-media-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: color .2s, background .2s;
}

.pn-tree-comment-media-btn:hover {
  color: var(--pn-tree-color-main, #2e7d32);
  background: rgba(46,125,50,.08) !important;
}

.pn-tree-comment-media-btn i {
  font-size: 20px;
}

/* Comment media preview (before submit) */
.pn-tree-comment-media-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.pn-tree-media-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.pn-tree-media-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pn-tree-media-preview-item i {
  font-size: 24px;
  color: #888;
}

.pn-tree-media-preview-name {
  font-size: .6rem;
  color: #888;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 64px;
  padding: 0 4px;
}

.pn-tree-media-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none !important;
  background: rgba(0,0,0,.6) !important;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pn-tree-media-preview-remove:hover {
  background: #e53935 !important;
}

/* Comment media display (rendered in comments) */
.pn-tree-comment-media {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pn-tree-comment-media-img {
  display: block;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
}

.pn-tree-comment-media-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s;
}

.pn-tree-comment-media-img:hover img {
  transform: scale(1.05);
}

.pn-tree-comment-media-video {
  max-width: 320px;
  border-radius: 8px;
}

.pn-tree-comment-media-audio {
  width: 100%;
  max-width: 320px;
}

/* Comment reactions */
.pn-tree-comment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  position: relative;
  align-items: center;
}

.pn-tree-reaction-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #fff !important;
  cursor: pointer;
  font-size: .82rem;
  transition: all .2s;
}

.pn-tree-reaction-pill:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-reaction-pill.pn-tree-reaction-active {
  border-color: var(--pn-tree-color-main, #2e7d32);
  background: rgba(46,125,50,.08) !important;
}

.pn-tree-reaction-emoji {
  font-size: 1rem;
  line-height: 1;
}

.pn-tree-reaction-count {
  font-size: .78rem;
  font-weight: 600;
  color: #555;
}

.pn-tree-reaction-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px dashed #ccc;
  background: transparent !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  transition: all .2s;
}

.pn-tree-reaction-add-btn:hover {
  border-color: var(--pn-tree-color-main, #2e7d32);
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-reaction-add-btn i {
  font-size: 16px;
}

/* Emoji picker */
.pn-tree-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 6px;
  z-index: 10;
  animation: pnTreeFadeIn .15s ease;
}

.pn-tree-emoji-picker-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent !important;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.pn-tree-emoji-picker-btn:hover {
  background: rgba(46,125,50,.1) !important;
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  /* Single */
  .pn-tree-hero {
    min-height: 300px;
    border-radius: 12px;
  }

  .pn-tree-hero-content {
    padding: 24px;
  }

  .pn-tree-hero-title {
    font-size: 1.6rem;
  }

  .pn-tree-info-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pn-tree-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .pn-tree-videos-grid {
    grid-template-columns: 1fr;
  }

  #pn-tree-map {
    height: 280px;
  }

  .pn-tree-description {
    padding: 20px;
  }

  /* Comments */
  .pn-tree-comment-form-wrapper {
    gap: 10px;
  }

  .pn-tree-comment-login-cta {
    padding: 24px 16px;
  }

  /* Media preview mobile */
  .pn-tree-media-preview-item {
    width: 56px;
    height: 56px;
  }

  /* Comment media mobile */
  .pn-tree-comment-media-video,
  .pn-tree-comment-media-audio {
    max-width: 100%;
  }

  /* Emoji picker mobile */
  .pn-tree-emoji-picker {
    position: fixed;
    bottom: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-bottom: 0;
    z-index: 9999;
  }

  /* Archive */
  .pn-tree-dropdown-panel {
    max-width: 100%;
  }

  .pn-tree-archive-search input {
    padding-right: 88px;
  }

  .pn-tree-chip {
    padding: 5px 12px;
    font-size: .8rem;
  }

  .pn-tree-archive-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pn-tree-archive-header h1 {
    font-size: 1.5rem;
  }

  /* Global Map */
  #pn-tree-global-map {
    height: 400px;
  }

  .pn-tree-map-filters {
    gap: 6px;
  }

  /* Route Single */
  .pn-tree-route-hero {
    min-height: 250px;
  }

  .pn-tree-route-hero-content {
    padding: 24px;
  }

  .pn-tree-route-hero-title {
    font-size: 1.5rem;
  }

  .pn-tree-route-info-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pn-tree-route-trees-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #pn-tree-route-map {
    height: 300px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .pn-tree-info-cards {
    grid-template-columns: 1fr 1fr;
  }

  .pn-tree-archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pn-tree-route-info-cards {
    grid-template-columns: 1fr 1fr;
  }

  .pn-tree-route-trees-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.pn-tree-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.pn-tree-toast-item {
  padding: 12px 24px;
  border-radius: 30px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
  pointer-events: auto;
  background: #333;
}

.pn-tree-toast-item.pn-tree-toast-success {
  background: #2e7d32;
}

.pn-tree-toast-item.pn-tree-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.pn-tree-toast-item.pn-tree-toast-hiding {
  opacity: 0;
  transform: translateY(-10px);
}

/* ==========================================================================
   RANKING SHORTCODE
   ========================================================================== */
.pn-tree-ranking-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.pn-tree-ranking-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 700;
  color: #2e7d32;
  margin-bottom: 24px;
}

.pn-tree-ranking-title i {
  font-size: 28px;
  color: #f9a825;
}

.pn-tree-ranking-empty {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.pn-tree-ranking-empty i {
  font-size: 64px;
  color: #ccc;
  display: block;
  margin-bottom: 16px;
}

.pn-tree-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pn-tree-ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: transform .15s;
}

.pn-tree-ranking-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
}

.pn-tree-ranking-top {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border: 1px solid #c8e6c9;
}

.pn-tree-ranking-position {
  min-width: 36px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #555;
}

.pn-tree-ranking-top .pn-tree-ranking-position {
  font-size: 26px;
}

.pn-tree-ranking-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pn-tree-ranking-info {
  flex: 1;
  min-width: 0;
}

.pn-tree-ranking-name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pn-tree-ranking-count {
  display: block;
  font-size: 13px;
  color: #777;
}

.pn-tree-ranking-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pn-tree-ranking-badge-icon {
  font-size: 20px;
  cursor: default;
}

/* ==========================================================================
   EXPLORER PANEL SHORTCODE
   ========================================================================== */
.pn-tree-explorer-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0;
}

.pn-tree-explorer-login-cta {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.pn-tree-explorer-login-cta i {
  font-size: 64px;
  color: #ccc;
  display: block;
  margin-bottom: 16px;
}

.pn-tree-explorer-login-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

/* Header */
.pn-tree-explorer-header {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, #2e7d32, #43a047);
  border-radius: 16px;
  padding: 28px 32px;
  color: #fff;
  margin-bottom: 20px;
}

.pn-tree-explorer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,.4);
  flex-shrink: 0;
}

.pn-tree-explorer-header-info {
  flex: 1;
}

.pn-tree-explorer-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
}

.pn-tree-explorer-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.pn-tree-explorer-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  opacity: .9;
}

.pn-tree-explorer-stat i {
  font-size: 18px;
}

/* Progress */
.pn-tree-explorer-progress {
  background: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 20px;
}

.pn-tree-explorer-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}

.pn-tree-explorer-progress-label {
  font-weight: 600;
}

.pn-tree-explorer-progress-bar {
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
}

.pn-tree-explorer-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #43a047, #2e7d32);
  border-radius: 5px;
  transition: width .4s ease;
}

.pn-tree-explorer-all-earned {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border-radius: 10px;
  border: 1px solid #ffe082;
}

.pn-tree-explorer-all-earned span {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.pn-tree-explorer-all-earned p {
  margin: 0;
  font-weight: 600;
  color: #f57f17;
}

/* How it works */
.pn-tree-explorer-howto {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: #f1f8e9;
  border-radius: 12px;
  border-left: 4px solid var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-explorer-howto h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  color: #333;
  margin-bottom: 8px;
}

.pn-tree-explorer-howto h3 i {
  color: var(--pn-tree-color-main, #2e7d32);
}

.pn-tree-explorer-howto p {
  font-size: .9rem;
  color: #555;
  line-height: 1.6;
  margin: 0 0 6px;
}

.pn-tree-explorer-howto p:last-child {
  margin-bottom: 0;
}

/* Badges */
.pn-tree-explorer-badges-section {
  margin-bottom: 20px;
}

.pn-tree-explorer-badges-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  color: #333;
  margin-bottom: 16px;
}

.pn-tree-explorer-badges-section h3 i {
  color: #f9a825;
}

.pn-tree-explorer-badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.pn-tree-explorer-badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  text-align: center;
  transition: transform .15s;
}

.pn-tree-explorer-badge:hover {
  transform: translateY(-2px);
}

.pn-tree-explorer-badge-icon {
  font-size: 36px;
  line-height: 1;
}

.pn-tree-explorer-badge-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.pn-tree-explorer-badge-threshold {
  font-size: 11px;
  color: #999;
}

.pn-tree-explorer-badge-earned {
  border: 2px solid #43a047;
}

.pn-tree-explorer-badge-locked {
  opacity: .45;
}

.pn-tree-explorer-badge-locked .pn-tree-explorer-badge-icon {
  filter: grayscale(1);
}

.pn-tree-explorer-badge-lock {
  position: absolute;
  top: 6px;
  right: 6px;
}

.pn-tree-explorer-badge-lock i {
  font-size: 14px;
  color: #aaa;
}

/* Visited trees */
.pn-tree-explorer-visited-section h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  color: #333;
  margin-bottom: 16px;
}

.pn-tree-explorer-visited-section h3 i {
  color: #2e7d32;
}

.pn-tree-explorer-visited-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.pn-tree-explorer-visited-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  text-decoration: none;
  color: #333;
  transition: transform .15s, box-shadow .15s;
}

.pn-tree-explorer-visited-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.14);
}

.pn-tree-explorer-visited-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.pn-tree-explorer-visited-title {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   RESPONSIVE - RANKING & EXPLORER PANEL
   ========================================================================== */
@media (max-width: 600px) {
  .pn-tree-ranking-row {
    padding: 10px 12px;
    gap: 10px;
  }

  .pn-tree-ranking-badges {
    display: none;
  }

  .pn-tree-explorer-header {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 14px;
  }

  .pn-tree-explorer-stats {
    justify-content: center;
  }

  .pn-tree-explorer-badges-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pn-tree-explorer-visited-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
