@charset "utf-8";

/* ==========================================================================
   data-header widget  (_structure/widgets/data-header)
   Site header: logo · slogan · telegram · search
   Transparent background — inherits the (white) page background, so text/icons
   use dark colors for readability.
   ========================================================================== */

/* No background of its own — inherits the parent/page background */
.hd {
    color: #1a1a1a;
}

/* Uses the theme's .nt-container (width + centering) + px-* utilities (side padding),
   so the header content lines up with the top bar. We only add the flex layout here. */
.hd .nt-container {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* 1. Logo */
.hd .logo {
    margin: 0;
    line-height: 0;
    flex: 0 0 auto;
}

.hd .logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* 2. Slogan — the page's h1, so reset Bootstrap's h1 size/weight/line-height */
.hd .slog {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    white-space: nowrap;
}

/* 3. Telegram pills — pushed to the right edge */
.hd .tg-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.hd .tg-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.hd .tg-wrap .plane {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.hd .tg-fill { /* theme accent (was Telegram blue) */
    background: color-mix(in srgb, var(--web-primary) 14%, #fff);
    color: var(--web-primary-hover);
    border: 1px solid color-mix(in srgb, var(--web-primary) 55%, #fff);
}

.hd .tg-fill:hover {
    background: var(--web-primary);
    border-color: var(--web-primary);
    color: #fff;
}

.hd .tg-fill b {
    font-weight: 800;
}

.hd .tg-line {
    background: transparent;
    color: var(--web-primary-hover);
    border: 1px solid var(--web-primary);
}

.hd .tg-line:hover {
    background: var(--web-primary);
    border-color: var(--web-primary);
    color: #fff;
}

/* 4. Search */
.hd .search {
    display: flex;
    flex: 0 0 auto;
}

/* When telegram is hidden there is no .tg-wrap to push things right,
   so the search anchors itself to the right edge. */
.hd .search.search-solo {
    margin-left: auto;
}

.hd .search input {
    width: 220px;
    padding: 9px 12px;
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ced4da;
    border-right: 0;
    border-radius: 8px 0 0 8px;
    font-size: 12px;
    outline: none;
}

.hd .search input::placeholder {
    color: #6b7280;
}

.hd .search input:focus {
    border-color: var(--web-primary-foreground);
}

/* Button color: the dark primary-foreground via .bg-web-foreground (theme.css + css/color vars). */
.hd .search button {
    padding: 6px 18px;
    border: 0;
    border-radius: 0 8px 8px 0;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* Mobile-only buttons (hidden on desktop) */
.hd .hsearch,
.hd .hbtn {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.hd .hsearch svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #1a1a1a;
    stroke-width: 2;
    stroke-linecap: round;
}

.hd .hbtn span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px 0;
    background: #1a1a1a;
    border-radius: 2px;
}

/* Widget setup gear */
.hd+.btn-wset {
    text-align: right;
    margin-top: 4px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
/* Tablet / small laptop: the one-row header stops fitting a bit before the
   1050px layout breakpoint (theme.css .web-row) — drop the slogan first, then
   narrow the search, so nothing overflows down to the 767px mobile header. */
@media (max-width: 1119.98px) {
    .hd .slog { display: none; }
}
@media (max-width: 1049.98px) {
    .hd .search input { width: 160px; }
}
@media (max-width: 899.98px) {
    .hd .search input { width: 130px; }
}

@media (max-width: 767px) {
    .hd .nt-container {
        flex-wrap: wrap;
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .hd .slog,
    .hd .tg-wrap {
        display: none;
    }

    /* hide on mobile */
    .hd .logo {
        margin-right: auto;
    }

    /* logo left, buttons right */
    .hd .logo img {
        height: 32px;
    }

    /* Elevated mobile header bar: solid white + bottom border + soft shadow */
    .hd {
        position: relative;
        z-index: 5;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .06);
    }

    /* Square outlined icon buttons (search / menu) */
    .hd .hsearch,
    .hd .hbtn {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        transition: border-color .15s ease, background .15s ease;
    }
    .hd .hsearch:hover,
    .hd .hbtn:hover,
    .hd.search-open .hsearch {
        border-color: var(--web-primary-foreground);
    }
    .hd .hsearch:focus,
    .hd .hbtn:focus { outline: none; }
    .hd .hsearch svg { width: 19px; height: 19px; stroke: var(--web-primary-foreground); }
    .hd .hbtn span { width: 18px; margin: 2px 0; background: var(--web-primary-foreground); }

    /* show mobile buttons */
    .hd .search {
        order: 3;
        width: 100%;
        display: none;
    }

    /* collapsed by default */
    .hd.search-open .search {
        display: flex;
    }

    .hd .search input {
        width: 100%;
        border-right: 1px solid #ced4da;
    }
}