/* ================================================
   OPAL – SINGLE BOOK LAYOUT (FINAL POLISHED)
   ================================================ */

.single-bocker {
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont,
        "Helvetica Neue", Arial, sans-serif;
    color: #233645;
}

/* -------------------------
   HUVUDLAYOUT (Main Layout)
   ------------------------- */
.single-bocker .img-text-box {
    display: flex;
    align-items: flex-start;
    /* DESKTOP DEFAULT: Large gap */
    gap: 60px; 
    max-width: 1180px;
    margin: 60px auto 40px;
    padding: 0 20px;
    flex-wrap: nowrap; /* Prevent random stacking */
}

/* TABLET ADJUSTMENT: Shrink gap to 30px */
@media (max-width: 1100px) {
    .single-bocker .img-text-box {
        gap: 15px; 
    }
}

/* FIX: Flexible Columns instead of Fixed Pixels */
.single-bocker .img-column {
    width: 40%;
    flex: 0 0 40%; 
    max-width: 450px; 
    min-width: 300px; /* Prevents it from getting too skinny */
}

.single-bocker .text-column {
    flex: 1; /* Takes up remaining space automatically */
    max-width: 100%;
}

.single-bocker .img-column img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.18);
    border-radius: 3px;
}

@media (min-width: 900px) {
    .single-bocker .img-sticky {
        position: sticky;
        top: 110px;
    }
}

.single-bocker .text-column h1 {
    font-size: 2.9rem;
    line-height: 1.15;
    color: #2ea4bf;
    font-weight: 700;
    margin: 0 0 18px;
}

/* "Av" + upphovsperson */
.single-bocker .creator-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.single-bocker .creator-box .by {
    font-weight: 600;
    font-size: 1rem;
    color: #233645;
    margin-top: 4px;
    min-width: 26px;
}

.opal-creators-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.opal-creators-list li {
    margin-bottom: 4px;
}

.opal-creators-list a {
    text-decoration: none;
}

.creator-name {
    font-size: 1.05rem;
    color: #2ea4bf;
    font-weight: 700;
    border-bottom: 1px solid rgba(0, 167, 199, 0.35);
    padding-bottom: 1px;
}

.creator-role {
    font-size: 0.95rem;
    color: #7fa9ba;
    font-style: italic;
    margin-left: 6px;
}

.opal-medarbetare {
    font-size: 0.95rem;
    color: #5a7487;
    margin: 6px 0 28px;
}

.single-bocker .text-column p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #335066;
    margin-bottom: 20px;
}

/* -------------------------
   METADATA-BOX
   ------------------------- */

.opal-meta-section {
    margin: 26px 0 32px;
}

.opal-format-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: #02A9C5 !important;
    margin: 0 0 6px;
}

.opal-meta-underline {
    display: none !important;
}

.opal-meta-grid .meta-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.opal-meta-grid .meta-label {
    font-size: 0.75rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0;
    padding-right: 4px;
    color: #02A9C5 !important;
}

.opal-meta-grid .meta-value {
    font-size: 0.98rem;
    color: #2ea4bf !important;
    font-weight: 400;
}

/* -------------------------
   SERIE-GRID
   ------------------------- */

.opal-series-block {
    max-width: 1180px;
    margin: 70px auto 0;
    padding: 0 20px 60px;
}

.opal-series-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.opal-series-title {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #233645;
    margin: 0 0 30px;
    text-align: center;
}

.opal-series-grid {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 180px));
    gap: 32px 20px;
    justify-content: center;
    justify-items: center;
}

.opal-series-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.opal-series-item img {
    width: 100%;
    border-radius: 3px;
    margin-bottom: 10px;
}

.opal-series-item h3 {
    font-size: 0.98rem !important;
    font-weight: 700;
    color: #00a7c7;
    margin: 0 0 4px;
}

.single-book-span span {
    display: block;
    font-size: 0.85rem;
    color: #486376;
}

/* -------------------------
   CREATOR-CARDS
   ------------------------- */

.opal-creators-section {
    padding: 70px 20px;
    margin-top: 60px;
}

.opal-creators-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    text-align: center;
}

.opal-creator-card {
    width: 260px;
}

.creator-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    background: #d7e8f0;
}

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

.creator-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00a7c7, #71d0e4);
}

.opal-creator-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 4px 0 0;
}

.opal-creator-name a {
    color: #00a7c7;
    text-decoration: none;
}

/* -------------------------
   RECENSIONER
   ------------------------- */

.opal-reviews {
    max-width: 760px;
    margin: 40px auto 0;
    padding: 0 20px;
    border-top: 2px solid #94c8d8;
    padding-top: 20px;
}

