/**
 * Content Block Styles
 */

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Section */
.cb-section {
    padding: 3rem 0 6rem;
    background: #fff;
}

@media (min-width: 1024px) {
    .cb-section {
        padding: 4rem 0 6rem;
    }
}

/* Container */
.cb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 1024px) {
    .cb-container {
        padding: 0 1.5rem;
    }
}

/* Title */
.cb-title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .cb-title {
        font-size: 28px;
        margin-bottom: 32px;
    }
}

@media (min-width: 1024px) {
    .cb-title {
        font-size: 34px;
        margin-bottom: 40px;
    }
}

/* Wrapper - layout with navigation */
.cb-wrapper {
    display: block;
}

.cb-wrapper.has-navigation {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .cb-wrapper.has-navigation {
        grid-template-columns: 1fr 240px;
        gap: 48px;
    }
}

/* Navigation sidebar */
.cb-nav {
    display: none;
}

@media (min-width: 1024px) {
    .cb-nav {
        display: block;
        order: 2;
        position: sticky;
        top: 100px;
        align-self: start;
        height: max-content;
    }
}

.cb-nav-inner {
    /* wrapper for nav content */
}

.cb-nav-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.cb-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #e5e7eb;
}

.cb-nav-list li {
    padding: 0;
    margin: 0;
}

.cb-nav-list a {
    display: block;
    padding: 8px 0 8px 16px;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.cb-nav-list a:hover {
    color: #2bb446;
    border-left-color: #2bb446;
}

.cb-nav-list a.active {
    color: #2bb446;
    border-left-color: #2bb446;
    font-weight: 500;
}

/* Content body */
.cb-body {
    padding: 1.25rem;
    border: 1px solid rgb(229 231 235 / 0.8);
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    background: #fff;
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    order: 1;
    overflow-x: auto;
    max-width: 100%;
}

@media (min-width: 768px) {
    .cb-body {
        padding: 2.5rem;
        border-radius: 16px;
        font-size: 16px;
        line-height: 1.8;
    }
}

/* Paragraphs */
.cb-body p {
    margin-bottom: 12px;
}

.cb-body p:last-child {
    margin-bottom: 0;
}

/* Headings inside content */
.cb-body h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-top: 24px;
    margin-bottom: 10px;
    line-height: 1.35;
    scroll-margin-top: 140px;
}

.cb-body h2[id] {
    scroll-margin-top: 140px;
}

@media (min-width: 768px) {
    .cb-body h2 {
        font-size: 22px;
        margin-top: 28px;
        margin-bottom: 12px;
    }
}

@media (min-width: 1024px) {
    .cb-body h2 {
        font-size: 26px;
        margin-top: 32px;
        margin-bottom: 14px;
    }
}

.cb-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .cb-body h3 {
        font-size: 17px;
        margin-top: 28px;
        margin-bottom: 12px;
    }
}

@media (min-width: 1024px) {
    .cb-body h3 {
        font-size: 19px;
        margin-top: 32px;
        margin-bottom: 14px;
    }
}

/* First heading - no top margin */
.cb-body > h2:first-child,
.cb-body > h3:first-child {
    margin-top: 0;
}

/* H3 after H2 - reduced spacing */
.cb-body h2 + h3 {
    margin-top: 16px;
}

/* H3 after paragraph - normal spacing */
.cb-body p + h3 {
    margin-top: 28px;
}

/* Lists */
.cb-body ul,
.cb-body ol {
    margin: 16px 0;
    padding-left: 0;
    list-style: none;
}

@media (min-width: 768px) {
    .cb-body ul,
    .cb-body ol {
        margin: 24px 0;
    }
}

.cb-body li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .cb-body li {
        padding-left: 28px;
        margin-bottom: 12px;
        line-height: 1.7;
    }
}

.cb-body li:last-child {
    margin-bottom: 0;
}

/* Bullet points */
.cb-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #2bb446 0%, #239038 100%);
    border-radius: 50%;
}

@media (min-width: 768px) {
    .cb-body ul li::before {
        top: 10px;
        width: 8px;
        height: 8px;
    }
}

/* Numbered lists */
.cb-body ol {
    counter-reset: item;
}

.cb-body ol li::before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: #2bb446;
}

/* Links */
.cb-body a {
    color: #2bb446;
    text-decoration: none;
    border-bottom: 1px solid rgba(43, 180, 70, 0.3);
    transition: border-color 0.2s ease;
}

.cb-body a:hover {
    border-bottom-color: #2bb446;
}

/* Strong/Bold */
.cb-body strong {
    font-weight: 600;
    color: #111827;
}

/* Adjacent elements spacing */
.cb-body p + ul,
.cb-body p + ol {
    margin-top: 16px;
}

.cb-body ul + p,
.cb-body ol + p {
    margin-top: 24px;
}

.cb-body h2 + p,
.cb-body h3 + p {
    margin-top: 0;
}

/* Table wrapper for horizontal scroll on mobile */
.cb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}

/* Tables */
.cb-table-wrap table,
.cb-body table {
    width: 100%;
    min-width: 420px;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.cb-body > table {
    margin: 24px 0;
}

@media (min-width: 768px) {
    .cb-table-wrap table,
    .cb-body table {
        min-width: auto;
        font-size: 15px;
    }
}

.cb-body th,
.cb-body td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .cb-body th,
    .cb-body td {
        padding: 12px 16px;
    }
}

.cb-body th {
    background: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.cb-body tr:last-child td {
    border-bottom: none;
}

.cb-body tbody tr:hover {
    background: #f9fafb;
}
