/* ==========================================================================
   TDD Buddy — Custom Styles
   Color palette:
     Navy (headings):   #37517e
     Accent blue:       #47b2e4
     Accent hover:      #31a9e1
     Body text:         #444
     Muted text:        #6c757d
     Light bg:          #f8f9fa
     Border:            #e9ecef
   ========================================================================== */

/* Kata icons */
.kataIcon {
  color: #ff6600;
}

.kataIconAlt {
  color: #37517e;
}

/* Kata detail page headings */
.kata-header {
  color: #37517e;
}

.bonus-header {
  color: #ff6600;
  font-style: italic;
}

.example-header {
  font-size: 18px;
  font-variant: small-caps;
  text-decoration: underline;
}

.hint-header {
  font-size: 16px;
  font-style: italic;
}

/* Kata images */
.kata-img {
  transform: scale(0.5);
  padding: 5px;
}

.tdd-img {
  width: 60%;
  min-width: 350px;
}

/* Example tables */
.example-table {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

.example-table td,
.example-table th {
  border: 1px solid #e9ecef;
  padding: 8px;
}

.example-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.example-table tr:hover {
  background-color: #eef2f7;
}

.example-table th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #ff6600;
  color: white;
}

/* Code blocks */
pre {
  position: relative;
}

pre code {
  border: none;
  border-radius: 8px;
  display: block;
  padding: 20px;
  font-size: 0.9em;
  line-height: 1.6;
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
  tab-size: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

.console-mode {
  color: #37517e;
}

/* Bold text — inherit color, don't override */
strong {
  color: inherit;
}

/* Legacy search dialog */
#search-dialog {
  position: fixed;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  z-index: 1000;
}

.hidden {
  display: none;
}

.search-input {
  width: 100%;
  padding: 10px;
  padding-right: 40px;
  box-sizing: border-box;
}

.search-icon {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  cursor: pointer;
  border-left: 1px solid #e9ecef;
}

/* ==========================================================================
   Filter bar (Kata Catalog)
   ========================================================================== */
.filter-bar {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 8px;
}

.filter-search {
  position: relative;
  margin-bottom: 16px;
}

.filter-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 0.95em;
}

.filter-search input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95em;
  background: #fff;
  transition: border-color 0.2s;
}

.filter-search input:focus {
  outline: none;
  border-color: #47b2e4;
  box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.15);
}

.filter-group {
  margin-bottom: 12px;
}

.filter-label {
  display: block;
  font-size: 0.8em;
  font-weight: 600;
  color: #37517e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 20px;
  background: #fff;
  color: #555;
  font-size: 0.85em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.chip:hover {
  border-color: #47b2e4;
  color: #37517e;
  background: #f0f7ff;
}

.chip.active {
  background: #37517e;
  color: #fff;
  border-color: #37517e;
}

.chip.active:hover {
  background: #2c4166;
  border-color: #2c4166;
  color: #fff;
}

.chip-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chip-count {
  font-size: 0.8em;
  opacity: 0.7;
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #e9ecef;
  margin-top: 4px;
  font-size: 0.9em;
  color: #6c757d;
}

.clear-filters {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 0.85em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
}

.clear-filters:hover {
  background: rgba(220, 53, 69, 0.08);
}

/* ==========================================================================
   Badges (difficulty levels)
   ========================================================================== */
.badge {
  margin-top: 6px;
  padding: 5px 10px;
  font-size: 0.8em;
  font-weight: 500;
  display: inline-block;
  border-radius: 4px;
}

.badge.bg-success {
  background-color: #28a745 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #000;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

/* ==========================================================================
   Kata card elements
   ========================================================================== */
.kata-icon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.kata-concepts {
  margin-bottom: 6px;
  margin-top: 0;
}

.concept-badge {
  display: inline-block;
  background: #e8f4fd;
  color: #37517e;
  border-radius: 12px;
  font-size: 0.8em;
  padding: 2px 10px;
  margin-right: 6px;
  margin-bottom: 2px;
  font-weight: 500;
}

/* Kata count badge */
.kata-count-badge {
  display: inline-block;
  background: #47b2e4;
  color: #fff;
  border-radius: 20px;
  font-size: 0.45em;
  padding: 4px 14px;
  vertical-align: middle;
  font-weight: 500;
  margin-left: 8px;
}

/* Estimated time */
.kata-time {
  display: inline-block;
  color: #6c757d;
  font-size: 0.85em;
  margin-left: 10px;
}

.kata-time i {
  margin-right: 3px;
}

/* No results message */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-results i {
  color: #ccc;
  margin-bottom: 16px;
}

.no-results p {
  font-size: 1.1em;
  margin-top: 10px;
}

/* ==========================================================================
   Stat Boxes (homepage)
   ========================================================================== */
.stat-box {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-5px);
}

.stat-box i {
  color: #47b2e4;
}

.stat-box h3 {
  color: #37517e;
  font-size: 2.5rem;
  font-weight: 700;
  margin: 10px 0;
}

.stat-box p {
  color: #6c757d;
  margin-bottom: 5px;
}

.stat-box small {
  color: #adb5bd;
  font-size: 0.8rem;
}

/* ==========================================================================
   Why Us / Industry Insights section
   ========================================================================== */
#why-us .list-group-item {
  background: transparent;
  border: none;
  font-size: 1.08em;
  padding-left: 0;
  padding-right: 0;
}

