@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: url('/static/fonts/roboto-v50-cyrillic-ext_latin-300.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('/static/fonts/roboto-v50-cyrillic-ext_latin-regular.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: url('/static/fonts/roboto-v50-cyrillic-ext_latin-500.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 600;
src: url('/static/fonts/roboto-v50-cyrillic-ext_latin-600.woff2') format('woff2');
font-display: swap;
}
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #f8f8f8;
    color: #333;
    line-height: 28px;
}

/* --- ЗАТЕМНЕНИЕ --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    z-index: 900;
    display: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
}

.page-container{
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

/* --- БАЗОВЫЕ СТИЛИ ХЕДЕРА --- */
header {
    position: relative;
    z-index: 1000;
    transition: background 0.3s ease;
}

header .logo-text{
    display: block;
    font-size: 26px;
    text-transform: uppercase;
    font-weight: 500;
    margin: 10px 0;
    color: #000;
    position: absolute;
    z-index: 2000;
    top: 50%;
    left: 50%;
    background: rgba(255,255,255,0.7);
    padding: 40px 20px;
    border-radius: 10px;
    transform: translate(-50%, -50%);
	line-height: 40px;
  }

header .logo{
    width: 100%;
    display: block;
    margin: 0 auto;
    position: relative;
  }
header .logo img{
    width: 100%;
    height: auto;
}
header .header-top {
    text-align: center;
    background: white;
    position: relative;
    z-index: 1001;
}
header .header-bottom {
    background: #274f79;
    position: relative;
    z-index: 1001;
	margin-top: -10px;
}
header.menu-open {
    background: #274f79;
}
.menu-container,.block-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    height: 50px;
}
.block-container {height:100%}
.menu-toggle-container{display: none;}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    top: 12px;
    right: 15px;
    z-index: 1100; /* выше всех */
}

nav ul.menu {
    list-style: none;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 25px;
    margin: 0;
    padding: 0;
    height: 50px;
    align-content: center;
}
nav ul.menu li{
    height: 100%;
    line-height: 54px;
    margin-bottom: 2px;
}
nav ul.menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    text-transform: uppercase;
}

nav ul.menu li.active, nav ul.menu li:hover{
    border-bottom: 2px solid #fc0;
    transition: all 0.2s;
}
nav ul.menu li.active a,
nav ul.menu li a:hover {
    color: #ffcc00;
    
}

/* --- HERO (слайдер) --- */
.hero-section {
    background: #1e4367;
    margin-bottom: 40px;
  }
  .slider-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
  }
  .slider {
    display: flex;
    transition: transform 0.6s ease;
  }
  .slide {
    min-width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
  }
  .slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    text-shadow: 0 3px 4px rgba(0,0,0,0.6);
    max-width: 80%;
    background: rgba(255,255,255,0.6);
    padding: 50px;
    border-radius: 10px;
  }
  .slide-content h2 {
    font-size: 2rem;
    font-weight: 500;
  }
  .slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s;
    width: 40px;
    height: 40px;
  }
  .slider-nav button:hover {
    background: rgba(0,0,0,0.6);
  }
  .slider-nav .prev { left: 10px; }
  .slider-nav .next { right: 10px; }

/* Блок преимуществ сервиса */
.advantages{
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
    margin: 30px 0 280px 0;
  }
.advantages .advantage{
    flex: 0 0 25%;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    margin-top: 40px;
  }
  .advantages .advantage-container{
    max-width: 60px;
    border: 2px solid #274f79;
    border-radius: 50%;
    max-height: 60px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}
.advantages .advantage img{
    width:100%;
    max-width: 60px;
    height: auto;
  }

.advantages .advantage p {
    text-align: center;
    line-height: 18px;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
  }

