:root {
    /*--background-secondary-color: #568998;*/
    --background-primary-color: #f4f4f4;
    --background-secondary-color: #712429; /*#880000;/*#572512;*/
    --header-font-color: #712429; /*#701303;*/
    --title-text-color: #482213;
    --title-text-color-blue: #262694;
    --news-block-border-color-grey: #c1c1c1;
    --captions-text-color-dark: #323753;
    --menu-top-height: 6.4rem;
    --news-blocks-gap: 1.2rem;
}

html {
    font-size: 62.5%;
    font-family: 'Open Sans', Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 1.6rem;
    background-color: var(--background-primary-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--header-font-color);
}

img {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

a {
    color: var(--title-text-color);
}

a:hover {
    color: var(--title-text-color-blue);
}

ul li::before {
    color: var(--header-font-color);
}

.single-post-content img {
    display: block;
    margin: 1rem auto !important;
}

.search-results-number, 
.post-meta-title, 
.entry-meta-date-published, 
.block-title, .post-date {
    color: var(--captions-text-color-dark);
}

div.container {
    width: 100% !important;
}

@media (min-width: 1900px) {
    div.container {
        width: 100% !important;
   }
}

/*
search {
    margin-left: auto;
    display: flex;
    justify-content: center;
    flex: 1 1 25%;
} */

.menu-container #headerSearchFormToggle {
    display: none;
}

.header-search {
    display: none;
}

.header-search-toggle-label {
    display: flex;
    color: white;
    gap: 1rem;
    justify-content: center;
    height: 6.4rem;
    flex-direction: row;
    align-items: center;
    margin: 0;
    width: 12.8rem;
    text-transform: uppercase;
}

.header-search-toggle-label:hover {
    background-color: white;
    color: var(--background-secondary-color);
}

.header-search-toggle-label:hover .search-button-img {
    background-image: url("../img/ui/icons-search-special.png");
    background-position: -11.4rem 0;
    background-size: 16rem 2.4rem;
    background-repeat: no-repeat;    
}

.menu-container #headerSearchFormToggle:checked ~ .header-search {
    display: flex;
    justify-content: center;
    position: absolute;
    height: 8rem;
    width: 100%;
    top: 6.4rem;
    background-color: var(--background-secondary-color);
    z-index: 100;
    box-sizing: border-box;
}

.header-search .quick-search-form {
    margin: 0;
    width: 88%;
}

.header-search button {
    margin: 0;
}

.search-form-toggle-container {
    height: inherit;
}

.container-internal {
    width: 88%;
    margin: auto;
}

.menu-container {
    background-color: var(--background-secondary-color);
    height: var(--menu-top-height);
    position: relative;
}

.menu-container .container-internal {
    display: flex;
}

.menu-container form {
    display: flex;
    margin-left: auto;
    align-items: center;
    gap: 0.5rem;
}

.menu-container form input[type=text]{
    height: 2.8rem;
    border-radius: 0.4rem;
}

.header-title {
    color: var(--header-font-color);
}

.header-title .title-big {
    font-weight: 600;
}

.header-upper-row {
    width: 100%;
    min-height: 2rem;
    padding-top: 1rem;
}

.header-upper-row .container-internal {
    display: flex;
}

.header-upper-row .socmedia-links {
    margin-left: auto;
}

.icon-special-version {
    background: url(../img/ui/sprite.png) no-repeat;
    background-size: 55.8rem 4rem;
    background-position: -53.6rem -0.8rem !important;
}

.special-version-link {
    color: var(--header-font-color);
}

.link-socmedia {
    border: 0.1rem solid var(--header-font-color);
}

.link-socmedia {
    background: url(../img/ui/sprite.png) no-repeat;
    background-size: 112rem 7.6rem;
}

.link-socmedia#soc-fb-page-link {
    background-position: -88.8rem -2rem !important;

}

.link-socmedia#rss-page-link {
    background-position: -93.8rem -2rem !important;
}

.link-socmedia#tg-page-link {
    background-position: -98.8rem -2rem !important;
}

