/* ---------------------------------------------------------------------------
 * Layout overrides for the "ulytau" theme
 *
 * 1. Wider content container on large screens.
 * 2. The main menu must stay on ONE line (it used to wrap onto a second row,
 *    pushing the social icons down).
 *
 * Loaded after style.css so these rules win without needing !important,
 * except where Bootstrap utility classes are involved (see point 3).
 * ------------------------------------------------------------------------- */

/* ---- 1. Wider container -------------------------------------------------- */

@media (min-width: 1400px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1440px;
    }
}

@media (min-width: 1800px) {
    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1560px;
    }
}

/* ---- 2. Header bar: menu on the left, tools on the right, no wrapping ---- */

.header-sticky .navbar-ulytau {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 15px;
}

/* Floats are replaced by flex, so the tools can no longer drop to a new line. */
.header-sticky .navbar-ulytau > .main-nav {
    float: none;
    flex: 1 1 auto;
    min-width: 0;
}

.header-sticky .navbar-ulytau > .header-tools {
    float: none;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* The floated clearfix is not needed inside a flex container. */
.header-sticky .navbar-ulytau > .clearfix {
    display: none;
}

/* ---- 3. Menu items on a single line ------------------------------------- */

/*
 * !important is required here: the <ul> carries Bootstrap's `.d-lg-inline`
 * utility, which sets `display: inline !important`. Without it the list is not
 * a flex row.
 *
 * Do NOT set `display` on the <li>: they are `display: inline-block` from
 * style.css and become flex items automatically. Forcing them to block makes
 * the whole menu stack vertically.
 */
@media (min-width: 992px) {
    .main-header .main-nav ul.main-menu.d-lg-inline {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
    }
}

.main-header .main-nav .main-menu > li > a {
    white-space: nowrap;
}

/* Instead of letting the items wrap, tighten them as the viewport shrinks. */
@media (max-width: 1600px) {
    .main-header .main-nav ul li a {
        font-size: 16px;
        padding: 14px 13px;
    }
}

@media (max-width: 1400px) {
    .main-header .main-nav ul li a {
        font-size: 15px;
        padding: 13px 10px;
    }
}

@media (max-width: 1200px) {
    .main-header .main-nav ul li a {
        font-size: 14px;
        padding: 11px 8px;
    }
}

/* Mobile: the flex header must not squeeze the hamburger button. */
@media (max-width: 991px) {
    .header-sticky .navbar-ulytau {
        gap: 8px;
    }
}
