/* ============================================
   Guides Navigation System Styles
   ============================================ */

/* Featured Section */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
}

.featured-card {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #0366d6;
}

.featured-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.featured-card h3 a {
  color: #24292e;
  text-decoration: none;
}

.featured-card h3 a:hover {
  color: #0366d6;
}

.featured-card p {
  color: #586069;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.featured-card .meta {
  color: #959da5;
  font-size: 0.85rem;
}

/* ============================================
   Topic Cards (Main Landing Page)
   ============================================ */
.topic-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.topic-card {
  display: block;
  background: #f6f8fa;
  border: 2px solid #e1e4e8;
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

.topic-card:hover {
  background: #ffffff;
  border-color: #0366d6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.1);
}

.topic-card h3 {
  margin: 0 0 0.5rem 0;
  color: #24292e;
  font-size: 1.25rem;
}

.topic-card p {
  margin: 0 0 0.75rem 0;
  color: #586069;
  font-size: 0.95rem;
}

.topic-card .count {
  color: #0366d6;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ============================================
   Guides Grid (Topic Pages)
   ============================================ */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
}

.guide-card {
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 1.25rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #0366d6;
}

.guide-card h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.1rem;
}

/* If h3 is the last child (no description), remove bottom margin for vertical centering */
.guide-card h3:last-child {
  margin-bottom: 0;
}

.guide-card h3 a {
  color: #24292e;
  text-decoration: none;
}

.guide-card h3 a:hover {
  color: #0366d6;
}

.guide-card p {
  color: #586069;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Hide empty paragraphs to prevent layout issues */
.guide-card p:empty {
  display: none;
}

.guide-card .meta {
  color: #959da5;
  font-size: 0.8rem;
}

/* ============================================
   Search Box (Topic Pages)
   ============================================ */
#integration-search,
#deployment-search,
#migration-search {
  width: 100%;
  max-width: 600px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e1e4e8;
  border-radius: 6px;
  margin: 1.5rem 0;
  transition: border-color 0.2s;
}

#integration-search:focus,
#deployment-search:focus,
#migration-search:focus {
  outline: none;
  border-color: #0366d6;
  box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

/* ============================================
   Platform Section (Deployment Page)
   ============================================ */
.platform-section {
  margin: 2rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   All Guides List (Compact)
   ============================================ */
.guides-list {
  margin: 2rem 0;
}

.guides-list .guide-item {
  border-bottom: 1px solid #e1e4e8;
  padding: 0.75rem 0;
}

.guides-list .guide-item:last-child {
  border-bottom: none;
}

.guides-list .guide-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.guides-list .guide-item h4 a {
  color: #24292e;
  text-decoration: none;
  transition: color 0.2s;
}

.guides-list .guide-item h4 a:hover {
  color: #0366d6;
}
