/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navigation */
.site-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

.main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-title {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #0066cc;
  text-decoration: none;
}

.header-inspiration {
  flex: 1;
  min-width: 0;
  max-width: 420px;
  max-height: 120px;
  object-fit: contain;
  border-radius: 6px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-menu a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
}

.nav-menu a:hover {
  background: #f5f5f5;
  color: #0066cc;
}

/* Layout */
.content-wrapper {
  display: flex;
  gap: 2rem;
}

.main-content {
  flex: 2;
  background: #fff;
  padding: 2rem;
  border-radius: 4px;
}

.sidebar {
  flex: 1;
  min-width: 250px;
}

/* Sidebar widgets */
.widget {
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.widget summary {
  font-weight: bold;
  cursor: pointer;
  padding: 0.5rem 0;
}

.widget ul {
  list-style: none;
  padding-left: 0;
}

.widget li {
  padding: 0.3rem 0;
}

.widget a {
  color: #0066cc;
  text-decoration: none;
}

.widget a:hover {
  text-decoration: underline;
}

.count {
  color: #666;
  font-size: 0.9em;
  margin-left: 0.3rem;
}

/* Location tree */
.location-tree {
  padding-left: 0;
}

.location-tree ul {
  padding-left: 1.2rem;
}

.location-tree summary {
  padding: 0.2rem 0;
}

/* Posts */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  color: #666;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.post-meta time {
  margin-right: 0;
}

/* Category & tag pills — post articles only (sidebar categories stay plain like Dive Locations) */
.post-single .taxonomy-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.post-single .taxonomy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid #c7dcff;
  border-radius: 8px;
  background: #e7f1ff;
  color: #24539a;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.2;
}

.post-single .taxonomy-pill:hover {
  background: #d7e8ff;
  color: #173d73;
  text-decoration: none;
}

.post-single .post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e8e8e8;
}

.post-single .post-tags .taxonomy-label {
  font-size: 0.9rem;
  margin-right: 0.15rem;
}

/* Compact category hints on dive-location “recent posts” (not full post pills) */
.categories--inline {
  display: inline;
  margin-left: 0.35rem;
}

.category-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: #eef2f6;
  color: #555;
  font-size: 0.85em;
}

/* Location pages */
.location-hierarchy {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f5f5f5;
  border-radius: 4px;
}

.location-hierarchy a {
  color: #0066cc;
}

.dive-site-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 4px;
}

.dive-site-meta dt {
  font-weight: bold;
}

.location-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0;
}

.location-card {
  display: block;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  border: 1px solid #ddd;
}

.location-card:hover {
  background: #f0f0f0;
}

.location-card .excerpt {
  font-size: 0.9rem;
  color: #666;
  margin: 0.5rem 0;
}

/* Recent posts on location pages */
.location-recent-posts {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 4px;
}

.post-list.compact li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}

.post-list.compact time {
  color: #666;
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 0;
  text-align: center;
  color: #666;
  border-top: 1px solid #ddd;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
  }

  .header-inspiration {
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  .content-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    order: -1;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
  }
}
