:root {
    --primary: #E8B56B;
    --primary-dark: #D49A4E;
    --secondary: #3A7D5F;
    --dark: #2A2A2A;
    --light: #F8F5F0;
    --gray: #7D7D7D;
    --telegram: #0088CC;
    --sand: #E8D2B0;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(232, 181, 107, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(232, 181, 107, 0.4);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-telegram {
    background-color: var(--telegram);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.btn-telegram:hover {
    background-color: #0077b5;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 136, 204, 0.5);
}

/* Updated Gradient Button */
.btn-gradient {
    background-color: var(--secondary); /* теперь используем переменную */
    color: white;
    box-shadow: 0 4px 15px rgba(58, 125, 95, 0.4);
    transition: all 0.3s ease;
    border: none;
}

.btn-gradient:hover {
    background-color: #2e6a50; /* немного темнее для hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 125, 95, 0.5);
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    color: var(--dark);
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background-color: var(--primary);
    margin: 20px auto 0;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
    font-size: 1.05rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.phone {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.phone i {
    margin-right: 8px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://xn--b1afhkubcr.xn--p1ai/static/src/_sandpat.avif') no-repeat center center/cover;
    color: white;
    padding: 200px 0 120px;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    background: rgba(255,255,255,0.1);
    padding: 15px 25px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    font-size: 1rem;
    margin-top: 5px;
}

/* Calculator Form */
.calculator {
    background-color: white;
    border-radius: 10px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 auto;
}

.calculator h3 {
    color: var(--dark);
    margin-bottom: 25px;
    font-size: 1.7rem;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--dark);
    font-size: 1.05rem;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 181, 107, 0.2);
    background-color: white;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

.form-row {
    display: flex;
    gap: 25px;
}

.form-row .form-group {
    flex: 1;
}

.bootstrap-select {
    position: relative;
}

.bootstrap-select .form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.bootstrap-select .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(232, 181, 107, 0.25);
}

.result {
    margin-top: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    display: none;
    border-left: 4px solid var(--primary);
}

.result.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin: 10px 0;
}

.guarantee-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(90, 143, 123, 0.1);
    color: var(--secondary);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-top: 15px;
    font-weight: 500;
}

.guarantee-badge i {
    margin-right: 8px;
}