.opal-reviews h2 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: #2ea4bf !important;
}

.opal-reviews ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.opal-reviews li {
    margin-bottom: 22px;
}

.opal-reviews p {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 14px;
    color: #2ea4bf !important;
    font-style: italic;
}

.opal-reviews .review-sender {
    font-weight: 700;
    font-size: 1.05rem;
    color: #2ea4bf !important;
}

.opal-reviews a {
    text-decoration: none;
    color: inherit;
}

/* ===============================
   EXTRAMATERIAL
   =============================== */
.opal-extras {
    max-width: 900px;
    margin: 30px auto 10px;
    padding: 18px 26px;
    background: #f2f8fb;
    border-radius: 6px;
}

.opal-extras ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    flex-wrap: nowrap;
}

.opal-extras li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opal-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #2ea4bf !important;
    text-decoration: none;
    font-weight: 700;
}

.opal-extra:hover {
    opacity: 0.85;
}

.opal-extra-icon {
    width: 60px;
    height: 60px;
    background: #2ea4bf;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.opal-extra-icon svg {
    width: 26px;
    height: 26px;
}

/* -------------------------
   PROVLÄSNING
   ------------------------- */
.opal-preview-book {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px 40px;
}

.opal-preview-book h3 {
    font-size: 1.3rem;
    color: #00a7c7;
    margin: 0 0 10px;
}

.opal-preview-embed {
    border: 1px solid #d3e5ee;
    background: #f7fbfd;
    padding: 6px;
    border-radius: 3px;
}

/* -------------------------
   EDITIONS
   ------------------------- */
.opal-editions {
    max-width: 760px;
    margin: 20px auto 40px;
    padding: 0 20px;
}

.opal-edition {
    margin-bottom: 16px;
    font-size: 0.96rem;
    color: #2ea4bf !important;
}

.opal-edition strong {
    font-weight: 700;
}

/* ======================
   TAB KNAPPAR & CONTENT
   ====================== */
.opal-edition-tab-buttons {
    display: flex;
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0 0 0 4px; /* Slight alignment fix */
}

.opal-editions-tabs {
    margin-bottom: 20px;
}

.opal-edition-tab-buttons .opal-tab-btn {
    font-size: 0.92rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em !important;
    color: #7EADC2 !important;
    padding-bottom: 6px !important;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: 0.2s ease;
}

.opal-edition-tab-buttons .opal-tab-btn.active {
    color: #02A9C5 !important;
    border-bottom: 3px solid #2C8AA2 !important;
    margin-bottom: -1px;
}

.opal-tab-content {
    display: none;
    background: #f2f8fb !important;
    padding: 20px 26px !important;
    border-radius: 10px !important;
    border: none !important;
}

.opal-tab-content.active {
    display: block;
}

.opal-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 14px !important;
    column-gap: 40px !important;
}

/* ============================================
   RESPONSIV MOBILANPASSNING (CLEAN BREAKPOINT)
   ============================================ */

/* STABILIZER: TABLET & DESKTOP (> 768px) */
/* Ensures side-by-side layout works smoothly until mobile */
@media (min-width: 768px) {
    .single-bocker .img-text-box {
        flex-direction: row !important;
    }
}

/* MOBILE LAYOUT (< 768px) */
/* This is the ONLY place where items should stack */
@media (max-width: 767px) {
    
    /* 1. Stack Main Image & Text */
    .single-bocker .img-text-box {
        flex-direction: column !important;
        gap: 30px;
        margin-top: 30px;
    }

    .single-bocker .img-column,
    .single-bocker .text-column {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
        min-width: 0 !important;
    }

    .single-bocker .text-column h1 {
        font-size: 2.3rem;
    }

    /* 2. Collapse Meta Grid */
    .opal-meta-grid {
        grid-template-columns: 1fr !important;
        row-gap: 10px !important;
    }

    .opal-tab-content {
        padding: 16px 18px !important;
    }

    /* 3. Collapse Tabs */
    .opal-edition-tab-buttons {
        gap: 20px;
        justify-content: center;
        flex-wrap: wrap;
        padding-left: 0;
    }
    
    /* 4. Collapse Extras */
    .opal-extras ul {
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
    
    .opal-extras li, .opal-extra {
        width: 100%;
        justify-content: center;
    }

    /* 5. Creator Cards */
    .opal-creators-inner {
        gap: 30px;
    }
}

/* Tiny Screens (Series Grid) */
@media (max-width: 420px) {
    .opal-series-grid {
        grid-template-columns: 1fr;
    }
}