#captionStandardVersion {
    display: none;
}

.header-lower-row {
    width: 100%;
    height: 20rem;
}

@media(max-width:1920px) {
    .header-lower-row {
        height: 16rem;
    }    
}

.header-lower-row .container-internal {
    display: flex;
    gap: 1rem;
    align-items: center;
    box-sizing: border-box;
    height: inherit;
    padding-bottom: 1rem;
}

.site-logo {
    box-sizing: border-box;
    height: 100%;
}

.site-logo img {
    height: 100%;
    width: auto;
}

.menu-container nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 75%;
}

.title-big {
    font-size: 4rem;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.title-descr {
    font-size: 2.6rem;
}

 
.menu-container nav a {
    color: white;
    min-height: 0.8rem;
    padding: 0;
    height: 100%;
    width: 100%;
}

.menu-container ul.menu-main-new > li > a {
display: inline-flex;
justify-content: center; /* Centers horizontally */
align-items: center;     /* Centers vertically */
}
 
.menu-container nav ul {
    list-style-type: none;
    display: flex;
    width: 100%;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 1rem;
    text-transform: uppercase;
 }
 
.menu-container nav ul.menu-main-new {
    height: 6.4rem;
}
.menu-container nav .menu-item-has-children {
    position: relative;
}

.menu-container nav ul.sub-menu {
    position: absolute;
    top: 6.4rem;
    left: 0;
    display: none;
    background-color: var(--background-secondary-color);
    min-width: 20rem;
    text-align: left;
    width: 400%;
    z-index: 200;
}

nav.header-nav ul.menu-main-new > li:hover,
nav.header-nav ul.menu-main-new > li:hover > a,
nav.header-nav  ul.sub-menu > li:hover, 
nav.header-nav  ul.sub-menu > li:hover > a {
    background-color: white;
    color: var(--background-secondary-color);
}


.menu-container nav.header-nav .menu-item-has-children:hover ul.sub-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Creates two equal-width columns */
  column-gap: 1rem;                      /* Spacing between columns */
  row-gap: 0.5rem;                         /* Spacing between rows */
}


.menu-container nav.header-nav ul.sub-menu li {
    /*width: 100%;*/
    padding: 0.5rem 1.6rem;
    box-sizing: border-box;
}

.menu-container nav.header-nav ul.sub-menu li a {
    display: flex;
    align-items: center;
}

.menu-container nav li.menu-item-has-children > a::after {
    content: '\2228';
    display: inline-block;
    margin-left: 0.5rem;
    padding-bottom: 0.2rem;
    font-size: 1.6rem;
    font-weight: 100;
}

.menu-container nav li.menu-item-has-children:hover > a::after
{
    content: '\2227';
}

.menu-container li {
    flex: 1 1 30rem;
    height: 100%;
    text-align: center;
}

.menu-container ul.sub-menu li {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
    width: 100%;
}

.menu-container li::before {
    content: none;
}

.menu-container nav {
    text-transform: uppercase;
    height: 100%;
    font-size: 1.4rem;
    font-weight: 600;
}

.footer-credits {
    display: flex;
    text-align: left;
    font-weight: 200 !important;
    gap: 1rem;
}

.footer-credits .socmedia-links a {
    background: url(../img/ui/sprite_white.png) no-repeat;
    background-size: 114rem 7.6rem;
}

.footer-credits .link-socmedia#soc-fb-page-link {
    background-position: -90.4rem -2rem !important;
}

.footer-credits .link-socmedia#rss-page-link {
    background-position: -95.5rem -2rem !important;
}

.footer-credits .link-socmedia#tg-page-link {
    background-position: -100.53rem -2rem !important;
}

nav.footer-nav-primary {
  width: 50%;
}

nav.footer-nav-primary a {
  color: white;
  font-size: 1.4rem;
  font-weight: 600;
}

nav.footer-nav-primary a:hover {
    text-decoration: underline;
}

nav.footer-nav-primary li {
    display: block;
}

nav.footer-nav-primary ul.menu-footer-new {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    /* Height must be explicitly set to fit exactly N elements */
    height: 60rem;
    position: static;
    width: 100%;
}

