/* ====================================================================
   WHATSAPP MINT GREEN MINIMALIST DESIGN SYSTEM
   HIGH-CONTRAST ACCESSIBILITY EDITION v2 🟢🔒
   ==================================================================== */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  display: flex;
  /* Sleek, ultra-clean WhatsApp light background framework */
  background: #f4f6f5;
  /* Deep charcoal readability text color */
  color: #2b2927;
}

nav {
  width: 280px;
  height: 100vh;
  /* Deepened to official high-contrast WhatsApp Dark Emerald */
  background: #075E54;
  color: white;
  padding: 20px;
  position: fixed;
  overflow-y: auto;
    background-color: #011402;
}

main {
  margin-left: 320px;
  padding: 15px 20px 20px 20px;
  flex: 1;
}

nav h3 {
  /* Crisp, bright mint green for the heading anchor */
  color: #8ff0a4;
  border-bottom: 1px solid #128C7E;
  padding-bottom: 10px;
}

nav a {
  /* Pure crisp white for 100% text-contrast readability score */
  color: #ffffff;
  text-decoration: none;
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #128C7E;
  font-weight: 500; /* Adds slightly more weight for effortless reading */
  transition: 0.2s ease-in-out;
}

nav a:hover {
  /* ---> FIX: Locks text at pure white and pushes background into deep midnight-pine */
  color: #ffffff !important;
  background: #053e37;
  padding-left: 8px; /* Slightly increased for a snappy visual slide movement */
}

.card {
  background: white;
  padding: 8px 15px 15px 15px;
  border-radius: 12px;
  /* Clean modern layout shadow drop */
  box-shadow: 0 4px 12px rgba(18, 140, 126, 0.04);
  max-width: 900px;
  /* Crisp minimalist accent border line */
  border: 1px solid #3A98E6;
}

h1 {
  font-size: 30px;
  margin-bottom: 15px;
  margin-top: 0;
  /* Authoritative Deep WhatsApp Emerald Brand Color */
  color: #075E54;
  text-align: center;
  line-height: 1;
}

h2 {
  font-size: 15px;
  margin-bottom: 0;
  margin-top: 0;
  /* Sub-heading soft dark slate signature tint */
  color: #4a665a;
  text-align: center;
  line-height: 1;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  /* Blends item photos with a clean balanced border frame */
  border: 1px solid #d4ded9;
  display: block;
}

.desc {
  white-space: pre-wrap;
  background: #fafbfc;
  padding: 20px;
  /* Solid accent bar shifts to primary WhatsApp Teal */
  border-left: 5px solid #128C7E;
  font-size: 1.1em;
  line-height: 1.6;
  margin: 20px 0;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
  color: #527063;
  font-weight: bold;
  text-decoration: none;
}

.back-link:hover {
  color: #128C7E;
}

.gallery-container {
  /* Crisp, clean light background container */
  background: #f7faf8;
  padding: 5px 20px 20px 20px;
  border-radius: 12px;
  margin: 10px 0 25px 0;
  /* border: 1px solid #3A98E6;  Consistent teal border */
  text-align: center;
  box-shadow: 0 2px 4px rgba(18, 140, 126, 0.02); 
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

.gallery-nav button {
  /* Interactive actions mapped to Deep Emerald Green */
  background: #075E54;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s, transform 0.1s;
  font-size: 0.9em;
}

.gallery-nav button:hover {
  background: #128C7E;
  transform: translateY(-1px);
}

.gallery-nav button:active {
  transform: translateY(0px);
}

#picStatus {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  color: #527063;
  min-width: 60px;
}

/* --- Sidebar Search Field (Matches High-Contrast Specification) --- */
.search-sidebar-container {
  padding: 15px 0;
  border-bottom: 1px solid #128C7E;
  margin-top: 2px;
  margin-bottom: 20px;
}

#searchBar {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  /* Dark teal backing inside the midnight sidebar for sharp legibility */
  background: #24472b;
  border: 1px solid #075E54;
  border-radius: 6px;
  color: white;
  box-sizing: border-box;
  font-family: inherit;
}

#searchBar::placeholder {
  color: #a8d4ce;
  font-weight: bold;
}

#searchBar:focus {
  outline: none;
  /* Focus lines trigger energetic WhatsApp Mint Green */
  border-color: #25D366;
  background: #24472b;
  font-weight: bold;
}

/* --- Internal Custom Text Elements (Non-clashing) --- */
.search-header-title {
  font-size: 22px;
  font-weight: bold;
  color: #075E54;
  margin-bottom: 4px;
  text-align: center;
}

.search-header-sub {
  color: #527063;
  font-size: 13px;
  margin-bottom: 15px;
  text-align: center;
}

.search-main-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e1e8e5;
  gap: 20px;
}

.search-thumb {
  width: 65px;
  height: 65px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
  border: 1px solid #8ba196;
  margin-right: 15px;
  flex-shrink: 0;
}

.search-main-item:last-child {
  border-bottom: none;
}

.search-main-details a {
  display: block;
  /* Preserved high-contrast crimson highlights */
  color: #721c24;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 3px;
  line-height: 1.4;
}

