/* =============================================
   SINGLE ARTICLE (single.php)
   ============================================= */

/* ── Hero ── */
.article-hero {
    position: relative;
    overflow: hidden;
    padding: 200px 0 56px;
    min-height: 440px;
    display: flex;
    align-items: flex-end;
    background: var(--navy);
}

.article-hero__bg {
    position: absolute;
    inset: 0;
}

.article-hero__bg img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero__bg--solid {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 24, 56, 0.25) 0%,
        rgba(10, 24, 56, 0.7) 100%
    );
}

.article-hero .container {
    position: relative;
    z-index: 2;
    max-width: var(--container);
}

.article-hero__content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
}

.article-hero__content > * {
    grid-column: 1;
}

.article-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.article-hero__cat {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--pill);
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    transition: background 0.25s var(--ease);
}

.article-hero__cat:hover {
    background: rgba(255, 255, 255, 0.25);
}

.article-hero__date {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.article-hero__title {
    font-family: var(--font);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.3px;
    margin: 0;
}


/* ── Article layout ── */
.article-page {
    padding: 48px 0 64px;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}


/* ── Body content (Gutenberg) ── */
.article-body {
    min-width: 0;
}

.article-body > *:first-child {
    margin-top: 0;
}

.article-body p {
    font-size: 17px;
    line-height: 1.75;
    color: var(--gray-800);
    margin-bottom: 1.5em;
}

.article-body h2 {
    font-family: var(--font);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 700;
    color: var(--navy);
    margin: 2em 0 0.75em;
    line-height: 1.25;
}

.article-body h3 {
    font-family: var(--font);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    color: var(--navy);
    margin: 1.75em 0 0.5em;
    line-height: 1.3;
}

.article-body h4 {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 1.5em 0 0.5em;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1.5em 0;
}

.article-body figure {
    margin: 2em 0;
}

.article-body figure img {
    margin: 0;
}

.article-body figcaption {
    font-size: 16px;
    color: var(--gray-500);
    margin-top: 8px;
    text-align: center;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.5em 1.5em;
    font-size: 17px;
    line-height: 1.75;
    color: var(--gray-800);
}

.article-body li {
    margin-bottom: 0.5em;
}

.article-body blockquote {
    margin: 2em 0;
    padding: 24px 28px;
    background: var(--gray-50);
    border-left: 4px solid var(--navy);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 18px;
    font-style: italic;
    color: var(--navy);
    line-height: 1.6;
}

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

.article-body a {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

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

.article-body .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    margin: 1.5em 0;
}

.article-body .wp-block-table th,
.article-body .wp-block-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.article-body .wp-block-table th {
    font-weight: 600;
    color: var(--navy);
    background: var(--gray-50);
}


/* ── Tags ── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--pill);
    font-size: 16px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.article-tag:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}


/* ── Sidebar ── */
.article-sidebar__inner {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* Author card */
.article-author-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.article-author-card__avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.article-author-card__info {
    display: flex;
    flex-direction: column;
}

.article-author-card__label {
    font-size: 16px;
    color: var(--gray-400);
    font-weight: 400;
    line-height: 1.3;
}

.article-author-card__name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}


/* Share */
.article-share {
    padding: 20px;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.article-share__label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.article-share__links {
    display: flex;
    gap: 8px;
}

.article-share__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.article-share__link:hover {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.article-share__link svg {
    width: 18px;
    height: 18px;
}

.article-share__link.copied {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}


/* Sidebar CTA */
.article-sidebar-cta {
    padding: 24px;
    background: var(--navy);
    border-radius: var(--radius);
    text-align: center;
}

.article-sidebar-cta h3 {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 8px;
}

.article-sidebar-cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 18px;
    line-height: 1.5;
}

.article-sidebar-cta .btn-orange {
    width: 100%;
    justify-content: center;
}


/* ── Related articles ── */
.related-sec {
    padding: 48px 0 64px;
    background: var(--gray-50);
}


/* =============================================
   BLOG CARDS (etusivu + related)
   – päivitetty: min 16px fontti, kategoria + pvm
   ============================================= */

.blog-card-cat {
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.blog-card-date {
    display: block;
    font-size: 16px;
    color: var(--gray-400);
    margin-top: 10px;
}


/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 960px) {
    .article-hero__content {
        grid-template-columns: 1fr;
    }

    .article-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .article-sidebar__inner {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .article-author-card,
    .article-share {
        flex: 1 1 auto;
        min-width: 200px;
    }

    .article-sidebar-cta {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 160px 0 40px;
        min-height: 340px;
    }

    .article-page {
        padding: 32px 0 48px;
    }

    .article-body p,
    .article-body ul,
    .article-body ol {
        font-size: 16px;
    }

    .article-body blockquote {
        padding: 18px 20px;
        font-size: 16px;
    }

    .article-sidebar__inner {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .article-hero {
        padding: 140px 0 32px;
        min-height: 280px;
    }

    .article-hero__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}