/* ============================================
   Tutorials Page — Bright Theme
   Clean, card-based tutorial listing
   ============================================ */

/* ---------- Page Wrapper ---------- */
.tbr-tutorials-page {
  background: #F8FAFC;
  font-family: var(--hero-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
  padding-bottom: 100px;
}

/* ---------- Hero Banner ---------- */
.tbr-hero {
  margin: 0 -15px;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
  max-height: 280px;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
}

.tbr-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
}

@media (max-width: 768px) {
  .tbr-hero {
    max-height: 160px;
    border-radius: 0;
  }
  .tbr-hero-img {
    height: 160px;
  }
}

/* ---------- Breadcrumb ---------- */
.tbr-breadcrumb {
  padding: 24px 0 0;
  font-size: 13px;
  color: #94A3B8;
}

.tbr-breadcrumb a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tbr-breadcrumb a:hover {
  color: #0EA5E9;
  text-decoration: none;
}

.tbr-breadcrumb-sep {
  margin: 0 8px;
  color: #CBD5E1;
}

.tbr-breadcrumb-current {
  color: #475569;
  font-weight: 500;
}

/* ---------- Page Header ---------- */
.tbr-page-header {
  text-align: center;
  padding: 48px 0 40px;
  max-width: 700px;
  margin: 0 auto;
}

.tbr-page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0EA5E9;
  margin-bottom: 12px;
}

.tbr-page-label-dot {
  width: 8px;
  height: 8px;
  background: #10B981;
  border-radius: 50%;
  animation: tbr-pulse 2s ease-in-out infinite;
}

@keyframes tbr-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.tbr-page-title {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin: 0 0 16px;
  line-height: 1.1;
}

.tbr-page-subtitle {
  font-size: 17px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* ---------- Stats Bar ---------- */
.tbr-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 0 0 36px;
}

.tbr-stat {
  text-align: center;
}

.tbr-stat-num {
  display: block;
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: #0EA5E9;
}

.tbr-stat-label {
  font-size: 12px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ---------- Category Tabs ---------- */
.tbr-tab-bar {
  display: flex;
  justify-content: center;
  padding: 0 0 48px;
}

.tbr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 6px;
}

.tbr-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tbr-tab:hover {
  background: #F0F9FF;
  color: #0EA5E9;
}

.tbr-tab.tbr-tab-active {
  background: #0EA5E9;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.tbr-tab svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.tbr-tab-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.06);
}

.tbr-tab-active .tbr-tab-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Category Sections ---------- */
.tbr-category-section {
  margin-bottom: 64px;
}

.tbr-category-section:last-child {
  margin-bottom: 0;
}

/* Hidden by tab filter */
.tbr-category-section.tbr-hidden {
  display: none;
}

/* Section Header */
.tbr-section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding: 24px 28px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-left: 4px solid #0EA5E9;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tbr-section-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.tbr-section-header:hover .tbr-section-icon {
  transform: scale(1.08);
}

.tbr-icon-blue {
  background: #DBEAFE;
  color: #2563EB;
}

.tbr-icon-purple {
  background: #EDE9FE;
  color: #7C3AED;
}

.tbr-icon-teal {
  background: #CCFBF1;
  color: #0D9488;
}

/* Override left border per category */
.tbr-category-network .tbr-section-header {
  border-left-color: #2563EB;
}

.tbr-category-ai .tbr-section-header {
  border-left-color: #7C3AED;
}

.tbr-category-docker .tbr-section-header {
  border-left-color: #0D9488;
}

.tbr-section-text h2 {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.tbr-section-text p {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* SVG illustration between header and cards */
.tbr-section-illustration {
  text-align: center;
  margin-bottom: 32px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.tbr-section-illustration img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
  opacity: 0.92;
}

.tbr-section-illustration img:hover {
  opacity: 1;
  transform: scale(1.02);
}

/* ---------- Tutorial Card Grid ---------- */
.tbr-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ---------- Tutorial Card ---------- */
.tbr-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  text-decoration: none;
}

.tbr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: rgba(14, 165, 233, 0.2);
  text-decoration: none;
}

.tbr-card:focus-within {
  outline: 2px solid #0EA5E9;
  outline-offset: 2px;
}

/* Card top row: number + badge */
.tbr-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tbr-card-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #F0F9FF;
  color: #0EA5E9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Under construction badge */
.tbr-badge-wip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: #92400E;
}

.tbr-badge-wip svg {
  flex-shrink: 0;
}

/* Card title */
.tbr-card-title {
  font-family: var(--hero-font-display, 'Plus Jakarta Sans', 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 8px;
  line-height: 1.35;
}

.tbr-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tbr-card-title a:hover {
  color: #0EA5E9;
  text-decoration: none;
}

/* Card description */
.tbr-card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 18px;
  flex: 1;
}

/* Card footer: link arrow */
.tbr-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  margin-top: auto;
}

.tbr-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #0EA5E9;
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.tbr-card-link:hover {
  gap: 10px;
  color: #0284C7;
  text-decoration: none;
}

.tbr-card-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tbr-card:hover .tbr-card-link svg {
  transform: translateX(2px);
}

/* Under construction card (no link) */
.tbr-card-wip {
  opacity: 0.75;
  background: #FEFCE8;
  border-color: #FDE68A;
}

.tbr-card-wip:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.85;
}

.tbr-card-wip .tbr-card-footer {
  justify-content: center;
}

.tbr-card-wip-text {
  font-size: 12px;
  font-weight: 500;
  color: #92400E;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Bottom CTA ---------- */
.tbr-bottom-cta {
  text-align: center;
  margin-top: 64px;
  padding: 40px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.tbr-bottom-cta p {
  font-size: 16px;
  line-height: 1.6;
  color: #475569;
  margin: 0 0 20px;
}

.tbr-bottom-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #0EA5E9;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

.tbr-bottom-cta-link:hover {
  background: #0284C7;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  color: #FFFFFF;
  text-decoration: none;
}

/* ---------- Scroll Reveal ---------- */
.tbr-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.tbr-reveal.tbr-revealed {
  opacity: 1;
  transform: translateY(0);
}

.tbr-reveal-delay-1 { transition-delay: 0.05s; }
.tbr-reveal-delay-2 { transition-delay: 0.1s; }
.tbr-reveal-delay-3 { transition-delay: 0.15s; }
.tbr-reveal-delay-4 { transition-delay: 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .tbr-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tbr-section-header {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .tbr-section-icon {
    width: 56px;
    height: 56px;
  }

  .tbr-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .tbr-stats {
    gap: 20px;
  }

  .tbr-stat-num {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  .tbr-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tbr-page-header {
    padding: 32px 0 28px;
  }

  .tbr-page-title {
    font-size: 28px;
  }

  .tbr-card {
    padding: 18px;
  }

  .tbr-bottom-cta {
    margin-top: 40px;
    padding: 28px 20px;
  }

  .tbr-category-section {
    margin-bottom: 40px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .tbr-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tbr-card {
    transition: none;
  }

  .tbr-section-icon {
    transition: none;
  }

  .tbr-page-label-dot {
    animation: none;
  }
}
