/* Examples gallery – sidebar + viewer (desktop), dropdown + viewer (mobile) */

.examples-gallery {
    margin-top: 16px;
}

.examples-intro {
    color: var(--text-color);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
    opacity: 0.85;
}

/* ------------------------------------------------------------------ */
/*  Mobile dropdown – hidden on desktop                                */
/* ------------------------------------------------------------------ */
.examples-mobile-select {
    display: none;
    margin-bottom: 20px;
}

.examples-mobile-select select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    background-color: var(--input-bg-color, var(--card-bg-color));
    color: var(--text-color);
    border: 1px solid var(--border-color);
    font-size: 15px;
    cursor: pointer;
}

/* ------------------------------------------------------------------ */
/*  Main layout: sidebar + viewer                                      */
/* ------------------------------------------------------------------ */
.examples-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ------------------------------------------------------------------ */
/*  Sidebar                                                            */
/* ------------------------------------------------------------------ */
.examples-sidebar {
    width: 240px;
    min-width: 240px;
    max-height: 75vh;
    overflow-y: auto;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.examples-group {
    padding-bottom: 4px;
}

.examples-group:last-child {
    padding-bottom: 0;
}

.examples-group-title {
    padding: 10px 16px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgb(100, 170, 235);
    opacity: 0.9;
    user-select: none;
}

.examples-item {
    display: block;
    width: 100%;
    padding: 7px 16px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.examples-item:hover {
    background-color: rgba(100, 170, 235, 0.15);
}

.examples-item.active {
    background-color: var(--button-primary);
    color: #fff;
}

/* ------------------------------------------------------------------ */
/*  Viewer                                                             */
/* ------------------------------------------------------------------ */
.examples-viewer {
    flex: 1;
    min-width: 0;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.examples-heading-block {
    margin-bottom: 16px;
}

.examples-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    text-align: center;
}

.examples-description {
    margin: 8px 0 0;
    padding: 0 8px;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
    color: var(--text-color);
    text-align: center;
    opacity: 0.82;
    white-space: pre-line;
}

.examples-image-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    margin-bottom: 12px;
}

.examples-image-wrap a {
    display: block;
    line-height: 0;
    border-radius: 6px;
    overflow: hidden;
}

.examples-image {
    max-width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: opacity 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

img.examples-image {
    max-height: 720px;
}

video.examples-image {
    cursor: default;
}

.examples-image-wrap video.examples-image {
    max-height: 70vh;
}

.examples-image.loading {
    opacity: 0.3;
}

.examples-hint {
    text-align: center;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.5;
    margin: 8px 0 20px;
}

/* ------------------------------------------------------------------ */
/*  Prev / Next navigation                                             */
/* ------------------------------------------------------------------ */
.examples-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.examples-nav-btn {
    background-color: var(--button-inactive);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.examples-nav-btn:hover:not(:disabled) {
    background-color: var(--button-primary);
}

.examples-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.examples-counter {
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.6;
    min-width: 60px;
    text-align: center;
}

/* ------------------------------------------------------------------ */
/*  Responsive: below 1000px                                           */
/* ------------------------------------------------------------------ */
@media (max-width: 999px) {
    .examples-mobile-select {
        display: block;
    }

    .examples-sidebar {
        display: none;
    }

    .examples-layout {
        flex-direction: column;
    }

    .examples-viewer {
        width: 100%;
        padding: 16px;
    }

    .examples-title {
        font-size: 18px;
    }

    .examples-description {
        font-size: 13px;
    }
}
