/* Основные настройки и переменные */
:root {
    --primary-color: #0056b3; /* Основной синий цвет */
    --secondary-color: #00a8e8; /* Светло-синий акцент */
    --accent-color: #1e3a8a; /* Темно-синий для фона партнеров */
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --font-stack: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-stack);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}

/* Утилиты */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }
.mt-20 { margin-top: 20px; }

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

h2.section-title {
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--primary-color);
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}
.btn-primary:hover { background-color: #004494; }

.btn-secondary {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}
.btn-secondary:hover { background-color: var(--white); color: var(--primary-color); }

.full-width { width: 100%; }

/* Общие стили секций */
.section {
    padding: 80px 0;
}

/* --- HEADER --- */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.logo-link img {
    max-height: 50px;
    width: auto;
    display: block;
}
.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 10px;
    line-height: 1;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 600;
    margin-left: 25px;
}
.nav-menu a:hover { color: var(--primary-color); }

.lang-switch { font-size: 14px; margin-left: 20px; }
.lang-switch a { color: var(--text-light); margin: 0 5px;}
.lang-switch a.active { color: var(--primary-color); font-weight: 700; }

.mobile-menu-toggle { display: none; font-size: 24px; cursor: pointer; }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    margin-top: 70px;
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 25, 50, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons .btn { margin-right: 15px; margin-bottom: 10px; }

/* --- УСЛУГИ --- */
.section-header { max-width: 800px; margin: 0 auto 40px; }
.section-header h2 { color: var(--primary-color); }

.countries-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.country-item {
    background: var(--white);
    border: 1px solid #eee;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.country-item i { margin-right: 8px; }

/* --- ПРЕИМУЩЕСТВА --- */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.benefit-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }

.icon-box {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.benefit-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.benefit-card p { font-size: 0.95rem; color: var(--text-light); }

/* --- ПАРТНЕРАМ --- */
.accent-bg {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.partners-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.partners-text { flex: 1; padding-right: 50px; }
.partners-image-placeholder { flex: 1; text-align: center; display: none; }

.partners-text h2 { color: var(--white); font-size: 2.5rem; }
.partners-text .lead { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }

.partners-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}
.partners-list i {
    color: #4cd964;
    margin-right: 15px;
    margin-top: 5px;
}

.partners .btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
}
.partners .btn-primary:hover { background-color: #f0f0f0; }

/* --- TRUST (Реквизиты) --- */
.trust-box {
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    max-width: 800px;
    margin: 0 auto;
}
.company-name { font-weight: 700; font-size: 1.1rem; margin: 15px 0; text-transform: uppercase;}
.requisites span { display: inline-block; margin: 5px 15px; color: var(--text-light); }
.address { margin-top: 15px; font-style: italic; color: var(--text-dark); }

/* --- КОНТАКТЫ --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.contact-item i {
    width: 40px; height: 40px;
    background: var(--bg-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-right: 15px;
}
.contact-item a { color: var(--text-dark); }
.contact-item a:hover { color: var(--primary-color); }

/* Форма */
.contact-form-container {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}
.contact-form textarea { resize: vertical; }

/* Согласия (152-ФЗ) */
.consent-block {
    margin: 15px 0 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text-light);
}
.consent-item:last-child { margin-bottom: 0; }
.consent-item input[type="checkbox"] {
    width: auto;
    margin: 3px 10px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
.consent-item span { flex: 1; }
.consent-item a {
    color: var(--primary-color);
    text-decoration: underline;
}
.consent-item a:hover { color: #004494; }

/* Сообщения формы */
.form-success,
.form-error {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- FOOTER --- */
.footer {
    background: #1a1a1a;
    color: #888;
    padding: 30px 0;
    font-size: 0.9rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}
.footer strong { color: var(--white); display: block; margin-bottom: 5px;}

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    text-align: right;
}
.footer-legal a {
    color: #ccc;
    font-size: 0.9rem;
}
.footer-legal a:hover { color: var(--white); text-decoration: underline; }

/* --- COOKIE POPUP (всплывающая карточка) --- */
.cookie-popup {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 25, 60, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 22px 22px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    /* стартовое состояние — скрыт и смещён вниз */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}
.cookie-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cookie-popup[hidden] { display: none !important; }

.cookie-popup__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff4e0 0%, #ffe0b8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.cookie-popup__body { flex: 1; min-width: 0; }

.cookie-popup__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
    line-height: 1.3;
}
.cookie-popup__text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-light);
    margin: 0 0 14px;
}
.cookie-popup__text a {
    color: var(--primary-color);
    text-decoration: underline;
}
.cookie-popup__text a:hover { color: #004494; }

.cookie-popup__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cookie-popup__btn {
    flex: 1;
    min-width: 110px;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    border: 1.5px solid transparent;
    line-height: 1.2;
}
.cookie-popup__btn--primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}
.cookie-popup__btn--primary:hover {
    background: #004494;
    border-color: #004494;
}
.cookie-popup__btn--secondary {
    background: transparent;
    color: var(--text-light);
    border-color: #e0e0e0;
}
.cookie-popup__btn--secondary:hover {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: #c8c8c8;
}

