/* ==========================================================================
   1. БАЗОВІ СТИЛІ ТА ЗМІННІ
   ========================================================================== */
:root {
    --bg-light: #f5f5f7;
    --bg-white: #FFFFFF;
    --text-dark: #1d1d1f;
    --text-secondary: #515154;
    --accent-blue: #0071e3;
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-secondary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

/* ==========================================================================
   2. ЗАГАЛЬНІ КОМПОНЕНТИ (КНОПКИ, ЗАГОЛОВКИ)
   ========================================================================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, #0071e3, #0077ed);
    color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 7px 20px rgba(0, 113, 227, 0.3);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid #d2d2d7;
}

.btn-secondary:hover {
    background-color: #e5e5e5;
    border-color: #c7c7c7;
}

.btn-dark {
    background-color: var(--text-dark);
    color: var(--bg-white);
}

.btn-dark:hover {
    background-color: #333;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.section-title, .section-title-left {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 40px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title-left {
    text-align: left;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header .section-title {
    margin-bottom: 10px;
}
.section-header .section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ==========================================================================
   3. СТИЛІ БЛОКІВ 
   ========================================================================== */

/* --- ХЕДЕР --- */
.header-full {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.header-top {
    background-color: #f5f5f7;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    color: var(--text-secondary);
}
.header-top-content, .header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-top-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-top-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-top-info img, .header-top-social img { opacity: 0.8; }
.header-top-social a { transition: opacity 0.3s ease; }
.header-top-social a:hover { opacity: 0.7; }
.header-main {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.header-main-content { height: 70px; }
.logo { font-size: 24px; font-weight: 700; color: var(--text-dark); }
.navigation { display: block; }
.navigation ul { display: flex; gap: 40px; }
.navigation a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}
.navigation a:hover { color: var(--text-dark); }
.navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}
.navigation a:hover::after { width: 100%; }
.header-main-actions { display: flex; align-items: center; gap: 20px; }
.phone-number { font-size: 17px; font-weight: 600; color: var(--text-dark); transition: color 0.3s ease; }
.phone-number:hover { color: var(--accent-blue); }
.burger-menu {
    display: none;
    height: 21px;
    width: 30px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    z-index: 101;
}
.burger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.burger-menu.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-menu.is-active span:nth-child(2) { opacity: 0; }
.burger-menu.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- HERO БЛОК --- */
.hero-new {
    background-color: var(--bg-white);
    padding: 60px 0;
    overflow: hidden;
}
.hero-new-content { display: flex; align-items: center; justify-content: space-between; }
.hero-new-text { max-width: 500px; text-align: left; }
.hero-new-text h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 20px;
}
.hero-new-text .subtitle {
    font-size: 19px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 35px;
}
.hero-buttons { display: flex; gap: 15px; }
.hero-new-image { flex-shrink: 0; }
.hero-new-image img { max-width: 600px; display: block; }