nav.footer-nav-primary ul.menu-footer-new > li {
    min-height: 3rem;
}

nav.footer-nav-primary ul.menu-footer-new > li > a {
    font-size: 1.6rem;
    text-transform: uppercase;
}

/*** Пункт меню "Разделы" в меню подножия ***/ /*
nav.footer-nav-primary .menu-item-1018562 ul.sub-menu {
  column-count: 2;
  column-gap: 1rem;
}
*/
nav.footer-nav-primary ul.menu-footer-new ul.sub-menu {
    display: block;
    position: static;
    padding-bottom: 1rem;
} 

nav.footer-nav-primary ul.sub-menu li {
    padding: 0.5rem 0 0 1.5rem;
}

nav.footer-nav-primary ul.sub-menu a {
    padding-left: 0;
}

nav.footer-nav-secondary {
    width: 50%;
}

nav.footer-nav-secondary ul.menu-footer-secondary {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

nav.footer-nav-secondary a {
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    text-transform: uppercase;    
}

nav.footer-nav-secondary li {
    height: 3rem;
}

nav.footer-nav-secondary .socmedia-links {
    margin-top: 2rem;
}

.menu-container nav form {
    display: flex;
    align-items: center;
}

 
.search-button-img {
    display: block;
    width: 2.4rem;
    height: 2.4rem;
    /*background-color: var(--background-secondary-color);*/
    background-image: url("https://archives.gov.by/wp-content/themes/belniced/images/search-filled-white-50.png");
    background-size: contain;
}

.widget-container {
    display: block;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    height: auto;
}

.widget-content-container .news-block-item {
    background-color: white;
    box-sizing: border-box;
    padding: 0.6rem;
    border-radius: 1rem;
    border: 0.1rem solid var(--news-block-border-color-grey);
}
.widget-content-container.news-item-small a {
    display: block;
    width: 100%;
    height: 100%;
}

.widget-content-container.news-item-small .news-block-content {
    display: flex;
    width: 100%;
    flex-direction: row;
}

.widget-content-container .news-block-item:hover {
    box-shadow: 0 0.3rem 0.6rem rgba(0,0,0,.6);
}

aside.right-panel .widget-content-container {
    display: flex;
    flex-direction: column;
    gap: var(--news-blocks-gap);
}

article.type-post {
    display: flex;
    gap: var(--news-blocks-gap);
    flex-direction: row;
}

article.type-post .search-entry-content h4,
article.type-page .search-entry-content h4,
article.type-book .search-entry-content h4 {
    margin-top: 0;
}

article.type-post .post-thumbnail-container img {
    height: 13rem;
    width: 16rem; 
    object-fit: cover; 
    object-position: center;
    border-radius: 1rem;
    margin: 0.5rem 0.8rem 0 0 !important; 
}

article.type-page .post-thumbnail-container {
    display: none;
}

.widget-content-container.news-item-small .post-thumbnail-container img {
    height: 13rem;
    width: 16rem;  /* Set your desired width */
    
    /* This crops the image to fill the box without stretching */
    object-fit: cover; 
  
    /* Optional: This centers the crop (default is center) */
    object-position: center;
    border-radius: 1rem;
    /*border: 0.2rem solid var(--background-secondary-color);*/
    margin: 0.5rem 0.8rem 0 0 !important; 
}

.main-content {
    min-height: 10rem;
}

.main-news {
  display: flex;
  width: 100%;
  flex-direction: row;
}
.main-news-group {
    flex: 1 1 55.2%;
    min-width: 90rem;
} 

.main-news-group .widget-content-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
  /* Creates 2 rows (optional, can be auto-generated) */
    /*grid-template-rows: repeat(2, 1fr);*/
    gap: var(--news-blocks-gap); /* Space between cells */
    width: 100%;
}

.news-group-title {
    margin: 1rem 0;
}

.news-group-title a, .news-group-title span {
    color: var(--title-text-color);
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.8rem;
    
}
.widget-content-container.news-item-big .news-block-item a {
    text-decoration: none;
    overflow-wrap: break-word;
    height: 100%;
}

