.text-columns {
    /* Shorthand: sets maximum 3 columns, minimum 200px wide */
    columns: 3 200px;

    /* Adds a 30px space between each text column */
    column-gap: 30px;

    /* Draws a vertical gray line between columns */
    column-rule: 1px solid #ccc;
}

.text-columns .no-break {
    break-inside: avoid;
    -webkit-column-break-inside: avoid; /* старый Safari */
}

.box-label {
    position: absolute;
    top: -1rem;
    left: 0.5rem;
    background-color: rgba(220,220,220,1);
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    font-size: 0.65rem;
    text-transform: uppercase;
}

.patched {
    text-decoration: line-through;
    opacity: 0.8;
}

.level-4 {
    text-decoration: underline;
    font-weight: bold;
}

.level-1 {
    color: rgba(127,127,127,1);
}

.level-3 {
    color: rgba(168,16,16,1);
    font-weight: bolder;
}

.title {
    font-size: 1.5rem;
}

.content {
    h1, h2, h3, h4 {
        font-family: "Noto Serif";
        font-stretch: 85%;
    }
}

.serif {
    font-family: "Noto Serif";
    font-stretch: 85%;
}

.sticky {
    position: sticky;
    background: white;
    z-index: 10;
}

/* 2. Elevate the dropdown containers to a higher relative positioning system */
.dropdown,
.navbar-item.has-dropdown {
    position: relative;
    z-index: 20;
}

/* 3. Force the actual visible popup panel to stay on top of the layout hierarchy */
.dropdown-menu,
.navbar-dropdown {
    z-index: 30 !important;
}

.anchor {
    position: relative;
    /* навбар фиксированный - сдвигаем якорь на его высоту + 2.75rem запаса (раньше было 6rem при навбаре 3.25rem) */
    top: calc(-1 * var(--bulma-navbar-height) - 2.75rem);
    visibility: hidden;
    display: block;
}

a.no-color {
    color: currentColor;
}

.pics {
    float: right;
    width: 33%;
    margin-left: 1rem;
    margin-bottom: 1rem;

    img {
        width: 100%;
        margin-bottom: 0.5rem;
        display: block;
    }

    img:not(.plain) {
        box-shadow: 0.125rem 0.125rem 0.5rem rgba(0,0,0,25%);
    }
}

.main-container {
    box-shadow: 0.25rem 0.25rem 0.75rem rgba(0,0,0,25%);
    padding: 1rem;
    padding-top: 1.5rem;
    background-color: white;
    margin-bottom: 20rem;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.mainbg {
    /* Доминантные цвета акварельного баннера: кремовая бумага в основе,
       шалфейно-зелёный (листья, холмы), туманно-голубой (небо) и
       лавандовый (цветы) */
    background-color: #F8F6E8;
    background-image:
            radial-gradient(circle at 20% 30%, rgba(140, 208, 140, 0.50) 0%, transparent 45%),
            radial-gradient(circle at 75% 15%, rgba(130, 208, 232, 0.55) 0%, transparent 42%),
            radial-gradient(circle at 50% 60%, rgba(190, 165, 238, 0.40) 0%, transparent 50%),
            radial-gradient(circle at 90% 90%, rgba(250, 218, 110, 0.38) 0%, transparent 38%);
    background-attachment: fixed;
    min-height: 100vh;
}

.organon-pad {
    right: calc((100vw - 333%) / -2);
    position: absolute;
    height: 100vh;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.footnote {
    display: inline-block;
    padding: 0 0.5rem;
    background-color: rgba(240,240,240,0.95);
    border-radius: 0.25rem;
    font-weight: bold;
}

.border-b {
    border-bottom: 1px solid rgba(200,200,200,0.5);
}

.remedy-thumb {
    display: block;
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    object-position: center; /* Центрирует изображение */
}

.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.25);
    z-index: 10000;
    pointer-events: none;
}

