/* Общие стили */
:root {
    --primary-color: #0078d7;
    --secondary-color: #f3f3f3;
    --text-color: #333;
    --accent-color: #e6f2ff;
    --border-color: #ddd;
    --success-color: #4caf50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

h2 {
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

h2:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #005baa;
}

section {
    padding: 60px 0;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Шапка сайта */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 0;
}

.logo p {
    font-size: 14px;
    color: #666;
}

.phone-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.phone-btn:hover {
    background-color: #005baa;
    color: white;
}

.phone-btn i {
    margin-right: 8px;
}

/* Баннер */
.banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/_includes/img/Brick_Wall.webp');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: white;
}

.banner p {
    font-size: 20px;
    margin-bottom: 30px;
}

.banner h2:after {
    background: white;
}

.cta-btn {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background-color: #005baa;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* О нас */
.about {
    background-color: var(--secondary-color);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 16px;
}

.benefits {
    list-style: none;
    margin-top: 20px;
}

.benefits li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.benefits li i {
    color: var(--success-color);
    margin-right: 10px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Услуги */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Наши работы */
.portfolio {
    background-color: var(--secondary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 250px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    color: white;
    font-size: 16px;
    margin: 0;
}

/* Стили для секции До/После */
.portfolio-item.before-after {
    position: relative;
    overflow: hidden;
    cursor: col-resize;
    height: 250px; /* Сохраняем высоту из ваших текущих стилей */
    background-color: #fff;
}

.comparison-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0; /* Сбрасываем радиус границ для внутренних изображений */
}

.before-image {
    left: 0;
    z-index: 1;
    clip-path: inset(0 50% 0 0);
}

.after-image {
    right: 0;
    z-index: 0;
}

.before-image img,
.after-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none; /* Отключаем анимацию из ваших текущих стилей */
    border-radius: 0; /* Сбрасываем радиус границ для изображений */
}

.portfolio-item.before-after:hover img {
    transform: none; /* Отключаем эффект масштабирования при наведении */
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: #fff;
    z-index: 2;
    transform: translateX(-2px);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.6);
}

.slider-handle:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle:before {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    font-size: 20px;
    color: #fff;
    font-weight: bold;
}

.label {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.before-image .label {
    left: 10px;
}

.after-image .label {
    right: 10px;
}

/* Добавляем стиль для заголовка внизу карточки */
.portfolio-item.before-after h3 {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item.before-after:hover h3 {
    bottom: -30px;
    opacity: 1;
}

/* Модификация сетки портфолио для учета заголовков */
.portfolio-grid {
    row-gap: 40px; /* Увеличиваем расстояние между рядами для размещения заголовков */
}

/* Стили для лайтбокса */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    margin: 0 auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 18px;
}

/* Контакты */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 50px;
}

.contact-info-block, .map-container {
    flex: 1;
    min-width: 300px;
}

.contact-info-block {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-item i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #005baa;
    transform: translateY(-3px);
}

.map-container h3 {
    margin-bottom: 15px;
}

#map {
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.feedback-form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.feedback-form h3 {
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: #005baa;
}

/* Подвал */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin: 5px 0;
}

/* Плавающая кнопка вызова */
.floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
}

.floating-button a {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: pulse 1.5s infinite;
}

.floating-button a:hover {
    background-color: #005baa;
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 120, 215, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 120, 215, 0);
    }
}

/* Медиа запросы для адаптивности */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .banner {
        padding: 70px 0;
    }
    
    .banner h2 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .portfolio-item.before-after {
        height: 200px; /* Уменьшаем высоту на мобильных */
    }
    
    .label {
        font-size: 12px;
        padding: 3px 8px;
    }
}