/* Ensure scrollable body for stickiness */
body {
    overflow-y: auto !important;
    min-height: 100vh;
}

/* Reset site containers for stickiness */
.site {
    overflow: visible !important;
    min-height: 100vh;
}

.site-grid {
    overflow: visible !important;
    min-height: 100vh;
}

/* Header styles */
.header.container-header {
    width: 100%;
    padding: 0;
    overflow: visible;
}

/* Navbar styling */
.container-nav {
    /*background-color: rgb(45, 54, 105);*/
  	background-color: rgb(0, 0, 0);
    padding: 8px 0px 8px 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Menu module */
.container-nav .mod-menu {
    display: flex;
    flex-direction: row;
    width: 100%;
}

/* Level 1 menu items */
.container-nav .metismenu.mod-menu .metismenu-item.level-1 {
    font-size: 0.9rem;
    font-family: 'Source Sans 3', sans-serif;
    color: #ffffff !important;
}

/* Level 1 menu links and buttons */
.container-nav .metismenu.mod-menu .metismenu-item.level-1 > a,
.container-nav .metismenu.mod-menu .metismenu-item.level-1 > button {
    color: #ffffff !important;
    text-decoration: none;
}

.container-nav .metismenu.mod-menu .metismenu-item.level-1 > a:hover,
.container-nav .metismenu.mod-menu .metismenu-item.level-1 > button:hover {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* General li styling */
.container-nav .mod-menu li {
    margin-right: 10px;
}

/* Styling for Knowledge center */
li.metismenu-item.item-300.level-1.deeper.parent {
    background-color: forestgreen;
}

/* Search module */
.container-nav .container-search {
    margin-left: auto;
}

/* Header and branding styles */
.container-header .grid-child {
    background-color: black;
    max-width: -webkit-fill-available;
    padding: 0px 0px 5px 10px;
}

.container-header .navbar-brand img {
    height: 40px;
    min-height: 40px;
    max-width: min-content;
}

.navbar-brand {
    display: flex;
    padding-left: 0.5em;
}

/* Adjusting Sign In module in social */
.grid-child .social {
    flex-direction: row;
    display: flex;
}
#rssocial-263 {
    margin: 0;
    text-align: center;
  	padding-top: 5px;
}
#rssocial-263 .rssocial-link {
  font-size: 16px;
  margin-top: 10px;
}
#mod-custom147 {
    padding: 20px 20px 0px 20px;
}

/* Bottom B and its cards styling */
/* Match bottom-b width to header/menu */
.site-grid .grid-child.container-bottom-b {
    max-width: none !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background-color: black;
}

.site-grid .grid-child.container-bottom-b .bottom-b {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0px 0px 0px 10px !important;
    box-sizing: border-box;
}

/* Optional: Constrain content like chernorizets.com */
.site-grid .grid-child.container-bottom-b .bottom-b .card-body {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.grid-child.container-bottom-b .card {
    background-color: black;
    line-height: 0.5;
    font-size: 0.875em;
}

/* Remove underlines and bold on hover for bottom-b links */
.site-grid .grid-child.container-bottom-b .bottom-b a {
    text-decoration: none !important;
    color: #ffffff;
    transition: font-weight 0.3s ease;
}

.site-grid .grid-child.container-bottom-b .bottom-b a:hover {
    font-weight: bold !important;
    color: #ffffff;
    text-decoration: none !important;
}

/* Align Footer content in the center */
.footer.container-footer.footer.full-width {
    margin-top: 0em;
}
.footer .grid-child {
    padding: 1rem 0em;
}
footer div.mod-footer {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

/* Headlines margin adjusted for Hindi translation mode */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    margin-top: 10px;
}

/* No text on the right of Intro image of articles */
.left.item-image {
    float: none;
}

/* Adjusting color of ICON-MENU for mobiles and no border of navbar-toggler */
.icon-menu {
    color: white;
}
.navbar-toggler {
    border-color: white;
}

/* SP Page Builder adjustments */
.com_sppagebuilder .grid-child.container-component {
    grid-column: 1/-1 !important;
}
.com_sppagebuilder.view-page .sppb-row-container {
    padding: 0 !important;
}
.header-hide header {
    display: none;
}
.header-hide footer {
    display: none;
}
.com_sppagebuilder main {
    margin-top: 0;
}
.card {
    border: none;
}

/* Mobile fixes: Vertical menu and fixed search */
@media (max-width: 767px) {
    .container-nav {
        flex-direction: row;
        align-items: center;
        position: relative;
        padding: 8px 80px 8px 10px;
        height: 60px;
        overflow: visible;
    }

    .navbar-toggler {
        flex: 0 0 auto;
        position: relative;
        z-index: 1003;
    }

    .container-nav .container-search {
        position: absolute;
        right: 10px;
        top: 8px;
        margin-left: 0;
        width: auto;
        z-index: 1003;
    }

    .container-nav .mod-menu {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: rgb(45, 54, 105);
        z-index: 1000;
    }

    .container-nav .mod-menu li {
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
    }

    .container-nav .metismenu.mod-menu .metismenu-item.level-1 {
        width: 100%;
    }

    /* Fix navbar-collapse width and left gap */
    .container-nav .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0; /* Align to viewport left */
        width: 100vw; /* Full viewport width */
        background-color: rgb(45, 54, 105);
        z-index: 1000;
        margin-left: -10px; /* Offset container-nav padding */
    }

    .container-nav .navbar-collapse.show {
        top: 100% !important;
        left: 0 !important;
        width: 100vw !important;
        background-color: rgb(45, 54, 105) !important;
        z-index: 1000;
        margin-left: -10px !important;
    }

    .container-nav .navbar {
        width: 100%;
    }
}