/* --- 1. ЗАГАЛЬНІ СТИЛІ --- */
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f7fa;
    color: #222;
}

.container {
    max-width: 1200px;
    margin: auto;
}

section {
    padding: 80px 20px;
    text-align: center;
}

h2 {
    font-size: 36px;
    margin-bottom: 40px;
}

/* --- 2. НАВІГАЦІЯ --- */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    font-family: 'Comfortaa', sans-serif;
}

.logo span {
    color: #2f6fed;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: #222;
    font-size: 16px;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #2f6fed;
}

/* --- 3. HERO СЕКЦІЯ (Головна) --- */
.hero {
    height: 750px;
    background: url("background2.png") center/cover no-repeat;
    display: flex;
    align-items: center; 
    justify-content: flex-start;
    padding-top: 80px; 
}

.hero .container {
    max-width: 800px;
    margin-left: 0; 
    padding-left: 80px;
    text-align: left;
}

.hero h1 {
    font-size: 50px;
    font-weight: bold;
    color: #333;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    color: #666;
    max-width: 500px;
    margin-top: 20px;
}

.buttons {
    margin-top: 60px;
    display: flex;
    gap: 20px;
}

.buttons button {
    padding: 16px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border: none;
    transition: 0.3s;
}

.buttons button:first-child {
    background: #2f6fed;
    color: white;
}

.buttons .secondary {
    background: white; 
    border: 2px solid #2f6fed;
    color: #2f6fed;
}

.buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

/* --- 4. СЕКЦІЯ ЦІН --- */
#prices {
    background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('background.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 100px 20px;
}

#prices .cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

#prices .card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
    min-height: 200px;
    transition: 0.3s;
}

/* --- 5. СЕКЦІЯ НАШІ РОБОТИ --- */
#works {
    background: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url("work.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 60px 20px;
}

#works .cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    max-width: 900px;
    margin: 0 auto;
}

#works .card {
    width: 100%;
    height: 480px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: 0.3s;
}

.card:hover img { transform: scale(1.1); }

/* --- 6. ОБ'ЄДНАНА СЕКЦІЯ (ПРО НАС + КОНТАКТИ) --- */
.combined-section {
    background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), 
                      url('fon3sec.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid #eee;
}

.about-content, .contact-content {
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.6;
}

.section-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(0, 123, 255, 0.3), transparent);
    margin: 50px auto;
    width: 60%;
}

/* Контакти та Форма */
.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.link-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.blue-icon {
    width: 20px;
    height: 20px;
}

.blue-text {
    color: #007bff !important;
    text-decoration: none !important;
    font-weight: bold;
}

.blue-text:visited { color: #007bff !important; }

#form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 450px;
    margin: auto;
}

input, textarea {
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
}

#form button {
    padding: 15px;
    background: #2f6fed;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* --- 7. АДАПТИВНІСТЬ (MOBILE) --- */
@media screen and (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 15px; }
    
    .hero {
        padding: 120px 20px 80px 20px;
        text-align: center;
        background-position: 25% center; /* Монітор ховається вправо */
        height: auto;
    }

    .hero .container { padding-left: 0; margin: 0 auto; text-align: center; }
    .hero h1 { font-size: 30px !important; }
    .buttons { flex-direction: column; align-items: center; }
    .buttons button { width: 100%; max-width: 300px; }

    #prices .cards, #works .cards { grid-template-columns: 1fr !important; }
    #works .card { height: 300px; }

    /* Адаптація об'єднаної секції */
    .combined-section {
        background-position: 20% center !important; /* Монітор ховається вправо */
        background-attachment: scroll !important;
        background-image: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)), 
                          url('fon3sec.png') !important;
        padding: 40px 15px !important;
    }

    .contact-links {
        flex-direction: column;
        gap: 12px;
    }

    .divider { display: none; }
}
/* ПОВНЕ ЦЕНТРУВАННЯ ЗАГОЛОВКІВ В ОБ'ЄДНАНІЙ СЕКЦІЇ */
.combined-section h2 {
    width: 100%;            /* Заголовок займає всю ширину */
    text-align: center;     /* Текст стає по центру */
    display: flex;          /* Допомагає, якщо всередині є span */
    justify-content: center; /* Центрує вміст всередині флекс-контейнера */
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

/* Додатково центруємо контейнери, щоб вони не притискалися вліво */
.about-content, .contact-content {
    display: block;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

/* Якщо заголовки загорнуті в span.blue-text */
.combined-section h2 .blue-text {
    text-align: center;
    width: 100%;
}
/* Встановлюємо початковий стан для оверлею (темний фон) */
#works .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Темна "плівка" за замовчуванням */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease; /* Плавність зміни */
    opacity: 1; /* Оверлей видимий відразу */
}

/* Ефект при наведенні на картку */
#works .card:hover .card-overlay {
    background: rgba(0, 0, 0, 0.1); /* Стає світлішим при наведенні */
}

/* Додатково: легке збільшення картинки для крутого вигляду */
#works .card img {
    transition: transform 0.5s ease;
}

#works .card:hover img {
    transform: scale(1.05); /* Картинка ніби наближається */
}