/* Custom Styles for Coworkies Documentation */

/* Breadcrumb Styles */
.breadcrumb-nav {
  margin-bottom: 1.5rem;
}

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
  color: #6c757d;
  display: inline-block;
}

.breadcrumb-item a {
  color: var(--primary-color, #02007e);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--coworkies_color_blue, #091e42);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--text-color, #636363);
}

.breadcrumb-item.active span {
  font-weight: 500;
}

/* Image Optimization Styles */
.content img,
.content picture img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 1.5rem 0;
}

.content picture {
  display: block;
  margin: 1.5rem 0;
}

/* Lazy Loading Image Placeholder */
img[loading="lazy"] {
  background-color: #f8f9fa;
  min-height: 200px;
}

/* Responsive Image Container */
.content figure {
  margin: 1.5rem 0;
  text-align: center;
}

.content figure img {
  margin: 0 auto;
}

.content figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-color, #636363);
  font-style: italic;
}

/* Print Styles */
@media print {
  .breadcrumb-nav {
    display: none;
  }
  
  .content img {
    page-break-inside: avoid;
    max-width: 100%;
  }
}

/* Accessibility Improvements */
.breadcrumb-nav [aria-label] {
  /* Ensure screen readers can identify breadcrumb navigation */
}

/* Section Grid Container */
.section-grid-container {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-grid-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color-dark, #242738);
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.section-grid-subtitle {
  font-size: 1rem;
  color: var(--text-color, #636363);
  margin: 0 0 2rem 0;
  font-weight: 400;
}

/* Section Links Styling - Modern Hospitality Design */
.page-list.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-list.section-grid li {
  margin: 0;
  padding: 0;
}

/* Override theme's hidden links for section grid */
.page-list.section-grid li a,
.page-list.section-grid .section-link {
  display: flex !important;
}

/* Hide nested lists in section grid (we only want top-level items) */
.page-list.section-grid li ul {
  display: none;
}

.page-list.section-grid .section-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
  border: 2px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color-dark, #242738);
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.page-list.section-grid .section-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #02007e 0%, #0500c4 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.page-list.section-grid .section-link:hover {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  border-color: rgba(2, 0, 126, 0.2);
  box-shadow: 0 8px 24px rgba(2, 0, 126, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.page-list.section-grid .section-link:hover::before {
  transform: scaleY(1);
}

.page-list.section-grid .section-link:hover i.ph {
  transform: scale(1.1);
  color: var(--primary-color, #02007e);
}

.page-list.section-grid .section-link:hover span {
  color: var(--primary-color, #02007e);
}

.page-list.section-grid .section-link.active {
  background: linear-gradient(135deg, #02007e 0%, #0500c4 100%);
  color: white;
  border-color: var(--primary-color, #02007e);
  box-shadow: 0 8px 24px rgba(2, 0, 126, 0.25), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.page-list.section-grid .section-link.active::before {
  background: rgba(255, 255, 255, 0.3);
  transform: scaleY(1);
}

.page-list.section-grid .section-link.active i.ph,
.page-list.section-grid .section-link.active span {
  color: white;
}

.page-list.section-grid .section-link i.ph {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(2, 0, 126, 0.08) 0%, rgba(2, 0, 126, 0.04) 100%);
  border-radius: 10px;
  color: var(--primary-color, #02007e);
  transition: all 0.3s ease;
}

.page-list.section-grid .section-link span {
  flex: 1;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

/* Sidebar section links - Enhanced */
.sidebar .list-styled .section-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0.25rem 0;
  text-decoration: none;
  color: var(--text-color, #636363);
  transition: all 0.2s ease;
  border-radius: 8px;
  font-weight: 500;
}

.sidebar .list-styled .section-link:hover {
  color: var(--primary-color, #02007e);
  background: rgba(2, 0, 126, 0.04);
  transform: translateX(4px);
}

.sidebar .list-styled .section-link.active {
  color: var(--primary-color, #02007e);
  font-weight: 600;
  background: rgba(2, 0, 126, 0.08);
}

.sidebar .list-styled .section-link i.ph {
  font-size: 1.25rem;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  vertical-align: middle;
  color: var(--primary-color, #02007e);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.sidebar .list-styled .section-link:hover i.ph,
.sidebar .list-styled .section-link.active i.ph {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-list.section-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
  }
  
  .section-grid-container {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .page-list.section-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .section-grid-container {
    padding: 1.5rem;
  }
  
  .section-grid-title {
    font-size: 1.5rem;
  }
  
  .section-grid-subtitle {
    font-size: 0.9rem;
  }
  
  .page-list.section-grid .section-link {
    padding: 1.25rem 1.5rem;
  }
  
  .page-list.section-grid .section-link i.ph {
    font-size: 1.75rem;
    width: 40px;
    height: 40px;
  }
}

/* Smooth page transitions */
.content {
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Typography */
.content h1, .content h2 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-color-dark, #242738);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content p {
  line-height: 1.7;
  color: var(--text-color, #636363);
  margin-bottom: 1.25rem;
}

.content a {
  color: var(--primary-color, #02007e);
  text-decoration: none;
  border-bottom: 1px solid rgba(2, 0, 126, 0.2);
  transition: all 0.2s ease;
}

.content a:hover {
  border-bottom-color: var(--primary-color, #02007e);
  color: #0500c4;
}

/* Enhanced Code Blocks */
.content pre {
  background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  overflow-x: auto;
}

.content code {
  background: rgba(2, 0, 126, 0.06);
  color: #02007e;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.content pre code {
  background: transparent;
  padding: 0;
  color: var(--text-color-dark, #242738);
}

/* Enhanced Lists */
.content ul, .content ol {
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
}

/* Dark Mode Support (if implemented) */
@media (prefers-color-scheme: dark) {
  .breadcrumb-item a {
    color: #6c9eff;
  }
  
  .breadcrumb-item.active {
    color: #e0e0e0;
  }
  
  .section-grid-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
  }
  
  .section-grid-title {
    color: #e0e0e0;
  }
  
  .section-grid-subtitle {
    color: #a0a0a0;
  }
  
  .page-list.section-grid .section-link {
    background: linear-gradient(135deg, #2a2a2a 0%, #242424 100%);
    border-color: #404040;
    color: #e0e0e0;
  }
  
  .page-list.section-grid .section-link:hover {
    background: linear-gradient(135deg, #242424 0%, #2a2a2a 100%);
    border-color: rgba(108, 158, 255, 0.3);
  }
  
  .page-list.section-grid .section-link:hover i.ph,
  .page-list.section-grid .section-link:hover span {
    color: #6c9eff;
  }
  
  .page-list.section-grid .section-link i.ph {
    background: rgba(108, 158, 255, 0.1);
    color: #6c9eff;
  }
}
