:root {
    --primary: #4a80f0;
    --primary-dark: #3a6bd0;
    --secondary: #ff6b6b;
    --dark: #2d3748;
    --light: #f8f9fa;
    --gray: #e2e8f0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 128, 240, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 128, 240, 0.3);
}

.section-title {
    position: relative;
    margin-bottom: 60px;
    text-align: center;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
}

.navbar {
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: white !important;
    position: fixed;
}

.navbar-brand img {
    height: 50px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover:after {
    width: 100%;
}

.about {
    background: url('/static/images/first-block-bg.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 120px 0;
    text-align: center;
}

.feature-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    border: 1px solid var(--gray);
}

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

.feature-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.calculator-box {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.form-control {
    height: 50px;
    border-radius: 5px;
    border: 1px solid var(--gray);
}

.form-control:focus {
    box-shadow: none;
    border-color: var(--primary);
}

.product-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    margin-bottom: 30px;
}

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

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-body {
    padding: 20px;
    background: white;
}

.price-tag {
    color: var(--primary);
    font-weight: 700;
    font-size: 20px;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.testimonial-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 30px;
}

.testimonial-card:after {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 60px;
    color: var(--gray);
    font-family: serif;
    line-height: 1;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
}

.faq-card {
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.faq-header {
    background: white;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray);
}

.faq-body {
    padding: 20px;
    background: var(--light);
    display: none;
}

#map {
    height: 400px;
    width: 100%;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-links a {
    color: var(--gray);
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
    padding-left: 5px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    margin-right: 10px;
    transition: all 0.3s;
}

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

.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    border-bottom: none;
    color: white;
    border-radius: 10px 10px 0 0 !important;
}

.modal-title {
    font-weight: 700;
}

.close {
    color: white;
    opacity: 1;
}

/* Calculator Styles */
.calculator-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.calculator-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
    padding: 30px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculator-header h2 {
    font-weight: 700;
    color: var(--dark);
}

.calculator-header p {
    color: #6c757d;
}

.calculator-step {
    margin-bottom: 30px;
}

.calculator-step h5 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

.calculator-step .help-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.range-slider-container {
    margin-bottom: 20px;
}

.range-slider-value {
    font-weight: 600;
    color: var(--primary);
}

.area-display {
    background: var(--light);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 20px;
}

.area-display h4 {
    font-weight: 700;
    color: var(--dark);
}

.area-display .value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.checkbox-option {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 5px;
}