/*.news-item-title span {
    text-decoration: none;
    color: var(--title-text-color);

}*/

.widget-content-container.news-item-big .news-block-item {
    margin: 0;
    /*max-width: 42rem;*/
    border-radius: 1rem;
    padding: 0.5rem;
    box-sizing: border-box;
    background-color: white;
}

.widget-content-container.news-item-big .news-block-item:hover {
    box-shadow: 0 0.3rem 0.6rem rgba(0,0,0,.6);
}

.widget-content-container.news-item-big .news-block-item-title {
    margin-top: 0.5rem;
}

.widget-content-container.news-item-small .news-block-item-date {
    color: var(--title-text-color);
}

.widget-content-container.news-item-big .news-block-item-date {
    background-color: var(--background-secondary-color);
    font-weight: 600;
    position: absolute;
    width: auto;
    margin: 0;
    padding: 0.6rem;
    top: 19.4rem;
    display: block;
    color: white;
    text-decoration: none;
    border-radius: 1rem;
    border-top-left-radius: 0;
    border-bottom-right-radius: 0;
}

.main-links-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.year-theme-banner {
    margin: 4.9rem 1rem 1rem 1rem;
    flex: 0 1 22%;

}

.year-theme-banner img {
    border: 0.1rem solid var(--news-block-border-color-grey);
    border-radius: 1rem;
    object-fit: cover; 
    object-position: center;
    /*max-height: 56.4rem;*/
    width: 100%;
    box-sizing: border-box;
}

.theme-banners {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin: 4rem 0 2rem 0;
}

.theme-banners a {
    /*flex: 1 1 auto;*/
    /*width: 80%;*/
    margin: auto;
}

.widget-content-container.news-item-big .post-thumbnail-container {
    position: relative;
}

.widget-content-container.news-item-big .post-thumbnail-container img {

    height: 23rem;
    width: 100%;  /* Set your desired width */

    /* This crops the image to fill the box without stretching */
    object-fit: cover; 
  
    /* Optional: This centers the crop (default is center) */
    object-position: center;
    border-radius: 1rem;
    /*border: 0.2rem solid var(--background-secondary-color);*/
    margin: 0;
    padding: 0;
}

/*** Блок объявлений ***/
.notices-container .widget-content-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    /*grid-template-rows: repeat(3, 1fr);*/
    gap: var(--news-blocks-gap); /* Space between cells */
    width: 100%;    
    /*display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Space between cells */
    /*width: 100%;*/    
}
/*
.notices-container .widget-content-container .news-block-item {
   flex: 0 1 calc(100% / 3);
   max-width: calc(100% / 3);
}
*/
.news-item-big img {

    height: 13rem;
    width: 16rem;  /* Set your desired width */

    /* This crops the image to fill the box without stretching */
    object-fit: cover; 
  
    /* Optional: This centers the crop (default is center) */
    object-position: center;
    border-radius: 1rem;
    /*border: 0.2rem solid var(--background-secondary-color);*/
    margin: 0;
    padding: 0;
}

.other-news-container .widget-content-container.news-item-small {
    /*display: flex;
    flex-wrap: wrap;*/
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    grid-template-rows: repeat(3, 1fr);
    gap: var(--news-blocks-gap); /* Space between cells */
    width: 100%;
}


.news-block-item-contaiter-left .news-block-item-date,
.news-block-item-contaiter-left img {
    display: block;
}

.archival-resources-links {
    padding: 0;
    flex: 0 0 22%;
}

.archival-resources-links .widget-content-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.archival-resources-links a {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    margin: 0;
    border: 0.1rem solid var(--news-block-border-color-grey);
    height: 10rem;
    padding: 1rem;
    border-radius: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    background-color: white;
    font-size: 1.4rem;
}


.archival-resources-links a img {
    width: 8rem;
    height: auto;
}

.menu-site-chapters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-basis: 20%;
}

.menu-site-chapters .menu-item {
    margin: 0;
    padding: 0;
    width: 20rem;
    height: 16rem;

}

