/**
 * Header main component.
 *
 * Block: .header-main
 * Context: .front (front page), .simple--header (simple header block)
 */

/* -------------------------------------------------------------------------
 * Root
 * ---------------------------------------------------------------------- */

#simple--header {
    position: relative;
    height: 16rem;
    border-radius: var(--k24-border-radius-xl);
    border-top-right-radius: 2.0rem;
    border-top-left-radius: var(--k24-border-radius-xxl);
    background: url(/files/k24_fon.jpg);
    background-size: cover;
    background-position: center;
}

#simple--header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
}

.path-frontpage #simple--header {
    display: none;
}

.header-main {
    width: calc(100% - 5rem);
    position: absolute;
    top: 6.5rem;
    left: var(--k24-gap-base);
    z-index: 99;
}

.front .header-main {
    width: calc(100% - 4rem);
    position: absolute;
    top: 6.0rem;
    left: var(--k24-gap-md);
    z-index: 99;
}

.simple--header .header-main {
    width: 100%;
    position: absolute;
    top: 6rem;
    left: var(--k24-gap-md);
    z-index: 99;
    padding: 0rem;
    border-radius: var(--k24-border-radius-base);
    background-color: transparent;
    box-shadow: none;
}

/* -------------------------------------------------------------------------
 * Inner
 * ---------------------------------------------------------------------- */

.header-main__inner {
    display: flex;
    gap: var(--k24-gap-md);
    align-items: start;
    justify-content: space-between;
    width: 100%;
}

.simple--header .header-main__inner {
    display: flex;
    gap: var(--k24-gap-md);
    align-items: start;
    justify-content: space-between;
    width: calc(100% - 4rem);
}

/* -------------------------------------------------------------------------
 * Logos
 * ---------------------------------------------------------------------- */

.header-main__logo-wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "one"
        "two"
        "three"
        "four";
    gap: 1.75rem;
    justify-content: center;
    align-items: center;
}

.simple--header .header-main__logo-wrapper {
    gap: 1.75rem;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "one   three"
        "two   .";
    align-items: start;
    justify-content: space-between;
}

.header-main__logo-line {
    grid-area: one;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.header-main__logo img {
    height: 3rem;
    width: auto;
}

.header-main__logo--dark {
    display: none;
}

.header-main .header-main__logo--simple img {
    display: none;
}

.header-main__logo--simple img {
    width: auto;
    height: 3rem;
}

.header-main__logo--simple-dark {
    display: none;
}

/* -------------------------------------------------------------------------
 * Channel name
 * ---------------------------------------------------------------------- */

.header-main__name {
    color: var(--k24-light-reverse);
    font-weight: var(--k24-font-weight-light);
    position: relative;
    bottom: 0.25rem;
    text-transform: uppercase;
}

.simple--header .header-main__name {
    color: var(--k24-light-reverse);
}

/* -------------------------------------------------------------------------
 * Live TV
 * ---------------------------------------------------------------------- */

.header-main__air {
    grid-area: two;
}

.header-main__tv {
    display: flex;
    position: relative;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem 0.35rem 0.5rem;
    max-width: fit-content;
    text-align: center;
    background: rgba(255, 51, 51, 1);
    outline: 0.25rem solid transparent;
    outline-offset: 0.25rem;
    border-radius: var(--k24-border-radius-2xl);
    transition: var(--k24-transition-base);
    z-index: 9;
}

.header-main__tv:hover {
    outline: 0.25rem solid var(--k24-red);
    transition: var(--k24-transition-base);
}

.header-main__tv a {
    padding-top: 0.15rem;
    color: var(--k24-light-reverse);
    text-transform: uppercase;
    font-weight: var(--k24-font-weight-light);
    font-size: 1.0rem;
}

.header-main__tv svg {
    fill: var(--k24-light-reverse);
    width: 1.9rem;
}

.simple--header .header-main__tv i {
    color: var(--k24-light-reverse);
    transition: var(--k24-transition-base);
    z-index: 9999;
}

/* -------------------------------------------------------------------------
 * Social links
 * ---------------------------------------------------------------------- */

.header-main__social {
    grid-area: three;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--k24-gap-xs);
}

.simple--header .header-main__social {
    grid-area: three;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    gap: var(--k24-gap-base);
}

.header-main__social-list {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: var(--k24-gap-xs);
}

.simple--header .header-main__social-list {
    grid-area: three;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: var(--k24-gap-xs);
    margin-top: 0rem;
}

.simple--header .header-main__social-list [data-tooltip]::before,
.simple--header .header-main__social-list [data-tooltip]::after {
    content: none !important;
    display: none !important;
}

a.header-main__social-link--vk svg {
    fill: var(--k24-light-reverse);
    width: 2.5rem;
    height: 2.5rem;
}