.checkbox-option:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-option input:checked ~ .checkmark {
    background-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-option input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-option .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.radio-option {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.radio-mark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border-radius: 50%;
}

.radio-option:hover input ~ .radio-mark {
    background-color: #ccc;
}

.radio-option input:checked ~ .radio-mark {
    background-color: var(--primary);
}

.radio-mark:after {
    content: "";
    position: absolute;
    display: none;
}

.radio-option input:checked ~ .radio-mark:after {
    display: block;
}

.radio-option .radio-mark:after {
    top: 9px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.result-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
}

.result-box h3 {
    font-weight: 700;
    margin-bottom: 20px;
}

.result-price {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.result-note {
    font-size: 14px;
    opacity: 0.9;
}

.irs--round .irs-bar {
    background-color: var(--primary);
}

.irs--round .irs-handle {
    border: 4px solid var(--primary);
}

.irs--round .irs-from, .irs--round .irs-to, .irs--round .irs-single {
    background-color: var(--primary);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .calculator-section {
        padding: 40px 0;
    }
}

.area-display {
    margin-top: 20px;
    text-align: center;
}

.area-display h5 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.area-visualization-container {
    width: 100%;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: auto;
}

.area-visualization {
    position: relative;
    width: 100%;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.area-shape {
    position: relative;
    width: 120px; /* Начальная ширина */
    height: 90px;  /* Начальная высота (3/4 от ширины) */
    border: 2px solid #007bff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 123, 255, 0.05);
    transition: all 0.3s ease;
    margin: 20px;
}

.area-value {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    text-align: center;
}

.dimensions {
    position: absolute;
    width: 100%;
    height: 100%;
}

.length-dimension {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
}

.width-dimension {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    white-space: nowrap;
}

/* Стили для ползунков */
.form-range {
    width: 100%;
    height: 1.5rem;
    padding: 0;
    background-color: transparent;
    -webkit-appearance: none;
}

.form-range:focus {
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    margin-top: -0.25rem;
    background-color: #007bff;
    border: 0;
    border-radius: 1rem;
    transition: background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-range::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    background-color: #007bff;
    border: 0;
    border-radius: 1rem;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 0.5rem;
    color: transparent;
    cursor: pointer;
    background-color: #dee2e6;
    border-radius: 1rem;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 0.5rem;
    color: transparent;
    cursor: pointer;
    background-color: #dee2e6;
    border-radius: 1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.contact-item h6 {
    color: #0066cc;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-control {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0055aa;
}

#contactsModal {
    overflow: hidden;
}

.h5-contact {
    background-color: #fff;
    color: var(--dark);
}

.testimonial-image {
    max-height: 360px;
    border-radius: 60px;
    width: 310px;
}

.preview-video {
    position: relative;
    width: 100%;
    max-width: 600px; /* можно регулировать по необходимости */
    height: 320px;
    padding-bottom: 56.25%; /* 16:9 соотношение сторон */
    overflow: hidden;
    background: url('/static/images/1.jpg') center center / cover no-repeat;
    border-radius: 8px; /* опционально - скругление углов */
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: url('/static/images/play.png') center center / contain no-repeat;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.irs--flat .irs-handle.state_hover>i:first-child, .irs--flat .irs-handle:hover>i:first-child {
    background-color: white;
}


.irs--flat .irs-from:before, .irs--flat .irs-to:before, .irs--flat .irs-single:before {
    background-color: var(--primary);
    border-top-color: var(--primary);
}

.irs--flat .irs-bar {
    background-color: var(--primary)
}

.irs--flat .irs-from, .irs--flat .irs-to, .irs--flat .irs-single {
    background-color: var(--primary)
}


.irs--flat .irs-from:before, .irs--flat .irs-to:before, .irs--flat .irs-single:before {
    background-color: var(--primary)
}

.irs--flat .irs-handle>i:first-child {
    background-color: var(--primary)
}

.h-footer {
    text-align: right;
}

.nav-link.active {
    color: var(--primary) !important;
}

.nav-link.active::after {
    width: 100% !important;
}

.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    display: none;
    font-size: 16px;
}

.works-slider {
        transition: all 0.3s ease;
}
.btn-group .btn {
    padding: 10px 25px;
    font-size: 16px;
}
.btn-group .btn.active {
    background-color: #0056b3;
    border-color: #0056b3;
}
.video-card {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card {
    transition: transform 0.3s ease;
}

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

.works-slider {
    transition: all 0.3s ease;
}

.btn-group .btn {
    padding: 10px 25px;
    font-size: 16px;
}

.btn-group .btn.active {
    background-color: #0056b3;
    border-color: #0056b3;
}

.video-card {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.product-card {
    transition: transform 0.3s ease;
}

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

.photo-item {
    display: block;
}

#load-more-container {
    display: none;
}

.modal-backdrop.show {
    opacity: 0.85 !important;
}

#imageModal .modal-content {
    background-color: transparent;
    box-shadow: none;
}

#imageModal .modal-body {
    padding: 0;
    text-align: center;
}

#prevBtn, #nextBtn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#prevBtn:hover, #nextBtn:hover {
    opacity: 1;
}

.modal-backdrop {
    opacity: 0;
    width: 0;
    height: 0;
}

#modalImage {
    transition: opacity 0.3s ease;
}

.w-100 {
    width: 200% !important;
}

#imageModal .modal-dialog {
    max-width: 90%;
    height: 90vh;
}

#imageModal .carousel-item {
    height: 100%;
    text-align: center;
    background-color: #000;
}

#imageModal .carousel-item img {
    max-height: 90vh;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
}

#imageModal .carousel-inner {
    height: 100%;
}

#imageModal .carousel {
    height: 100%;
}

.carousel-control-prev, .carousel-control-next {
    width: 8%;
    opacity: 1;
    background-color: rgba(0,0,0,0.3);
}
.carousel-control-prev:hover, .carousel-control-next:hover {
    background-color: rgba(0,0,0,0.5);
}

#imageModal .carousel-control-prev,
#imageModal .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s;
}

#imageModal .carousel-control-prev:hover,
#imageModal .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

#imageModal .carousel-control-prev {
    left: 15px;
}

#imageModal .carousel-control-next {
    right: 15px;
}

#imageModal .carousel-control-prev,
#imageModal .carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s;
}

#imageModal .carousel-control-prev:hover,
#imageModal .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

#imageModal .carousel-control-prev {
    left: 15px;
}

#imageModal .carousel-control-next {
    right: 15px;
}

#imageModal .close {
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    height: 50px;
    margin-left: 0;
    top: 50%;
    background: none !important;
    box-shadow: none !important;
}

.about-card {
    background: white;
    border-top: 4px solid #4e73df;
    transition: transform 0.3s ease;
}

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

.feature-item {
    transition: all 0.3s ease;
    height: 100%;
}

.feature-item:hover {
    background: #f8f9fa !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.benefit-item {
    padding: 8px 12px;
    background-color: rgba(78, 115, 223, 0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.benefit-item:hover {
    background-color: rgba(78, 115, 223, 0.1);
}

.about-cta {
    border-top: 1px dashed #dee2e6;
    padding-top: 2rem;
}
