/* ==========================================================================
   INFO PAGES STYLES NEW - Fixed scrolling implementation
   For use with BaseInfoPageNew component
   ========================================================================== */

/* Main wrapper - uses simple grid, allows natural scrolling */
.info-page-wrapper {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  padding: 0;
}

/* When there's no sidebar (about page without TOC) */
.info-page-wrapper:not(:has(.info-page-sidebar)) {
  grid-template-columns: 1fr;
}

/* Sidebar - sticky positioning within scrollable container */
.info-page-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Main content area */
.info-page-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0; /* Prevent grid blowout */
}

/* Content wrapper */
.info-page-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Table of Contents */
.toc-card {
  padding: 24px;
  position: sticky;
  top: 20px;
  align-self: flex-start; /* Important for sticky to work properly */
}

.toc-title {
  font-size: var(--text-body-large);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 16px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.toc-link {
  display: block;
  padding: 12px 16px;
  color: var(--theme-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-small);
  transition: var(--transition-smooth);
  font-size: var(--text-body);
  font-weight: 500;
}

.toc-link:hover {
  background: var(--theme-primary-light);
  color: var(--theme-primary);
  transform: translateX(4px);
}

.toc-link.active {
  background: var(--theme-primary);
  color: white;
}

.help-contact {
  padding: 20px;
  background: var(--theme-primary-light);
  border-radius: var(--radius-medium);
  border: 1px solid var(--theme-primary-border);
  text-align: center;
}

.contact-title {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 8px;
}

.contact-description {
  font-size: var(--text-small);
  color: var(--theme-text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.contact-btn {
  padding: 10px 16px;
  font-size: var(--text-small);
  font-weight: 600;
}

/* Search Section */
.search-section {
  padding: 32px;
  text-align: center;
}

.search-header {
  margin-bottom: 32px;
}

.search-title {
  font-size: var(--text-title);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 8px;
}

.search-subtitle {
  font-size: var(--text-body);
  color: var(--theme-text-secondary);
}

.search-container {
  max-width: 500px;
  margin: 0 auto 32px;
}

.search-input-container {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-large);
  font-size: var(--text-body);
  background: rgba(255, 255, 255, 0.8);
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: var(--theme-primary);
  box-shadow: 0 0 0 3px var(--theme-primary-light);
  background: rgba(255, 255, 255, 1);
}

.search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--theme-text-muted);
}

.quick-links {
  text-align: center;
}

.quick-links-title {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--theme-text-primary);
  margin-bottom: 16px;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-link-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-medium);
  color: var(--theme-text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: var(--text-small);
  font-weight: 500;
}

.quick-link-btn:hover {
  background: var(--theme-primary-light);
  border-color: var(--theme-primary-border);
  color: var(--theme-primary);
  transform: translateY(-2px);
}

/* Help Sections */
.help-section {
  scroll-margin-top: 80px;
}

.section-title {
  font-size: var(--text-heading);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* FAQ Items */
.faq-item {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-medium);
  margin-bottom: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-item:hover {
  box-shadow: var(--shadow-light);
}

.faq-question {
  font-size: var(--text-body-large);
  font-weight: 600;
  color: var(--theme-text-primary);
  padding: 20px 24px;
  margin: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  user-select: none;
}

.faq-question::after {
  content: '▼';
  float: right;
  transition: var(--transition-smooth);
  font-size: var(--text-small);
  color: var(--theme-text-muted);
}

.faq-question:hover {
  background: rgba(0, 0, 0, 0.04);
}

.faq-question:hover::after {
  color: var(--theme-primary);
}

/* Collapsed state */
.faq-item.collapsed .faq-question {
  border-bottom: none;
}

.faq-item.collapsed .faq-question::after {
  transform: rotate(-90deg);
}

.faq-answer {
  padding: 24px;
  color: var(--theme-text-secondary);
  line-height: 1.6;
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

/* Collapsed answer */
.faq-item.collapsed .faq-answer {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.faq-answer p {
  margin-bottom: 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.faq-answer li {
  margin-bottom: 6px;
}

.faq-answer strong {
  color: var(--theme-text-primary);
  font-weight: 600;
}

/* Contact Methods */
.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.contact-method {
  background: white;
  padding: 32px 24px;
  border-radius: var(--radius-medium);
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition-smooth);
}

.contact-method:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.contact-icon {
  font-size: 32px;
  margin-bottom: 16px;
}

.contact-method h3 {
  font-size: var(--text-body-large);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 8px;
}

.contact-method p {
  color: var(--theme-text-secondary);
  margin-bottom: 4px;
}

.contact-time {
  font-size: var(--text-small);
  color: var(--theme-text-muted);
  font-style: italic;
}

/* About Content */
.about-content {
  max-width: 900px;
  margin: 0 auto;
}

.about-header {
  text-align: center;
  margin-bottom: 48px;
}

.about-header h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  color: var(--theme-text-primary);
  margin-bottom: 16px;
}

.about-subtitle {
  font-size: var(--text-body-large);
  color: var(--theme-text-secondary);
  font-style: italic;
}

.about-section {
  margin-bottom: 48px;
  padding: 32px;
  background: white;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.about-section h2 {
  font-size: var(--text-heading);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 20px;
}

.about-section p {
  color: var(--theme-text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.feature-card {
  padding: 24px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: var(--radius-medium);
  text-align: center;
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: var(--text-body-large);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--theme-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.values-list {
  list-style: none;
  padding: 0;
}

.values-list li {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--theme-text-secondary);
  line-height: 1.6;
}

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

.values-list strong {
  color: var(--theme-primary);
  font-weight: 700;
}

.cta-section {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Search highlighting */
mark {
  background: var(--theme-primary-light);
  color: var(--theme-primary);
  padding: 2px 4px;
  border-radius: 4px;
}

/* ==========================================================================
   LEGAL PAGES - Terms, Privacy Policy
   ========================================================================== */

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--theme-primary-border);
}

.legal-header h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  color: var(--theme-text-primary);
  margin-bottom: 8px;
}

.legal-date {
  font-size: var(--text-body);
  color: var(--theme-text-muted);
  font-style: italic;
}

.legal-section {
  margin-bottom: 32px;
  padding: 24px;
  background: white;
  border-radius: var(--radius-medium);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.legal-section h2 {
  font-size: var(--text-heading);
  font-weight: 700;
  color: var(--theme-text-primary);
  margin-bottom: 16px;
}

.legal-section p {
  color: var(--theme-text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-section ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-section li {
  color: var(--theme-text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .info-page-wrapper {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .info-page-sidebar {
    /* Keep TOC at top on mobile for better navigation */
    order: -1;
  }

  .toc-card {
    position: relative;
    top: 0;
  }

  .toc-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .search-section {
    padding: 24px 20px;
  }

  .quick-links-grid {
    grid-template-columns: 1fr;
  }

  .contact-methods {
    grid-template-columns: 1fr;
  }

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

  .about-section {
    padding: 20px;
  }

  .cta-section {
    flex-direction: column;
    align-items: center;
  }

  .cta-section .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .search-input {
    padding: 14px 40px 14px 16px;
  }

  .faq-question {
    padding: 16px 20px;
    font-size: var(--text-body);
  }

  .faq-answer {
    padding: 20px;
  }

  .about-header h1 {
    font-size: var(--text-title);
  }
}
