/* Article pages — uses CSS variables and header/footer styles from landing.css.
   Background mirrors .section-pricing-bg so the article reads as a continuation
   of the "Asiakas ei enää odota" section. */

.article-page {
    background:
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(245, 158, 11, 0.05), transparent 70%),
        #E9EEF5;
    color: var(--light-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.article-page main {
    flex: 1 0 auto;
    padding: 180px 24px 140px;
}

/* Two-column layout on desktop: article body + sticky sidebar */
.article-container {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 720px) 240px;
    gap: 80px;
    align-items: start;
}

/* Breadcrumb above title */
.article-breadcrumb {
    font-size: 0.9rem;
    color: var(--light-text-secondary);
    margin-bottom: 40px;
}

.article-breadcrumb a {
    color: var(--light-text-secondary);
    text-decoration: none;
}

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

/* Title + lead */
.article-title {
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--light-text);
}

.article-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--light-text-secondary);
    margin-bottom: 60px;
    font-weight: 400;
}

/* Body typography */
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--light-text);
    line-height: 1.3;
}

.article-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 20px;
    color: var(--light-text);
}

.article-body p strong {
    font-weight: 700;
}

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body a:hover {
    color: var(--accent-hover);
}

/* End-of-article CTA card — dark themed */
.article-cta {
    margin-top: 80px;
    padding: 48px 40px;
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.article-cta h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
    line-height: 1.3;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 28px;
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta .btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
}

/* Secondary "back to guides" link — bottom-left, small, muted */
.article-cta-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.article-cta-footer .next-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.article-cta-footer .next-link:hover {
    color: var(--accent);
}

/* Mobile */
@media (max-width: 640px) {
    .article-page main {
        padding: 110px 20px 80px;
    }

    .article-title {
        font-size: 1.7rem;
    }

    .article-lead {
        font-size: 1.05rem;
    }

    .article-body h2 {
        font-size: 1.3rem;
        margin-top: 36px;
    }

    .article-body p {
        font-size: 1rem;
    }

    .article-cta {
        padding: 36px 24px;
        margin-top: 60px;
    }

    .article-cta h3 {
        font-size: 1.35rem;
    }

    .article-cta p {
        font-size: 1rem;
    }
}

/* === Guide listing page === */

.guide-hero {
    max-width: 720px;
    margin: 0 auto 80px;
    text-align: center;
}

.guide-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--light-text);
    letter-spacing: -0.02em;
}

.guide-hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--light-text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* Wider container for the card grid (overrides .article-container max-width) */
.guide-listing-container {
    max-width: 1100px;
    margin: 0 auto;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(15, 26, 46, 0.06), 0 1px 2px rgba(15, 26, 46, 0.04);
    border: 1px solid rgba(15, 26, 46, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle top accent bar — appears on hover, alternates color per card */
.guide-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.guide-card:nth-child(even)::before {
    background: var(--warm);
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 26, 46, 0.1), 0 4px 12px rgba(15, 26, 46, 0.05);
    border-color: rgba(15, 26, 46, 0.1);
}

.guide-card:hover::before {
    transform: scaleX(1);
}

.guide-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--light-text);
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}

.guide-card-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--light-text-secondary);
    margin: 0 0 24px;
    flex-grow: 1;
}

.guide-card-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.guide-card:hover .guide-card-link {
    gap: 10px;
}

.guide-card-link::after {
    content: '→';
    font-size: 1.05rem;
    transition: transform 0.2s ease;
}


/* Mobile */
@media (max-width: 720px) {
    .guide-hero {
        margin-bottom: 48px;
    }

    .guide-hero p {
        font-size: 1.05rem;
    }

    .guide-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .guide-card {
        padding: 28px 24px;
    }

    .guide-card-title {
        font-size: 1.2rem;
    }
}

/* === Sidebar: Muut artikkelit === */

.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.article-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--light-text-secondary);
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 26, 46, 0.1);
}

.article-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-sidebar-list li {
    margin: 0;
}

.article-sidebar-list a {
    display: block;
    padding: 12px 0;
    color: var(--light-text);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    border-bottom: 1px solid rgba(15, 26, 46, 0.06);
    transition: color 0.2s ease, padding-left 0.2s ease;
    position: relative;
}

.article-sidebar-list a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.article-sidebar-list a:hover {
    color: var(--accent);
    padding-left: 20px;
}

.article-sidebar-list a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.article-sidebar-list li:last-child a {
    border-bottom: none;
}

/* Sidebar moves below the article body on tablet/mobile */
@media (max-width: 980px) {
    .article-container {
        grid-template-columns: minmax(0, 720px);
        gap: 0;
    }

    .article-sidebar {
        position: static;
        margin-top: 64px;
        padding-top: 32px;
        border-top: 1px solid rgba(15, 26, 46, 0.1);
    }

    .article-sidebar-title {
        border-bottom: none;
        margin-bottom: 8px;
    }
}
