/* Ensure channel promo icons are sized correctly */
.channel-promo img {
  width: 36px;
  height: 36px;
  vertical-align: middle;
  filter: invert(1);
}

/* Custom Styles for Submarine FAQ Site */

:root {
  --submarine-blue: #1e3a8a;
  --navy-blue: #1e40af;
  --ocean-blue: #0ea5e9;
  --steel-gray: #64748b;
  --warning-amber: #f59e0b;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/* Navigation */
.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.navbar-brand i {
  margin-right: 0.5rem;
  color: var(--ocean-blue);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--submarine-blue), var(--navy-blue));
  color: white;
  padding: 3rem 0;
  margin: -1rem -15px 2rem -15px;
  text-align: center;
  border-radius: 0 0 1rem 1rem;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero-section .lead {
  font-size: 1.25rem;
  opacity: 0.9;
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.category-card .card {
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-card .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.category-card .card-title {
  color: var(--submarine-blue);
  font-weight: bold;
}

.category-card .card-title i {
  margin-right: 0.1875rem;
  color: var(--ocean-blue);
  width: 1.5rem;
}

/* FAQ Styles */
.category-header {
  background: linear-gradient(45deg, #f8fafc, #e2e8f0);
  padding: 2rem;
  border-radius: 1rem;
  border-left: 5px solid var(--ocean-blue);
}

.category-header h1 {
  color: var(--submarine-blue);
  margin-bottom: 1rem;
}

.category-header i {
  margin-right: 1rem;
  color: var(--ocean-blue);
}

.faq-item .card {
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.faq-item .card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.faq-item .card-header {
  background: linear-gradient(45deg, #f1f5f9, #e2e8f0);
  border-bottom: 1px solid #e5e7eb;
}

.faq-item .btn-link {
  text-decoration: none;
  color: var(--submarine-blue);
  font-weight: 600;
  width: 100%;
  text-align: left;
  padding: 1rem;
}

.faq-item .btn-link:hover {
  color: var(--navy-blue);
}

.faq-item .btn-link:focus {
  box-shadow: none;
}

.faq-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #374151;
}

.faq-tags .badge {
  font-size: 0.8rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  pointer-events: auto;
  position: relative;
  z-index: 2;
  border: none;
}

.faq-tags {
  position: relative;
  z-index: 1;
}

.faq-actions .btn {
  margin-right: 0.5rem;
}

.md-table {
  border-collapse: collapse;
  /* allow explicit widths (pixel or percent) set by scripts or inline styles */
  width: auto;
  max-width: 100%;
  margin: 1rem 0;
}

/* Rendered FAQ table borders */
.faq-content table,
.answer-content table {
  border-collapse: collapse;
  /* allow table to be sized by inline styles or JS; remain responsive */
  width: auto;
  max-width: 100%;
  margin: 1rem 0;
}

.faq-content,
.answer-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.faq-content th,
.faq-content td,
.answer-content th,
.answer-content td {
  border: 1px solid #bcd6f2;
  padding: 6px 10px;
}

.md-table th,
.md-table td {
  border: 1px solid #bcd6f2;
  padding: 6px 10px;
}

.faq-content th,
.answer-content th {
  background: #e6f2ff;
  font-weight: 600;
}

.md-table th {
  background: #e6f2ff;
  font-weight: 600;
}

/* Keep header row aligned with new light-blue styling */
.faq-content table tr:first-child th,
.faq-content table tr:first-child td,
.answer-content table tr:first-child th,
.answer-content table tr:first-child td {
  background: #e6f2ff;
}

.md-table tr:first-child th,
.md-table tr:first-child td {
  background: #e6f2ff;
}

/* Enforce table header styling across FAQ/answer content */
.faq-content th,
.answer-content th {
  background: #e6f2ff !important;
  /* light blue */
  border: 1px solid #bcd6f2;
}

.faq-content tr:first-child th,
.faq-content tr:first-child td,
.answer-content tr:first-child th,
.answer-content tr:first-child td {
  background: #e6f2ff !important;
  font-weight: 600;
}

/* WYSIWYG table borders */
.ql-editor table {
  border-collapse: collapse;
  width: auto;
}

.ql-editor th,
.ql-editor td {
  border: 1px solid #ccc;
  padding: 6px 10px;
}

.ql-editor th {
  background: #f6f6f6;
  font-weight: 600;
}

/* Search Styles */
.category-search input {
  border-radius: 2rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

.category-search input:focus {
  border-color: var(--ocean-blue);
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Buttons */
.btn-primary {
  background-color: var(--ocean-blue);
  border-color: var(--ocean-blue);
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--submarine-blue);
  border-color: var(--submarine-blue);
  transform: translateY(-1px);
}

.btn-outline-primary {
  color: var(--ocean-blue);
  border-color: var(--ocean-blue);
}

.btn-outline-primary:hover {
  background-color: var(--ocean-blue);
  border-color: var(--ocean-blue);
}

/* Breadcrumb */
.breadcrumb {
  background: none;
  padding: 1rem 0;
}

.breadcrumb-item a {
  color: var(--ocean-blue);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

/* Alerts */
.alert-info {
  border-left: 4px solid var(--ocean-blue);
  background-color: #f0f9ff;
  border-color: #bae6fd;
}

/* Footer */
footer {
  margin-top: 4rem;
}

footer h5,
footer h6 {
  color: #e5e7eb;
}

footer a {
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--ocean-blue) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .category-header {
    padding: 1.5rem;
    margin: 0 -15px;
    border-radius: 0;
    border-left: none;
    border-top: 5px solid var(--ocean-blue);
  }
}

/* Loading States */
.loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--ocean-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Star Rating for Featured Content */
.fa-star {
  color: var(--warning-amber);
}

/* Search Results */
.search-results .list-group-item {
  border-left: 3px solid transparent;
  transition: all 0.3s ease;
}

.search-results .list-group-item:hover {
  border-left-color: var(--ocean-blue);
  background-color: #f8fafc;
}

/* Admin Styles */
.admin-panel {
  background: linear-gradient(135deg, var(--submarine-blue), var(--navy-blue));
  color: white;
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
}

/* Print Styles */
@media print {

  .navbar,
  .footer,
  .faq-actions,
  .category-search {
    display: none !important;
  }

  .faq-item .collapse {
    display: block !important;
  }
}