/*
 * Leader Customizations — global front-end overrides.
 *
 * Theme-level tweaks that must survive theme updates live here. Keep this for
 * cross-cutting overrides only; feature-specific styles belong in their own
 * mysteerio-leader-* plugin.
 */

/* Override header section spacing, Kadence doesn't allow this normally */
#main-header {
    margin-bottom: 2rem;
}

/* Remove Kadence's mobile content-area top margin on the front page to prevent
   a white gap between the black header and the black hero block */
@media (max-width: 767px) {
    body.home .content-area {
        margin-top: 0;
    }

    body.home .entry-content-wrap {
        padding: 0;
    }
}

/* Front page only: invert black logo to white against the black menu */
body.home #main-header .site-branding img {
    filter: brightness(0) invert(1);
}

/* Front page only: black header rows, white text and links */
body.home header#masthead,
body.home #main-header .site-header-row-container {
    background-color: #000000;
}

/* All nav links and their child spans (including .nav-drop-title-wrap on items with children) */
body.home #main-header .main-navigation .menu-item > a,
body.home #main-header .main-navigation .menu-item > a *,
body.home #main-header .secondary-navigation .menu-item > a,
body.home #main-header .secondary-navigation .menu-item > a * {
    color: #ffffff;
}

body.home #main-header .main-navigation .menu-item > a:hover,
body.home #main-header .main-navigation .menu-item > a:hover *,
body.home #main-header .secondary-navigation .menu-item > a:hover,
body.home #main-header .secondary-navigation .menu-item > a:hover * {
    color: rgba(255, 255, 255, 0.75);
}

/* Top bar text and links */
body.home #main-header .site-top-header-wrap,
body.home #main-header .site-top-header-wrap a,
body.home #main-header .site-top-header-wrap p {
    color: #ffffff;
}

/* Dropdown sub-menus */
body.home #main-header .sub-menu {
    background-color: #000000;
}

body.home #main-header .sub-menu .menu-item > a,
body.home #main-header .sub-menu .menu-item > a * {
    color: #ffffff;
}

body.home #main-header .sub-menu .menu-item > a:hover,
body.home #main-header .sub-menu .menu-item > a:hover * {
    color: rgba(255, 255, 255, 0.75);
}

/**
 * A bit hacky: Rotated patukka/img over text
 * introduced by adding "patukka" class to elements in block editor
 * */
.patukka {
    /* Anchor the absolutely-positioned image to the heading box. */
    position: relative;
}

.patukka::after {
    content: "";
    position: absolute;
    /* Sit in the bottom-right corner of the heading. */
    right: 20%;
    bottom: 10%;
    /* Nudge outwards so the rotated bar overhangs the heading slightly. */
    transform: translate(25%, 35%) rotate(-20deg);
    transform-origin: bottom right;
    width: 16rem;
    /* patukka.png is 1887x820, keep its aspect ratio (~2.3:1). */
    aspect-ratio: 1887 / 820;
    background-image: url("../img/patukka.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* Decorative only: don't block clicks on the heading/links beneath. */
    pointer-events: none;
}
