:root {
    --primary: #f54e17;
    --primary-hover: #e0450f;
    --dark-bg: #222c35;
    --darker-bg: #1b232a;
    --card-bg: #2f3d4b;
    --card-bg-hover: #2d333c;
    --text-light: #ffffff;
    --text-gray: #a0a8b4;
    --text-muted: #6b7380;
    --link-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
}

html {
    scroll-behavior: auto;
}

/* Scroll to Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 54px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(245, 78, 23, 0.8);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(245, 78, 23, 0.4);
}

/* ==================== NAVBAR ==================== */
.navbar {
    transition: all 0.4s ease;
    padding: 15px 0;
    background: transparent !important;
}

.navbar.scrolled {
    background: rgba(20, 24, 29, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.navbar-brand-logo img {
    width: auto;
    height: 90px;
}

.navbar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-main {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
}

.brand-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.5px;
    margin: 0 6px;
    padding: 8px 10px !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.navbar-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.contact-phone {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-phone:hover {
    color: var(--primary);
}

.contact-email {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: var(--primary);
}

.btn-primary-custom {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 10px 20px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom-calc {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 400;
    padding: 16px 32px;
    text-transform: uppercase;
    font-size: 18px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover,
.btn-primary-custom-calc:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 78, 23, 0.4);
    color: #fff;
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    font-weight: 700;
    padding: 20px 40px;
    font-size: 18px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-right: 4rem;
}

.error404 .btn-outline-custom {
    margin-right: 0;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 78, 23, 0.4);
}

a.link-white {
    color: var(--link-white);
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: 2px solid var(--primary);
    padding: 8px 12px;
    outline: none !important;
    border-radius: 4px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23f54e17' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

/* Мобильные контакты */
.mobile-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 0;
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.mobile-contact-link:hover {
    opacity: 0.8;
    color: var(--primary);
}

.mobile-contact-link span {
    color: var(--text-light);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(14, 17, 21, 0.65) 0%, rgba(20, 24, 29, 0.75) 100%),
        url('../images/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 160px 0 100px;
}

.hero-content {
    position: relative;
    z-index: 2;    
}

.hero-title {
    font-size: 46px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 48px;
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 15px;
    font-weight: 400;
}

.hero-services {
    list-style: none;
    padding: 0;
    margin: 0 0 48px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hero-services li {
    font-size: 20px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-services li img {
    width: 18px;
    height: 18px;
}

.hero-services li i {
    color: var(--primary);
    font-size: 10px;
}

.hero-bottom {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-right: 2rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.stat-text {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 00;
    line-height: 1.3;
}

.stat-text strong {
    display: block;
    font-size: 18px;
    color: var(--text-light);
    font-weight: 400;
    margin-bottom: 3px;
}

.modal-body .stat-text {
    font-size: 14px;
}

/* ==================== ADVANTAGES SECTION ==================== */
.advantages-section {
    background: var(--dark-bg);
    padding: 90px 0;
}

.section-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 64px;
    text-align: center;
    color: var(--text-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 72px;
    max-width: 1100px;
    margin: 0 auto;
}

.advantages-grid .card-wide {
    grid-column: span 2;
}

.advantages-grid .card-full {
    grid-column: span 4;
}

.advantage-card {
    background: var(--card-bg);
    padding: 35px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.advantage-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
}

.advantage-icon img {
    width: 100%;
    height: auto;
    stroke: var(--primary);
    fill: none;
    stroke-width: 1.5;
}

.advantage-card h5 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 24px;
    color: var(--text-light);
}

.advantage-card p {
    font-size: 16px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

/* ==================== PROCESS SECTION ==================== */
.process-section {
    background: var(--darker-bg);
    padding: 0;
    position: relative;
    overflow: hidden;
}

.process-left {
    display: flex;
    align-items: center;
    height: 100%;
}

.process-texture {
    width: 353px;
    height: 640px;
    background: url('../images/process-texture.png') no-repeat right center;
}

.process-center {
    padding: 64px 32px;
}

.process-center h2 {
    margin-bottom: 64px;
    color: var(--text-light);
}

.process-flow {
    display: flex;
    flex-direction: column;
    gap: 25px;
    background: url('../images/steps.png') no-repeat 0 0;
    width: 510px;
    height: 323px;
}

.process-row {
    display: flex;
    align-items: center;
    gap: 34px;
    padding: 0 32px;
    justify-content: center;
    text-align: center;
}

.process-flow .process-row:first-child {
    margin: 5rem 0 12rem;
}

.process-step {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.step-label {
    font-size: 18px;
    color: var(--text-light);
    font-weight: 400;
}

.process-arrow {
    color: var(--primary);
    font-size: 16px;
    opacity: 0.5;
}

.process-right {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: url('../images/process-video.jpg') no-repeat 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
}

.process-right-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sparks-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 60% 40%, rgba(245, 78, 23, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 70% 60%, rgba(245, 78, 23, 0.1) 0%, transparent 30%);
}

.play-btn {
    width: 70px;
    height: 70px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    border-color: var(--primary);
    background: rgba(245, 78, 23, 0.2);
    transform: scale(1.1);
}

.play-btn i {
    color: #fff;
    font-size: 24px;
    margin-left: 4px;
}

/* ==================== CALCULATOR SECTION ==================== */
.calculator-section {
    background: var(--dark-bg);
    padding: 80px 0;
}

.calculator-box {
    background: var(--darker-bg);
    padding: 40px;
    margin: 0 auto;
}

.calc-label {
    display: block;
    font-size: 20px;
    color: var(--text-gray);
    margin-bottom: 10px;
    font-weight: 400;
}

.calc-input {
    background: #3a4050;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px 15px;
    color: var(--text-light);
    font-size: 18px;
    font-weight: 700;
    width: 120px;
    text-align: center;
    outline: none;
    font-family: 'Roboto', sans-serif;
}

.calc-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 78, 23, 0.2);
}

.calc-unit {
    font-size: 14px;
    color: var(--text-gray);
}

.calc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calc-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.calc-radio:hover {
    background: rgba(245, 78, 23, 0.1);
}

.calc-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.calc-radio input[type="radio"]:checked {
    border-color: var(--primary);
}

.calc-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.calc-radio-label {
    font-size: 16px;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.4;
}

.calc-total {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    padding: 15px 20px;
    background: rgba(245, 78, 23, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(245, 78, 23, 0.3);
}

.calc-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
}

/* ==================== PORTFOLIO SECTION ==================== */
.portfolio-section {
    background: var(--darker-bg);
    padding: 100px 0 0;
}

.portfolio-subtitle {
    text-align: center;
    font-size: 18px;
    color: var(--text-gray);
    margin-bottom: 40px;
    font-weight: 400;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 400px);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    cursor: pointer;
    height: 400px;
}

.portfolio-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0.2;
    transition: all 0.3s ease;
}

.portfolio-item:hover::after {
    opacity: 1;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--card-bg), #333a45);
}

.portfolio-placeholder i {
    font-size: 40px;
    color: var(--text-muted);
    opacity: 0.3;
}

/* ==================== REVIEWS SECTION ==================== */
.reviews-section { background: var(--dark-bg); padding: 100px 0 120px 0; }

.reviews-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
}

