/*
 * pages.css — Estilos compartilhados para páginas secundárias
 * (sobre.html, termos.html, privacidade.html, como-usar.html)
 */

/* ─── Variáveis e color-scheme ────────────────────────────────────────────── */
:root {
    color-scheme: light dark;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --border-radius: 8px;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --text-muted: #475569;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.07);
}

html.dark,
html.dark body,
body.dark {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

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

/* ─── Base ─────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.9375rem;
}

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

/* ─── Site Header ──────────────────────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-header-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -0.01em;
}
.site-header-brand svg { color: var(--primary); }
.site-header-brand:hover { color: var(--primary); text-decoration: none; }

.site-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 11px;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}
.btn-back:hover { color: var(--text); background: var(--bg); text-decoration: none; }

.btn-icon {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.btn-icon:hover { color: var(--text); background: var(--bg); }
.btn-icon:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ─── Page hero ─────────────────────────────────────────────────────────────── */
.page-hero {
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.page-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.page-hero p {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto;
}

/* ─── Container ────────────────────────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    flex-grow: 1;
}

.page-content {
    padding: 2.5rem 0 3rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* ─── Sections ─────────────────────────────────────────────────────────────── */
section {
    background: var(--surface);
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.85rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}
p:last-child { margin-bottom: 0; }

ul {
    padding-left: 1.25rem;
    margin-bottom: 0.9rem;
}
li {
    margin-bottom: 0.55rem;
    color: var(--text-muted);
    padding-left: 0.25rem;
}
li::marker { color: var(--primary); }

code {
    background-color: var(--bg);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.875em;
    border: 1px solid var(--border);
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
footer.page-footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: auto;
    border-top: 1px solid #1e293b;
}
html.dark footer.page-footer,
body.dark footer.page-footer { background: #020617; }

.page-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 2rem 1.25rem;
    text-align: center;
}

.page-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.page-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    text-decoration: none;
    transition: color 0.15s;
}
.page-footer-logo svg { color: #2563eb; }
.page-footer-logo:hover { color: #93c5fd; text-decoration: none; }

.page-footer-tagline {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.55;
    max-width: 280px;
    margin: 0;
    text-align: center;
}

.page-footer-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
}
.page-footer-links a {
    font-size: 0.82rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}
.page-footer-links a:hover { color: #f1f5f9; }

.page-footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.page-footer-copy {
    font-size: 0.75rem;
    color: #94a3b8;
}

.page-footer-github {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s;
}
.page-footer-github:hover { color: #f1f5f9; text-decoration: none; }

/* ─── Scroll to top ────────────────────────────────────────────────────────── */
#topBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
#topBtn:hover { background: var(--primary-dark); transform: translateY(-2px); }
#topBtn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .page-hero { padding: 2.5rem 1rem 2rem; }
    .page-hero h1 { font-size: 1.6rem; }
    .site-header { padding: 0.65rem 1rem; }
    section { padding: 1.25rem; }
}


/* ─── Page badge ────────────────────────────────────────────────────────────── */
.page-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}
html.dark .page-badge {
    background: rgba(37,99,235,0.15);
    color: #93c5fd;
    border-color: rgba(37,99,235,0.3);
}

/* ─── Stats bar ─────────────────────────────────────────────────────────────── */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 1.5rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    justify-content: space-around;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    min-width: 100px;
    flex: 1;
}

.stat-item-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.stat-item-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.stat-item-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Feature cards grid ────────────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 0.25rem;
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-card-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.feature-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.feature-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

@media (min-width: 768px) {
    .features-grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 560px) {
    .features-grid { grid-template-columns: 1fr; }
    .stats-bar { justify-content: flex-start; }
    .stat-item { min-width: 80px; }
}

/* ─── Table of contents nav ─────────────────────────────────────────────────── */
.toc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 1.25rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.toc-nav-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 100%;
    margin-bottom: 2px;
}

.toc-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 11px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.toc-nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #eff6ff;
    text-decoration: none;
}
html.dark .toc-nav a:hover {
    background: rgba(37,99,235,0.1);
}

/* ─── Privacy summary card ──────────────────────────────────────────────────── */
.privacy-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}
html.dark .privacy-summary {
    background: linear-gradient(135deg, rgba(16,185,129,0.08) 0%, rgba(37,99,235,0.08) 100%);
    border-color: rgba(16,185,129,0.25);
}

