#banner{
    background: url(/images/bg/1.png);    
}
.banner-columns{
    display: flex;
}
.banner-col{
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.company{
    display: flex;
}
#banner-text-1{
    display: flex;
}

@media (min-width: 1250px) {
    #banner{
        height: 925px;
    }
    #banner-content{
        width: 1240px;
        height: 825px;    
    }    
    .gosuslugi-banner{
        width: 1236px;
        margin: 80px 0 80px 0;        
    }    
    #banner-text-1{        
        align-items: center;
        font-weight: 500;
        font-size: 20px;
        line-height: 130%;
        cursor: default;     
        margin-left: 40px;   
    }
    #banner-text-2{
        font-weight: 700;
        font-size: 48px;
        line-height: 120%;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        cursor: default;
    }      
    .company{
        width: 100%;        
    }
    .bi-1{
        margin: 50px 0 0 0;
    }      
    .bi-2{
        margin: 37px 0 0 0;
    }
    .bi-3{
        margin: 33px 0 0 0;
    }
    .bi-4{
        margin: 49px 0 0 0;
    }    
    .banner-col.col-2{       
        padding-top: 6%;
        justify-content: center;
        align-items: center;
    }
}
@media (min-width: 1024px) and (max-width: 1249px) {
    #banner-text-1 {
        align-items: center;
        margin-left: 20px;
    } 
    .gosuslugi-banner{
        margin: 40px 0 40px 0;
    }      
}
@media (max-width: 1023px){
    .company{
        flex-direction: column;
    }
    #banner-text-1{        
        margin-top: 23px;
    }
    .banner-col{
        width: 100%;
    }
    .gosuslugi-banner{
        margin: 40px 0 40px 0;
    }  
}
@media (max-width: 1250px){
    #banner-content{
        width: 90%;
    }
    #banner-text-1{
        font-weight: 500;
        font-size: 15px;
        line-height: 130%;
    }
    #banner-text-2{
        font-weight: 700;
        font-size: 20px;
        line-height: 120%;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    .banner-item{
        margin: 20px 0 0 0;       
    }    
}

#menu{    
    display: flex;
    flex-wrap: wrap;    
}
.banner-col.col-2>img{
    width: 100%;
}
@media (min-width: 1250px){
    #menu{
        width: 1240px;        
    }
    .nav-btn{
        width: 309px;
    }
    .nav-btn-2{
        width: 618px;
    }
    .banner-col.col-2>img{
        height: 284px;
        width: auto;
    }
}
@media (min-width: 800px){
    .banner-col.col-1{
        width: 60%;
    }
    .banner-col.col-2{
        width: 40%;
        justify-content: center;
        align-items: flex-end;
    }    
    
}
@media (min-width: 800px) and (max-width:1250px){
    .banner-col.col-2{
        padding-top: 2%;
    }
    .nav-btn{
        width: 50%;
    }
    #menu{
        width: 100%;        
    }
}

@media (max-width:799px) {
    .banner-col.col-1{
        width: 100%;
    }
    .banner-col.col-2{
        width: 100%;
    }
    .banner-columns{
        flex-direction: column;
    }
    .nav-btn{
        width: 100%;
    }
    #menu{
        width: 100%;        
    }    
}
.nav-btn{    
    height: 150px;
    display: flex;    
    align-items: center;
    background: #FFFFFF;
    padding: 30px;
    font-size: 16px;
    line-height: 130%;
    letter-spacing: 0.05em;
    font-weight: 400;        
    /*border: 1px solid #DEE2EB;*/
    cursor: pointer;    
    transition: background 300ms linear, border 300ms linear;
    opacity: 0.95;   
}


/*////////////////////////////////////////////////Границы//////////////////////////////////////*/


