/* ============================================================
   SORGENFRI PUBLIC — EXTRA STYLES
   Tilføjet oven på Singapore-temaet. Bruger temaets egne
   CSS-variabler (--brand-color, --primary-text-color,
   --border-radius-large, --font-base) i stedet for at opfinde
   nye, så det altid følger accentfarve/skrifttype valgt i
   Ghost Admin > Design.
   ============================================================ */

/* --- Sorgenfri farvepalet ---
   Overstyrer tema-preset og accentfarve med de faste hex-koder.
   NB: Ghosts login/tilmeld-popup (Portal) styres separat af
   Settings > Design > Brand > Accentfarve i Ghost Admin — sæt
   den til #E86E00 der også, så pop-uppen matcher. --*/
:root {
    --brand-color: #E86E00;
    --background-color: #F0EFE6;
    --background-elevated-color: #E8E7DE;
}

/* --- Overskrift-animation: ord skrives hurtigt ind --- */
.tw-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.35em);
    filter: blur(4px);
    animation: sp-tw-in .5s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes sp-tw-in {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
    .tw-word { animation: none; opacity: 1; transform: none; filter: none; }
}

/* --- Fælles kort-stil (bruges på Kompetencer, CV, Tekster m.fl.) --- */
.sp-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 50px 20px;
}
.sp-section-heading {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}
.sp-section-heading h2 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    letter-spacing: -0.035em;
    line-height: 1;
    margin: 0 0 14px;
    color: var(--primary-text-color);
}
.sp-section-heading p {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--secondary-text-color);
    margin: 0;
}

.sp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 24px;
}
.sp-grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
@media (max-width: 800px) {
    .sp-grid-3 { grid-template-columns: 1fr; }
}

.sp-card {
    background: var(--background-elevated-color, #fff);
    border: 1px solid var(--divider-color);
    border-radius: var(--border-radius-large, 24px);
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.sp-card h3, .sp-card h4 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-weight: 700;
    color: var(--primary-text-color);
    line-height: 1.15;
    margin: 0 0 14px;
    font-size: 1.45rem;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}
.sp-card p {
    font-size: .95rem;
    line-height: 1.55;
    color: var(--secondary-text-color);
    margin: 0;
}

.sp-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--primary-text-color);
    color: var(--background-color, #fff);
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 22px;
}

.sp-card-image {
    display: block;
    text-decoration: none !important;
    color: var(--primary-text-color);
    background: var(--background-elevated-color, #fff);
    border: 1px solid var(--divider-color);
    border-radius: var(--border-radius, 20px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
    transition: .3s;
}
.sp-card-image:hover {
    border-color: rgba(0,0,0,.18);
    box-shadow: 0 18px 45px rgba(0,0,0,.1);
    transform: translateY(-5px);
}
.sp-card-image img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    background: #f2f2f2;
}
.sp-card-image .sp-card-body { padding: 28px; }
.sp-card-image h4 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0 0 10px;
    color: var(--primary-text-color);
}
.sp-card-image p {
    font-size: .95rem;
    line-height: 1.55;
    color: var(--secondary-text-color);
    margin: 0;
}

.sp-label {
    display: block;
    margin-bottom: 10px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-text-color);
    opacity: .8;
}

.sp-card-dark {
    background: var(--primary-text-color);
    color: var(--background-color, #fff);
    border-radius: var(--border-radius-large, 24px);
    padding: 32px;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 45px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
}
.sp-card-dark .sp-label { color: rgba(255,255,255,.58); }
.sp-card-dark h3 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-size: 1.85rem;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.15;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}
.sp-card-dark p { color: rgba(255,255,255,.76); margin: 0 0 22px; font-size: 1.05rem; line-height: 1.6; }
.sp-card-dark ul { margin: 0 0 24px; padding-left: 1.1rem; color: rgba(255,255,255,.84); }
.sp-card-dark li { margin-bottom: 10px; font-size: 1.02rem; line-height: 1.5; }
.sp-card-dark .sp-btn { margin-top: auto; align-self: flex-start; }