.cookie-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #b0b0b0;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
.cookie-popup__close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* --- LEGAL PAGES (privacy / terms / consent) --- */
.legal-page {
    margin-top: 70px; /* компенсируем фиксированный header */
    padding: 40px 0 60px;
    background: var(--bg-light);
    min-height: calc(100vh - 70px);
}
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
}
.back-link:hover { text-decoration: underline; }

.legal-content {
    background: var(--white);
    padding: 40px 50px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}
.legal-content h1 {
    color: var(--primary-color);
    font-size: 1.9rem;
    margin-bottom: 10px;
}
.legal-content h2 {
    color: var(--accent-color);
    font-size: 1.35rem;
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--bg-light);
}
.legal-content p { margin-bottom: 12px; color: var(--text-dark); }
.legal-content .legal-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 20px;
}
.legal-content .legal-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0 20px;
    font-size: 0.9rem;
}
.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}
.legal-content a:hover { color: #004494; }
.legal-content ul.legal-list {
    margin: 10px 0 15px 20px;
    list-style: disc;
}
.legal-content ul.legal-list li {
    margin-bottom: 8px;
    padding-left: 5px;
}
.legal-content strong { color: var(--text-dark); }

/* --- АДАПТИВНОСТЬ --- */
@media (min-width: 769px) {
    .partners-image-placeholder { display: block; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .header-content { padding: 0 15px; }

    /* Мобильное меню */
    .mobile-menu-toggle { display: block; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px; left: 0; width: 100%;
        background: var(--white);
        flex-direction: column;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }
    .nav-menu.responsive { display: flex; }
    .nav-menu a { margin: 10px 20px; display: block; }
    .lang-switch { margin-right: 50px; }

    .partners-content { flex-direction: column; }
    .partners-text { padding-right: 0; }
    .partners-text h2 { font-size: 2rem; }

    .contact-grid { grid-template-columns: 1fr; }

    .footer-content { flex-direction: column; text-align: center; gap: 20px;}
    .footer-legal { align-items: center; text-align: center; }

    .logo-link img { max-height: 40px; }
    .logo-text { font-size: 20px; }

    .legal-content { padding: 25px 20px; }
    .legal-content h1 { font-size: 1.5rem; }
    .legal-content h2 { font-size: 1.15rem; }

    .cookie-popup {
        right: 12px;
        left: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        padding: 18px 18px 16px;
    }
    .cookie-popup__icon { width: 38px; height: 38px; }
    .cookie-popup__title { font-size: 1rem; }
    .cookie-popup__text  { font-size: 0.8rem; }
    .cookie-popup__actions { gap: 6px; }
    .cookie-popup__btn { min-width: 0; }
}