a.header-main__social-link--vk:hover svg {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

a.header-main__social-link--max svg {
    fill: var(--k24-light-reverse);
    width: 2.5rem;
    height: 2.5rem;
    position: relative;
    top: 0.3rem;
    left: 0.35rem;
}

a.header-main__social-link--max:hover svg {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

a.header-main__social-link--telegram svg {
    fill: var(--k24-light-reverse);
    width: 2.5rem;
    height: 2.5rem;
}

a.header-main__social-link--telegram:hover svg {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

a.header-main__social-link--rutube svg {
    fill: var(--k24-light-reverse);
    width: 2.5rem;
    height: 2.5rem;
}

a.header-main__social-link--rutube:hover svg {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

a.header-main__social-link--ok svg {
    fill: var(--k24-light-reverse);
    width: 1.9rem;
    height: 1.9rem;
    position: relative;
    margin-right: 0.5rem;
    margin-left: 0.25rem;
}

a.header-main__social-link--ok svg:hover {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

a.header-main__social-link--dzen svg {
    fill: var(--k24-light-reverse);
    width: 1.9rem;
    height: 1.9rem;
    margin-left: 0.15rem;
}

a.header-main__social-link--dzen svg:hover {
    fill: var(--k24-red);
    transition: var(--k24-transition-base);
}

/* -------------------------------------------------------------------------
 * Advertising contacts
 * ---------------------------------------------------------------------- */

.header-main__advertise {
    grid-area: four;
    display: flex;
    flex-direction: column;
    font-weight: var(--k24-font-weight-semibold);
    color: var(--k24-light-reverse);
    text-transform: uppercase;
}

.simple--header .header-main__advertise {
    margin-top: -1rem;
    display: none;
    flex-direction: column;
    align-items: end;
}

.header-main__advertise a {
    font-weight: var(--k24-font-weight-light);
    color: var(--k24-light-reverse);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: var(--k24-transition-base);
}

.header-main__advertise a:hover {
    text-decoration-color: rgba(255, 255, 255, 1.0);
    transition: var(--k24-transition-base);
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media only screen and (orientation: portrait) and (min-width: 1px) and (max-width: 999px) {

    .header-main__inner {
        display: block;
        position: relative;
        padding-bottom: 0rem;
    }

    .simple--header .header-main__logo-wrapper {
        width: 100%;
        flex-direction: column;
        align-items: start;
        justify-content: start;
        gap: 0rem;
    }

    .simple--header .header-main__social {
        justify-content: start;
        display: none;
    }

    .header-main__logo-line {
        display: grid;
        justify-content: start;
        gap: var(--k24-gap-xs);
        width: 100%;
    }

    .simple--header .header-main__logo-line {
        display: grid;
        grid-template-columns: 1fr;
        align-items: center;
        justify-content: start;
        gap: 1rem;
        width: 100%;
    }

    .simple--header .header-main__advertise {
        display: none;
    }

    .header-main__air {
        display: block;
        margin: 0.5rem 0;
    }

    a.header-main__social-link--max svg,
    a.header-main__social-link--vk svg,
    a.header-main__social-link--rutube svg,
    a.header-main__social-link--telegram svg,
    a.header-main__social-link--ok svg,
    a.header-main__social-link--dzen svg {
        fill: var(--k24-light-reverse);
    }

    .header-main {
        position: relative;
        top: var(--k24-gap-sm);
        left: var(--k24-gap-sm);
        margin-right: 0;
    }

    .front .header-main,
    .header-main {
        left: auto;
        position: relative;
    }

    .front .header-main {
        margin-bottom: var(--k24-gap-md);
        border-radius: var(--k24-border-radius-base);
        padding: var(--k24-gap-sm);
        top: 0;
        width: 100%;
        position: relative;
        background: url(/files/k24_fon.jpg);
        background-size: cover;
        background-position: center;
    }

    .front .header-main::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        border-radius: inherit;
        z-index: -1;
        pointer-events: none;
    }

    .header-main__name {
        font-size: 1rem;
        margin-top: 0;
        color: var(--k24-light-reverse);
    }

    .simple--header .header-main__name {
        display: none;
        font-size: 0.9rem;
        color: var(--k24-light-reverse);
    }

    .header-main__advertise {
        color: var(--k24-light-reverse);
    }

    .header-main__advertise a {
        color: var(--k24-light-reverse);
    }

    .header-main__logo--dark {
        display: none;
    }

    .simple--header .header-main__logo--dark {
        margin-bottom: 0rem;
    }

    .header-main__logo img {
        width: 100%;
        height: auto;
        display: block;
        z-index: 999;
    }

    .header-main__logo--simple {
        display: none;
    }

    .header-main__logo-wrapper {
        position: relative;
        display: block;
        margin: 0;
    }

    .simple--header .header-main {
        background-color: transparent;
        border-radius: 0;
        left: 0;
        position: relative;
        top: 1rem;
        width: 100%;
    }

    .header-main__tv {
        padding: 0.35rem 0.75rem 0.25rem 0.5rem;
    }

    .header-main__tv svg {
        width: 1.4rem;
    }

}