/* =========================================
   FIKA STOCKHOLM — Global Design System
   ========================================= */

/* --- Design Tokens --- */
:root {
    --primary: #111111;
    --secondary: #555555;
    --accent: #2c77af;
    --accent-light: #f9ebea;
    --bg: #ffffff;
    --text: #111111;
    --text-muted: #666666;
    --border: #cacacb;
    --border-active: #111111;
    --divider: 0px -1px 0px 0px #e5e5e5 inset;
    --radius: 6px;
    --font-main: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-top: 0;
    line-height: 1.15;
}

p {
    margin-top: 0;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Site Header --- */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 200;
}

.site-header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--primary);
    letter-spacing: -0.04em;
    flex-shrink: 0;
}

.site-title span {
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-trigger {
    display: none;
}

.menu-icon {
    display: none;
}

.page-link {
    color: var(--secondary);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition), background var(--transition);
}

.page-link:hover {
    color: var(--primary);
    background: #f5f5f5;
}

/* --- Main Content --- */
.page-content {
    min-height: 60vh;
}

/* --- Typography defaults for page/post layouts --- */
.page-content-inner {
    max-width: 780px;
    margin: 0 auto;
    padding: 80px 40px;
}

.page-content-inner h1 {
    font-size: 3rem;
    margin-bottom: 24px;
}

/* --- Post Layout --- */
.post-wrapper {
    padding-top: 60px;
    padding-bottom: 80px;
}

.post-header-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

@media (max-width: 900px) {
    .post-header-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.post-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #1a73e8;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    margin-top: 50px;
}

.post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #111;
    line-height: 1.15;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.post-header-tag-container {
    margin-bottom: 40px;
}

.post-header-tag {
    display: inline-block;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
    border-bottom: 2px solid #1a73e8;
    padding-bottom: 2px;
}

.post-author-block {
    font-size: 0.95rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    padding-top: 10px;
}

.post-header-author {
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.post-header-image {
    width: 100%;
}

.post-header-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 680px;
    margin: 0 auto;
}

.post-content.hide-first-h1 h1:first-of-type {
    display: none;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-top: 2em;
    margin-bottom: 0.5em;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Hide the duplicate H1 that comes from the markdown body
   (the layout already renders an <h1> in the post header) */
.hide-first-h1 h1:first-child {
    display: none;
}

/* Blockquote — used for FAQ callout sections */
.post-content blockquote {
    margin: 2em 0;
    padding: 20px 24px;
    background: #fafafa;
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1rem;
    color: var(--text);
    line-height: 1.7;
}

.post-content blockquote p {
    margin: 0;
}

.post-content blockquote strong {
    display: block;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

/* Tables inside post content */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-bottom: 2em;
    overflow-x: auto;
    display: block;
}

.post-content table th {
    background: var(--primary);
    color: white;
    text-align: left;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.post-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}

.post-content table tr:hover td {
    background: #fafafa;
}

/* Inline code */
.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
}


.post-content ul,
.post-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-cat-tag {
    display: inline-block;
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 20px;
}

/* --- Related Content --- */
.related-content-section {
    max-width: 1000px;
    margin: 80px auto 0;
    padding-top: 60px;
}

.related-content-heading {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 32px;
    color: #111;
}

.related-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
    padding: 16px;
}

.related-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-active);
}

.related-card-img {
    margin-bottom: 20px;
    width: 100%;
}

.related-card-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

.related-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-card-tag {
    color: #1a73e8;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.06em;
}

.related-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    line-height: 1.35;
    margin: 0 0 24px 0;
    letter-spacing: -0.02em;
}

.related-card-date {
    margin-top: auto;
    font-size: 0.9rem;
    color: #888;
}

/* --- Hero Spotlight --- */
.hero-spotlight {
    padding: 48px 0 56px;
    border-bottom: 1px solid var(--border);
}

.spotlight-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.region-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.region-tag svg {
    color: var(--accent);
    flex-shrink: 0;
}

.region-tag strong {
    color: var(--primary);
}

.more-link {
    text-decoration: none;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--transition);
}

.more-link:hover {
    color: var(--accent);
}

.spotlight-main {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 56px;
    align-items: start;
    margin-bottom: 56px;
}

.spotlight-image img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: var(--radius);
}

.spotlight-content h2 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.spotlight-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.7;
}

.spotlight-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
}

.spotlight-author img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.spotlight-extras {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding-top: 40px;
    /* border-top: 1px solid var(--border); */
}

.extra-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition);
}

.extra-card:hover {
    opacity: 0.75;
}