.loading-spinner {
    display: none;
    margin: 10px auto;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

/* Features Section */
.features {
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 25px;
    border-radius: 10px;
    transition: all 0.4s ease;
    background-color: var(--light);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card:hover:before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.feature-card h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Materials Section */
.materials {
    background-color: var(--light);
    position: relative;
    overflow: hidden;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.material-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.material-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.material-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.material-content h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.price-tag {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 700;
    margin: 10px 0;
}

.material-content .btn {
    margin-top: auto;
}

/* Guarantee Section */
.guarantee-section {
    background: linear-gradient(to right, var(--secondary), #2e6a50);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.guarantee-content {
    max-width: 800px;
    margin: 0 auto;
}

.guarantee-section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.guarantee-section p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.guarantee-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.guarantee-badge-large {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 10px;
    min-width: 200px;
    backdrop-filter: blur(5px);
}

.guarantee-badge-large i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

/* Clients Section */
.clients {
    background-color: white;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.client-card {
    background: var(--light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.client-quote {
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.client-quote:before, .client-quote:after {
    content: '"';
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.2;
    position: absolute;
}

.client-quote:before {
    top: -20px;
    left: -10px;
}

.client-quote:after {
    bottom: -40px;
    right: -10px;
}

.client-info {
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.client-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.client-position {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background-color: var(--light);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.contact-card {
    background-color: white;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.contact-card h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    transition: color 0.3s;
    display: block;
    padding: 5px 0;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Address Suggestions */
.suggestions-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.suggestions-suggestions {
    position: absolute !important;
    width: 100% !important;
    background: white !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    z-index: 1000 !important;
    margin-top: 5px !important;
    overflow: hidden;
}

.suggestions-suggestion {
    padding: 10px 15px !important;
    color: #333 !important;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestions-suggestion:hover {
    background-color: #f8f9fa !important;
}

/* Hide DaData branding */
.suggestions-promo,
.suggestions-suggestion a[href*="dadata.ru"] {
    display: none !important;
}

/* Fix for mobile address suggestions */
.suggestions-container {
    position: relative;
    z-index: 1000;
}

.suggestions-suggestions {
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }
    
    .hero {
        padding: 180px 0 100px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .form-row {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .calculator {
        padding: 30px 20px;
    }
    
    .stats-bar, .stats {
        gap: 20px;
    }
    
    .materials-grid {
        grid-template-columns: 1fr;
    }
    
    .material-card {
        flex-direction: row;
        align-items: center;
        padding: 15px;
    }
    
    .material-image {
        width: 100px;
        height: 100px;
        border-radius: 8px;
        margin-right: 20px;
        flex-shrink: 0;
    }
    
    .material-content {
        padding: 0;
    }
    
    .material-content .btn {
        align-self: flex-start;
        margin-top: 10px;
    }

    .suggestions-suggestions {
        position: absolute !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        top: 100% !important;
        margin-top: 5px !important;
        z-index: 1001 !important;
    }
    
    .suggestions-wrapper {
        position: relative;
    }

}

@media (max-width: 576px) {
    .section {
        padding: 70px 0;
    }
    
    .hero {
        padding: 160px 0 80px;
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .material-card {
        flex-direction: column;
        text-align: center;
    }
    
    .material-image {
        width: 100%;
        height: 150px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .material-content .btn {
        align-self: center;
    }
}


.price_p {
    color: #464646;
}


@media (max-width: 1085px) {
    .nav-links li:nth-child(3), /* Гарантии */
    .nav-links li:nth-child(4) { /* Контакты */
        display: none;
    }
}

@media (max-width: 855px) {
    .nav-links li:nth-child(2) { /* Материалы */
        display: none;
    }
}


/* Для мобильного меню (гамбургера) возвращаем все пункты */
@media (max-width: 992px) {
    .nav-links.active li {
        display: block !important; /* Переопределяем скрытие для активного меню */
    }
}


/* Базовые стили шапки */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
}

/* Адаптация для планшетов */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* Промежуточные адаптации (если нужно) */
@media (min-width: 768px) and (max-width: 992px) {
    .nav-links li {
        margin-left: 15px;
    }
    
    .phone {
        font-size: 1rem;
        white-space: nowrap; /* Запрещаем перенос телефона */
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 15px;
    }
}


/* Исправление для select */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232a2a2a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    padding-right: 35px;
    color: var(--dark);
    min-height: 50px;
    -webkit-box-shadow: none;
    box-shadow: none;
    border-radius: 6px !important;
}

/* Унификация для всех полей ввода */
.form-control {
    min-height: 50px;
    font-size: 1rem;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px solid #ddd;
    width: 100%;
    background-color: #f9f9f9;
    color: var(--dark);
    transition: all 0.3s;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .form-control {
        min-height: 44px;
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    select.form-control {
        background-position: right 12px center;
        padding-right: 32px;
    }
}


.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

/* Модификация для мобильных устройств */
@media (max-width: 620px) {
    .stats-bar {
        flex-direction: row !important; /* Оставляем в строке */
        gap: 20px; /* Уменьшаем промежутки */
        margin-bottom: 30px;
        flex-wrap: nowrap;
    }
    
    .stat-item {
        padding: 10px 15px; /* Уменьшаем отступы */
        min-width: 60px; /* Фиксируем минимальную ширину */
    }
    
    .stat-label {
        display: none; /* Скрываем текст */
    }
    
    .stat-number {
        font-size: 1.8rem; /* Чуть уменьшаем цифры */
        margin-bottom: 0; /* Убираем отступ снизу */
    }
}


@media (max-width: 576px) {
    .stat-item {
        position: relative;
    }
    
    .stat-item:hover .stat-label,
    .stat-item:focus .stat-label {
        display: block;
        position: absolute;
        bottom: 100%;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0,0,0,0.8);
        color: white;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
}


/* Гарантии */
.guarantee-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.guarantee-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.guarantee-subtitle {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.guarantee-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.guarantee-card {
    background: white;
    border-radius: 10px;
    padding: 30px 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    transition: transform 0.3s ease;
}

.guarantee-card:hover {
    transform: translateY(-5px);
}

.guarantee-icon {
    font-size: 2.5rem;
    color: #4a6bff;
    margin-bottom: 20px;
}

.guarantee-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.guarantee-card p {
    color: #666;
    line-height: 1.5;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .guarantee-section {
        padding: 40px 0;
    }
    
    .guarantee-grid {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .guarantee-card {
        width: 100%;
        max-width: 100%;
        padding: 25px 20px;
    }
}