@media (min-width: 1250px){
    .nav-btn:nth-child(1), .nav-btn:nth-child(2), .nav-btn:nth-child(3){
        border-right: 1px solid #DEE2EB;
        border-bottom: 1px solid #DEE2EB;
    }
    .nav-btn:nth-child(5){
        border-right: 1px solid #DEE2EB;
    }    
    .nav-btn:nth-child(4){
        border-bottom: 1px solid #DEE2EB;
    }          
}
@media (min-width: 800px) and (max-width:1250px){
    .nav-btn:nth-child(1), .nav-btn:nth-child(3){
        border-right: 1px solid #DEE2EB;
        border-bottom: 1px solid #DEE2EB;
    }
    .nav-btn:nth-child(5){
        border-right: 1px solid #DEE2EB;
    }
    .nav-btn:nth-child(2), .nav-btn:nth-child(4){
        border-bottom: 1px solid #DEE2EB;
    }
}
@media (max-width: 800px){
    .nav-btn:nth-child(1), .nav-btn:nth-child(2), .nav-btn:nth-child(3), .nav-btn:nth-child(4), .nav-btn:nth-child(5){
        border-bottom: 1px solid #DEE2EB;
    }    
}
@media (min-width: 801px){
    .btn-bg:nth-child(1){
        border-right: 1px solid #DEE2EB;
    }
}

/*//////////////////////////////////////////////////////////////////////////////////////*/

.nav-btn label{
    margin: 0 0 0 20px;    
    cursor: pointer;
}
.nav-btn:hover{
    background: #3A8EF8;      
    /*border: 1px solid #3A8EF8;*/
    opacity: 1;
}
.nav-btn:hover label{
    color: #FFFFFF;
}
.nav-btn:hover img{
    filter: brightness(0) invert(1);
}
.btn-bg{    
    height: 150px;        
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-position: center !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px 0 30px;
    cursor: pointer;    
}
@media (min-width: 1250px){
    #btn-bg-container{
        display: flex;
        width: 1240px;    
    }
    .btn-bg{
        width: 618px;
    }    
}
@media (min-width: 1024px) and (max-width:1250px) {
    #btn-bg-container{
        display: flex;
        width: 100%;    
    }
    .btn-bg{
        width: 50%;
    }  
}
@media (max-width:1024px) {
    #btn-bg-container{
        display: flex;        
        width: 100%;    
    }
    .btn-bg{
        width: 100%;
    }  
}
@media (max-width:500px){
    #btn-bg-container{
        flex-direction: column;
    }    
}
@media (max-width: 800px){
    .btn-bg-p2{
        opacity: 0;
    }
}
.btn-bg:hover{
    background: #3A8EF8 !important;   
}
.btn-bg-p1{
    font-weight: 700;
    font-size: 20px;
    line-height: 130%;
    letter-spacing: 0.05em;
    color: #232F4F;
    text-transform: uppercase;
}
.btn-bg-p2{
    display: none;
    position: absolute;
    top: 45px;
    right: 45px;     
}
.btn-bg-p2 p{
    font-size: 14px; 
    text-align: right;
    color: #FFFFFF;
}
.btn-bg-arrow{
    display: flex;
    align-items: center;
    margin-left: 10px;
}
#btn-bg-zakl-dogovor{
    position: relative;    
    background: url('/images/btn-bg/zakl-dogovor.jpg');
}
#btn-bg-services{
    position: relative;    
    background: url('/images/btn-bg/services.jpg');    
}
@media(max-width: 1240px){
    #btn-bg-services{
        width: 100%;
    }
}
@media (min-width: 1250px){
    #news-container{
        width: 1240px;
    }
    #btn-bg-services{
        width: 1236px;
    }
}
@media (max-width: 1250px){
    #news-container{
        width: 90%;
    }
}
#news-header{
    display: flex;    
    align-items: flex-end;
}
#news-header p{
    font-weight: 700;
    font-size: 30px;
    line-height: 120%;
    letter-spacing: 0.05em;
    color: #232F4F;
    text-transform: uppercase;
    cursor: default;
}
#news-header a{
    margin: 0 0 7px 10px;
    width: 100px;
    line-height: 120%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    color: #3A8EF8;
}
#news{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;    
}
.news-separator{
    height: 3px;
    width: 100%;
    display: flex;
    align-items: center;
    margin: 20px 0 20px 0;
}
.news-separator .sep-blue{
    height: 100%;
    width: 70px;
    background: #3A8EF8;
}
.news-separator .sep-gray{
    height: 1px;
    flex-grow: 2;
    background: #DEE2EB;
}
.new{    
    margin: 50px 0 0 0;
    cursor: pointer;
}
@media (min-width: 800px){
    .new{
        width: 47%;
    }
}

