/* =========================================================
   PrivateByRight VPN – Support Center Styles
   ========================================================= */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@1,900,700,500,400,300&display=swap');

/* ----- CSS Custom Properties ----- */
:root {
  --bg-primary:       #0A0B14;
  --bg-card:          #12131F;
  --bg-elevated:      #191B2F;
  --border:           rgba(255, 255, 255, 0.08);
  --border-hover:     rgba(255, 255, 255, 0.15);
  --text-primary:     #F8FAFC;
  --text-secondary:   #94A3B8;
  --text-muted:       #64748B;
  --accent:           #FBBF24;
  --accent-hover:     #F59E0B;
  --green:            #10B981;
  --blue:             #0EA5E9;
  --white:            #FFFFFF;

  --font: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-card:      12px;
  --radius-input:     6px;
  --radius-btn:       8px;
  --transition:       150ms ease;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

img { max-width: 100%; display: block; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--text-primary);
  line-height: 1.25;
}

p { color: var(--text-secondary); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

strong, b { color: var(--text-primary); font-weight: 700; }

/* ----- Layout Helpers ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

main { flex: 1; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-search {
  width: 100%;
  max-width: 640px;
  position: relative;
  justify-self: stretch;
}

.header-search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 9px 16px 9px 40px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.header-search-input::placeholder { color: var(--text-muted); }
.header-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15);
}

.header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.search-dropdown.open { display: block; }

.search-result-item {
  display: block;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-elevated); }

.search-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
}

.search-result-category {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.search-no-results {
  padding: 16px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.nav-link.primary {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

.nav-link.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-primary);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-help {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-help a { color: var(--accent); }
.footer-help a:hover { color: var(--accent-hover); text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-secondary); }

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* =========================================================
   HERO (Homepage)
   ========================================================= */
.hero {
  padding: 80px 24px 64px;
  text-align: center;
  background: var(--bg-primary);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.hero-search-wrap {
  max-width: 640px;
  margin: 0 auto 20px;
  position: relative;
}

.hero-search-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  padding: 14px 20px 14px 52px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.hero-search-input::placeholder { color: var(--text-muted); }
.hero-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.hero-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.hero-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  text-align: left;
}

.hero-search-dropdown.open { display: block; }

.popular-questions {
  font-size: 14px;
  color: var(--text-secondary);
}

.popular-questions a {
  color: var(--accent);
  font-weight: 500;
}

.popular-questions a:hover { color: var(--accent-hover); text-decoration: underline; }

/* =========================================================
   CATEGORY CARDS GRID
   ========================================================= */
.categories-section {
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  background: var(--bg-elevated);
  color: inherit;
}

.category-card-icon {
  font-size: 2.25rem;
  margin-bottom: 16px;
  display: block;
  line-height: 1;
}

.category-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.category-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* =========================================================
   STILL NEED HELP SECTION
   ========================================================= */
.still-need-help {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.still-need-help h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.still-need-help p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
}

/* =========================================================
   BACK LINK
   ========================================================= */
.back-link-bar {
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}

.back-link:hover { color: var(--accent-hover); }

/* =========================================================
   SIDEBAR + CONTENT LAYOUT
   ========================================================= */
.content-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar */
.sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px 0;
  position: sticky;
  top: 80px;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 20px 8px;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }

.sidebar-nav li { margin: 0; }

.sidebar-nav a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.sidebar-nav a:hover {
  color: var(--accent);
  background: rgba(251, 191, 36, 0.05);
}

.sidebar-nav a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  background: rgba(251, 191, 36, 0.05);
}

/* Content area */
.content-area { min-width: 0; }

/* =========================================================
   CATEGORY PAGE
   ========================================================= */
.category-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-header p {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

.article-list { list-style: none; padding: 0; margin: 0; }

.article-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.article-list li:last-child { border-bottom: none; }

.article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
  gap: 12px;
}

.article-list a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.article-list a svg { flex-shrink: 0; opacity: 0.6; }

/* =========================================================
   ARTICLE PAGE
   ========================================================= */
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.article-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.article-body {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.75;
}

.article-body h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 12px;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 20px 0 8px;
}

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

.article-body ul, .article-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-body li { margin-bottom: 6px; color: var(--text-secondary); }

.article-body a { color: var(--accent); }
.article-body a:hover { color: var(--accent-hover); text-decoration: underline; }

.article-body strong { color: var(--text-primary); }

.article-body code {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
}

/* Article feedback */
.article-feedback {
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-align: center;
}

.article-feedback p {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.feedback-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.feedback-btn {
  padding: 8px 24px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.feedback-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.feedback-btn.yes:hover { border-color: var(--green); color: var(--green); }
.feedback-btn.no:hover  { border-color: #EF4444; color: #EF4444; }

.feedback-btn.active-yes { border-color: var(--green); color: var(--green); background: rgba(16,185,129,0.08); }
.feedback-btn.active-no  { border-color: #EF4444; color: #EF4444; background: rgba(239,68,68,0.08); }

.article-contact-note {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

.article-contact-note a { color: var(--accent); }
.article-contact-note a:hover { color: var(--accent-hover); text-decoration: underline; }

/* =========================================================
   CONTACT PAGE
   ========================================================= */
.contact-section {
  padding: 64px 24px;
}

.contact-section h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-form-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group:last-of-type { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-label span { color: var(--accent); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit-btn {
  width: 100%;
  margin-top: 28px;
  padding: 14px;
  font-size: 16px;
}

.contact-direct {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.contact-direct a { color: var(--accent); }
.contact-direct a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Form success message */
.form-success {
  display: none;
  text-align: center;
  padding: 32px;
}

.form-success.show { display: block; }

.form-success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.form-success h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.form-success p { color: var(--text-secondary); }

/* =========================================================
   MOBILE SIDEBAR TOGGLE
   ========================================================= */
.sidebar-toggle {
  display: none;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}

.sidebar-toggle:hover { border-color: var(--border-hover); }

.sidebar-mobile {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px 0;
  margin-bottom: 24px;
}

.sidebar-mobile.open { display: block; }

/* =========================================================
   BREADCRUMB
   ========================================================= */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); opacity: 0.5; }
.breadcrumb .current { color: var(--text-secondary); }

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

@media (max-width: 768px) {
  .header-inner { gap: 12px; padding: 12px 16px; grid-template-columns: auto 1fr auto; }
  .header-search { max-width: none; width: 100%; justify-self: stretch; }
  .nav-link { display: none; }
  .nav-link.primary { display: inline-flex; padding: 7px 10px; font-size: 13px; }

  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: 1.75rem; }

  .categories-section { padding: 32px 16px; }
  .categories-grid { grid-template-columns: 1fr; gap: 16px; }

  .content-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 48px;
  }

  .sidebar { display: none; }
  .sidebar-toggle { display: flex; }

  .back-link-bar { padding: 12px 16px; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-copy { white-space: normal; }

  .contact-form-wrap { padding: 24px 20px; }
}

@media (max-width: 480px) {
  .header-logo img { height: 26px; }
  .hero h1 { font-size: 1.5rem; }
  .category-card { padding: 24px 16px; }
  .contact-section h1 { font-size: 1.5rem; }
}