.extra-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.extra-card h4 {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* --- Topical Section --- */
.topical-section {
    padding: 80px 0;
    background: #fafafa;
}

.section-heading {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
}

.topical-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.topic-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: white;
    transition: border-color var(--transition), transform var(--transition);
}

.topic-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.topic-card-thumb {
    position: relative;
    background-size: cover;
    background-position: center;
    min-height: 220px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topic-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0) 100%);
    border-radius: 0;
}

.topic-card-thumb h3 {
    position: relative;
    z-index: 1;
    color: white;
    margin: 0;
    font-size: 1.2rem;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.topic-btn {
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: white;
    padding: 6px 6px 6px 14px;
    border-radius: 40px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background var(--transition);
}

.topic-btn:hover {
    background: rgba(0, 0, 0, 0.75);
}

.topic-btn-arrow {
    background: white;
    color: #222;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.topic-card-list {
    padding: 20px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.topic-card-list a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
    transition: color var(--transition);
}

.topic-card-list a:hover {
    color: var(--accent);
}

/* --- Posts Section --- */
.posts-section {
    padding: 80px 0;
    background: white;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.post-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-card-img {
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: var(--radius);
}

.post-card-img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-card:hover .post-card-img img {
    transform: scale(1.03);
}

.post-card-cat {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 8px;
    display: block;
}

.post-card h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    line-height: 1.45;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.post-card-date {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* --- Feature Boxes --- */
.feature-boxes-section {
    padding: 80px 0;
    background: #f5f7fa;
    border-top: 1px solid var(--border);
}

.feature-boxes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-box {
    background: white;
    padding: 32px 28px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    min-height: 260px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    color: inherit;
}

.feature-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-box h3 {
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 700;
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.feature-box-icon {
    margin-top: 24px;
    color: var(--accent);
}

/* --- Topic Page --- */
.topic-header {
    padding: 72px 0 56px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #fff 0%, #fdfafa 100%);
}

.topic-meta-top {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.topic-header h1 {
    font-size: 3.5rem;
    margin: 0 0 20px;
    letter-spacing: -0.04em;
}

.topic-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    line-height: 1.65;
}

.topic-description p {
    margin: 0;
}

.topic-posts-section {
    padding: 80px 0;
}

.section-title-alt {
    margin-bottom: 40px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title-alt h2 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.no-posts {
    grid-column: 1 / -1;
    padding: 80px 40px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #ccc;
    color: #aaa;
    border-radius: var(--radius);
    font-size: 1rem;
}

/* --- Footer --- */
.footer-social-bar {
    background: #0d0d0d;
    color: white;
    padding: 14px 0;
}

.footer-social-bar .wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-social-bar .social-label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

.footer-social-bar a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: border-color var(--transition), background var(--transition);
}

.footer-social-bar a:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.footer-main {
    background: #f0f0ee;
    padding: 72px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid #d5d5d3;
    padding: 28px 0;
    background: #f0f0ee;
}

.footer-bottom .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.82rem;
    color: #777;
}

.footer-links-btm {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links-btm a {
    color: #666;
    font-size: 0.82rem;
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links-btm a:hover {
    color: var(--primary);
}

.cookie-btn {
    border: 1px solid #999;
    padding: 8px 18px;
    background: white;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background var(--transition), border-color var(--transition);
}

.cookie-btn:hover {
    background: #f5f5f5;
    border-color: #555;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .topical-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-boxes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spotlight-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .spotlight-extras {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wrapper {
        padding: 0 20px;
    }

    .site-header .wrapper {
        height: 56px;
    }

    /* Mobile nav */
    .nav-trigger {
        display: none;
    }

    .menu-icon {
        display: block;
        cursor: pointer;
        padding: 8px;
    }

    .menu-icon svg {
        fill: var(--primary);
    }

    .site-nav {
        position: relative;
    }

    .site-nav .trigger {
        display: none;
        position: absolute;
        top: calc(100% + 16px);
        right: 0;
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
        padding: 12px;
        flex-direction: column;
        min-width: 200px;
        z-index: 300;
    }

    .nav-trigger:checked~.trigger {
        display: flex;
    }

    .page-link {
        padding: 10px 14px;
        border-radius: var(--radius);
        margin-left: 0;
        font-size: 1rem;
    }

    .spotlight-main {
        grid-template-columns: 1fr;
    }

    .spotlight-extras {
        grid-template-columns: 1fr 1fr;
    }

    .topical-grid {
        grid-template-columns: 1fr;
    }

    .topic-card {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .related-content-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-boxes-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .post-title {
        font-size: 2.2rem;
    }

    .topic-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .spotlight-extras {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .related-content-grid {
        grid-template-columns: 1fr;
    }

    .feature-boxes-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}