/*
 * Гемокод — стеклянные молекулы.
 * Пилотное оформление информационного блока анализа.
 */

.gem-glass-analysis {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 42px 34px 46px;
    margin: 30px 0;
    border: 1px solid rgba(163, 190, 157, .38);
    border-radius: 28px;
    background:
        radial-gradient(
            ellipse at 85% 15%,
            rgba(220, 236, 211, .82),
            transparent 48%
        ),
        linear-gradient(135deg, #f8faf6, #eaf2e8);
}

.gem-glass-analysis__content {
    position: relative;
    z-index: 2;
}

.gem-glass-analysis__title {
    margin: 0 0 26px;
    font-family: Georgia, serif;
    font-size: clamp(25px, 2.6vw, 36px);
    line-height: 1.2;
    font-weight: 600;
    color: #294a36;
}

.gem-glass-analysis__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.gem-glass-analysis__card {
    min-width: 0;
    padding: 24px 20px;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 19px;
    background: rgba(255, 255, 255, .74);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow:
        0 12px 30px rgba(52, 89, 62, .08),
        inset 0 1px 0 rgba(255, 255, 255, .95);
}

.gem-glass-analysis__label {
    display: block;
    margin-bottom: 13px;
    color: #4e8059;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .1em;
}

.gem-glass-analysis__card p {
    margin: 0 0 12px;
    color: #34493b;
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.gem-glass-analysis__card p:last-child {
    margin-bottom: 0;
}

.gem-glass-analysis__molecules {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gem-glass-analysis__molecule {
    position: absolute;
    display: block;
    width: var(--size, 100px);
    height: var(--size, 100px);
    border-radius: 50%;
    opacity: .8;
    background:
        radial-gradient(
            circle at 31% 27%,
            rgba(255, 255, 255, .98) 0,
            rgba(255, 255, 255, .65) 12%,
            rgba(199, 226, 206, .38) 37%,
            rgba(104, 164, 128, .28) 68%,
            rgba(255, 255, 255, .7) 100%
        );
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow:
        inset -10px -12px 20px rgba(73, 128, 94, .12),
        inset 8px 8px 16px rgba(255, 255, 255, .7),
        0 14px 30px rgba(63, 111, 77, .12);
    animation:
        gem-glass-float var(--duration, 18s)
        ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
    will-change: transform;
}

.gem-glass-analysis__molecule--one {
    --size: 155px;
    --duration: 21s;
    top: -65px;
    right: 8%;
}

.gem-glass-analysis__molecule--two {
    --size: 90px;
    --duration: 17s;
    --delay: -7s;
    top: 38%;
    left: -35px;
}

.gem-glass-analysis__molecule--three {
    --size: 125px;
    --duration: 24s;
    --delay: -12s;
    bottom: -50px;
    right: 22%;
}

.gem-glass-analysis__molecule--four {
    --size: 65px;
    --duration: 15s;
    --delay: -4s;
    top: 17%;
    left: 48%;
}

.gem-glass-analysis__molecule--five {
    --size: 75px;
    --duration: 19s;
    --delay: -9s;
    bottom: 12%;
    right: -20px;
}

@keyframes gem-glass-float {
    0% {
        transform: translate3d(-12px, 8px, 0) rotate(-8deg);
    }

    50% {
        transform: translate3d(18px, -15px, 0) rotate(6deg);
    }

    100% {
        transform: translate3d(-6px, 17px, 0) rotate(-5deg);
    }
}

@media (max-width: 1100px) {
    .gem-glass-analysis__cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .gem-glass-analysis {
        padding: 28px 17px 32px;
        margin: 22px 0;
        border-radius: 22px;
    }

    .gem-glass-analysis__title {
        font-size: 27px;
        margin-bottom: 20px;
    }

    .gem-glass-analysis__cards {
        gap: 12px;
    }

    .gem-glass-analysis__card {
        padding: 20px 17px;
        border-radius: 16px;
    }

    .gem-glass-analysis__molecule {
        opacity: .55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gem-glass-analysis__molecule {
        animation: none;
        will-change: auto;
    }
}

/* ШАГ 148 — раскрытие длинного описания */

.gem-glass-analysis__details {
    position: relative;
}

.gem-glass-analysis__details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #356d49;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    list-style: none;
}

.gem-glass-analysis__details summary::-webkit-details-marker {
    display: none;
}

.gem-glass-analysis__details summary::after {
    content: "⌄";
    font-size: 19px;
    line-height: 1;
    transition: transform .2s ease;
}

.gem-glass-analysis__details[open] summary::after {
    transform: rotate(180deg);
}

.gem-glass-analysis__details[open] summary {
    margin-bottom: 14px;
}

.gem-glass-analysis__details summary:focus-visible {
    outline: 2px solid #356d49;
    outline-offset: 5px;
    border-radius: 4px;
}

.gem-glass-analysis__details p {
    margin: 0;
}


/* ШАГ 149 — первые три строки описания */

.gem-glass-analysis__preview {
    margin-bottom: 12px;
}

.gem-glass-analysis__preview p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    margin: 0;
}

.gem-glass-analysis__preview:has(+ .gem-glass-analysis__details[open]) {
    display: none;
}

