/* Основні стилі */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: 0.5ms;
    
}


body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0px auto;
    padding: 0 20px;
}

.ROT{
    margin-top: 20px;
}

/* Шапка */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Хедер-контейнер */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}


/* Паралакс на hero хедер*/
.hero {
    background: url('../img/hero/hero.JPG') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    /* Паралакс-ефект */
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Напівпрозорий шар для читабельності тексту */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    /* Текст поверх темного шару */
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 1.5s ease-out forwards; /* Анімація появи */
    transition: transform 0.3s ease, color 0.3s ease; /* Плавний перехід для ефекту при наведенні */
}

.hero h1:hover{
    transform: scale(1.05);
    color: var(--secondary-color);
}

.hero p {
    font-size: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/*Анімація появи тексту*/
@keyframes fadeInUp{
    0%{
        opacity: 0;
        transform: translateY(40px);
    }
    100%{
        opacity: 1;
        transform: translateY(0);
    }
}




/* Адаптивність для менших екранів */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 45px;
    }

    .hero p {
        font-size: 23px;
    }
}
    /* Вимикаємо паралакс на мобільних для кращої продуктивності */
    /*
    .hero {
        background-attachment: scroll;
    }/*





/* Логотип */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    
}

.title1 {
    color: white;
    font-size: 24px;
    font-weight: bold;
    line-height: 40px;
    text-decoration: none;
    align-items: center;
    position: relative;
    bottom: 11px;
}

.a1{
    text-decoration: none;
}

/* Бургер-кнопка */
.burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 100;
}

.burger-line {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Навігація */
.main-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    font-size: 18px;
}

.main-nav li {
    margin: 0 60px 0 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* Мобільна версія */
@media (max-width: 768px) {
    .burger-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 99;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .main-nav li {
        margin: 0;
    }

    /* Анімація бургера */
    .burger-btn.active .burger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .burger-btn.active .burger-line:nth-child(2) {
        opacity: 0;
    }

    .burger-btn.active .burger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Герой секція */
/*
.hero {
    color: white;
    text-align: center;
    padding: 180px 0 100px;
    margin-top: 10px;
}

.hero h1 {
    font-size: 60px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 35px;
    max-width: 700px;
    margin: 0 auto;
}
*/


/* Секція "Про нас" */
.about-section {
    padding: 80px 0;
    background-color: var(--light-color, #f9f9f9);
}

.about-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--primary-color, #333);
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
    color: #333;
}

.about-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.about-image__item {
    position: relative;
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.about-image__item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.about-image__item img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.about-image__name {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color, #333);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .about-text {
        text-align: center;
    }

    .about-image {
        flex-direction: column;
        align-items: center;
    }

    .about-image__item {
        max-width: 200px;
    }

    .about-image__item img {
        height: 250px;
    }

    .about-section h2 {
        font-size: 28px;
    }

    .about-text p {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .about-section {
        padding: 50px 0;
    }

    .about-section h2 {
        font-size: 24px;
    }

    .about-text p {
        font-size: 14px;
    }

    .about-image__item {
        max-width: 150px;
    }

    .about-image__item img {
        height: 200px;
    }

    .about-image__name {
        font-size: 16px;
    }
}


/* Секція "Наші проекти" */
.projects-section {
    padding: 80px 0;
}

.projects-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--primary-color);
}

.projects-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-link{
    display: inline-block;
    padding: 10px 10px 10px;
    margin: 20px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.project-link:hover{
    background-color: var(--primary-color);
}

.filter-btn {
    padding: 10px 20px;
    background-color: var(--light-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--secondary-color);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card h3 {
    padding: 0 20px;
    margin: 15px 0 10px;
    font-size: 22px;
}

.project-card p {
    padding: 0 20px 20px;
    color: #666;
}

/* Слайдер "до/після" */
.before-after-slider {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 500px;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    touch-action: none;
}

.before-after-slider .before,
.before-after-slider .after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.before-after-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.before-after-slider .after {
    width: 50%;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    z-index: 11;
    transform: translate(-50%, -50%);
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    touch-action: none;
    user-select: none;
}

.slider-button:hover {
    background: #f0f0f0;
}

.slider-button:active {
    cursor: grabbing;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Секція "Контакти" */
.contact-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
    color: var(--primary-color);
}

.contact-content {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-info {
    text-align: center;
    font-size: 18px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-form {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form label {
    font-weight: 600;
    color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.contact-form button:hover {
    background-color: var(--primary-color);
}

/* Підвал */
footer {
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    padding: 25px 0;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.social-links img {
    width: 30px;
    height: 30px;
}

/* Кнопка до початку сторінки */
.to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Адаптивність */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .before-after-slider {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .before-after-slider {
        height: 200px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }
}