.review-card {
    display: flex;
    flex-direction: column; /* Фото сверху, текст снизу */
    align-items: center;
    max-width: 1200px;       /* Ширина области блока */
    margin: 0 auto;
    text-align: center;
}

.review-photo {
    width: 100%;            /* На всю ширину области блока */
    max-width: 100%;    
    overflow: hidden;    
    margin-bottom: 32px;    /* Отступ до текста */
    background: var(--card-bg);
    flex-shrink: 0;
    max-height: 500px;
}

.review-photo img {
    width: 100%;
    height: auto;    
}

.review-content {
    width: 100%;
}

.review-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-light);
}

.review-position {
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.5;
}

.review-text {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.7;
    font-weight: 400;
}

/* Навигация (без изменений) */
.review-nav-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: var(--primary);
    z-index: 10;
}
.review-nav-prev { left: 0; }
.review-nav-next { right: 0; }
.review-nav-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

/* Адаптив */
@media (max-width: 768px) {
    .reviews-wrapper { padding: 0 30px; }
    .review-card { max-width: 100%;padding: 0 1rem; box-sizing: border-box; }
    .review-photo { max-width: 100%; margin-bottom: 24px; }
    .review-nav-btn { width: 30px; height: 30px; top: 26%; }
}

/* ==================== FAQ SECTION ==================== */


/* 1. Скрываем все ответы по умолчанию */
.faq-answer {
    background: #fff;
    color: #333;
    display: none;
    /* Важно: скрываем через display, а не max-height */
}

/* 2. ПОКАЗЫВАЕМ ответ, если у него есть класс .open */
.faq-answer.open {
    display: block;
}

