
/* ==========================================
   MJ Yearbook Detail
========================================== */
.mj-yearbook-detail,
.mj-yearbook-detail * {
    box-sizing: border-box;
}

.mj-yearbook-detail {
    --mj-ybd-primary: #176b62;
    --mj-ybd-primary-dark: #10534d;
    --mj-ybd-text: #293e46;
    --mj-ybd-muted: #71818a;
    --mj-ybd-border: #e5ecea;
    --mj-ybd-bg: #f5f8f7;

    direction: rtl;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
    gap: 30px;
    width: 100%;
    margin: 25px auto;
}

/* ==========================================
   Main Content
========================================== */

.mj-yearbook-detail .mj-yearbook-content {
    min-width: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--mj-ybd-border);
    border-radius: 17px;
    box-shadow: 0 4px 18px rgba(25, 65, 58, 0.055);
}

/* Header */

.mj-yearbook-detail .mj-yearbook-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 23px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--mj-ybd-border);
}

.mj-yearbook-detail .mj-yearbook-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: #fff;
    font-size: 21px;
    background: linear-gradient(
        135deg,
        var(--mj-ybd-primary),
        #29988a
    );
    border-radius: 13px;
    box-shadow: 0 5px 12px rgba(23, 107, 98, 0.2);
}

.mj-yearbook-detail .mj-yearbook-header-text {
    min-width: 0;
}

.mj-yearbook-detail .mj-yearbook-title {
    margin: 0;
    color: var(--mj-ybd-text);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.8;
}

.mj-yearbook-detail .mj-yearbook-subtitle {
    margin: 2px 0 0;
    color: var(--mj-ybd-muted);
    font-size: 12px;
    line-height: 1.8;
}

/* ==========================================
   Download All
========================================== */

.mj-yearbook-detail .mj-yearbook-full {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 15px 17px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(
        110deg,
        var(--mj-ybd-primary-dark),
        var(--mj-ybd-primary)
    );
    border-radius: 12px;
    box-shadow: 0 5px 13px rgba(23, 107, 98, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mj-yearbook-detail .mj-yearbook-full:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 9px 19px rgba(23, 107, 98, 0.2);
}

.mj-yearbook-detail .mj-yearbook-full-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    font-size: 22px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.mj-yearbook-detail .mj-yearbook-full-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.mj-yearbook-detail .mj-yearbook-full-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.8;
}

.mj-yearbook-detail .mj-yearbook-full-caption {
    font-size: 11px;
    opacity: 0.8;
    line-height: 1.8;
}

.mj-yearbook-detail .mj-yearbook-full-arrow {
    font-size: 17px;
    opacity: 0.9;
}

/* ==========================================
   Chapters
========================================== */

.mj-yearbook-detail .mj-yearbook-list-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 13px;
    color: var(--mj-ybd-text);
    font-size: 15px;
    font-weight: 800;
}

.mj-yearbook-detail .mj-yearbook-list-heading i {
    color: var(--mj-ybd-primary);
    font-size: 17px;
}

.mj-yearbook-detail .mj-yearbook-chapters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mj-yearbook-detail .mj-yearbook-chapter {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.mj-yearbook-detail .mj-yearbook-chapter-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 65px;
    padding: 11px 12px;
    color: var(--mj-ybd-text);
    text-decoration: none;
    background: var(--mj-ybd-bg);
    border: 1px solid transparent;
    border-radius: 11px;
    transition: background 0.2s ease,
                border-color 0.2s ease,
                transform 0.2s ease;
}

.mj-yearbook-detail .mj-yearbook-chapter-link:hover {
    color: var(--mj-ybd-primary);
    text-decoration: none;
    background: #fff;
    border-color: rgba(23, 107, 98, 0.25);
    transform: translateY(-2px);
}

.mj-yearbook-detail .mj-yearbook-pdf-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    color: #d94b48;
    font-size: 19px;
    background: #fff0ef;
    border-radius: 9px;
}

.mj-yearbook-detail .mj-yearbook-chapter-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.9;
}

.mj-yearbook-detail .mj-yearbook-chapter-arrow {
    flex: 0 0 auto;
    color: #a4b0b2;
    font-size: 12px;
    transition: color 0.2s ease,
                transform 0.2s ease;
}

.mj-yearbook-detail .mj-yearbook-chapter-link:hover .mj-yearbook-chapter-arrow {
    color: var(--mj-ybd-primary);
    transform: translateX(-3px);
}

/* ==========================================
   Book Cover
========================================== */

.mj-yearbook-detail .mj-yearbook-cover-panel {
    position: sticky;
    top: 20px;
    min-width: 0;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--mj-ybd-border);
    border-radius: 17px;
    box-shadow: 0 4px 18px rgba(25, 65, 58, 0.055);
}

.mj-yearbook-detail .mj-yearbook-cover-title {
    margin: 0 0 13px;
    color: var(--mj-ybd-text);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.mj-yearbook-detail .mj-yearbook-cover-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 430px;
    object-fit: contain;
    border-radius: 9px;
}

.mj-yearbook-detail .mj-yearbook-cover-caption {
    margin: 13px 0 0;
    padding-top: 12px;
    color: var(--mj-ybd-muted);
    font-size: 12px;
    line-height: 1.9;
    text-align: center;
    border-top: 1px solid var(--mj-ybd-border);
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 900px) {
    .mj-yearbook-detail {
        grid-template-columns: minmax(0, 1fr) 230px;
        gap: 18px;
    }

    .mj-yearbook-detail .mj-yearbook-content {
        padding: 18px;
    }

    .mj-yearbook-detail .mj-yearbook-chapters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .mj-yearbook-detail {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .mj-yearbook-detail .mj-yearbook-cover-panel {
        position: static;
        width: min(100%, 340px);
        margin: 0 auto;
    }

    .mj-yearbook-detail .mj-yearbook-cover-image {
        max-height: 400px;
    }
}

@media (max-width: 420px) {
    .mj-yearbook-detail .mj-yearbook-content {
        padding: 14px;
    }

    .mj-yearbook-detail .mj-yearbook-title {
        font-size: 17px;
    }

    .mj-yearbook-detail .mj-yearbook-header-icon {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }

    .mj-yearbook-detail .mj-yearbook-chapter-link {
        min-height: 60px;
        padding: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mj-yearbook-detail .mj-yearbook-full,
    .mj-yearbook-detail .mj-yearbook-chapter-link,
    .mj-yearbook-detail .mj-yearbook-chapter-arrow {
        transition: none;
    }
}
