/* ==========================================================================
   Help Index Page Styles (/help/)
   ========================================================================== */

/* Hero Section */
.hero-alt-3__wrapper h1 {
  margin-bottom: 24px;
}

/* Search Bar & Results */
.help-search {
  position: relative;
  width: 100%;
  margin: 0 auto;
  transform: translateY(50%); /* Pulls search bar slightly into hero */
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon-help {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none; /* Ensures the icon doesn't interfere with input clicks */
}

.help-search input[type="text"] {
  width: 100%;
  padding: 18px 18px 18px 50px; /* Increased left padding for icon */
  border: 1px solid #dee2e6;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-results {
  /* Container for dynamic search results */
  position: absolute;
  top: 100%; /* Position below the input */
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  display: none; /* Hidden by default */
}

.search-result {
  /* Individual result item */
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.search-result:last-child {
  border-bottom: none;
}

.search-result a {
  color: #333;
  text-decoration: none;
}

.search-result-title {
  /* Title within a search result */
  font-size: 1.05rem;
  font-weight: bold; /* Make title bold */
  margin-bottom: 0.5rem; /* Add space below title */
}

.search-result p {
  /* Excerpt within a search result */
  margin: 0; /* Remove default margin */
  color: #666;
  font-size: 0.9rem; /* Slightly smaller font for excerpt */
}

.search-result p strong {
  /* Highlighted search term */
  background-color: var(--accent-base); /* Highlight background */
  padding: 0.1em 0.2em; /* Add some padding */
  border-radius: 3px; /* Rounded corners */
  color: var(--dark-base); /* Ensure text is readable */
}

.no-results {
  /* Message when no results are found */
  padding: 1rem;
  text-align: center;
  color: #666;
}

/* Category Listing */
.inline-link {
  /* e.g., "Back to all categories" */
  color: #008070;
  text-decoration: underline;
}

/* Using header2--sm utility class (Moved here as it's prominent on help index) */
h2.header2--sm {
  font-size: 2rem;
  line-height: var(--font-size-l);
  letter-spacing: -0.69px;
}

/* Category Grid */
.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.help-category-card {
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05); /* Softer shadow */
  padding: 24px; /* More padding */
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth transitions */
  height: 100%;
  display: flex; /* Use flexbox for better alignment */
  flex-direction: column; /* Stack content vertically */
}

.help-category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1); /* Enhance shadow on hover */
}

.help-category-card h2 {
  /* Title within category card */
  margin-bottom: 12px; /* Increased space */
  font-size: 1.35rem; /* Slightly larger title */
  color: var(--dark-base); /* Ensure dark color */
}

.help-category-card p {
  /* Description/article count */
  margin-bottom: 8px;
  color: #555; /* Slightly darker grey */
  font-size: 0.95rem; /* Slightly larger text */
  flex-grow: 1; /* Allow description to take up space */
}

.help-category-card p:last-child {
  /* Article count */
  margin-top: auto; /* Push to bottom */
  margin-bottom: 0;
  font-weight: 500; /* Slightly bolder */
  color: var(--medium-base);
}

/* Article Listing (within a category) */
.help-articles-card {
  /* Container for articles in a category */
  margin-top: 20px;
  border-radius: 8px; /* Rounded corners */
  overflow: hidden; /* Clip hover effect */
}

.help-article-item {
  margin-bottom: 0; /* Remove margin as border separates items */
  padding: 20px; /* Increased padding */
  border-bottom: 1px solid #e5e5e5;
  transition: background-color 0.2s ease; /* Smoother transition */
  cursor: pointer;
  background: transparent;
}

.help-article-item:last-child {
  margin-bottom: 0;
  border-bottom: none;
}

.help-article-item:hover {
  /* transform: translateY(-2px); Remove transform, causes slight jump */
  background-color: #f9f9f9; /* Lighter hover background */
}

.help-article-item-link {
  /* The actual link covering the item */
  text-decoration: none;
  color: var(--dark-base);
  display: block;
  height: 100%;
  width: 100%;
}

.help-article-link {
  /* Flex container for title and arrow */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-article-title {
  /* Title of the article */
  margin-bottom: 8px;
  font-size: 1.15rem; /* Slightly smaller title */
  font-weight: 600; /* Bolder title */
}

.help-article-item:hover .arrow {
  transform: translateX(5px);
}

/* ==========================================================================
   Help Page Styles (/help/article-slug/)
   ========================================================================== */

/* Specific iframe styling for help pages */
.help-page__content iframe {
  width: 100%; /* Make the iframe responsive */
  aspect-ratio: 16/9; /* Maintain a 16:9 aspect ratio */
  margin-top: 1rem; /* Add space above */
  margin-bottom: 1.5rem; /* Add space below the iframe */
  border-radius: 8px; /* Round the corners */
  overflow: hidden; /* Ensure content doesn't overflow */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
  border: none; /* Remove default border */
  height: auto; /* Allow height to adjust based on aspect ratio */
}

/* Still Stuck Section */
.still-stuck {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e5e5;
}

.still-stuck__content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.still-stuck__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(0, 128, 112, 0.1); /* Use accent color alpha */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.still-stuck__icon img {
  width: 20px; /* Control icon size */
  height: 20px;
}

.still-stuck p {
  margin: 0;
  color: var(--dark-medium); /* Match paragraph color */
}

.still-stuck a {
  color: var(--accent-base-bold);
  text-decoration: none;
  font-weight: 600; /* Make link bolder */
}

.still-stuck a:hover {
  text-decoration: underline;
}

/* Related Articles Section (uses .still-stuck as base) */
.related-articles h2 {
  /* Style the "Related articles" heading */
  font-size: 1.5rem; /* Adjust heading size */
  margin-bottom: 1.5rem; /* Space below heading */
  color: var(--dark-base);
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Reduced gap */
  margin-top: 0; /* Remove top margin as h2 has margin-bottom */
}

.related-article-item {
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: white;
  border: 1px solid #eee; /* Add subtle border */
}

.related-article-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Lighter shadow */
}

.related-article-item a {
  color: var(--accent-base-bold);
  text-decoration: none;
  padding: 1rem 1.5rem;
  display: block;
  transition: background-color 0.2s ease;
  font-weight: 500; /* Slightly bolder */
}

.related-article-item a:hover {
  background-color: #f9f9f9; /* Lighter hover */
}

.related-article-arrow {
  float: right;
  color: var(--accent-base);
  transition: transform 0.2s ease; /* Add transition to arrow */
}

.related-article-item a:hover .related-article-arrow {
  transform: translateX(3px); /* Move arrow slightly on hover */
}

/* Help page return link positioning */
.help-page-return-link {
  display: inline-block;
  margin-top: 30px;
  margin-bottom: 16px;
  color: var(--accent-base);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.help-page-return-link:hover {
  color: var(--accent-base-bold);
  text-decoration: underline;
}