.menu-site-chapters .menu-item a {
    padding-top: 10%;
    border: 0.1rem solid var(--news-block-border-color-grey);
    color: #701303;
}

.menu-site-chapters .menu-item a:hover {
    background-color: var(--title-text-color);
    color: white;
    border-color: var(--background-secondary-color);
}

.menu-site-chapters li a:hover .icon-site-chapter {
    background: url(../img/ui/sprite_white.png) no-repeat;
}

.menu-site-chapters li a .icon-site-chapter {
    background: url(../img/ui/sprite.png) no-repeat;
}

.menu-site-chapters li.topic-administration a .icon-site-chapter {
    background-position: -53.5rem 0rem;
    background-size: 90rem 5.4rem;
}

.menu-site-chapters li.topic-control a .icon-site-chapter {
    background-position: -57rem 0rem; 
    background-size: 86rem 5.4rem;
}

.menu-site-chapters li.topic-education a .icon-site-chapter {
    background-position: -62rem 0rem;
    background-size: 85.8rem 5.4rem;
}

.menu-site-chapters li.topic-genealogy a .icon-site-chapter {
    background-position: -5.6rem -0.2rem;
    background-size: 85.8rem 5.4rem;
}

.menu-site-chapters li.topic-archiving a .icon-site-chapter {
    background-position: -14.5rem 0rem;
    background-size: 78rem 5.2rem;
}

.menu-site-chapters li.topic-heraldry a .icon-site-chapter {
    background-position: -26rem -0.2rem;
    background-size: 82rem 5.2rem;
}

.menu-site-chapters li.topic-legislation a .icon-site-chapter {
    background-position: -26rem -0.2rem;
    background-size: 82rem 5.2rem;
}

.menu-site-chapters li.topic-adminproc a .icon-site-chapter {
    background-position: -29.9rem -0.2rem;
    background-size: 78rem 5.4rem;
}

.menu-site-chapters li.topic-findingaids a .icon-site-chapter {
    background-position: -10.3rem -0.2rem;
    background-size: 83rem 5.8rem;
}

.menu-site-chapters li.topic-archeography a .icon-site-chapter {
    background-position: -26rem -0.2rem;
    background-size: 82rem 5.2rem;
}

.menu-site-chapters li.topic-magazine a .icon-site-chapter {
    background-position: -10.3rem -0.2rem;
    background-size: 83rem 5.8rem;
}

.menu-site-chapters li.topic-calendar a .icon-site-chapter {
    background-position: -14.6rem -0.2rem;
    background-size: 78rem 5.4rem;
}

.menu-site-chapters li.topic-archives-newsmedia a .icon-site-chapter {
    background-position: -43rem -0.3rem;
    background-size: 82rem 5.6rem;
}

.menu-site-chapters li.topic-archives-socmedia a .icon-site-chapter {
    background-position: -43rem -0.3rem;
    background-size: 82rem 5.6rem;
}

.menu-site-chapters li.topic-publications a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

.menu-site-chapters li.topic-temp-hist a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

.menu-site-chapters li.topic-doc-letopis a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

.menu-site-chapters li.topic-temp-peace a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

.menu-site-chapters li.topic-jubilee a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

.menu-site-chapters li.topic-temp-qwality a .icon-site-chapter {
    background-position: 0 -0.3rem;
    background-size: 80rem 5.6rem;    
}

footer {
    /*position: absolute;
    bottom: 0;*/
    padding-top: 1rem;
    width: 100%;
    margin-top: 2rem;
    min-height: 5rem;
    color: white;
    background-color: var(--background-secondary-color);
    border-radius: 0;
}

.single-post-content, .page-content {
    display: flex;
    gap: 2rem;
}

.single-post-content section, .page-content section {
    width: 800rem;
    overflow: hidden;
}

footer .container-internal {
    height: 100%;
}

footer .site-logo-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    height: 100%;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

footer .site-logo-footer img {
    max-width: 8rem;

}

footer .site-logo-footer-text {
    font-weight: 600;
}