.privacy-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.privacy-summary-icon {
    color: #059669;
    flex-shrink: 0;
    margin-top: 1px;
}
html.dark .privacy-summary-icon { color: #34d399; }

.privacy-summary-text strong {
    display: block;
    font-size: 0.83rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 2px;
}
html.dark .privacy-summary-text strong { color: #6ee7b7; }

.privacy-summary-text span {
    font-size: 0.75rem;
    color: #047857;
    line-height: 1.4;
}
html.dark .privacy-summary-text span { color: #a7f3d0; }

/* ─── FAQ accordion ─────────────────────────────────────────────────────────── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    font-family: inherit;
    transition: background 0.15s;
}

.faq-question:hover { background: var(--surface); }

.faq-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform 0.25s;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-item.open .faq-question { background: var(--surface); }

.faq-answer {
    display: none;
    padding: 0 1.1rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.65;
    background: var(--surface);
    border-top: 1px solid var(--border);
}
.faq-item.open .faq-answer { display: block; }

/* ─── Contact cards ─────────────────────────────────────────────────────────── */
.contact-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-card-icon {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.contact-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.contact-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.83rem;
    font-weight: 600;
    word-break: break-all;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 5px 11px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    margin-top: 4px;
    width: fit-content;
}
.btn-copy:hover { background: #dbeafe; border-color: var(--primary); }
.btn-copy--link { text-decoration: none; }
.btn-copy--link:hover { text-decoration: none; }
html.dark .btn-copy {
    background: rgba(37,99,235,0.15);
    border-color: rgba(37,99,235,0.3);
    color: #93c5fd;
}
html.dark .btn-copy:hover { background: rgba(37,99,235,0.25); }

.contact-time-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: #92400e;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 1rem;
}
html.dark .contact-time-note {
    background: rgba(234,179,8,0.1);
    border-color: rgba(234,179,8,0.3);
    color: #fde68a;
}

@media (max-width: 560px) {
    .contact-cards { grid-template-columns: 1fr; }
    .privacy-summary { grid-template-columns: 1fr 1fr; }
}

/* ─── Section icon headings ─────────────────────────────────────────────────── */
.section-icon-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.85rem;
}
.section-icon-heading .icon {
    color: var(--primary);
    flex-shrink: 0;
}
.section-icon-heading h2 {
    margin: 0;
}

/* ─── Tech stack list ───────────────────────────────────────────────────────── */
.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
}
.tech-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}
.tech-list li::marker { content: none; }

/* ─── CTA inline block ──────────────────────────────────────────────────────── */
.cta-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.btn-primary:hover { background: var(--primary-dark); color: white; text-decoration: none; transform: translateY(-1px); }

/* ─── Tablet ────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .page-footer-inner { padding: 1.75rem 1.25rem 1rem; gap: 1rem; }
    .page-footer-bottom { padding: 0.85rem 1.25rem; }
    .page-footer-links { justify-content: center; gap: 6px 16px; }
}

/* ─── Small mobile ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .page-hero { padding: 1.75rem 1rem 1.5rem; }
    .page-hero h1 { font-size: 1.35rem; }
    .container { padding: 0 0.875rem; }
    .privacy-summary { grid-template-columns: 1fr; }
    .page-footer-inner { gap: 0.875rem; padding: 1.5rem 1rem 1rem; }
    .page-footer-links { justify-content: center; }
    .page-footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0.75rem 1rem; }
    .page-footer-tagline { max-width: 100%; }
}

/* ─── Pagination dots ──────────────────────────────────────────────────────── */
.page-dots {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 500;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.35);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.2s;
    display: block;
    position: relative;
}

.page-dot:hover {
    background: rgba(37, 99, 235, 0.65);
    transform: scale(1.25);
}

.page-dot.active {
    background: var(--primary);
    transform: scale(1.35);
}

.page-dot[title]:hover::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.7rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    padding: 3px 8px;
    border-radius: 4px;
    pointer-events: none;
}

html.dark .page-dot[title]:hover::after,
body.dark .page-dot[title]:hover::after {
    background: #334155;
}

@media (max-width: 640px) {
    .page-dots { display: none; }
}