.faq-section {
    background: var(--darker-bg);
    padding: 100px 0 120px;
}

.faq-accordion {
    max-width: 780px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 4px;
}

.faq-question {
    background: #3a4050;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    width: 100%;
    text-align: left;
}

.faq-question:hover,
.faq-question.active {
    background: #444a58;
}

.faq-question span {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-light);
}

.faq-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--text-gray);
    transition: all 0.3s ease;
}

.faq-icon::before {
    width: 32px;
    height: 2px;
}

.faq-icon::after {
    width: 2px;
    height: 32px;
}

.faq-question.active .faq-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

/* Ответ — скрыт по умолчанию, без перехода */
.faq-answer {
    background: #fff;
    color: #333;
    display: none;
    /* важно: не max-height: 0 */
}

.faq-answer-content {
    padding: 24px 32px;
    font-size: 18px;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

/* ==================== CONTACTS SECTION ==================== */
.contacts-section {
    background: var(--dark-bg);
    padding: 0;
    min-height: 500px;
}

.contacts-info {
    padding-right: 40px;
}

.contacts-info h2 {
    margin-bottom: 32px;
    color: var(--text-light);
}

.contacts-info a {
    font-size: 28px;
    color: var(--primary);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.contacts-info a:hover {
    color: var(--primary-hover);
}

.contacts-info .contact-email-link {
    font-size: 15px;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 25px;
}

.contacts-details {
    font-size: 20px;
    color: var(--text-light);
    line-height: 1.8;
    font-weight: 400;
    margin-top: 32px;
}

.contacts-details strong {
    color: var(--text-light);
    font-weight: 700;
}

.contacts-map {
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.contacts-map iframe {
    width: 100%;
    height: 500px;
    border: none;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--primary);
    padding: 48px 0;
    margin-top: 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-left {
    font-size: 16px;
    color: var(--dark-bg);
}

.footer-left a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-top: 2rem;
}

.footer-left a:hover {
    color: #fff;
}

.footer-right {
    display: block;
    align-items: center;
    gap: 20px;
}

.footer-btn {
    background: var(--darker-bg);
    color: #fff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
    text-decoration: none;
}

.footer-btn:hover {
    background: #222;
    transform: translateY(-2px);
}

.footer-marketing {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
    display: block;
    transition: color 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.footer-marketing:hover {
    color: #fff;
}

/* ==================== MODAL ==================== */
.modal-content {
    background: var(--card-bg);
    border: 4px solid var(--primary);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 25px;
}

.modal-title {
    color: var(--text-light);
    font-weight: 400;
    font-size: 24px;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-control {
    background: var(--darker-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-weight: 400;
    padding: 12px 15px;
    font-size: 16px;
}

.modal-body .form-control::placeholder {
    color: var(--text-muted);
}

.modal-body .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(245, 78, 23, 0.2);
}

.modal-body textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.btn-close-white {
    filter: invert(1);
}

/* Блок справа: Контакты + Кнопка */
.navbar-right-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 150px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.contact-link:hover {
    opacity: 0.8;
    color: var(--text-light);
}

.contact-link span {
    color: var(--text-light);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .navbar-brand-logo img {
        height: 60px;
    }

    .navbar-right-group {
        align-items: center;
        margin: 20px 0;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .contact-link {
        font-size: 18px;
        margin-bottom: 5px;
    }
    .advantages-grid .card-full {
    grid-column: span 1;
}


}

@media (max-width: 768px) {
    .hero-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }

    .hero-section {
        padding-top: 80px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 30px;
    }
  

    .reviews-wrapper {
        padding: 0 40px;
    }

    .review-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }  

    .review-content {
        padding-top: 25px;
    }

    .review-nav-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 991px) {
    .navbar {
        background: rgba(20, 24, 29, 0.98) !important;
    }
    #navbarNav .navbar-nav{
        padding-bottom: 48px;
        margin-bottom: 32px;
    }
    .navbar-collapse {
        /* Ограничиваем высоту экраном минус высота шапки */
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        /* Плавная прокрутка на iOS */

        /* Позиционируем поверх контента */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        background: rgba(20, 24, 29, 0.98) !important;
        border-radius: 0 0 10px 10px;
        z-index: 1000;
        padding: 15px 20px 30px;
        /* Добавляем отступ снизу, чтобы последний пункт не прилипал к краю */
        margin-top: 0;
    }

    /* Кастомный скроллбар для меню */
    .navbar-collapse::-webkit-scrollbar {
        width: 4px;
    }

    .navbar-collapse::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .navbar-collapse::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 2px;
    }

    .nav-link {
        margin: 8px 0;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-contact {
        align-items: center;
        margin: 15px 0;
    }

    .hero-title {
        font-size: 32px;
    }
 

    .hero-services {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .portfolio-item {
        height: auto;
        max-height: 160px;
    }

    .process-center {
        min-height: 620px;
    }

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantages-grid .card-wide {
        grid-column: span 1;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 150px);
    }

    .process-left,
    .process-right {
        display: none;
    }

    .contacts-info {
        padding-right: 0;
        margin-bottom: 64px;
    }

    .contacts-section {
        padding-top: 64px;
    }

    .contacts-map {
        margin-bottom: 64px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 32px;
        margin-top: 48px;
    }

    .hero-stats {
        margin-top: 32px;
    }

    .stat-item {
        margin-top: 16px;
    }

    .btn-outline-custom {
        margin-right: 0;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 27px;
    }

    .process-flow {
        width: 350px;
        height: 391px;
        background: url('../images/steps-mob.png') no-repeat 0 0;
        display: block;
        padding: 1.5rem 0 0 0;
    }

    .process-flow .process-row:first-child {
        margin: 0;
    }

    .process-row {
        display: block;
        margin: 0;
    }

    .process-row .process-step {
        margin-bottom: 2.25rem;
        margin-left: 5rem;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 400px);
    }

    .calculator-box {
        padding: 25px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

   

    .review-name {
        font-size: 20px;
    }

    .review-text {
        font-size: 14px;
    }

    #scrollTopBtn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (min-width:992px) and (max-width:1199px) {
    .btn-outline-custom {
        margin-right: 0;
        padding: 20px 30px;
    }

    .advantages-grid {
        gap: 54px;
    }

    .process-center {
        padding: 48px 32px;
    }

    .contact-link span {
        font-size: 11px;
    }

    .nav-link {
        margin: 0 4px;
        font-size: 14px;
        padding: 8px 6px !important;
    }

    .navbar-right-group {
        min-width: auto;
        gap: 6px;
    }

    .contact-link {
        font-size: 14px;
    }

    .contact-link svg {
        width: 16px;
        height: 16px;
    }

    .btn-primary-custom {
        padding: 6px 12px;
        font-size: 11px;
    }

    .brand-main {
        font-size: 24px;
    }
    .hero-content {
        max-width: 950px;
    }
}

@media (min-width:1200px) and (max-width:1439px) {
    .contact-link span {
        font-size: 16px;
    }
}

@media (min-width:992px) and (max-width:1679px) {
    .process-flow {
        width: 350px;
        height: 391px;
        background: url('../images/steps-mob.png') no-repeat 0 0;
        display: block;
        padding: 1.5rem 0 0 0;
    }

    .process-flow .process-row:first-child {
        margin: 0;
    }

    .process-row {
        display: block;
        margin: 0;
    }

    .process-row .process-step {
        margin-bottom: 2.25rem;
        margin-left: 5rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ==================== MODAL STYLES ==================== */

/* Стили для текста политики внутри модального окна */
#privacyModalContent {
    font-size: 16px;
    line-height: 1.6;
    color: #ccc;
    /* Светло-серый текст для темной темы */
}

#privacyModalContent h1,
#privacyModalContent h2,
#privacyModalContent h3,
#privacyModalContent h4,
#privacyModalContent h5 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

#privacyModalContent p {
    margin-bottom: 1rem;
}

#privacyModalContent ul,
#privacyModalContent ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#privacyModalContent a {
    color: var(--primary);
    text-decoration: underline;
}

/* Принудительная высота для модального диалога, чтобы появился скроллбар */
.modal-dialog-scrollable .modal-content {
    max-height: 85vh;
    /* Высота экрана */
}

/* Кастомизация скроллбара для Webkit (Chrome/Safari) */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

.modal-body::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Form messages */
#orderFormMessage {
    font-size: 14px;
    padding: 10px 15px;
    border-radius: 4px;
}

#orderFormMessage.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid #28a745;
    color: #28a745;
}

#orderFormMessage.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* reCAPTCHA centering */
.g-recaptcha {
    margin: 0 auto;
}

/* Form messages */
#orderFormMessage {
    font-size: 14px;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
}

#orderFormMessage.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid #28a745;
    color: #28a745;
}

#orderFormMessage.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #dc3545;
}

.grecaptcha-badge {
    position: absolute;
    right: 100000px !important;
    display: none !important;
}