:root {
    --primary-blue: #0f2d59;
    --accent-blue: #1d4ed8;
    --graphite-dark: #1f2937;
    --graphite-light: #f3f4f6;
    --white: #ffffff;
    --orange-accent: #ea580c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

body {
    color: var(--graphite-dark);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ЛОГІКА КЕРУВАННЯ ВІДОБРАЖЕННЯМ МОВ */
body.lang-ua .pl-text { display: none !important; }
body.lang-ua .ua-text { display: block; }

body.lang-pl .ua-text { display: none !important; }
body.lang-pl .pl-text { display: block; }

/* ШАПКА САЙТУ */
.header {
    background-color: var(--primary-blue);
    color: var(--white);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* НОВИЙ СТИЛІЗОВАНИЙ ЛОГОТИП EXIM */
.logo {
    font-size: 26px;
    font-weight: 800; /* Максимально жирний */
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
}

/* Перша частина (Колір залежить від фону шапки) */
.logo .logo-ex {
    color: #ffffff !important; /* Якщо шапка темна — залишаємо білим. Якщо шапка світла — замініть на #0f2d59 */
}

/* Друга частина — яскравий блакитний акцент */
.logo .logo-im {
    color: #24A1DE !important; 
}

.nav {
    display: flex;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover { color: #93c5fd; }

.lang-switcher button {
    background: transparent;
    border: 1px solid var(--white);
    color: var(--white);
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    margin-left: 5px;
    transition: all 0.3s;
}

.lang-switcher button.active, .lang-switcher button:hover {
    background-color: var(--white);
    color: var(--primary-blue);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #111827 100%);
    color: var(--white);
    padding: 180px 0 120px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 46px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-content h1 span {
    color: #60a5fa;
}

.hero-content p {
    font-size: 19px;
    max-width: 850px;
    margin: 0 auto 35px auto;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-tg { background-color: #22c55e; color: var(--white); }
.btn-tg:hover { background-color: #16a34a; }
.btn-secondary { background-color: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-secondary:hover { background-color: var(--white); color: var(--primary-blue); }

/* БЛОК МАГАЗИНІВ */
.platforms { padding: 80px 0; background-color: var(--white); }
.section-title { text-align: center; font-size: 32px; margin-bottom: 50px; color: var(--primary-blue); }

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.platform-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    position: relative;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s, box-shadow 0.3s;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.main-platform { border-top: 4px solid var(--orange-accent); }
.bonus-platform { border-top: 4px solid var(--accent-blue); background-color: var(--graphite-light); }

.platform-badge {
    position: absolute; top: 15px; right: 15px;
    padding: 4px 10px; font-size: 12px; font-weight: bold; border-radius: 20px;
}
.class-pl-badge { background-color: #ffedd5; color: var(--orange-accent); }
.class-eu-badge { background-color: #e0f2fe; color: var(--accent-blue); }

.platform-badge-bonus {
    position: absolute; top: 15px; right: 15px;
    background-color: #dbeafe; color: var(--accent-blue);
    padding: 4px 10px; font-size: 12px; font-weight: bold; border-radius: 20px;
}

.platform-icon { font-size: 45px; color: var(--primary-blue); margin-bottom: 20px; }
.platform-card h3 { font-size: 22px; margin-bottom: 12px; }

/* ПЕРЕВАГИ */
.about { padding: 80px 0; background-color: var(--graphite-light); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: var(--white); padding: 40px 30px; border-radius: 8px; text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.card-icon { font-size: 40px; color: var(--accent-blue); margin-bottom: 20px; }
.card h3 { margin-bottom: 15px; font-size: 20px; }

/* КРОКИ */
.steps { padding: 80px 0; background-color: var(--white); }
.steps-flow { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.step { flex: 1; min-width: 200px; background: var(--graphite-light); padding: 25px; border-radius: 6px; text-align: center; }
.step-num { width: 40px; height: 40px; background-color: var(--primary-blue); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; margin: 0 auto 15px auto; }

/* КОНТАКТИ */
.contacts { padding: 80px 0; background-color: var(--graphite-light); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contacts-info p { font-size: 18px; margin-bottom: 15px; }
.contacts-info i { color: var(--accent-blue); margin-right: 10px; width: 20px; }
.phones { margin: 25px 0; }
.phone-link { display: block; font-size: 20px; color: var(--primary-blue); text-decoration: none; font-weight: bold; margin-bottom: 10px; }
.social-icons a { font-size: 30px; margin-right: 20px; color: var(--graphite-dark); transition: color 0.3s; }
.social-icons a:hover { color: var(--accent-blue); }
.map-container { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }

/* ФУТЕР */
.footer { background-color: var(--graphite-dark); color: var(--white); text-align: center; padding: 20px; font-size: 14px; }

/* АДАПТИВНІСТЬ */
@media (max-width: 768px) {
    .header-container { flex-direction: column; height: auto; padding: 15px; }
    .nav { margin: 15px 0; text-align: center; }
    .nav a { margin: 5px 10px; display: inline-block; }
    .hero { padding: 220px 0 60px 0; }
    .hero-content h1 { font-size: 30px; }
    .hero-buttons { flex-direction: column; gap: 10px; padding: 0 20px; }
    .contacts-grid { grid-template-columns: 1fr; }
    .steps-flow { flex-direction: column; }
}

/* Рядок з номером та іконками */
.phone-inline-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.phone-inline-row .phone-link {
    margin-bottom: 0 !important;
}

/* Блок з іконками месенджерів */
.messenger-icons-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Круглі кнопки-кружечки (як на екрані смартфона) */
.messenger-icons-inline a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.12); 
}

/* ЖОРСТКИЙ ФІКС: робимо самі логотипи всередині чисто білими та центруємо їх */
.messenger-icons-inline a i {
    color: #ffffff !important;    /* Тільки білий колір значка! */
    margin: 0 !important;         /* Скидаємо глобальний відступ сайту */
    width: auto !important;       /* Скидаємо глобальну ширину значка */
    font-size: 20px !important;   /* Акуратний розмір логотипу всередині круга */
    display: inline-block !important;
}

/* Фірмові кольори для фону кружечків */
.messenger-icons-inline a.icon-tg { background-color: #24A1DE !important; } /* Telegram */
.messenger-icons-inline a.icon-vb { background-color: #7360f2 !important; } /* Viber */
.messenger-icons-inline a.icon-wa { background-color: #25D366 !important; } /* WhatsApp */

/* Плавне збільшення при наведенні курсора */
.messenger-icons-inline a:hover {
    transform: scale(1.1);
}

/* Підказка під рядком */
.messenger-note {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-top: 5px;
    font-style: italic;
    font-weight: 500;
}

/* Стилізація клікабельної адреси */
.address-map-link {
    color: var(--graphite-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.address-map-link:hover {
    color: var(--accent-blue);
}

/* Нова кнопка побудови маршруту */
.btn-route {
    display: inline-block;
    background-color: #ffffff;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-route:hover {
    background-color: var(--primary-blue);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 45, 89, 0.2);
}

/* Стилізація головної кнопки Viber у Hero-блоці */
.btn-vb {
    background-color: #7360f2 !important; /* Фірмовий колір Viber */
    color: #ffffff !important;
    transition: all 0.2s ease;
}

.btn-vb:hover {
    background-color: #5b4ae3 !important; /* Трохи темніший при наведенні */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115, 96, 242, 0.3);
}

/* Стилізація блоку електронної пошти */
.email-block {
    margin-top: 15px;
    display: block;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #1f2937; /* Темно-графітовий колір для тексту */
    font-size: 18px;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Примусовий фікс кольору для значка конверта */
.email-link i {
    color: var(--primary-blue) !important;
    font-size: 18px !important;
    margin: 0 !important;
    width: auto !important;
}

.email-link:hover {
    color: var(--accent-blue);
}

/* =========================================
   ВИПРАВЛЕННЯ ШАПКИ ДЛЯ МОБІЛЬНИХ ТЕЛЕФОНІВ
   ========================================= */
@media (max-width: 768px) {
    .header-container {
        display: flex;
        flex-wrap: wrap; /* Дозволяємо елементам переноситися на новий рядок */
        justify-content: space-between; /* Логотип зліва, мови справа */
        align-items: center;
        padding: 10px 15px;
    }

    .nav {
        width: 100%; /* Меню займає 100% ширини екрана */
        order: 3; /* Примусово опускаємо меню на другий поверх (під лого і мови) */
        margin-top: 15px;
        display: flex;
        justify-content: center; /* Центруємо пункти меню */
        flex-wrap: wrap; /* Дозволяємо пунктам меню переноситися на нові рядки, якщо не влазять */
        gap: 12px; /* Відстань між пунктами меню */
    }

    .nav a {
        font-size: 14px; /* Трохи зменшуємо шрифт для акуратності на телефоні */
        padding: 5px;
        margin: 0;
    }
}