/*Секция информации о компаниях и отзывах*/
.company-info{
    background: #1e4367;
    padding-bottom: 20px;
}
.companies-section{
    position: relative;
    top: -211px;
}
.company-info .companies-grid,.reviews-section .reviews-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    justify-items: center;
  }
  .company-info .companies-grid .company-card{
    background: #fff;
    border-radius: 10px;
  } 
  .company-info .companies-grid .company-card img{
    width:100%;
    height:auto;
    border-radius: 10px 10px 0 0;
  } 
  .company-info .companies-grid .company-text{
    padding:10px;
  } 
  .company-info .companies-grid .company-text h3{
    margin:0 0 10px 0;
  }
  .company-info .companies-grid .company-text p{
    color:#ffcc00;

  }
  .company-info .companies-grid .company-text strong{
    color:#000;
  }
  .company-info .companies-grid .company-text a{
    background-color: #106abe;
    margin-left: auto;
    color: #fff;
    text-decoration: navajowhite;
    height: 40px;
    display: block;
    width: 50%;
    text-align: center;
    line-height: 40px;
    border-radius: 10px;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 14px;
  }
  .company-info .companies-grid .company-text a:hover{
    background-color: #1685ed;
    transition: all 0.2s;
  }
  .block-container h2{
    text-align: center;
    margin: 10px 0 20px 0;

  }

