/* UNITY How-To Page - Design Matching Mockup */

.unity-howto-page {
  background: #f5f5f5;
  min-height: 100vh;
  overflow-x: hidden;
}

.howto-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 2rem;
  padding: 2rem;
  align-items: flex-start;
}

/* LEFT SIDEBAR - STICKY */
.howto-sidebar {
  position: sticky;
  top: 2rem;
  flex: 0 0 280px;
  align-self: flex-start;
}

.howto-library-box {
  background: #003d5c;
  color: white;
  padding: 2rem;
  border-radius: 8px;
}

.library-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 0 0 0.5rem 0;
  color: #7ec4cf;
}

.library-heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.library-description {
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
  opacity: 0.9;
  line-height: 1.5;
}

/* SIDEBAR SEARCH */
.howto-search-sidebar {
  margin-bottom: 1.5rem;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.sidebar-search-input::placeholder {
  color: rgba(255,255,255,0.6);
}

.sidebar-search-btn {
  width: 100%;
  padding: 0.75rem;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.sidebar-search-btn:hover {
  background: #0052a3;
}

/* TOPIC LIST */
.topic-list {
  margin-bottom: 2rem;
}

.topic-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  color: white;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.topic-item:hover {
  opacity: 0.8;
}

.topic-item.active {
  font-weight: 600;
}

.topic-count {
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.85rem;
}

/* HELP BOX */
.help-box {
  background: rgba(0,0,0,0.2);
  padding: 1.5rem;
  border-radius: 4px;
  text-align: center;
}

.help-box h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  margin: 0 0 0.5rem 0;
}

.help-box p {
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
  opacity: 0.9;
}

.submit-ticket-btn {
  display: inline-block;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.submit-ticket-btn:hover {
  opacity: 0.8;
}

/* MAIN CONTENT AREA */
.howto-main {
  flex: 1;
  min-width: 0;
}

.howto-header {
  margin-bottom: 1.5rem;
}

.results-count {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 0.5rem;
}

.howto-main-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #333;
}

/* ARTICLE LIST - STACKED */
.howto-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* INDIVIDUAL ARTICLE ITEM */
.howto-item-link {
  text-decoration: none;
  display: block;
  margin-bottom: 1.5rem;
}

.howto-item {
  display: flex;
  gap: 1.5rem;
  background: white;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
  position: relative;
  min-height: 240px;
  height: 240px;
}

.howto-item-link:hover .howto-item {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.howto-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.howto-item-image {
  flex: 0 0 280px;
  position: relative;
  overflow: hidden;
  background: #003d5c;
  height: 240px;
}

.howto-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.howto-item-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.howto-placeholder-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #003d5c;
}

.icj-logo-placeholder {
  width: auto !important;
  height: auto !important;
  max-width: 180px;
  max-height: 180px;
  object-fit: contain !important;
}

.howto-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ffc107;
  color: #333;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 3px;
}

.howto-item-content {
  flex: 1;
  padding: 1.5rem 1.5rem 1.5rem 0;
  display: flex;
  flex-direction: column;
}

.howto-item-meta {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #0066cc;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.meta-date {
  font-size: 0.75rem;
  color: #999;
  font-weight: 400;
}

.howto-item-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
  color: #333;
  transition: color 0.2s;
}

.howto-item-link:hover .howto-item-title {
  color: #0066cc;
}

.howto-item-summary {
  color: #666;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.howto-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #666;
  margin-top: auto;
}

.footer-highlight {
  font-weight: 500;
  color: #666;
  font-size: 0.85rem;
}

.footer-arrow {
  font-size: 1.25rem;
  color: #0066cc;
  font-weight: 600;
  transition: transform 0.2s;
}

.howto-item-link:hover .footer-arrow {
  transform: translateX(4px);
}

/* NO RESULTS */
.howto-no-results {
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 4px;
  color: #666;
}

/* PAGINATION */
.howto-pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.pagination-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.pagination-item {
  display: inline-block;
}

.pagination-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  min-width: 40px;
  text-align: center;
  color: #333;
  text-decoration: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.pagination-link:hover {
  background: #f5f5f5;
  border-color: #0066cc;
  color: #0066cc;
}

.pagination-current {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
  font-weight: 600;
}

.pagination-current:hover {
  background: #0066cc;
  color: white;
}

.pagination-prev,
.pagination-next {
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.pagination-ellipsis {
  padding: 0.5rem 0.25rem;
  color: #999;
}

/* ARTICLE DETAIL PAGE */
.unity-howto-article {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
}

.howto-breadcrumb {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.9rem;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: #999;
}

.breadcrumb-list a {
  color: #0066cc;
  text-decoration: none;
}

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

.breadcrumb-list li:last-child {
  color: #666;
}

.howto-article-header {
  margin-bottom: 2rem;
}

.howto-back-link {
  display: inline-block;
  color: #0066cc;
  text-decoration: none;
  margin-bottom: 1rem;
  font-weight: 500;
}

.howto-back-link:hover {
  text-decoration: underline;
}

.howto-article-title {
  font-size: 2.5rem;
  margin: 0;
  color: #333;
  font-weight: 700;
}

.howto-article-image {
  margin-bottom: 2rem;
  border-radius: 4px;
  overflow: hidden;
}

.howto-article-image img {
  width: 100%;
  height: auto;
  display: block;
}

.howto-article-content {
  line-height: 1.8;
  color: #333;
  font-size: 1.05rem;
}

.howto-article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #333;
  font-weight: 700;
}

.howto-article-content p {
  margin-bottom: 1rem;
}

.howto-article-videos {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e0e0;
}

.howto-article-videos h2 {
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.howto-video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 4px;
  background: #000;
}

.howto-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* SCROLL TO TOP BUTTON */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: #0066cc;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.scroll-to-top:hover {
  background: #0052a3;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* HORIZONTAL SCROLL WRAPPER */
.horizontal-scroll-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .howto-container {
    flex-direction: column;
    padding: 1rem;
  }

  .howto-sidebar {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
  }

  .howto-item {
    flex-direction: column;
  }

  .howto-item-image {
    flex: 0 0 200px;
  }

  .howto-item-content {
    padding: 1.5rem;
  }

  .howto-item-arrow {
    flex: 0 0 50px;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
  }
}

@media (max-width: 768px) {
  .howto-container {
    padding: 0.5rem;
  }

  .howto-main-title {
    font-size: 1.5rem;
  }

  .howto-item-title {
    font-size: 1.25rem;
  }

  .howto-article-title {
    font-size: 2rem;
  }
}

/* ARTICLE LINKS & FILES (Weekly Updates, UNITY Spotlights, Events) */
.howto-article-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.howto-resource-link {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  background: #0066cc;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}

.howto-resource-link:hover,
.howto-resource-link:focus {
  background: #004f9e;
  color: #fff;
}
