/* header-buttons.css – бутони в хедъра: Регистрирай се, Публикувай, Абонирай се, Подкрепи ни */

header .hbtns {
    display: flex;
    background-color: #FFF;
    border: 1px solid #dfe5d6;
    border-radius: 10px;
    box-sizing: border-box;
}

header .hbtn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    line-height: 1.15;
    color: #2d4d00;
    text-decoration: none;
    text-align: left;
    transition: background-color .15s;
}

header .hbtn:first-child { border-radius: 10px 0 0 10px; }

header .hbtn:last-child { border-radius: 0 10px 10px 0; }

header .hbtn + .hbtn:before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background-color: #e3e3e3;
}

header .hbtn svg {
    flex: none;
    width: 36px;
    height: 36px;
    padding: 7px;
    box-sizing: border-box;
    border-radius: 50%;
    background-color: #eef7e1;
    color: #457600;
    transition: background-color .15s, color .15s;
}

header .hbtn b {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
}

header .hbtn small {
    display: block;
    font-size: 12.5px;
    color: #7a7a7a;
    white-space: nowrap;
}

header .hbtn:hover { background-color: #f5faee; }

header .hbtn:hover svg {
    background-color: #457600;
    color: #FFF;
}

header .hbtn.support svg {
    background-color: #fff5c2;
    color: #d6331f;
}

header .hbtn.support:hover svg {
    background-color: #FFD200;
    color: #b0200f;
}

/* Desktop: лого | бутони | търсене, навигацията на отделен ред */
@media all and (min-width: 961px) {
    header:has(> .hbtns) {
        flex-wrap: wrap;
        align-items: center;
    }

    header > .hbtns ~ .r { display: contents; }

    /* повече въздух: над бутоните, между бутоните и менюто, под менюто */
    header > .hbtns { margin: 22px 20px; }

    header > .hbtns ~ .r form.search { order: 3; }

    header > .hbtns ~ .r nav {
        order: 4;
        flex: 1 1 100%;
        text-align: right;
        margin: 4px 0 18px;
    }
}

/* Таблет: бутоните на отделен ред под логото, на пълна ширина */
@media all and (min-width: 961px) and (max-width: 1320px) {
    header > .hbtns {
        order: 3;
        flex: 1 1 100%;
        margin: 6px 0 22px;
    }

    header > .hbtns ~ .r form.search { order: 2; }
}

@media all and (max-width: 1320px) {
    header .hbtn {
        flex: 1 1 0;
        justify-content: center;
    }
}

/* До 960px хедърът е мобилен (лого, търсене, хамбургер) – бутоните са на нов ред */
@media all and (max-width: 960px) {
    header .hbtns {
        clear: both;
        margin: 0 0 10px;
    }

    header .hbtn {
        padding: 8px 10px;
        gap: 7px;
    }

    header .hbtn svg {
        width: 30px;
        height: 30px;
        padding: 6px;
    }

    header .hbtn b { font-size: clamp(10px, 1.55vw, 13px); }

    header .hbtn small { font-size: clamp(9.5px, 1.4vw, 12px); }
}

/* Телефон: 4 бутона в ред – икона отгоре, текст отдолу (обикновен, по-малък), без подзаглавия */
@media all and (max-width: 700px) {
    header .hbtns {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    header .hbtn {
        flex-direction: column;
        justify-content: flex-start;
        gap: 5px;
        padding: 8px 2px;
        text-align: center;
    }

    header .hbtn + .hbtn:before {
        top: 12px;
        bottom: 12px;
    }

    header .hbtn svg {
        width: 34px;
        height: 34px;
        padding: 7px;
    }

    header .hbtn b {
        font-size: clamp(9px, 2.7vw, 11px);
        font-weight: normal;
        text-transform: none;
        letter-spacing: 0;
        color: #4b4b4b;
    }

    header .hbtn small { display: none; }
}
