/* ==================== 1. Базові стилі та підключення шрифтів ==================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Tektur:wght@400;900&display=swap');

html {
    box-sizing: border-box;
    font-size: 120%;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
}

/* ==================== 2. Загальні елементи ==================== */
.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Tektur', sans-serif;
    font-weight: 900;
    margin: 0;
    color: #fff;
}

p {
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Глобальні стилі для кнопок, що використовуються в різних секціях */
.cta-button,
.hero-cta-button,
.all-services-button,
.all-projects-button,
.contact-form button {
    font-family: 'Tektur', sans-serif;
    background: #f67828;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    white-space: nowrap;
}

.cta-button:hover,
.hero-cta-button:hover,
.all-services-button:hover,
.all-projects-button:hover,
.contact-form button:hover {
    background: #ff9147;
    box-shadow: 3px 9px 8px rgba(246, 120, 40, 0.5);
}

/* ==================== 3. Основні секції ==================== */
main {
    padding-top: 85px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.25rem;
    color: #fff;
}

/* Секція "Про нас" (з іконками) */
.about .features-grid,
.services .service-list,
.contacts .contact-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-item,
.service-item,
.contact-info-block {
    text-align: center;
}

.feature-item h3 {
    color: #fff;
}

.feature-item p {
    color: #ccc;
    font-size: 0.9rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #ccc;
    font-size: 1rem;
}

.service-list li i {
    margin-right: 10px;
    color: #f67828;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #222;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
}

.contact-form textarea {
    resize: vertical;
}

/* Кнопки "Всі послуги/проекти" */
.all-services-button,
.all-projects-button {
    display: block;
    margin: 50px auto 0;
}

/* Контактна секція */
.contacts {
    background-color: #000;
    color: #fff;
    padding: 80px 0;
}

.contacts .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    color: #ccc;
}

/* ==================== Секція "Як нас знайти?" ==================== */
.find-us-section {
    width: 100%;
    background-color: #f67828;
    color: #fff;
    text-align: center;
    padding: 40px 0 0;
    margin: 0;
}

.find-us-section h2 {
    font-size: 2.25rem;
    color: #fff;
    margin-bottom: 40px;
}

.map-container {
    width: 100%;
    margin: 0 auto;
    padding-bottom: 40px;
}

.map-container iframe {
    width: 100%;
    height: 50vh;
    border: 0;
    display: block;
}

/* ==================== 4. Перемикач мови ==================== */
.lang-switcher {
    position: fixed;
    top: 25%;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-color: rgba(44, 62, 80, 0.7);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.lang-link {
    padding: 10px;
    font-family: 'Tektur', sans-serif;
    font-size: 1rem;
    text-align: center;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-link:last-child {
    border-bottom: none;
}

.lang-link.active {
    background-color: #f67828;
    color: #fff;
    font-weight: bold;
}

.lang-link:hover {
    background-color: #f67828;
    color: #fff;
}

/* ==================== REVIEWS SECTION STYLING (Оновлена) ==================== */
.reviews-section {
    padding: 80px 0;
    text-align: center;
    background-color: #000;
    color: #fff;
}

.reviews-section .section-title {
    margin-bottom: 40px;
    font-size: 2em;
    color: #fff;
}

.reviews-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    /* Видалено зайвий відступ для мобільних */
    padding: 0 15px; 
}

@media (min-width: 992px) {
    .reviews-content-wrapper {
        gap: 60px;
    }
}

.reviews-rating-block {
    flex: 1;
    max-width: 400px;
    padding: 20px;
    text-align: center; /* Центруємо текст */
}

.rating-box {
    padding: 20px;
}

.rating-box h3 {
    font-family: 'Tektur', sans-serif;
    font-weight: 900;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.rating-score {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5em;
    color: #f67828;
    margin-bottom: 5px;
}

.rating-score .total-rating {
    font-size: 1.2em;
    color: gold;
}

.rating-box p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9em;
    color: #ccc;
    margin-bottom: 15px;
}

.google-review-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: transparent;
    border: 2px solid #f67828;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    gap: 10px;
}

.google-review-btn:hover {
    background-color: #f67828;
}

.reviews-carousel-wrapper {
    flex: 2;
    max-width: 700px;
    position: relative;
    display: flex;
    align-items: center;
}

.reviews-container {
    display: flex;
    gap: 20px;
    overflow-x: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    /* Видалено фіксовані відступи, щоб дозволити каруселі займати всю ширину */
    padding: 0;
}

.review-card {
    background-color: #222;
    padding: 20px;
    border-radius: 12px;
    min-width: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.review-avatar {
    position: relative;
    width: 50px;
    height: 50px;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.google-icon {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: #fff;
    color: #4285F4;
    border-radius: 50%;
    padding: 2px;
    font-size: 0.8rem;
}

.review-author {
    display: flex;
    flex-direction: column;
}

.review-author h4 {
    margin: 0;
    font-family: 'Tektur', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: #fff;
}

.review-author p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8em;
    color: #aaa;
    margin: 0;
}

.review-rating-stars {
    color: gold;
    font-size: 0.50rem;
    margin-bottom: 10px;
}

.review-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    color: #ccc;
    line-height: 1.6;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5em;
    transition: background 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    .reviews-content-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 0 15px; /* Забезпечуємо відступи на мобільних, щоб контент не прилипав до країв */
    }

    .reviews-rating-block {
        text-align: center;
        max-width: 100%;
    }

    .reviews-carousel-wrapper {
        width: 100%; /* Забезпечуємо, що карусель займає всю ширину */
        max-width: 100%;
    }

    .reviews-container {
        padding: 0;
    }

    .carousel-btn {
        display: none;
    }
}

/* ==================== 5. Адаптивність ==================== */
@media (max-width: 991px) {
    .cta-button {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    /* Стилі для перемикача мови на мобільних пристроях */
    .lang-switcher {
        right: 10px;
    }

    .lang-link {
        font-size: 1.2rem;
        padding: 12px;
    }

    /* Стилі для футера на мобільних пристроях */
    .footer-contacts .contacts-wrapper {
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        align-items: center;
    }

    .footer-contacts .contact-card {
        min-width: unset;
    }
}
