/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #FFEBB3;
    --secondary-color: #C1E4F4;
    --accent-color: #C1E4F4;
    --bg-card-Følelser: #C1E4F4;
    --bg-mindfullness: #E2F0D9;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;

    --text-main: #2c3e50;
    --text-light: #2c3e50;
    --text-invert: #000000;

    --border-light: rgba(255, 255, 255, 0.1);
    --border-muted: #f0f0f0;

    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;

    --border-radius: 8px;
    --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);

    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================================
   2. BASE LAYOUT
   ========================================= */
body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
   3. HEADER & MAIN
   ========================================= */
header {
    color: var(--text-invert);
    padding: 0.9rem var(--spacing-md);
    text-align: center;
    position: relative;
}

/* Language Selector */
.language-selector {
    position: absolute;
    top: 10px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.language-flag {
    display: inline-block;
    width: 35px;
    height: 25px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.language-flag:hover {
    opacity: 1;
    transform: scale(1.1);
}

.language-flag.active {
    opacity: 1;
    border-color: #000;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.language-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Default */
body.default header {
    background-color: var(--primary-color);
}

/* Følelser (blå) */
body.foelelser header {
    background-color: var(--bg-card-Følelser);
}

/* Mindfullness (grønn) */
body.mindfullness header {
    background-color: var(--bg-mindfullness);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    flex: 1;
    width: 100%;
}
/* HEADER FULL-WIDTH EMOTION STRIP */
.header-wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Keep title centered no matter what */
.header-content {
    text-align: center;
    z-index: 2;
}

/* Emotion rows span full sides */
.header-emotions {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

.header-emotions img {
    width: clamp(44px, 6.5vw, 100px);
    height: auto;
    object-fit: contain;
    transition: transform 0.25s ease;
    cursor: pointer;
}

.book-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.books-grid .book-item .book-image {
    width: 250px;
    height: 250px;
    object-fit: contain;
}

/* EMOTION ICON STYLES */
.emotion-icon {
    position: relative;
}

.emotion-icon:hover {
    transform: scale(1.2);
}

/* TOOLTIP STYLING */
.emotion-tooltip {
    position: fixed;
    white-space: nowrap;
    background-color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #9ed2ee;
    z-index: 1000;
}

/* GLOW EFFECTS ON HOVER */
.emotion-afraid:hover {
    filter: drop-shadow(0 0 8px #7c3aed);
}

.emotion-angry:hover {
    filter: drop-shadow(0 0 8px #ef4444);
}

.emotion-disgust:hover {
    filter: drop-shadow(0 0 8px #22c55e);
}

.emotion-fluster:hover {
    filter: drop-shadow(0 0 8px #f97316);
}

.emotion-happy:hover {
    filter: drop-shadow(0 0 8px #eab308);
}

.emotion-inlove:hover {
    filter: drop-shadow(0 0 8px #ec4899);
}

.emotion-jealousy:hover {
    filter: drop-shadow(0 0 8px #10b981);
}

.emotion-plain:hover {
    filter: drop-shadow(0 0 8px #9ca3af);
}

.emotion-sad:hover {
    filter: drop-shadow(0 0 8px #0ea5e9);
}

.emotion-shy:hover {
    filter: drop-shadow(0 0 8px #d946ef);
}

.emotion-stressed:hover {
    filter: drop-shadow(0 0 8px #f97316);
}

.emotion-uncomfortable:hover {
    filter: drop-shadow(0 0 8px #8b7355);
}

/* Push emotions fully to edges */
.header-emotions.left {
    padding-left: 1rem;
}

.header-emotions.right {
    padding-right: 1rem;
}

/* MOBILE */
@media (max-width: 768px) {
    .header-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .header-emotions {
        justify-content: space-around;
    }
    .header-emotions img {
        width: clamp(42px, 13vw, 74px);
        height: auto;
    }
}
.site-title-link {
    text-decoration: none; /* remove underline */
    color: inherit;        /* keeps the original header color */
}

/* Optional hover effect */
.site-title-link:hover .site-title {
    opacity: 0.8;
}



/* =========================================
   4. CONTENT COMPONENTS
   ========================================= */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-soft);
}

h2 {
    color: var(--text-invert);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-muted);
}

h3 {
    color: var(--text-invert);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* =========================================
   5. FOOTER
   ========================================= */
footer {
    color: var(--text-invert);
    width: 100%;
    flex-shrink: 0;
}
/* Default */
body.default footer {
    background-color: var(--primary-color);
}

/* Følelser (blå) */
body.foelelser footer {
    background-color: var(--bg-card-Følelser);
}

/* Mindfullness (grønn) */
body.mindfullness footer {
    background-color: var(--bg-mindfullness);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.footer-section {
    text-align: left;
}

.footer-section h3 {
    color: var(--text-invert);
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.footer-section p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--text-invert);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

/* Footer bottom strip */
.footer-bottom {
    padding: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
}
/* Default */
body.default footer-bottom {
    background-color: var(--primary-color);
}

/* Følelser (blå) */
body.foelelser footer-bottom {
    background-color: var(--bg-card-Følelser);
}

/* Mindfullness (grønn) */
body.mindfullness footer-bottom {
    background-color: var(--bg-mindfullness);
}

/* =========================================
   6. BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;

    font-weight: 600;
    font-size: 0.95rem;

    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;

    text-decoration: none;
    background-color: var(--accent-color);
    color: var(--text-main);

    box-shadow: var(--shadow-soft);
    transition: all 0.2s ease;
}

.btn:hover {
    filter: brightness(0.9);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* HEADER TITLE DESIGN */
.header-content {
    max-width: 1000px;
    margin: 0 auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.site-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Modern underline accent */
.site-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: white;
    margin: 1rem auto 0;
    border-radius: 2px;
}
/* HERO CARD */
.hero-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin: 2rem auto;
    text-align: center;
    max-width: 900px;
    width: 90%;
}
.hero-card-Følelser {
    background-color: var(--bg-card-Følelser);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin: 2rem auto;
    text-align: center;
    max-width: 900px;
    width: 90%;
}
.hero-card-Intro {
    background-color: var(--primary-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    margin: 2rem auto;
    text-align: center;
    max-width: 900px;
    width: 90%;
}

/* HERO CARD HEADLINE */
.hero-card h2 {
    font-size: 2.5rem;
    color: var(--text-invert);
    margin-bottom: 1.5rem;
}

/* HERO CARD PARAGRAPHS */
.hero-card p {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* HERO IMAGE */
.hero-image {
    margin-top: 2rem;
}

.hero-image img {
    max-width: 50%;
    height: auto;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .hero-card h2 {
        font-size: 2rem;
    }

    .hero-card p {
        font-size: 1rem;
    }
}

/* PREMIUM BUTTON FEEL */
/* BUTTON GROUP */
.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

/* BASE BUTTON */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;

    min-width: 260px;
    padding: 16px 32px;

    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;

    color: #fff;
    border-radius: 14px;

    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);

    transition: all 0.25s ease;
}
.page-btn-Følelser {
    background-color: var(--secondary-color);
    color: var(--text-main);
}
.chapter-btn-Følelser {
    background-color: var(--secondary-color);
    color: var(--text-main);
}
.page-btn-Mindfullness {
    background-color: var(--bg-mindfullness);
    color: var(--text-main);
}
.chapter-btn-Mindfullness {
    background-color: var(--bg-mindfullness);
    color: var(--text-main);
}
.go-back-btn-Mindfullness {
    background-color: var(--bg-mindfullness);
    color: var(--text-main);
}
.page-btn-Intro {
    background-color: var(--primary-color);
    color: var(--text-main);
}
.chapter-btn-Intro {
    background-color: var(--primary-color);
    color: var(--text-main);
}
.go-back-btn-Intro {
    background-color: var(--primary-color);
    color: var(--text-main);
}
.go-back-btn-Følelser {
    background-color: var(--bg-card-Følelser);
    color: var(--text-main);
}

.modell-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

/* HOVER / PRESS */
.btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* STATUS COLORS */

/* DONE */
.status-done {
    background: linear-gradient(135deg, #4caf50, #43a047);
}

/* IN PROGRESS */
.status-progress {
    background: linear-gradient(135deg, #ffb300, #ffa000);
}

/* LOCKED / NOT AVAILABLE */
.status-locked {
    background: linear-gradient(135deg, #e53935, #d32f2f);
    cursor: not-allowed;
    opacity: 0.85;
}

/* Disable hover effect for locked */
.status-locked:hover {
    transform: none;
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.15);
}

/* MOBILE */
@media (max-width: 768px) {
    .btn {
        min-width: 220px;
        font-size: 1rem;
    }
}
/* =========================================
   BOOK GRID (NY – påvirker ikke eksisterende)
   ========================================= */

/* Grid layout (2x2 for 4 books) */
.books-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 2rem;
}

/* Professional book cards with accent borders */
.books-grid .book-item {
    background: #ffffff;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.books-grid .book-item.book-mindfulness {
    background: #E2EFD8;
}

.books-grid .book-item.book-holdut {
    background: #FBE2D6;
}

.books-grid .book-item.book-foelelser {
    background: var(--secondary-color);
}

.books-grid .book-item.book-relasjoner {
    background: #F9CCC3;
}

/* Hover effect - 3D book cover effect */
.books-grid .book-item:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}
/* =========================================
   MOBILE: 2x3 BOOK GRID
   ========================================= */

@media (max-width: 768px) {
    .books-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 per rad */
        gap: 15px;
    }

    .books-grid .book-item {
        padding: 0;
        min-height: 350px;
    }

    .books-grid .btn {
        min-width: unset;
        width: 100%;
        font-size: 0.95rem;
        padding: 12px;
    }

    .books-grid .book-description {
        font-size: 0.8rem;
        margin: 10px 12px 12px 12px;
    }

    .books-grid .book-image {
        height: 60%;
    }
}
/* =========================================
   BOOK COLORS (matcher systemet ditt)
   ========================================= */

.book-green {
    background-color: #9CCC65;
}

.book-orange {
    background-color: #FFA726;
}

.book-blue {
    background-color: #81D4FA;
}

.book-pink {
    background-color: #F48FB1;
}

/* Professional button styling */
.book-yellow:hover,
.book-green:hover,
.book-orange:hover,
.book-blue:hover,
.book-pink:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Button inside books grid */
.books-grid .btn {
    width: 100%;
    margin: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    font-size: 1rem;
    min-width: unset;
    color: var(--text-main);
    font-weight: 700;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: none;
    box-shadow: none;
}
.book-yellow {  
    background-color: #FFEBB3;
}

.books-grid .btn.book-green {
    background-color: #BFE89A;
}

.books-grid .btn.book-orange {
    background-color: #fdd5a7;
}

.books-grid .btn.book-blue {
    background-color: #99DCF8;
}

.books-grid .btn.book-pink {
    background-color: #f8c5da;
}

.books-grid .btn:hover {
    transform: none;
}

/* =========================================
   FEATURED SECTION (DBT ORIENTATION)
   ========================================= */

.featured-section {
    background: #ffffff;
    margin: 2rem auto;
    max-width: 900px;
    width: 90%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: all 0.3s ease;
}

.featured-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.featured-image {
    flex: 0 0 35%;
    background: #FFEBB3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 350px;
}

.featured-image img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.featured-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    border: none;
}

.featured-description {
    font-size: 0.9rem;
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.featured-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.featured-list li {
    color: #2c3e50;
    padding: 0.4rem 0 0.4rem 1.8rem;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.5;
}

.featured-list li::before {
    content: "-";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #f4c542;
}

/* STATUS BADGES */
.status-badge {
    display: inline-block;
    margin-left: 0.6rem;
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1;
    vertical-align: middle;
    background: none !important;
}

.status-badge.status-done {
    color: #4caf50;
    background: none !important;
}

.status-badge.status-not-started {
    color: #e53935;
    background: none !important;
}

.featured-btn {
    background-color: #FFEB3B;
    color: #2c3e50;
    padding: 12px 28px;
    font-size: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.featured-btn:hover {
    background-color: #e0b837;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .featured-section {
        flex-direction: column;
    }

    .featured-image {
        flex: 0 0 auto;
        min-height: 250px;
        padding: 1.5rem;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .featured-title {
        font-size: 1.3rem;
    }

    .featured-description {
        font-size: 0.85rem;
    }

    .featured-list li {
        font-size: 0.8rem;
    }
}

/* Litt bedre spacing på tekst */
.books-grid .book-description {
    color: var(--text-main);
    font-size: 0.85rem;
    margin: 12px 16px 0 16px;
    line-height: 1.4;
    text-align: center;
}

/* Tittel over seksjonen */
.section-title {
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 600;
}

/* Description for book introduction */
.book-item.book-introduction .book-description {
    color: #2c3e50;
    font-size: 0.85rem;
    margin: 12px 16px 16px 16px;
    line-height: 1.4;
    text-align: center;
}

/* Books section description */
.books-description {
    text-align: center;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
/* BOOK ITEM WRAPPER */
.book-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

/* Book introduction styling (outside grid) */
.book-item.book-introduction {
    background: #ffeb3b;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    margin-top: 2rem;
    max-width: 250px;
}

.book-item.book-introduction .btn {
    background-color: #f57f17;
}

.book-item.book-introduction:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

/* Book image styling */
.books-grid .book-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.book-item.book-introduction .book-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.books-grid .book-item:hover .book-image {
    transform: scale(1.05);
}

.book-item.book-introduction:hover .book-image {
    transform: scale(1.05);
}

/* BOOK DESCRIPTION */
.book-description {
    max-width: 600px;
    font-size: 0.95rem;
    color: #2c3e50;
    line-height: 1.6;
    margin: 0 auto;
}

/* LOCKED DESCRIPTION */
.book-description.locked {
    color: #bbb;
    font-style: italic;
}

/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    .book-description {
        font-size: 0.95rem;
        max-width: 90%;
    }
}
/* Make chapter text black */
.book-chapters h3.chapter {
    color: #2c3e50; /* dark black/gray for title */
    position: relative;
    padding-left: 1.5rem; /* space for the colored dot */
}

/* Add colored dot for status */
.book-chapters h3.chapter.status-done::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #4caf50; /* green */
    border-radius: 50%;
}

.book-chapters h3.chapter.status-progress::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #ffb300; /* yellow */
    border-radius: 50%;
}

.book-chapters h3.chapter.status-locked::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #e53935; /* red */
    border-radius: 50%;
}

/* =========================================
   5. Kapittel grunnside style
   ========================================= */

/* ===== LAYOUT FULL BREDDE ===== */

.page-layout {
    display: flex;
    align-items: flex-start;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}
/* ===== SIDEBAR HELT TIL VENSTRE ===== */

.sidebar-Følelser {
    width: 260px;
    position: sticky;
    top: 0;

    align-self: flex-start;
    height: calc(100vh - 40px);

    background-color: var(--bg-card);
    padding: 25px 20px;
    box-shadow: 4px 0 10px rgba(0,0,0,0.05);

    overflow-y: auto;
}

/* ===== HOVEDINNHOLD TAR RESTEN ===== */

.main-content {
    flex: 1;
    padding: 40px 60px;
}

/* Gjør info-boksen bredere */
#Grunnside {
    width: 100%;
    max-width: none;
}


/* ===== SIDEBAR STYLING ===== */

.sidebar-Følelser h3 {
    margin-bottom: 15px;
    color: var(--text-main);
}

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

.chapter-title {
    font-weight: bold;
    margin-top: 20px;
    color: var(--bg-card-Følelser);
}

.sidebar-list li a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 6px 0;
    transition: 0.2s;
}

.sidebar-list li a:hover {
    color: var(--bg-card-Følelser);
    padding-left: 5px;
}


/* ===== NAVIGASJON KNAPPER ===== */

.page-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

.nav-button:hover {
    opacity: 0.85;
}

/* ===== ARBEIDSARK – EN KOLONNE ===== */

/* Stack layout (rett ned) */
.worksheet-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Labels */
.worksheet-stack label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* Help text */
.worksheet-stack small {
    color: #555;
    font-size: 0.8rem;
    margin-top: -6px;
}

/* Inputs */
.worksheet-input {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 0.95rem;
}

textarea.worksheet-input {
    min-height: 120px;
    resize: vertical;
}

/* ===== VENSTREJUSTER ARBEIDSARK ===== */

#Grunnside .worksheet-stack {
    text-align: left;
}
.worksheet-stack {
    text-align: left;
}

.hero-card h2 {
    text-align: center;
}
/* =========================================
   WORKSHEET PAGE (KUN GRUNNSIDE)
   ========================================= */

/* Lyseblå bakgrunn */
.worksheet-page-Følelser .main-content {
    background: var(#ffffff);
    padding: 40px 60px;
}

/* Fjern stor hvit container */
.worksheet-page-Følelser .hero-card {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Gjør tittelen svart */
.worksheet-page-Følelser .hero-card h2 {
    color: #000;
    border-bottom: none;
    margin-bottom: 40px;
}

/* Worksheet layout */
.worksheet-page-Følelser .worksheet-stack {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Hvit boks */
.worksheet-page-Følelser .worksheet-box {
    background-color: #ffffff !important;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}s

/* Overskrift */
.worksheet-page-Følelser .worksheet-box label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

/* Inputs */
.worksheet-page-Følelser .worksheet-input {
    background-color: #ffffff;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}s

/* Textarea */
.worksheet-page-Følelser textarea.worksheet-input {
    min-height: 140px;
    resize: vertical;
}

/* NAV KNAPPER – GRUNNSIDE */
.worksheet-page-Følelser .nav-button {
    background-color: white;
    color: #2c3e50;
    border: 2px solid #7bbad9;
    font-weight: 600;
}

.worksheet-page-Følelser .nav-button:hover {
    background-color: #7bbad9;
    color: white;
}

/* FJERN TOPPMELLOMROM */
.worksheet-page-Følelser .main-content {
    margin-top: 0;
    padding-top: 20px;
}

/* INFO BOKSER (SIDE 1) */

.worksheet-page-Følelser .grunnside-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.worksheet-page-Følelser .info-box {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.worksheet-page-Følelser .info-box h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Mindfulness pages keep box content left-aligned (hero-card centers by default) */
.mindfullness .grunnside-info,
.mindfullness .grunnside-info .info-box {
    text-align: left;
}
.worksheet-page-Følelser .info-tekst{
    padding: 25px;
}
.worksheet-page-Følelser .info-tekst h3{
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 25px;
    font-weight: 800;
}

/* =========================================
   KARAKTER MED SNAKKEBOBLE
   ========================================= */

.character-section {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* HANDLE MOTSATT – FINAL LAYOUT FIXED */

/* Hele layouten */
.handle-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* TOPP – full bredde som resten */
.handle-top-single {
    display: flex;
}

.handle-top-single .info-box {
    width: 100%;   /* 🔥 nå matcher den bunnen */
}

/* MIDTEN – bilde venstre, tekst høyre */
.handle-middle {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-direction: row-reverse;
}

.handle-text {
    flex: 1;
}

.handle-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.handle-image img {
    max-width: 300px;
    width: 100%;
    height: auto;
}

/* BUNN */
.handle-bottom {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Info kar i starten av hver kapittel*/

/* =========================================
   KARAKTER MED SNAKKEBOBLE
========================================= */

.character-section.second-character {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
    box-sizing: border-box;
}

.speech-section {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 850px;
    background: white;
    color: #222;
    padding: 30px 40px;
    border-radius: 25px;
    border: 3px solid #222;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.speech-section h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
    line-height: 1.3;
    color: #222;
    border-bottom: none;
}

.speech-section p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
}

/* Pil mot karakteren (karakter til høyre) */
.speech-section::after {
    content: "";
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 22px solid transparent;
    border-bottom: 22px solid transparent;
    border-left: 30px solid #222;
}

.speech-section::before {
    content: "";
    position: absolute;
    right: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 25px solid white;
    z-index: 2;
}

/* Karakter til venstre – speil pilen mot venstre */
.character-section.second-character.character-left {
    flex-direction: row;
}

.character-left .speech-section::after {
    right: auto;
    left: -30px;
    border-left: none;
    border-right: 30px solid #222;
}

.character-left .speech-section::before {
    right: auto;
    left: -24px;
    border-left: none;
    border-right: 25px solid white;
}

.speaking-character {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
}

.speaking-character img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: auto;
    object-fit: contain;
}

@media (max-width: 800px) {

    .character-section.second-character {
        flex-direction: column;
        gap: 35px;
        padding: 15px;
    }

    .speech-section {
        max-width: 100%;
        padding: 25px;
    }

    .speech-section h2 {
        font-size: 1.1rem;
    }
    .speech-section p {
        font-size: 0.85rem;
    }
    .speech-section::after {
        right: 50%;
        top: auto;
        bottom: -30px;

        transform: translateX(50%);

        border-left: 22px solid transparent;
        border-right: 22px solid transparent;
        border-top: 30px solid #222;
        border-bottom: none;
    }

    .speech-section::before {
        right: 50%;
        top: auto;
        bottom: -24px;
        transform: translateX(50%);
        border-left: 18px solid transparent;
        border-right: 18px solid transparent;
        border-top: 25px solid white;
        border-bottom: none;
    }


    /* Karakter til venstre står øverst på mobil – pilen peker opp */
    .character-left .speech-section::after {
        left: 50%;
        right: auto;
        top: -30px;
        bottom: auto;
        transform: translateX(-50%);
        border-left: 22px solid transparent;
        border-right: 22px solid transparent;
        border-bottom: 30px solid #222;
        border-top: none;
    }

    .character-left .speech-section::before {
        left: 50%;
        right: auto;
        top: -24px;
        bottom: auto;
        transform: translateX(-50%);
        border-left: 18px solid transparent;
        border-right: 18px solid transparent;
        border-bottom: 25px solid white;
        border-top: none;
    }


    .speaking-character {
        width: 130px;
    }
}

/* =========================================
   RESPONSIV SIDEBAR (DRAWER PÅ SMÅ SKJERMER)
   ========================================= */

.sidebar-toggle {
    display: none;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1300;
    width: 42px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0 12px 12px 0;
    background-color: var(--bg-card-Følelser);
    color: #2c3e50;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.2);
    transition: left 0.3s ease;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 900px) {
    .sidebar-Følelser {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(260px, 82%);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1250;
        box-shadow: none;
    }

    body.sidebar-open .sidebar-Følelser {
        transform: translateX(0);
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.28);
    }

    .main-content {
        padding: 25px 18px;
    }

    .sidebar-toggle {
        display: flex;
    }

    body.sidebar-open .sidebar-toggle {
        left: min(260px, 82%);
    }

    .sidebar-backdrop {
        display: block;
        pointer-events: none;
    }

    body.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

/* =========================================
   HOVEDSIDE – RESPONSIVITET
   ========================================= */

@media (max-width: 600px) {
    .container {
        padding: 0 14px;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SIDER – FARGET KORT FULL BREDDE PÅ SMÅ SKJERMER
   ========================================= */

@media (max-width: 768px) {
    .page-layout .main-content {
        padding-left: 0;
        padding-right: 0;
    }

    .page-layout .hero-card,
    .page-layout .hero-card-Følelser,
    .page-layout .hero-card-Intro {
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }
}

/* =========================================
   SAMMENLEGGBAR KAPITTEL-MENY (MINDFULNESS & INTRO)
   ========================================= */

.sidebar-Følelser details.chapter-group {
    border-bottom: 1px solid #eef0f2;
}

.sidebar-Følelser summary.chapter-title {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 0;
    padding: 10px 0;
    font-weight: bold;
    user-select: none;
}

.sidebar-Følelser summary.chapter-title::-webkit-details-marker { display: none; }
.sidebar-Følelser summary.chapter-title::marker { content: ""; }

.sidebar-Følelser summary.chapter-title::after {
    content: "▸";
    font-size: 0.8em;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.sidebar-Følelser details.chapter-group[open] > summary.chapter-title::after {
    transform: rotate(90deg);
}

.sidebar-Følelser details.chapter-group > .sidebar-list {
    margin: 0 0 10px;
    padding-left: 6px;
}

.sidebar-Følelser details.chapter-group > .sidebar-list li a {
    color: gray;
}

.sidebar-Følelser details.chapter-group > .sidebar-list li a.active-page {
    color: #000;
    font-weight: bold;
}

/* Egne farger på kapitteltitlene per tema */
.mindfulness-theme summary.chapter-title {
    color: #6b8e4e;
}
.mindfulness-theme .sidebar-list li a:hover {
    color: #6b8e4e;
}

.intro-theme summary.chapter-title {
    color: #c9962e;
}
.intro-theme .sidebar-list li a:hover {
    color: #c9962e;
}