/**
 * Styles specific to the homepage (index.html)
 */

/* ============================================
   Homepage Layout
   ============================================ */

.home-content {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Header Section */
.home-header {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.home-logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.home-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e40af;
  margin: 1rem 0 0.5rem;
  letter-spacing: -0.02em;
}

.home-tagline {
  font-size: 1.1rem;
  font-style: italic;
  color: #555;
  margin: 0;
  padding: 1rem 1.5rem;
  background: #e5e5e5;
  border-radius: 6px;
}

/* Navigation / Table of Contents */
.home-nav {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.home-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-toc li {
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
}

.home-toc li:last-child {
  border-bottom: none;
}

.home-toc li:hover {
  background: #f8f9fa;
}

.home-toc a {
  display: block;
  padding: 1rem 1.5rem;
  color: #1a56db;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.home-toc a:hover {
  color: #dc2626;
}

.home-toc a em {
  font-style: italic;
}

/* Featured links (Preface, Full Contents) */
.home-toc-featured a {
  font-weight: 700;
}

.home-toc-preface a {
  color: #dc2626;
  padding-top: 1.25rem;
}

.home-toc-contents a {
  color: #1a56db;
}

/* Chapter numbers */
.chapter-num {
  display: inline-block;
  min-width: 1.75rem;
  font-weight: 700;
  color: #666;
  margin-left: 1.5rem;
}

.home-toc li:not(.home-toc-featured) {
  display: flex;
  align-items: center;
}

.home-toc li:not(.home-toc-featured) a {
  padding-left: 0.5rem;
}

/* Footer */
.home-footer {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.home-footer p {
  margin: 0 0 0.75rem 0;
  color: #666;
  font-size: 0.9rem;
}

.home-footer a {
  color: #1a56db;
  text-decoration: none;
  font-weight: 600;
}

.home-footer a:hover {
  color: #dc2626;
  text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
  .home-content {
    margin: 1rem auto;
    padding: 0 1rem;
  }
  
  .home-header {
    padding: 1.5rem 1rem;
    border-radius: 8px;
  }
  
  .home-tagline {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .home-toc a {
    padding: 0.875rem 1rem;
  }
  
  .chapter-num {
    width: 1.75rem;
  }
  
  .home-footer {
    margin: 1rem auto;
    padding: 1rem;
    border-radius: 8px;
  }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .home-header,
  .home-nav,
  .home-footer {
    box-shadow: none;
    background: #fff;
  }
  
  .home-toc a {
    color: #000;
  }
  
  .home-toc a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
