/* ==========================================================================
   Adamic Blog - Pages Stylesheet
   Styles specific to support pages (FAQ, Contact, Sitemap, 404)
   ========================================================================== */

/* ==========================================================================
   FAQ Page Styles
   ========================================================================== */

.faq-section {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    contain: layout style paint;
}

.faq-category {
    margin-bottom: 2rem;
}

.faq-category h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.faq-item {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.2s;
}

.faq-question:hover {
    background: var(--background-alt);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
    display: none;
}

.faq-answer.show {
    display: block;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer code {
    background: var(--background-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.875rem;
}

.faq-answer pre {
    background: var(--background-alt);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
}

.faq-toggle {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.faq-toggle.rotated {
    transform: rotate(180deg);
}

/* Code copy button */
.code-block-container {
    position: relative;
    margin: 1rem 0;
    padding-right: 80px;
}

.code-block-container pre {
    margin-right: 0;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    z-index: 100;
    flex-shrink: 0;
}

.copy-btn:hover:not(.copied) {
    background: #0066cc;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #10b981 !important;
    transform: scale(0.95);
}

.copy-btn.copied::after {
    content: " ✓";
    margin-left: 0.25rem;
}

/* ==========================================================================
   Contact Page Styles
   ========================================================================== */

/* List styling for contact and support pages */
.contact-section ul,
.section ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.contact-section {
    margin-bottom: 2rem;
}

.contact-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.contact-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.contact-card {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.contact-card .email {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.contact-card .description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.resources {
    margin: 2rem 0;
}

.resources h3,
.resources h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.resources ul {
    list-style: none;
    padding: 0;
}

.resources li {
    margin-bottom: 0.75rem;
}

.resources a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.resources a:hover {
    text-decoration: underline;
}

.faq-answer a {
    color: #0066cc;
    text-decoration: underline;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: none;
}

.back-home {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-home a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.back-home a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.back-home a::before {
    content: '←';
    font-size: 1rem;
}

/* ==========================================================================
   Sitemap Page Styles
   ========================================================================== */

/* Table of Contents */
.table-of-contents {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.table-of-contents h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-color);
    text-align: center;
}

.toc-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    display: block;
    background: var(--background);
    transition: all 0.2s;
}

.toc-list a:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Sitemap Sections */
.sitemap-section {
    margin-bottom: 3rem;
}

.sitemap-section:last-of-type {
    margin-bottom: 1rem;
}

.sitemap-section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sitemap-list {
    list-style: none;
    padding: 0;
}

.sitemap-list li {
    margin-bottom: 0.75rem;
}

.sitemap-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
}

.sitemap-list a:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-left: 1rem;
}

/* ==========================================================================
   Security Policy Page Styles
   ========================================================================== */

.section {
    margin-bottom: 2rem;
}

.section h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    margin: 1.5rem 0 0.75rem;
}

.section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.section ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-info {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.contact-info strong {
    color: var(--primary-color);
}

/* ==========================================================================
   404 Error Page Styles
   ========================================================================== */

.error-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    flex-grow: 1;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* ==========================================================================
   Search Page Specific Styles (wiki-search-worker)
   ========================================================================== */

/* Quick navigation links */
.quick-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.quick-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.quick-nav a:hover {
    text-decoration: underline;
}

/* Search section headings */
.search-section-heading {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.search-section-subheading {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.search-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* About section subheadings */
.search-about-subheading {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-color);
}

/* Search results dynamically generated styles */
.search-result-header {
    color: #667eea;
    margin-bottom: 1rem;
}

.search-result-content {
    white-space: pre-wrap;
}

.search-result-divider {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid var(--border-color);
}

.search-sources-heading {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.search-source-item {
    background: var(--background-alt);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.search-source-score {
    color: var(--text-muted);
}

/* ==========================================================================
   Mobile Responsive - Pages
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .faq-answer a {
        color: #66b3ff;
    }

    .faq-answer a:hover {
        color: #99ccff;
    }

    .resources a {
        color: #66b3ff;
    }

    .resources a:hover {
        color: #99ccff;
    }

    .copy-btn:hover:not(.copied) {
        background: #66b3ff;
    }
}

@media (max-width: 768px) {
    .faq-section {
        padding: 1.25rem;
    }

    .copy-btn:hover {
        background: var(--primary-color) !important;
        transform: none !important;
    }

    .page-header {
        margin-top: 25px !important;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .container {
        padding: 1rem;
    }

    .sitemap-section {
        margin-bottom: 2rem;
    }

    .sitemap-section:last-of-type {
        margin-bottom: 0.75rem;
    }

    .sitemap-section h2 {
        font-size: 1.25rem;
    }

    .toc-list {
        flex-direction: column;
        align-items: center;
    }

    .toc-list a {
        text-align: center;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }
}

