/* === Pages — Shared styles for subpages === */

/* Article layout */
.page-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 500;
}
.breadcrumb a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb a:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}
.breadcrumb .sep {
    color: var(--border);
    user-select: none;
}

/* Page hero */
.page-hero {
    margin-bottom: 3rem;
}
.page-hero h1 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}
.page-hero .page-lead {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 640px;
}

/* Section headings */
.page-article h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 3rem 0 1rem;
    line-height: 1.3;
}
.page-article h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 2rem 0 0.75rem;
    line-height: 1.4;
}

/* Body text */
.page-article p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 1rem;
}
.page-article ul, .page-article ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
}
.page-article li {
    margin-bottom: 0.35rem;
}

/* Links */
.page-article a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.page-article a:hover {
    color: var(--teal-dark);
    border-bottom-color: var(--teal-dark);
}

/* === Step sections with numbered circles === */
.steps {
    list-style: none;
    margin: 2rem 0;
    padding: 0;
    counter-reset: step-counter;
}
.steps > li {
    position: relative;
    padding: 1.5rem 1.5rem 1.5rem 4.5rem;
    margin-bottom: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    counter-increment: step-counter;
}
.steps > li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1.25rem;
    top: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 151, 167, 0.3);
}
.steps > li h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}
.steps > li p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* === Code blocks === */
.page-article pre {
    background: #1a2332;
    color: #e0e8f0;
    border-radius: var(--radius-sm);
    padding: 1.25rem 1.5rem;
    font-size: 0.82rem;
    line-height: 1.65;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid #2a3c50;
    scrollbar-width: thin;
    scrollbar-color: #2a3c50 transparent;
}
.page-article pre::-webkit-scrollbar { height: 5px; }
.page-article pre::-webkit-scrollbar-thumb { background: #2a3c50; border-radius: 4px; }

.page-article code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85em;
}
.page-article p code,
.page-article li code {
    background: var(--teal-light);
    color: var(--teal-dark);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    font-size: 0.82em;
    font-weight: 500;
}

/* Syntax highlighting tokens */
.code-comment { color: #6b8599; font-style: italic; }
.code-keyword { color: #c792ea; }
.code-string { color: #c3e88d; }
.code-func { color: #82aaff; }
.code-number { color: #f78c6c; }
.code-param { color: #ffcb6b; }
.code-decorator { color: #ff5370; }

/* === Info boxes (tips/notes) === */
.info-box {
    background: var(--teal-light);
    border-left: 4px solid var(--teal);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--navy);
}
.info-box strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--teal-dark);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-box p {
    margin: 0;
    font-size: 0.88rem;
}

/* === Feature cards grid === */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.15s;
}
.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.feature-card .feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.feature-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}
.feature-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* === CTA section === */
.page-cta {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
    color: #ffffff;
    border-radius: var(--radius);
    padding: 2rem 2.5rem;
    margin: 3rem 0 2rem;
    text-align: center;
}
.page-cta h2 {
    color: #ffffff;
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}
.page-cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}
.page-cta .cta-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.page-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}
.cta-btn-primary {
    background: var(--teal);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 151, 167, 0.3);
}
.cta-btn-primary:hover {
    background: #00acc1;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 151, 167, 0.4);
    color: #ffffff;
    border-bottom-color: transparent;
}
.cta-btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: #ffffff;
    border-bottom-color: transparent;
}

/* === Cross-links section === */
.read-more {
    margin: 3rem 0 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.read-more h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}
.read-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.read-more-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}
.read-more-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--teal);
    border-bottom-color: var(--teal);
}
.read-more-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--teal-dark);
}
.read-more-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* === Footer with 4 columns (when "Sidor" column is added) === */
.footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* === Nav links in CTA bar === */
.cta-bar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cta-bar-nav a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: color 0.15s;
    white-space: nowrap;
}
.cta-bar-nav a:hover {
    color: #ffffff;
}

/* === Responsive === */
@media (max-width: 768px) {
    .page-article {
        padding: 1.5rem 1rem 3rem;
    }
    .page-hero h1 {
        font-size: 1.6rem;
    }
    .page-hero .page-lead {
        font-size: 1rem;
    }
    .page-article h2 {
        font-size: 1.25rem;
    }
    .steps > li {
        padding-left: 3.5rem;
    }
    .steps > li::before {
        left: 0.75rem;
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.8rem;
    }
    .page-cta {
        padding: 1.5rem 1.25rem;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .read-more-grid {
        grid-template-columns: 1fr;
    }
    .cta-bar-nav {
        display: none;
    }
}