#why-us .fa-check {
  color: #47b2e4;
}

#why-us .section-title .lead {
  font-size: 1.1em;
  color: #6c757d;
}

/* ==========================================================================
   Hero CTA buttons
   ========================================================================== */
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-get-started {
  display: inline-block;
  padding: 12px 32px;
  background: #47b2e4;
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-get-started:hover {
  background: #31a9e1;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 178, 228, 0.3);
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  padding: 12px 32px;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95em;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-learn-more:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Feature cards (homepage)
   ========================================================================== */
.feature-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 24px;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f4fd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon i {
  font-size: 1.5em;
  color: #47b2e4;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #47b2e4;
  font-weight: 600;
  font-size: 0.9em;
  text-decoration: none;
  transition: gap 0.2s ease;
}

.feature-link:hover {
  gap: 10px;
  color: #31a9e1;
}

/* ==========================================================================
   Card hover effects (global)
   ========================================================================== */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e9ecef;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Homepage featured kata cards */
.kata-card-home .card-body {
  display: flex;
  flex-direction: column;
}

.kata-card-home .feature-link {
  margin-top: auto;
  padding-top: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
/* ==========================================================================
   Shift comparison card (homepage)
   ========================================================================== */
.shift-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.shift-card h4 {
  color: #37517e;
  font-weight: 700;
  margin-bottom: 20px;
}

.shift-comparison {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.shift-before,
.shift-after {
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  font-size: 0.9em;
  line-height: 1.5;
}

.shift-before {
  background: #fef3f2;
  border: 1px solid #fecaca;
}

.shift-after {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.shift-label {
  display: block;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  color: #6c757d;
}

.shift-before p,
.shift-after p {
  margin-bottom: 0;
  color: #444;
}

.shift-arrow {
  color: #47b2e4;
  font-size: 1.2em;
  flex-shrink: 0;
}

.shift-footer {
  color: #37517e;
  font-weight: 600;
  font-size: 0.95em;
  margin-bottom: 0;
  font-style: italic;
}

@media (max-width: 576px) {
  .shift-comparison {
    flex-direction: column;
  }
  .shift-arrow {
    transform: rotate(90deg);
  }
}

/* ==========================================================================
   Latest Blog callout (homepage)
   ========================================================================== */
.latest-blog-card {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  border-left: 4px solid #47b2e4;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.latest-blog-label {
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #47b2e4;
  margin-bottom: 12px;
}

.latest-blog-label i {
  margin-right: 6px;
}

.latest-blog-card h3 {
  margin-bottom: 12px;
}

.latest-blog-card h3 a {
  color: #37517e;
  text-decoration: none;
  transition: color 0.2s;
}

.latest-blog-card h3 a:hover {
  color: #47b2e4;
}

.latest-blog-card p {
  color: #6c757d;
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 16px;
}

.latest-blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.latest-blog-meta span {
  color: #adb5bd;
  font-size: 0.85em;
}

.latest-blog-meta span i {
  margin-right: 4px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
#footer .footer-contact p {
  color: #aaa;
  font-size: 0.9em;
  line-height: 1.6;
  margin-top: 12px;
}

/* ==========================================================================
   Print styles
   ========================================================================== */
@media print {
  #header,
  #footer,
  .back-to-top,
  #preloader,
  .search-overlay,
  .breadcrumbs,
  .mobile-nav-toggle {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .inner-page {
    padding-top: 0 !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  pre code {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .badge {
    border: 1px solid #999;
    color: #000 !important;
    background: #eee !important;
  }

  .card {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }

  .example-table {
    page-break-inside: avoid;
  }

  .example-table th {
    background-color: #666 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