.search-main-details a:hover {
  text-decoration: underline;
  color: #8c1d1d;
}

.search-main-id {
  display: block;
  font-size: 11px;
  color: #768a80;
}

.search-main-btn {
  /* Preserved quick-find action highlight button */
  background: #8c1d1d;
  color: white !important;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  transition: background 0.2s;
}

.search-main-btn:hover {
  background: #691414;
}

.search-main-none {
  padding: 12px;
  background: #fff3cd;
  color: #856404;
  border-radius: 6px;
  border: 1px solid #ffeeba;
  font-size: 13px;
  margin-top: 10px;
}

.specs-sublink {
  font-size: 0.90em;
  color: #527063;
  text-decoration: none;
  margin-top: 4px;
  display: inline-block;
}

.specs-sublink:hover {
  color: #128C7E;
  text-decoration: underline;
}

/* --- Object Crawler Navigation Block --- */
.page-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 0px;
  padding-top: 10px;
  border-top: 1px solid #e1e8e5;
  clear: both;
}

.page-navigation a {
  display: inline-block;
  color: #527063;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.2s ease;
}

.page-navigation a:hover {
  color: #128C7E;
}

.page-navigation .nav-pipe {
  color: #b3c7be;
  font-size: 0.95em;
}

/* INVENTORY QUANTITY TRACKING BADGE */
.inventory-quantity-badge {
  margin-top: 10px;
  padding-top: 5px;
  text-align: bottom;
  font-family: sans-serif;
  font-size: 16px;
  color: #4a5c53;
}

/* CRIMSON ACCENT HIGHLIGHT FOR NUMBERS/LETTERS */
.inventory-quantity-badge span {
  font-size: 16px;
  color: #721c24;
  font-weight: bold;
  margin-left: 4px;
}

/* CLEAN RESPONSIVE REGISTRY DISCLAIMER STYLING */
.registry-disclaimer {
  display: inline-block;
  width: 100%;
  clear: both;
  font-size: 0.85em;
  color: #1d2b24;
  line-height: 1.4;
  background-color: #f1f5f3;
  border-left: 3px solid #b8c7c0;
  padding: 10px 15px 8px 15px;
  margin-top: 25px;
  margin-bottom: 0px;
  box-sizing: border-box;
}

.registry-disclaimer b {
  color: #333333;
}

/* Appraisal Header Title Styling for High-Contrast Accessibility */
.appraisal-gold-header {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: bold;
  /* Polished clean contrast appraisal gold */
  color: #ba931a;
}

/* LIGHTSPEED FLEX INTEGRATION FOR CATEGORY LISTINGS */
main ul {
  list-style: none;
  padding-left: 0;
}

/* MULTI-NODE TIGHT HIGH-DENSITY SPACING RULE */
main ul li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.list-thumb {
  width: 65px;
  height: 65px;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  border: 1px solid #8ba196;
  margin-right: 15px;
  flex-shrink: 0;
}

.list-thumb-placeholder {
  width: 65px;
  height: 65px;
  background: #e4ece8;
  border-radius: 6px;
  border: 1px dashed #abbfb5;
  margin-right: 15px;
  flex-shrink: 0;
}

.sitemap-list-container {
  /* Your custom sitemap-only tweaks go here! */
    background-color: #ffffff;
}

.sitemap-gallery-container {
  /* Your custom sitemap-only tweaks go here! */
  padding: 5px 20px 20px 20px;
  border-radius: 12px;
  margin: 10px 0 25px 0;
  border: 1px solid #ebdcc5;
  text-align: center;
  box-shadow: 0 2px 4px rgba(27, 26, 24, 0.03);
    background-color: #ffffff;
}

.category-subtitle {
    color: #4a3b32;
    font-size: 1.0em;
    line-height: 1.4;
    margin: 8px 0 24px 0;
    font-style: italic;
}

/* Sidebar Compliance Utility Layout */
.sidebar-divider {
    border-top: 1px solid #444;
    margin: 5px 0;
}

.sidebar-trust-link {
    font-size: 1.0em;
    opacity: 1;
    font-weight: Normal;
}

.category-subtitle-index {
    color: #020900;
    font-size: 1.0em;
    line-height: 1.4;
    margin: 8px 0 24px 0;
    font-style: italic;
}

.sitemap-container {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px dotted #444;
    opacity: 0.6;
}

.sitemap-link {
    color: #093071;
    font-size: 13px;
    text-decoration: none;
    font-weight: bold;
}

/* Clickable category subtitle link */
.card h2 a {
  color: #666;
  text-decoration: none;
  transition: color 0.15s ease;
}

.card h2 a:hover {
  color: #222;
  text-decoration: underline;
}

.card h2 a::after {
  content: " \2197\FE0E";
  opacity: 0.8;
}

/* Related Specimens Grid (Below Comments) */
.related-box {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.related-box h3 {
  margin: 0 0 14px 0;
  font-size: 1.05em;
  color: #333;
}

.related-box h2 {
  margin: 0 0 14px 0;
  font-size: 1.0em;
  text-align: left;
  color: #333;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: #fafafa;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 8px;
  text-decoration: none;
  color: #222;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: #999;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
}

.related-card span {
  font-size: 0.85em;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