.new-header{
    font-weight: 700;
    font-size: 18px;
    line-height: 20px;
    letter-spacing: 0.05em;
}
.new-body{
    display: flex;
    height: 120px;
}
.new-descr{
    margin: 0 0 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
@media (min-width: 400px){
    .new-descr p{
        font-weight: 400;
        font-size: 15px;
        line-height: 20px;
        letter-spacing: 0;
        color: #788093;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        line-height: 140%;    
        max-height: 80px;     
        -webkit-line-clamp: 4; /* Write the number of 
                              lines you want to be 
                              displayed */
        -webkit-box-orient: vertical;
        padding: 0 !important;  
    }
}

@media (max-width: 400px){
    .new-descr p{
        font-weight: 400;
        font-size: 12px;
        line-height: 20px;
        letter-spacing: 0;
        color: #788093;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        line-height: 140%;    
        max-height: 80px;     
        -webkit-line-clamp: 4; /* Write the number of 
                              lines you want to be 
                              displayed */
        -webkit-box-orient: vertical;
        padding: 0 !important;  
        word-break: break-word;
    }    
}
.new-date{
    font-weight: 400;
    font-size: 12px !important;
    line-height: 20px !important;
    letter-spacing: 0.05em !important;
    color: #788093 !important;
    margin: 10px 0 0 0 !important;
}
.div-new-img{    
    flex-basis: 150px;
    flex-grow: 0;
    flex-shrink: 0;
    height: 100%;    
}
.new-img{    
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#pre-footer{
    width: 100%;
    display: flex;        
    margin: 50px 0 0 0;
}
@media (min-width: 1250px){
    #pre-footer{
        width: 1240px;
        justify-content: space-between;
    }
    .btn-pre-footer{
        width: 47%;
    }
}
@media (min-width: 1024px) and (max-width:1250px){
    #pre-footer{
        width: 90%;
        justify-content: space-between;
    }
    .btn-pre-footer{
        width: 47%;
    }
}
@media (max-width:1024px){
    #pre-footer{
        flex-direction: column;
        align-items: center;
        width: 90%;
    }
    .btn-pre-footer{
        width: 100%;
        margin: 5px 0 0 0;
    }
}
.btn-pre-footer{
    display: flex;
    align-items: center;    
    height: 150px;
    background: white;
    padding: 5px 10px 5px 20px;
    cursor: pointer;
    transition: background 300ms linear;
}
.btn-pre-footer p{
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
    margin: 0 0 0 15px;
}
.btn-pre-footer:hover{
    background: #3A8EF8;
}
.btn-pre-footer:hover p{
    color: white;
}
.btn-pre-footer:hover img{
    filter: brightness(0) invert(1);
}
.new:hover .new-header, .new:hover .new-p-descr, .new:hover .new-date{
    color: #3A8EF8 !important;
}

/*popup*/

body.modal-open {
    overflow: hidden;
  }

  #overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }

  #popup {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 600px;
    width: 90%;
    text-align: center;
    margin: 0 auto; /* дополнительная мера центрирования */
  }

  #close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    background: none;
    border: none;
    outline: none;
  }

  #popup p {
    margin-bottom: 20px;
    font-size: 18px;
  }

  .popup-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
  }

  .popup-buttons a,
  .popup-buttons button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #23314f;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
  }

  .popup-buttons a:hover,
  .popup-buttons button:hover {
    background-color: #1a243a;
  }

/* Home layout hard-fix: prevent services/news overlap */
#banner {
    height: auto !important;
}
#banner-content {
    height: auto !important;
}
#btn-bg-container {
    margin-bottom: 0 !important;
}
#news-container {
    margin-top: 0 !important;
}
.gosuslugi-banner {
    margin-top: 0 !important;
    margin-bottom: 40px !important;
}