/* Последниеотзывы */
.reviews-section{
    margin-top: -160px;
    color: #fff;
    padding-bottom: 40px;
}
.reviews-section .reviews-grid{
    margin-top:100px;
}
.reviews-section .review-card{
    background-color: #274d77;
    color: #fff;
    padding: 10px;
    border-radius: 10px;
    max-width: 265px;
    width:100%;
    margin-bottom: 40px;
}
.reviews-section .review-user{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.reviews-section .review-avatar{
    margin: -50px auto 0 auto;
    text-align: center;
    width: 100%;
    max-width: 80px;
  }
.reviews-section .review-avatar img{width:100%;height:auto}
.reviews-section .review-user .review-info{width: 100%;}
.reviews-section .review-user .review-info span{
    display: block;
    text-align: center;
    width: 100%;
  }
.reviews-section .review-content{
    border-top: 1px solid #717171;
    margin-top: 10px;
    color:#a8b7c6;
    word-wrap: break-word;

  }

/*Страница компании*/
.company-page{
    background-color: #1e4367;
    padding: 20px 0 40px 0;
}
.company-page .company-preview{
    display: flex;
    align-items: center;
    background-color: rgb(39, 77, 119);
    border-radius: 10px;
    color: #fff;
}
.company-page .company-preview img{
    width: 40%;
    height: auto;
    border-radius: 10px 0 0 10px;
}
.company-page .company-preview .company-preview-title{padding: 0 40px;width: 60%;}
.company-page .company-preview h1{
    font-size: 25px;
    line-height: 40px
}
.company-page .company-preview .company-preview-rating{font-size: 30px;}
.company-page .company-preview .company-preview-phone{
    margin-top: 15px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
.company-page .company-preview .company-preview-phone a{
    display: block;
    background-color: green;
    padding: 10px 40px;
    color: #fff;
    text-decoration: navajowhite;
    font-weight: 300;
    border-radius: 10px;
    width: 50%;
    text-align: center;
    font-size: 20px;
  }
.company-page .company-preview .company-preview-phone a:hover{
    opacity: 0.7;
    transition: all ease 0.2s;
  }
.company-page .company-preview .company-preview-rating span{color: rgb(255, 204, 0);}
.company-page .company-detail .company-detail-desc{
    background: #fff;
    border-radius: 10px;
    margin-top: 30px;
    padding: 20px;
    border:10px solid #0871c5;
  }
.company-page .company-detail .company-detail-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    justify-items: center;
    margin-top: 80px;
  }
.company-page .company-detail .company-detail-element{
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 10px;
    border:5px solid #0871c5;
    max-width: 333px;
    width:100%;
    position: relative;
    font-weight: 500;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
.company-page .company-detail .company-detail-phone a,.company-page .company-detail .company-detail-url a{
    color: #444;
    text-decoration: none;
    flex: 100%;
    text-align: center;
    font-size: 20px;
}
.company-page .company-detail .company-detail-element-icon{
    position: absolute;
    top: -20px;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translate(-50%, -50%);
    left:50%;
    border: 5px solid #0871c5;
    padding:10px;
  }
.company-page .company-detail .company-detail-element-icon img{
    width: auto;
    height: 100%;
}
.company-page .reviews-section{
    margin-top:40px;
    padding-bottom: 0;
}
.company-page .reviews-section h2{
    text-align: center;
}
.company-page .add-review h4{
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
  }
.company-page .add-review form{
    background: #fff;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 5px solid #0871c5;
    border-radius: 10px;
    padding:10px;
    text-align: center;
  }
.company-page .add-review form >div{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
.company-page .add-review form label{
    flex: 0 0 100%;
    text-align: center;
    color: #444;
  }
.company-page .add-review form input,.company-page .add-review form select,.company-page .add-review form textarea{
    height: 40px;
    width: 100%;
}
.company-page .add-review form button{
    background-color: #0871c5;
    color: #fff;
    border: none;
    border-radius: 10px;
    height: 40px;
    padding: 0 20px;
    text-transform: uppercase;
    margin: 20px auto;
}
.company-page .add-review form button:hover{
    background-color: #1e4367;
    transition: all 0.2s ease;
}

/*Страница компаний в регионе*/
.company-list-page{
    padding: 40px 0;
}
.company-list-page h1{
    color:#fff;
    text-align: center;
    margin:0 0 40px 0;
}
.company-list-page .companies-section{
    top:0
}
.region-page-main-text,.region-page-description,.main-page-content{
    background: #fff;
    border-radius: 10px;
    margin-top: 30px;
    padding: 20px;
    border: 10px solid #0871c5;
  }
.region-page-main-text{margin-bottom:20px}
.region-page-description h2{text-align: left;}


/* Подвал */
footer {
    background: #0b2a47;
    color: white;
    text-align: center;
    padding: 20px 0;
    border-top:2px solid #193750;
}

/*Информационная страница*/
.main-page-content.text-page{
    margin-bottom: 30px;
    margin-top: 50px;
    position: relative;
}
.main-page-content.text-page h1{
    position: absolute;
    display: block;
    top: -50px;
    left: 50%;
    background: #fff;
    padding: 5px 20px;
    transform: translate(-50%, 0);
    width: 80%;
    text-align: center;
    line-height: 40px;
  }

  #contactModal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
  }
  #contactForm{text-align: center;}
  #contactModal label{
    width: 100%;
  }
  #contactModal .form-control{
    width: 100%;
    height:40px;
    border: 1px solid #cecece;
    text-align: center;
  }
  .modal-content {
    background: white; 
    padding: 20px; 
    margin: 10% auto; 
    width: 300px; 
    position: relative;
    border-radius: 10px;
    padding: 20px;
    border: 10px solid #0871c5;
  }
  #contactModal button{
    background-color: #0871c5;
    color: #fff;
    padding: 10px 30px;
    border-radius: 10px;
    border: none;
  }
  #contactModal button:hover,#openModalBtn:hover{
    opacity: 0.7;
    transition: 0.2 s all ease;
    cursor: pointer;
  }
  #closeModalBtn {
    position: absolute; top: 5px; right: 10px; cursor: pointer; font-size: 20px;
  }
  #openModalBtn{
    border: 2px solid #fff;
    background-color: #0871c5;
    border-radius: 10px;
    padding: 10px 20px;
    color: #fff;
    text-transform: uppercase;
  }


