/* Poreia Website Styles */

:root {
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --border-color: #eee;
    --bg-code: #f4f4f4;
    --link-color: #007aff;
    --max-width: 700px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Typography */
h1 {
    margin-top: 0;
    margin-bottom: 0.5em;
}

h2 {
    margin-top: 2em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    margin-top: 1.5em;
    color: var(--text-secondary);
}

p {
    margin: 1em 0;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Lists */
ul, ol {
    padding-left: 1.5em;
    margin: 1em 0;
}

li {
    margin: 0.5em 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

th, td {
    text-align: left;
    padding: 0.75em 1em;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    background: #fafafa;
}

/* Code */
code {
    background: var(--bg-code);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "SF Mono", Menlo, Monaco, monospace;
}

pre {
    background: var(--bg-code);
    padding: 1em;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85em;
}

pre code {
    background: none;
    padding: 0;
}

/* Blockquotes / Notes */
blockquote {
    margin: 1.5em 0;
    padding: 1em 1.25em;
    background: #f8f9fa;
    border-left: 4px solid #007aff;
    border-radius: 0 6px 6px 0;
}

blockquote p:first-child {
    margin-top: 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

.screenshot {
    display: block;
    margin: 1.5em auto;
    max-height: 500px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.screenshot-small {
    max-height: 300px;
}

.screenshot-caption {
    text-align: center;
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 0.5em;
}

/* Header */
.site-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2em;
}

.site-header img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.site-header h1 {
    margin: 0;
    font-size: 1.5em;
}

.site-header .tagline {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Site Navigation */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em 1.25em;
    font-size: 0.9em;
    margin-bottom: 2em;
}

.site-nav a {
    color: var(--text-secondary);
}

.site-nav a:hover {
    color: var(--link-color);
}

/* Breadcrumb Navigation */
.breadcrumb {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--link-color);
}

/* Table of Contents */
.toc {
    background: #f8f9fa;
    padding: 1.5em;
    border-radius: 8px;
    margin: 1.5em 0;
}

.toc h2 {
    margin-top: 0;
    border: none;
    padding: 0;
    font-size: 1.1em;
}

.toc ul {
    margin: 0;
    padding-left: 1.25em;
}

.toc li {
    margin: 0.4em 0;
}

/* Page navigation (prev/next) */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid var(--border-color);
    font-size: 0.95em;
}

.page-nav a {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.page-nav .prev::before {
    content: "\2190";
}

.page-nav .next::after {
    content: "\2192";
}

/* Footer */
footer {
    margin-top: 3em;
    padding-top: 1.5em;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85em;
}

footer a {
    color: var(--text-muted);
}

/* Landing page specific */
.hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 1.5em;
}

.hero img {
    width: 80px;
    height: 80px;
    border-radius: 18px;
}

.hero h1 {
    margin: 0;
}

.hero .tagline {
    margin: 0.25em 0 0;
    color: var(--text-secondary);
}

/* Carousel */
.carousel {
    position: relative;
    margin: 2em 0;
    text-align: center;
}

.carousel-inner {
    display: flex;
    overflow: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.carousel-slide img {
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.carousel-slide .caption {
    margin-top: 12px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carousel-nav button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.carousel-nav button.active {
    background: #333;
}

.carousel-nav button:hover {
    background: #999;
}

/* Quick links */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    margin: 1.5em 0;
}

.quick-links a {
    display: inline-block;
}

/* Help index cards */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
    margin: 1.5em 0;
}

.help-card {
    display: block;
    padding: 1em;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.help-card:hover {
    background: #eef0f2;
    transform: translateY(-2px);
    text-decoration: none;
}

.help-card h3 {
    margin: 0 0 0.25em;
    color: var(--link-color);
    font-size: 1em;
}

.help-card p {
    margin: 0;
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Utility classes */
.text-muted {
    color: var(--text-muted);
}

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

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Changelog specific */
.build-date {
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 0.85em;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 20px 16px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
    }

    .page-nav {
        flex-direction: column;
        gap: 1em;
    }

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

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 0.5em;
    }
}