.sp-btn {
    display: inline-block;
    font-weight: 700;
    font-size: .92rem;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none !important;
    transition: .25s;
    border: none;
    cursor: pointer;
}
.sp-btn-primary { background: var(--brand-color); color: #fff; }
.sp-btn-primary:hover { filter: brightness(0.9); transform: translateY(-2px); }
.sp-btn-dark { background: #fff; color: var(--primary-text-color); }
.sp-btn-dark:hover { background: rgba(255,255,255,.88); transform: translateY(-2px); }
.sp-btn-outline { background: transparent; color: var(--primary-text-color); border: 1px solid rgba(0,0,0,.2); }
.sp-btn-outline:hover { border-color: var(--primary-text-color); }

.sp-timeline-entry {
    background: var(--background-elevated-color, #fff);
    border: 1px solid var(--divider-color);
    border-radius: var(--border-radius, 20px);
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
    margin-bottom: 20px;
}
.sp-timeline-entry .sp-meta {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-text-color);
    margin-bottom: 8px;
}
.sp-timeline-entry h3 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-text-color);
    margin: 0 0 10px;
}
.sp-timeline-entry p { font-size: .95rem; line-height: 1.55; color: var(--secondary-text-color); margin: 0 0 12px; }
.sp-timeline-entry ul { margin: 0; padding-left: 1.1rem; color: var(--secondary-text-color); }
.sp-timeline-entry li { font-size: .92rem; line-height: 1.5; margin-bottom: 6px; }

.sp-tag-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--lighter-gray-color);
    border: 1px solid var(--divider-color);
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary-text-color);
    margin: 0 6px 6px 0;
}

.sp-divider {
    border: none;
    border-top: 1px solid var(--divider-color);
    margin: 60px auto;
    max-width: 1180px;
}

/* --- Synligt tag/kategori-label på hvert opslag i post-feed --- */
.feed-tag-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.feed-tag-label {
    display: inline-block;
    font-size: .86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--brand-color);
}

/* --- Jacob's Notio: personligt, dagbogsagtigt udtryk --- */
.notio-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 5vw 6rem;
}
.notio-entry {
    padding: 36px 0;
    border-bottom: 1px solid var(--divider-color);
}
.notio-entry:last-child { border-bottom: none; }
.notio-entry-date {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-text-color);
    margin-bottom: 10px;
    display: block;
}
.notio-entry h2 {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    margin: 0 0 12px;
}
.notio-entry h2 a { color: var(--primary-text-color); text-decoration: none; }
.notio-entry p { font-size: 1.02rem; line-height: 1.65; color: var(--secondary-text-color); margin: 0; }

/* --- Nyhedsbrev-sidebar på opslag (som justinwelsh.me) --- */
.sp-post-subscribe { display: none; }

.sp-post-subscribe-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: relative;
}
.sp-post-subscribe-card::before {
    content: "Sorgenfri Public";
    display: block;
    margin-bottom: 16px;
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--brand-color);
}
.sp-post-subscribe-eyebrow { display: none; }
.sp-post-subscribe-title {
    font-family: var(--gh-font-heading, var(--font-serif));
    font-weight: 700;
    font-size: 2.1rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    color: var(--primary-text-color);
}
.sp-post-subscribe-desc {
    font-size: 1.15rem;
    line-height: 1.5;
    color: var(--secondary-text-color);
    margin: 0 0 22px;
}
.sp-post-subscribe-card .form-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.sp-post-subscribe-card .auth-email {
    flex: 1 1 0%;
    min-width: 0;
    height: 58px;
    border: none;
    border-radius: 999px 0 0 999px;
    padding: 0 20px;
    font-size: 1.1rem;
    background: #fff;
    color: #111;
}
.sp-post-subscribe-card .auth-email::placeholder { color: rgba(0,0,0,.4); }
.sp-post-subscribe-card .auth-email:focus { outline: none; }
.sp-post-subscribe-card .form-button {
    position: static !important;
    flex: 0 0 auto;
    height: 58px;
    border: none;
    border-radius: 0 999px 999px 0;
    background: var(--brand-color);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 28px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease;
}
.sp-post-subscribe-card .form-button:hover { background: #C95F00; }
.sp-post-subscribe-card .form-wrapper.success .auth-email { display: none; }
.sp-post-subscribe-card .form-wrapper.success .form-button {
    flex: 1 1 100%;
    width: 100%;
    border-radius: 999px;
    white-space: normal;
}
.sp-post-subscribe-card .form-button .success {
    white-space: normal;
    text-align: center;
    width: 100%;
}
.sp-post-subscribe-card .form-wrapper::after {
    content: "Ingen spam. Afmeld når som helst.";
    flex: 1 0 100%;
    margin-top: 14px;
    font-size: .92rem;
    color: var(--secondary-text-color);
}

@media (min-width: 1440px) {
    .sp-post-subscribe--float {
        display: block;
        position: fixed;
        top: 150px;
        left: calc(50% + 420px);
        width: 280px;
        padding-left: 28px;
        border-left: 1px solid var(--divider-color);
        box-sizing: border-box;
        z-index: 5;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    .sp-post-subscribe--float.is-visible {
        opacity: 1;
        pointer-events: auto;
    }
}
@media (max-width: 1439px) {
    .sp-post-subscribe--inline {
        display: block;
        max-width: 420px;
        margin: 40px auto 0;
    }
}