.author-cell {
    display: block;
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    transform: scale(1);
    transition: transform 0.2s ease-out;
    .author-name {
        position: absolute;
        bottom: 0.5rem;
        left: 50%;
        width: max-content;
        transform: translateX(-50%);
        box-shadow: 0 0 0.5rem 0.5rem rgba(255,255,255,1);
        background: rgba(255,255,255,1);
        line-height: 1;
        border-radius: 0.5rem;
        word-break: keep-all;
        break-inside: avoid;
        padding-bottom: 0.25em;
        padding-left: 0.5em;
        padding-right: 0.5em;
    }
    .count {
        position: absolute;
        background-color: rgba(120,200,120,0.75);
        color: rgba(200,255,200,0.95);
        right: 0.75rem;
        bottom: 3rem;
        width: 1.75rem;
        height: 1.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        font-weight: bold;
        font-size: 0.85em;
    }
    .count-2 {
        position: absolute;
        background-color: rgba(200,200,120,0.75);
        color: rgba(255,255,200,0.95);
        right: 0.75rem;
        bottom: 0.75rem;
        width: 1.75rem;
        height: 1.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        font-weight: bold;
        font-size: 0.85em;
    }
}

.author-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 0 1rem rgba(120,120,120,0.5);
    z-index: 10;
}

.front-section {
    background-color: white;
    padding-top: 4rem;
    padding-bottom: 4rem;
    margin-bottom: 4rem;
    border-top: 1px solid rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(0,0,0,0.25);

    h3, h2 {
        color: var(--bulma-primary);
        text-align: center;
        text-transform: uppercase;
    }

    h2 {
        font-weight: 700;
        font-size: 3rem;
        margin-bottom: 4rem;
    }

    h3 {
        font-weight: 400;
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

}

.front-hero {
    height: calc(70vh - var(--bulma-navbar-height));
    width: 100%;
    background-image: url("/i/bg.webp");
    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: scroll;
    .front-hero-inside {
        position: relative;
        height: 80%;
        width: 40%;
        margin: 0 auto;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
        .text {
            color: black;
            text-align: left;
            .intro {
                margin-bottom: 2rem;
                font-size: 1.2rem;
                text-transform: uppercase;
                font-weight: 300;
                text-shadow: 0.1em 0.1em 0.15rem rgba(7, 96, 94, 0.15);
            }
            h1 {
                margin-bottom: 2rem;
                font-size: 3rem;
                text-transform: uppercase;
                font-weight: 700;
                text-shadow: 0.1em 0.1em 0.5rem rgba(7, 96, 94, 0.15);
            }
            .front-motto {
                font-size: 1.35rem;
                font-weight: 500;
                text-shadow: 0.1em 0.1em 0.25rem rgba(7, 96, 94, 0.15);
                padding-right: 10rem;
            }
        }
    }
    .front-scroll-down {
        position: absolute;
        bottom: 2rem;
        z-index: 30;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        font-size: 2rem;
    }
}

.pulsing-element {

    animation: pulse 1s ease-in-out infinite;
}


@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.floating-element {
    animation: float 1s ease-in-out infinite alternate;
}

@keyframes float {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(20%);
    }
}

.search-area {
    /* 12.75rem - прочие элементы страницы (раньше было 16rem при навбаре 3.25rem) */
    height: calc(100vh - var(--bulma-navbar-height) - 12.75rem);
    display: flex;
    flex-direction: column;
}

.search-results {
    overflow-y: scroll;
    scrollbar-width: thin;
    flex-grow: 1;
    flex-basis: 0;
}

.brand-inverted {
    filter: brightness(0) invert(1);
}

.navbar-brand.front {
    flex-grow: 1;
    .navbar-item {
        flex-grow: 0.75;
        img {
            transform: scale(1.2);
        }
        span {
            text-transform: uppercase;
            font-weight: bold;
            color: black;
            line-height: 1.1;
            font-size: 1.1em;
        }
    }
}

.main-footer {
    border-top: 1px solid rgba(0,0,0,0.25);
    background-color: #E3E5CE;

}