
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #93c5fd;
    --secondary: #f97316;
    --secondary-light: #fdba74;
    --accent: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --darker: #0f172a;
    --success: #10b981;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, #ea580c 100%);
}

/* Improved animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Enhanced base styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    background-color: var(--light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Topbar Styles */
.container-fluid.bg-dark {
    background: var(--darker) !important;
}

.top-bar {
    padding: 0.5rem 0;
}

.top-bar .text-white {
    color: white !important;
    margin-bottom: 0;
}

.top-bar .btn-sm-square {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.top-bar .btn-sm-square:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Navbar Styles */
.nav-bar {
    padding: 0;
}

.navbar {
    padding: 0.75rem 1rem;
}

.nav-item.nav-link {
    color: var(--dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.nav-link:hover,
.nav-item.nav-link.active {
    color: var(--primary);
}

.nav-item.nav-link:hover:after,
.nav-item.nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

.emergency-contact {
    background: var(--gradient-primary);
    border-radius: 12px;
    padding: 1rem !important;
    margin: 0.5rem 0;
}

.emergency-contact .text-white {
    color: white !important;
    margin-bottom: 0;
}

.emergency-contact h5 {
    color: white !important;
    margin-bottom: 0;
    font-weight: 600;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.4s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    border: 2px solid white;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    background: var(--primary-dark);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .top-bar .d-none.d-lg-block {
        display: none !important;
    }

    .emergency-contact {
        margin: 1rem 0;
    }

    .navbar-nav {
        text-align: center;
    }

    .nav-item.nav-link {
        padding: 0.5rem;
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.wow {
    visibility: hidden;
}

/* Image styling improvements */
.img-fluid {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Carousel images */
.owl-carousel-item .img-fluid {
    width: 100%;
    height: 100vh;
    min-height: 500px;
    object-fit: cover;
    object-position: center;
}

/* Service item images */
.service-item-top {
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-item-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-item-top .overflow-hidden {
    height: 250px;
    overflow: hidden;
}

.service-item-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-item-top:hover img {
    transform: scale(1.05);
}

/* About section images */
.about-img-container {
    position: relative;
}

.about-img-container .position-absolute {
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.about-img-container .position-absolute:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.about-img-container img:first-child {
    z-index: 1;
    padding: 0 0 50px 50px;
}

.about-img-container img:last-child {
    z-index: 2;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Team images */
.team-item {
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.team-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.team-item .position-relative {
    height: 300px;
    overflow: hidden;
}

.team-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-item:hover img {
    transform: scale(1.05);
}

/* Testimonial images */
.testimonial-item img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Video section */
.video {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.video .btn-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video .btn-play:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(1.1);
}

.video .btn-play span {
    position: relative;
    display: block;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid white;
    margin-left: 5px;
}

/* Modal video */
#modalVideo {
    width: 100%;
    height: auto;
    max-height: 70vh;
    border-radius: 8px;
}

/* Responsive adjustments for images */
@media (max-width: 992px) {
    .owl-carousel-item .img-fluid {
        height: 60vh;
    }

    .service-item-top .overflow-hidden {
        height: 200px;
    }

    .team-item .position-relative {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .owl-carousel-item .img-fluid {
        height: 50vh;
    }

    .about-img-container {
        min-height: 400px;
    }

    .about-img-container img:first-child {
        padding: 0 0 30px 30px;
    }

    .service-item-top .overflow-hidden {
        height: 180px;
    }

    .team-item .position-relative {
        height: 220px;
    }

    .video {
        height: 300px;
        margin-bottom: 2rem;
        position: relative;
        z-index: 1;
    }

    .video .btn-play {
        width: 60px;
        height: 60px;
    }

    .video .btn-play span {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 20px solid white;
    }
}

@media (max-width: 576px) {
    .owl-carousel-item .img-fluid {
        height: 40vh;
        min-height: 300px;
    }

    .about-img-container {
        min-height: 350px;
    }

    .service-item-top .overflow-hidden {
        height: 150px;
    }

    .team-item .position-relative {
        height: 200px;
    }

    .video {
        height: 250px;
        margin-bottom: 1.5rem;
        position: relative;
        z-index: 1;
    }
}

/* Loading effect for images */
img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

img[src] {
    background: none;
    animation: none;
}

/* Стили для формы */
.form-container {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    max-width: 800px;
    margin: -100px auto 0;
    position: relative;
    z-index: 10;
}

.form-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12) !important;
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
}

.form-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.4rem;
    margin-bottom: 1rem;
}

.required-field:after {
    content: '*';
    color: #dc3545;
    margin-left: 3px;
}

.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    height: 45px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.15rem rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

.input-group {
    margin-bottom: 0.8rem;
}

.input-group-text {
    border: 2px solid #e2e8f0;
    border-right: none;
    border-radius: 8px 0 0 8px !important;
    background: var(--gradient-primary);
    transition: all 0.2s ease;
    width: 45px;
    justify-content: center;
    padding: 0.6rem;
}

.input-group:focus-within .input-group-text {
    background: var(--primary-dark);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    transition: all 0.3s ease;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Секции формы */
.form-section {
    animation: fadeInUp 0.4s ease-out;
    margin-bottom: 1.2rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.form-section:last-child {
    margin-bottom: 0;
}

/* Валидация */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v2'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.15s; }
.form-section:nth-child(3) { animation-delay: 0.2s; }

/* Улучшенная адаптивность */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem !important;
        margin: -80px 0.5rem 0;
    }

    .form-title {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .form-control, .form-select {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
        height: 42px;
    }

    .input-group-text {
        width: 42px;
        padding: 0.5rem;
    }

    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .btn-primary {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .form-container {
        padding: 1.2rem !important;
        margin: -60px 0.5rem 0;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-control, .form-select {
        font-size: 0.8rem;
    }

    textarea.form-control {
        min-height: 80px;
    }
}

/* Специфические стили для элементов формы */
.construction-icon {
    color: var(--secondary);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--dark);
}

/* Плавное появление */
.form-container {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ховер эффекты для секций */
.form-section:hover {
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* Кастомный скролл для текстовой области */
textarea.form-control::-webkit-scrollbar {
    width: 6px;
}

textarea.form-control::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

textarea.form-control::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

textarea.form-control::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Booking section positioning */
.booking-section {
    position: relative;
    z-index: 5;
}

.video-container {
    position: relative;
    z-index: 1;
}

/* Footer Styles - Updated to match second version */
.bg-dark.text-light.footer {
    background: linear-gradient(to bottom, var(--darker) 0%, #000 100%) !important;
    color: white;
    padding: 6rem 0 0;
    position: relative;
    overflow: hidden;
    margin-top: 6rem;
}

.bg-dark.text-light.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--gradient-secondary);
}

.footer .btn-link {
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    display: block;
    position: relative;
    overflow: hidden;
}

.footer .btn-link:hover {
    color: var(--primary-light);
    transform: translateX(5px);
}

.footer .btn-link::before {
    content: '';
    position: absolute;
    left: -100%;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
}

.footer .btn-link:hover::before {
    left: 0;
}

.footer .btn-social {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.footer .btn-social::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.footer .btn-social:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    color: white;
}

.footer .btn-social:hover::before {
    opacity: 1;
}

.footer .btn-social i {
    transition: all 0.3s ease;
}

.footer .btn-social:hover i {
    transform: scale(1.2);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
    margin-top: 3rem;
    background: rgba(0, 0, 0, 0.3);
    padding-bottom: 2rem;
}

.copyright a {
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.copyright a:hover {
    color: var(--secondary-light);
    text-decoration: underline;
}

/* Newsletter form styles */
.footer .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
}

.footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.footer .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    color: white;
}

.footer .btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer .btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.3);
}

/* Footer section headings */
.footer h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
    font-size: 1.3rem;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* Footer contact info */
.footer p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--gray-300);
}

.footer p i {
    color: var(--primary-light);
    margin-right: 0.8rem;
    width: 20px;
    text-align: center;
}

/* Working hours styles */
.footer h6 {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Responsive adjustments for footer */
@media (max-width: 768px) {
    .bg-dark.text-light.footer {
        padding: 4rem 0 0;
        margin-top: 4rem;
    }

    .footer h4 {
        font-size: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .footer .btn-social {
        width: 40px;
        height: 40px;
    }

    .copyright {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .bg-dark.text-light.footer {
        padding: 3rem 0 0;
        margin-top: 3rem;
    }

    .footer h4 {
        font-size: 1.1rem;
    }

    .footer .btn-social {
        width: 35px;
        height: 35px;
    }

    .footer .form-control {
        padding: 0.7rem 1rem;
    }

    .footer .btn-primary {
        padding: 0.7rem 1.2rem;
    }
}

/* Additional decorative elements for footer */
.footer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    opacity: 0.03;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Animation for footer elements */
@keyframes fadeInUpFooter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer > * {
    animation: fadeInUpFooter 0.6s ease-out;
}

.footer .col-lg-3:nth-child(1) { animation-delay: 0.1s; }
.footer .col-lg-3:nth-child(2) { animation-delay: 0.2s; }
.footer .col-lg-3:nth-child(3) { animation-delay: 0.3s; }
.footer .col-lg-3:nth-child(4) { animation-delay: 0.4s; }