/* Мобильные стили */
@media (max-width: 1280px) {
	header .logo-text{
		width: 80%;
	}
	.company-page .company-detail .company-detail-grid{
		display: flex;
		flex-wrap: wrap;
	}
	.company-page .company-detail .company-detail-element{
		max-width: 100%;
		padding: 30px 0;
		margin-bottom: 50px;
	}
}
@media (max-width: 1100px) {
	.company-page .company-preview{
		flex-wrap: wrap;
	}
	.company-page .company-preview img{
		width:100%;
	}
	.company-page .company-preview .company-preview-title{
		width:100%;
		padding: 20px 30px;
		text-align: center;
	}
	.company-page .company-preview .company-preview-phone{
		display: flex;
		justify-content: center;
	}
}
@media (max-width: 1024px) {
    .slider-container {
        height: 500px;
        max-height: 500px;
    }
    .slide-content h2 { font-size: 28px; }
    .slide-content p { font-size: 16px; }
	header .logo-text{
		font-size: 20px;
		padding: 20px 10px;
	}
	.menu-container,nav ul.menu{height:auto;}
	nav ul.menu li:last-child{
		width:100%;
		margin-top: -20px;
		margin-bottom: 20px;
		text-align: center;
	}
	.main-page-content.text-page h1{
		position: unset;
		transform: unset;
		width: 100%;
		text-align: center;
		background: none;
		padding: 0;
	}
}

@media (max-width: 780px) {
    .menu-toggle,.menu-toggle-container {
        display: block;
    }
	.menu-toggle-container{
		height: 40px;
		height: 40px;
		display: flex;
		justify-content: center;
		align-items: center;
	}
	.menu-toggle{
		font-size: 16px;
		position: relative;
		top: 0;
	}
    .header-top {
        padding: 10px 0;
        transition: background 0.3s ease;
    }
	footer{
		padding:10px 10px;
	}
	.company-page .add-review form{
		width:auto;
	}
	.menu-container,nav ul.menu{margin-top:-19px}
/* Меню */
    nav {
        display: none;
        position: absolute;
        top: 40px;
        left: 0;
        width: 100%;
        background: #1e90ff;
        z-index: 9999;
    }

    nav.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    nav ul.menu {
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
        margin: 0;
    }

    nav ul.menu li {
        padding: 10px 0;
    }

    /* Когда меню открыто — делаем фон хедера синим */
    header.menu-open .header-top {
        background: #1e90ff;
    }

    /* Добавляем отступ под шапкой для слайдера */
    body.menu-open main {
        margin-top: 160px; /* высота хедера + меню */
    }

    /* Анимация выезда меню */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .regions-list {
        justify-content: center;
    }

    .region-card {
        width: 45%;
        margin-bottom: 15px;
    }
    .slider-container {
        height: 400px;
        max-height: 400px;
    }
    .slide-content h2 { font-size: 22px; }
    .slide-content p { font-size: 14px; }
    .prev, .next { font-size: 24px; padding: 6px 10px; }
}

@media (max-width: 760px) {
	header .header-top{padding:0}
	header .logo{text-decoration:none}
	header .logo-text {
		position: relative;
		top: -17px;
		left: unset;
		right: unset;
		text-align: center;
		width: 100%;
		background: rgba(0,0,0,0.1);
		transform: unset;
		border-radius: 0;
		padding: 0;
	}
	.advantages .advantage{
		flex:0 0 50%;
	}
	.advantages .advantage p{
		display: block;
		flex: 0 0 100%;
	}
}
@media (max-width: 640px) {
	.company-page .company-preview{
		padding:10px;
	}
	.company-page .company-preview .company-preview-phone{
		flex-wrap:wrap;
	}
	.company-page .company-preview .company-preview-title{
		padding:0;
	}
	.company-page .company-preview .company-preview-phone a{
		width: 100%;
	}
}

@media (max-width: 480px) {
	header .logo-text{
		font-size:16px;
	}
    .region-card {
        width: 100%;
    }
    .slider-container {
        height: 300px;
        max-height: 300px;
    }
    .slide-content h2 { font-size: 18px; }
    .slide-content p { font-size: 12px; }
    .prev, .next { font-size: 20px; padding: 4px 8px; }
	.hero-section{display:none}
	.advantages .advantage{
		flex:0 0 100%;
	}
}