/* --- СЕКЦІЯ СТАТИСТИКИ --- */
.stats-section { padding: 80px 0; background-color: var(--bg-white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.stat-item { text-align: center; padding: 20px; }
.stat-number { font-size: 48px; font-weight: 700; color: var(--accent-blue); margin-bottom: 10px; }
.stat-label { font-size: 18px; color: var(--text-secondary); }

/* --- СЕКЦІЯ "ЧОМУ МИ" --- */
.about-us-section-new { padding: 100px 0; background-color: var(--bg-light); }
.about-us-grid { display: grid; grid-template-columns: repeat(2, 1fr); align-items: center; gap: 80px; }
.section-subtitle-left { text-align: left; font-size: 18px; color: var(--text-secondary); margin-bottom: 40px; max-width: 500px; }
.benefits-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 30px; }
.benefits-list li { display: flex; align-items: flex-start; gap: 20px; }
.benefits-list img { width: 32px; height: 32px; flex-shrink: 0; margin-top: 5px; }
.benefits-list h4 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.benefits-list p { font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.about-us-image img { width: 100%; height: 600px; object-fit: cover; border-radius: 20px; }

/* --- СЕКЦІЯ КАЛЬКУЛЯТОРА --- */
.calculator-section { padding: 80px 0; background-color: var(--bg-white); }
.calc-step { margin-top: 40px; }
.calc-step.hidden { display: none; }
.step-title { text-align: center; font-size: 22px; font-weight: 500; color: var(--text-secondary); margin-bottom: 40px; }
.back-btn { background: none; border: none; color: var(--accent-blue); font-size: 16px; font-weight: 600; cursor: pointer; margin-bottom: 20px; }
.device-type-carousel { display: flex; justify-content: center; align-items: flex-end; gap: 40px; padding-bottom: 20px; }
.device-type-item {
    background: none; border: none; cursor: pointer; font-weight: 500; padding: 10px;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    width: 110px; gap: 10px;
}
.device-type-item img { height: 70px; transition: transform 0.3s ease; object-fit: contain; }
.device-type-item:hover img { transform: scale(1.05); }
.device-type-item span { font-size: 15px; color: var(--text-dark); }
.device-type-item.active span { color: var(--accent-blue); }
.calc-divider { border: none; height: 1px; background-color: #e5e5e5; margin: 0; }
.model-grid, .repair-grid { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 15px; }
.model-button, .repair-button {
    background-color: var(--bg-light); border: 1px solid var(--bg-light); border-radius: 10px;
    padding: 12px 20px; cursor: pointer; transition: all 0.2s ease-in-out; text-align: center;
    color: var(--text-dark); font-size: 14px; font-weight: 500;
}
.model-button:hover, .repair-button:hover {
    border-color: var(--accent-blue); color: var(--accent-blue); transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}
.result-wrapper { display: grid; grid-template-columns: 1fr 2fr; gap: 50px; align-items: center; }
.result-image img { max-width: 300px; height: auto; border-radius: 8px; }
.result-service-name { font-size: 24px; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.result-price { font-size: 40px; font-weight: 600; color: var(--text-dark); margin: 15px 0; }
.result-benefits { list-style: none; padding: 0; margin-bottom: 30px; color: var(--text-secondary); }
.result-benefits li { margin-bottom: 10px; font-size: 15px; }

/* --- СЕКЦІЯ ВІДГУКІВ --- */
.testimonials-section { padding: 80px 0; background-color: var(--bg-light); }
.slider-wrapper { position: relative; width: 100%; overflow: hidden; }
.testimonial-track { display: flex; gap: 30px; transition: transform 0.5s ease-in-out; }
.testimonial-card {
    flex: 0 0 calc(33.333% - 20px);
    background-color: var(--bg-white);
    border-radius: 20px; padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.author-info h4 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.stars { color: #ffb800; font-size: 16px; }
.author-photo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.review-text { font-size: 15px; line-height: 1.7; color: var(--text-secondary); }
.slider-controls { text-align: center; margin-top: 40px; }
.slider-btn {
    background-color: var(--bg-white); border: 1px solid #e5e5e5; width: 45px; height: 45px;
    border-radius: 50%; font-size: 24px; font-weight: bold; color: var(--text-dark);
    cursor: pointer; margin: 0 10px; transition: all 0.3s ease;
}
.slider-btn:hover { background-color: var(--accent-blue); color: var(--bg-white); border-color: var(--accent-blue); }
.slider-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- СЕКЦІЯ СПЕЦПРОПОЗИЦІЙ --- */
.special-offers-section { padding: 80px 0; background-color: var(--bg-white); }
.offers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 50px; }
.offer-card {
    background-color: var(--bg-white); border-radius: 20px; padding: 40px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.07); display: flex;
    justify-content: space-between; align-items: center;
}
.offer-content h3 { font-size: 24px; font-weight: 600; color: var(--text-dark); margin-bottom: 10px; }
.offer-content p { font-size: 16px; color: var(--text-secondary); margin-bottom: 25px; }
.offer-discount { font-size: 64px; font-weight: 700; color: var(--accent-blue); line-height: 1; flex-shrink: 0; margin-left: 20px; }

/* --- СЕКЦІЯ КОНТАКТІВ --- */
.contacts-section { padding: 80px 0; background-color: var(--bg-light); }
.contacts-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: center; }
.contacts-info { display: flex; flex-direction: column; gap: 30px; }
.contact-item { display: flex; align-items: center; gap: 20px; }
.contact-icon { width: 40px; height: 40px; }
.contact-item h4 { font-size: 18px; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.contact-item p, .contact-item a { font-size: 16px; color: var(--text-secondary); }
.contact-item a { text-decoration: underline; transition: color 0.3s ease; }
.contact-item a:hover { color: var(--accent-blue); }
.contacts-map iframe { width: 100%; height: 400px; border-radius: 12px; }

/* --- ФУТЕР --- */
.footer { padding: 40px 0; background-color: var(--text-dark); text-align: center; }
.footer p { color: var(--bg-light); font-size: 14px; }

/* --- МОДАЛЬНЕ ВІКНО --- */
.modal-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); display: flex;
    justify-content: center; align-items: center; z-index: 2000;
    opacity: 1; transition: opacity 0.3s ease;
}
.modal-wrapper.hidden { opacity: 0; pointer-events: none; }
.modal-content {
    background-color: var(--bg-white); padding: 40px; border-radius: 12px;
    width: 90%; max-width: 500px; position: relative;
    transform: scale(1); transition: transform 0.3s ease;
}
.modal-wrapper.hidden .modal-content { transform: scale(0.9); }
.modal-close {
    position: absolute; top: 15px; right: 20px; background: none;
    border: none; color: var(--text-secondary); font-size: 30px; cursor: pointer;
}
.modal-title { font-size: 28px; text-align: center; color: var(--text-dark); margin-bottom: 10px; }
.modal-text { text-align: center; margin-bottom: 30px; }
.modal-form .form-group { margin-bottom: 20px; }
.modal-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.modal-form input {
    width: 100%; padding: 12px; background-color: var(--bg-light);
    border: 1px solid #d2d2d7; border-radius: 8px;
    color: var(--text-dark); font-size: 16px;
}

/* ==========================================================================
   4. АДАПТИВНІСТЬ (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 992px) {
    /* Хедер */
    .header-top { display: none; }
    .header-main-actions, .navigation { display: none; }
    .burger-menu { display: flex; }
    .navigation {
        position: absolute; top: 70px; left: 0; width: 100%;
        background-color: var(--bg-white); box-shadow: 0 5px 10px rgba(0,0,0,0.05);
        padding: 20px 0; transform: translateY(-150%);
        transition: transform 0.4s ease-in-out; display: block;
    }
    .navigation.is-open { transform: translateY(0); }
    .navigation ul { flex-direction: column; align-items: center; gap: 0; }
    .navigation li { width: 100%; text-align: center; }
    .navigation a { display: block; padding: 15px 0; width: 100%; border-bottom: 1px solid var(--bg-light); }
    .navigation a::after { display: none; }

    /* Hero */
    .hero-new-content { flex-direction: column; text-align: center; padding: 20px 0; }
    .hero-new-text { text-align: center; margin-bottom: 40px; }
    .hero-buttons { justify-content: center; }
    .hero-new-image img { max-width: 100%; }
    
    /* Заголовки */
    .section-title, .section-title-left { font-size: 32px; }

    /* Чому ми */
    .about-us-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-us-image { order: -1; margin-bottom: 20px; }
    .about-us-image img { height: 300px; }
    .section-title-left, .section-subtitle-left { text-align: center; }

    /* Калькулятор */
    .device-type-carousel { justify-content: flex-start; overflow-x: auto; padding: 0 15px; }
    .device-type-item img { height: 60px; }

    /* Відгуки */
    .testimonial-track { gap: 20px; }
    .testimonial-card { flex: 0 0 calc(50% - 10px); }

    /* Спецпропозиції */
    .offers-grid { grid-template-columns: 1fr; }
    
    /* Контакти */
    .contacts-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .contacts-info {
        align-items: center; 
    }
    .contact-item {
        flex-direction: column; 
        text-align: center;   
        gap: 10px;            
    }
}

@media (max-width: 768px) {
    /* Статистика */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-number { font-size: 36px; }

    /* Калькулятор */
    .model-grid, .repair-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .result-wrapper { grid-template-columns: 1fr; text-align: center; }
    .result-image {
        max-width: 250px; 
        margin: 0 auto 30px; 
        display: flex; 
        justify-content: center; 
    }
    .result-service-name { font-size: 20px; }
    .result-price { font-size: 32px; }
}

@media (max-width: 576px) {
    /* Hero */
    .hero-new-text h1, .section-title, .section-title-left { font-size: 28px; }

    /* Відступи секцій */
    .stats-section, .about-us-section-new, .calculator-section, .contacts-section, .special-offers-section, .testimonials-section {
        padding: 60px 0;
    }

    /* Статистика */
    .stats-grid { grid-template-columns: 1fr; }

    /* Відгуки */
    .testimonial-card { flex: 0 0 90%; }
}