/* ==========================================================================
   PHROZEN HELP CENTER - PAGES MODULE
   ========================================================================== */

/* Pages 模塊載入成功 ✅ */

/* ==========================================================================
   PAGE-SPECIFIC STYLES - 不依賴 Zendesk 變數的頁面樣式
   - Homepage、Article、Category、Search、Community 頁面結構
   - 依賴 Zendesk 變數的顏色樣式保留在 style.css
   ========================================================================== */

/***** Homepage Structure *****/
.section {
  margin-bottom: 40px;
}

.home-section h2 {
  margin-bottom: 10px;
  text-align: center;
}

/***** Promoted Articles Structure *****/
.promoted-articles {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.promoted-articles-item {
  flex: 1 0 auto;
}

.promoted-articles-item:nth-child(3n) {
  padding-right: 0;
}

.promoted-articles-item a {
  display: block;
  border-bottom: 1px solid #ddd;
  padding: 15px 0;
}

.promoted-articles-item .icon-lock {
  vertical-align: baseline;
}

.promoted-articles-item:last-child a {
  border: 0;
}

/***** Community Section Structure *****/
.community {
  text-align: center;
}

.community-image {
  min-height: 300px;
  margin-top: 32px;
  background-position: center;
  background-repeat: no-repeat;
  max-width: 100%;
}

.community,
.activity {
  border-top: 1px solid #ddd;
  padding: 30px 0;
}

/***** Recent Activity Structure *****/
.recent-activity-header {
  margin-bottom: 10px;
  text-align: center;
}

.recent-activity-list {
  padding: 0;
}

.recent-activity-item {
  border-bottom: 1px solid #ddd;
  overflow: auto;
  padding: 20px 0;
}

.recent-activity-item-parent {
  font-size: 16px;
  font-weight: 600;
}

.recent-activity-item-parent, .recent-activity-item-link {
  margin: 6px 0;
  display: inline-block;
  width: 100%;
}

.recent-activity-item-link {
  font-size: 14px;
}

.recent-activity-item-meta {
  margin: 15px 0 0 0;
  float: none;
}

.recent-activity-item-time, .recent-activity-item-comment {
  display: inline-block;
  font-size: 13px;
}

.recent-activity-item-comment {
  padding-left: 5px;
}

[dir="rtl"] .recent-activity-item-comment {
  padding: 0 5px 0 0;
}

.recent-activity-item-comment::before {
  display: inline-block;
}

.recent-activity-controls {
  padding-top: 15px;
}

.recent-activity-accessibility-label {
  border: 0;
  clip: rect(0 0 0 0);
  -webkit-clip-path: inset(50%);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.recent-activity-comment-icon svg {
  vertical-align: middle;
  width: 16px;
  height: 16px;
}

.recent-activity-comment-icon:after {
  content: attr(data-comment-count);
  margin-left: 3px;
}

[dir="rtl"] .recent-activity-comment-icon:after {
  margin-left: 0;
  margin-right: 3px;
}

/***** Category Pages Structure *****/
.category-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-content {
  flex: 1;
}

.section-tree {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
}

.section-tree .section {
  flex: 1 0 auto;
  margin-bottom: 40px;
}

.category-banner {
  margin-bottom: 40px;
}

.category-banner-image {
  max-width: 100%;
}

.section-tree-title {
  font-size: 16px;
  font-weight: 600;
}

.section-tree-title a {
  text-decoration: none;
}

.section-tree .see-all-articles {
  margin-top: 20px;
}

.article-list-item {
  margin: 10px 0;
}

.article-list-item a {
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.section-flex {
  display: flex;
  flex-wrap: wrap;
  padding-left: 8%;
}

.category-name {
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 5px;
  margin-bottom: 20px;
}

.category-section-title {
  margin-bottom: 20px;
}

.category-cards {
  margin-bottom: 40px;
}

.category-cards .category-card {
  width: 20%;
  margin: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.category-cards  .category-article-image {
  width: 100%;
}

.article-list-link {
  display: block;
  padding: 10px 0;
}

/***** Section Pages Structure *****/
.section-container {
  display: flex;
  flex-direction: column;
}

.section-content {
  flex: 1;
}

.section-list {
  margin: 0 0 40px 0;
}

.section-list-item {
  border-bottom: 1px solid #ddd;
  padding: 20px 0;
}

.section-list-item:first-child {
  border-top: 1px solid #ddd;
}

.section-list-item a {
  display: block;
  padding: 10px 0;
}

/***** Article Pages Structure *****/
/*
 * Article grid optimization for readability:
 * Sidebar | Content | Free space
 * 17%     | 66%     | 17%
 */
.article {
  flex: 1 0 auto;
}

.article-container {
  display: flex;
  flex-direction: column;
}

.article-header {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 40px;
  margin-top: 20px;
}

.article-avatar {
  margin-right: 10px;
}

.article-author {
  margin-bottom: 10px;
}

.article-title .icon-lock {
  position: relative;
  left: -5px;
  vertical-align: baseline;
}

.article [role="button"] {
  flex-shrink: 0;
  width: 100%;
}

.article-info {
  max-width: 100%;
}

.article-meta {
  display: inline-block;
  vertical-align: middle;
}

.article-body img {
  height: auto;
  max-width: 100%;
}

.article-body ul,
.article-body ol {
  padding-left: 20px;
  list-style-position: outside;
  margin: 20px 0 20px 20px;
}

[dir="rtl"] .article-body ul, [dir="rtl"]
.article-body ol {
  padding-right: 20px;
  padding-left: 0;
  margin-left: 0;
  margin-right: 20px;
}

.article-body ul > ul,
.article-body ol > ol,
.article-body ol > ul,
.article-body ul > ol,
.article-body li > ul,
.article-body li > ol {
  margin: 0;
}

.article-body ul {
  list-style-type: disc;
}

.article-body > p:last-child {
  margin-bottom: 0;
}

.article-content {
  line-height: 1.6;
  margin: 40px 0;
  word-wrap: break-word;
}

.article-footer {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
}

.article-comment-count-icon {
  vertical-align: middle;
  margin-right: 4px;
}

.article-sidebar {
  border-top: 1px solid #ddd;
  flex: 1 0 auto;
  margin-top: 40px;
  padding-top: 40px;
}

.article-relatives {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

.article-relatives > * {
  flex: 1 0 auto;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.article-relatives > *:last-child {
  border: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.article-votes {
  border-top: 1px solid #ddd;
  padding: 30px 0;
  text-align: center;
}

.article-vote {
  margin: 10px 5px;
  min-width: 90px;
  width: auto;
}

.article-more-questions {
  margin-top: 10px;
}

.article-more-questions a {
  font-weight: 600;
}

.article-return-to-top {
  margin-top: 20px;
}

.article-return-to-top a {
  display: block;
  text-align: center;
  text-decoration: none;
}

.article-return-to-top-icon {
  transform: rotate(270deg);
  vertical-align: middle;
}

/***** Search Pages Structure *****/
.search-container {
  position: relative;
}

.search {
  border-color: #ddd;
  border-radius: 30px;
  border-style: solid;
  border-width: 1px;
  display: flex;
  position: relative;
  transition: border 0.12s ease-in-out;
}

.search input[type="search"],
.search .clear-button {
  background-color: rgba(255, 255, 255, 0.30);
  border-radius: 30px;
  border: none;
}

.search-full input[type="search"],
.search-full .clear-button {
  border-color: #fff;
}

.search input[type="search"] {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  color: #666;
  flex: 1 1 auto;
  height: 40px;
  width: 100%;
}

.search input[type="search"]:focus {
  color: #555;
}

.search input[type="search"]::placeholder {
  color: #fff; 
  font-size: 12px; 
  font-weight: bold;
  text-align: center;
  opacity: 1; 
}

.search input[type="search"]::-webkit-search-decoration,
.search input[type="search"]::-webkit-search-cancel-button,
.search input[type="search"]::-webkit-search-results-button,
.search input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

.search input[type="search"]:-webkit-autofill,
.search input[type="search"]:-webkit-autofill:hover,
.search input[type="search"]:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px white inset;
}

.search .clear-button {
  align-items: center;
  box-sizing: border-box;
  color: black;
  cursor: pointer;
  display: none;
  flex: none;
  justify-content: center;
  padding: 0 15px;
}

.search-has-value .clear-button {
  display: flex;
}

[dir="ltr"] .search input[type="search"] {
  padding-left: 40px;
  padding-right: 20px;
}

[dir="ltr"] .search-has-value input[type="search"] {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  border-right-color: transparent;
}

[dir="ltr"] .search .clear-button {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-left-color: transparent;
}

[dir="rtl"] .search input[type="search"] {
  padding-left: 20px;
  padding-right: 40px;
}

[dir="rtl"] .search-has-value input[type="search"] {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
  border-left-color: transparent;
}

[dir="rtl"] .search .clear-button {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  border-right-color: transparent;
}

.search-icon {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  position: absolute;
  left: 15px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: #777;
  pointer-events: none;
}

[dir="rtl"] .search-icon {
  left: auto;
  right: 15px;
}

/* 特定搜索框的 placeholder 樣式 */
.home-search input[placeholder],
.article-search input[placeholder],
.search-result input[placeholder] {
  color: #fff !important;
}

/***** Hero Component Structure *****/
.hero {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  height: 480px;
  padding: 0 20px;
  text-align: center;
  width: 100%;
}

.hero-inner {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  max-width: 610px;
  margin: 0 auto;
}

/***** Content Blocks Structure *****/
.blocks-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
}

.blocks-item {
  min-width: 150px;
  border-radius: 15px;
  border: 1px solid #313840;
  box-sizing: border-box;
  box-shadow: 0px 8px 8px rgba(0, 0, 0, 0.3); 
  color: #fff;
  display: flex;
  flex: 0 0 17%;
  margin: 0 8px 30px;
  max-width: 100%;
  text-align: center;
}

.blocks-item:hover, .blocks-item:focus, .blocks-item:active {
  background-color: #59323e;
}

.blocks-item-internal {
  background-color: transparent;
  border: 1px solid #ddd;
}

.blocks-item-internal .icon-lock {
  height: 15px;
  width: 15px;
  bottom: 5px;
  position: relative;
}

.blocks-item-link {
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  border-radius: inherit;
}

.blocks-item-link:visited, .blocks-item-link:hover, .blocks-item-link:active {
  color: inherit;
  text-decoration: none;
}

.blocks-item-title {
  margin-bottom: 0;
  font-size: 10px;
}

.blocks-item-description {
  margin: 0;
}

.blocks-item-description:not(:empty) {
  margin-top: 10px;
}

/***** FAQ Section Structure *****/
.faq-section {
  width: 100vw;
  margin: 0 calc((100% - 100vw)/2);
  margin-top: 6rem;
  background: #63707C;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.faq-section h2 {
  text-align: center;
  font-size: 60px;
  font-weight: 700;
  line-height: normal;
  margin-top: 5rem;
}

.faqs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 568px;
  margin-bottom: 5rem;
}

.faq {
  width: 210px;
  padding: 1rem;
  border-radius: 15px;
  display: flex;
  margin: 1rem 2rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease, box-shadow 0.15s ease-in-out;
  text-decoration: none;
}

.faq-section .faqs .faq:hover {
  text-decoration: none;
  box-shadow: 2px 6px 8px rgba(0, 0, 0, 0.15); 
  background: #7A8B95;
}

.faq div {
  font-size: 16px;
  font-weight: 700;
}

.faq-image {
  max-width: 160px;
  max-height: 160px;
}

/***** Submit Request Section Structure *****/
.submit-request {
  width: 100vw;
  height: 474px;
  margin: 0 calc((100% - 100vw)/2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.submit-request h3 {
  font-size: 24px;
  font-weight: 700;
}

/***** Search Results Structure *****/
.search-results {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
}

.search-results-column {
  flex: 1;
}

.search-results-sidebar {
  border-top: 1px solid #ddd;
  flex: 1 0 auto;
  margin-bottom: 20px;
  padding: 0;
}

.search-results-sidebar .sidenav-item {
  border-radius: 4px;
  padding: 10px 36px;
  margin-bottom: 4px;
}

.search-results-sidebar .sidenav-item:hover, .search-results-sidebar .sidenav-item.current {
  background-color: #666;
  text-decoration: none;
}

.search-results-sidebar .sidenav-subitem {
  unicode-bidi: embed;
}

.search-results-sidebar .collapsible-sidebar {
  margin-bottom: 30px;
}

.search-results-sidebar .collapsible-sidebar[aria-expanded="false"] .multibrand-filter-list {
  display: none;
}

.search-results-sidebar .multibrand-filter-list--collapsed li:nth-child(1n + 6) {
  display: none;
}

.search-results-sidebar .see-all-filters {
  background: none;
  border: none;
  cursor: pointer;
  display: block;
  padding: 10px;
}

.search-results-sidebar .see-all-filters[aria-hidden="true"] {
  display: none;
}

.search-results-sidebar .see-all-filters:hover {
  text-decoration: underline;
}

.search-results-sidebar .see-all-filters::after {
  content: ' ⌄';
  font-weight: bold;
}

.search-results-subheading {
  font-size: 18px;
  font-weight: 600;
}

.search-results-list {
  margin-bottom: 25px;
}

.search-results-list > li {
  padding: 20px 0;
}

.search-results-list > li:first-child {
  border-top: 1px solid #ddd;
}

.search-results-list > li h2 {
  margin-bottom: 0;
}

.search-results .meta-group {
  display: block;
  align-items: center;
  clear: both;
  color: #666;
}

.search-results .meta-group > li {
  display: block;
}

.search-results .meta-group .meta-data {
  color: inherit;
}

[dir="ltr"] .search-results .meta-group .meta-data:not(:last-child) {
  margin-right: 20px;
}

[dir="rtl"] .search-results .meta-group .meta-data:not(:last-child) {
  margin-left: 20px;
}

.search-results .meta-group .meta-data::after {
  content: none;
}

.search-results-description {
  margin-top: 10px;
  word-break: break-word;
}

.search-result-title {
  font-size: 16px;
  display: inline-block;
}

[dir="ltr"] .search-result-icons {
  float: right;
}

[dir="rtl"] .search-result-icons {
  float: left;
}

.search-result-votes, .search-result-meta-count {
  display: inline-block;
  font-size: 13px;
  padding: 4px 5px;
  border-radius: 2px;
  line-height: 1;
}

.search-result-votes-icon, .search-result-meta-count-icon {
  vertical-align: baseline;
  width: 16px;
  height: 16px;
}

[dir="ltr"] .search-result-votes, [dir="ltr"] .search-result-meta-count {
  margin-left: 5px;
}

[dir="ltr"] .search-result-votes::before, [dir="ltr"] .search-result-meta-count::before {
  margin-right: 5px;
}

[dir="rtl"] .search-result-votes, [dir="rtl"] .search-result-meta-count {
  margin-right: 5px;
}

[dir="rtl"] .search-result-votes::before, [dir="rtl"] .search-result-meta-count::before {
  margin-left: 5px;
}

.search-result .meta-group {
  margin-bottom: 15px;
}

.search-result-breadcrumbs {
  display: none;
}

.search-results-description em {
  font-weight: 600;
  font-style: normal;
}

html[lang|="zh"] .search-results-description em {
  font-weight: normal;
  background-color: rgba(255, 255, 0, 0.4);
}

/***** Community Pages Structure *****/
.community-hero {
  margin-bottom: 40px;
}

.community-footer {
  margin-top: 60px;
}

.community-footer-title {
  font-size: 18px;
  font-weight: 600;
}

.community-featured-posts .title {
  margin-bottom: 20px;
}

.community-featured-posts, .community-activity {
  margin-bottom: 40px;
}

.community-header {
  margin-bottom: 20px;
}

.community-header .title {
  font-size: 24px;
  font-weight: 600;
}

.community-follow {
  display: inline-block;
}

.community-follow button {
  border-radius: 4px;
  padding: 8px 16px;
  min-width: 120px;
  cursor: pointer;
}

.community-follow button:hover {
  text-decoration: none;
}

.community-follow button:hover::after, .community-follow button:focus::after {
  display: none;
}

.community-follow button[data-selected="true"] {
  position: relative;
}

.community-follow button[data-selected="true"]::after {
  content: '';
}

.community-follow button[data-selected="true"]:hover {
  background-color: transparent;
}

.community-follow button::after {
  content: '';
  display: inline-block;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

[dir="rtl"] .community-follow button::after {
  left: 10px;
  right: auto;
}

.community-badge-title {
  font-size: 13px;
  font-weight: 600;
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}

.profile-info .community-badge-title {
  margin-bottom: 4px;
}

.community-badge-container-achievements {
  display: flex;
}

.community-badge-container-achievements > .community-badge-titles {
  margin-right: 16px;
}

[dir="rtl"] .community-badge-container-achievements > .community-badge-titles {
  margin-left: 16px;
  margin-right: 0;
}

.community-name-and-title-badges {
  display: flex;
  align-items: center;
}

.community-badge {
  display: inline-block;
  vertical-align: middle;
}

.community-badge-achievements {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.profile-info .community-badge-achievements {
  flex-direction: column;
  align-items: flex-start;
}

.community-title-badges {
  display: flex;
  align-items: center;
}

.community-badge-achievements-rest {
  cursor: pointer;
  font-size: 13px;
  margin-left: 4px;
  vertical-align: middle;
}

.community-badge-achievements img {
  margin-right: 4px;
}

.community-badge-titles img {
  margin-right: 4px;
}

.profile-info .community-badge-achievements-rest {
  margin-left: 0;
}