/* ======================== */
/* Глобальные стили */
/* ======================== */
@font-face {
    font-family: 'Tilda Sans';
    src: url('../webfonts/TildaSans-Regular.woff2') format('woff2'),
         url('../webfonts/TildaSans-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tilda Sans';
    src: url('../webfonts/TildaSans-Medium.woff2') format('woff2'),
         url('../webfonts/TildaSans-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tilda Sans';
    src: url('../webfonts/TildaSans-Bold.woff2') format('woff2'),
         url('../webfonts/TildaSans-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Tilda Sans';
    src: url('../webfonts/TildaSans-ExtraBold.woff2') format('woff2'),
         url('../webfonts/TildaSans-ExtraBold.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #2c3e50;
    --secondary: gray;
    --accent: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --slategray: slategrey;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tilda Sans', -apple-system, BlinkMacSystemFont, 
                 'Segoe UI', 'Ubuntu', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--dark);
    line-height: 1.6;
    padding-top: 70px;
    font-size: 18px;
}

/* ======================== */
/* Шапка */
/* ======================== */
header {
    opacity: 0.9;
    background-color: gray;
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-img {
    height: 6rem; 
    width: auto;
    transition: all 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.2));
}

/* Стили для групп навигации */
.nav-group {
    position: relative;
}

.group-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    cursor: pointer;
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.group-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.group-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}

.nav-group:hover .group-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.group-menu a {
    color: var(--primary) !important;
    padding: 0.5rem 1rem;
    text-decoration: none;
    transition: background 0.2s;
    font-weight: 600;
    display: block;
}

.group-menu a:hover {
    background: var(--light);
    color: var(--secondary) !important;
}

/* Увеличиваем жирность основного меню */
.nav-list > li > a {
    font-weight: 900 !important;
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-list > li > a:hover,
.nav-list > li > a:focus {
    background: rgba(255, 255, 255, 0.15);
}

/* Навигация */
.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

.header-contacts {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: 1rem;
}

.phone-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s;
    font-weight: 700;
}

.phone-link:hover {
    opacity: 0.8;
}

.language-selector {
    position: relative;
    margin-left: 1rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.language-current, 
.language-dropdown li {
    cursor: pointer;
    outline: none;
}

.language-current:focus .language-dropdown,
.language-selector:hover .language-dropdown {
    display: block;
}

.language-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.language-current:hover {
    background: rgba(255,255,255,0.1);
}

.language-label {
    font-size: 0.9rem;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 100;
    padding: 0.5rem 0;
    list-style: none;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown li {
    padding: 0.5rem 1rem;
    color: var(--primary);
    transition: all 0.2s;
}

.language-dropdown li:hover {
    background-color: var(--light);
    color: var(--secondary);
}

.hamburger {
    display: none;
    width: 30px;
    height: 21px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }

    .nav-group .group-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    
    .nav-group .group-toggle i {
        display: none;
    }
    
    .group-menu a {
        color: white !important;
        padding-left: 1.5rem;
    }
    
    .group-menu a:hover {
        background: rgba(255, 255, 255, 0.15);
        color: white !important;
    }
    
    .nav-list {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    .header-contacts {
        margin-left: auto;
    }
    
    .language-label {
        display: none;
    }
    
    .language-current {
        padding: 0.5rem;
    }
    
    .phone-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: white;
        text-decoration: none;
        transition: opacity 0.3s;
        font-size: 0.8rem;
    }
    
    .phone-link:hover {
        opacity: 0.8;
    }
}

/* Мобильное меню */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: 1000;
    padding: 6rem 2rem 2rem;
    transition: right 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-list li {
    margin-bottom: 1.5rem;
}

.mobile-nav-list li a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.mobile-nav-list li a:hover {
    background: rgba(255, 255, 255, 0.15);
}


/* Мобильное меню - выпадающие пункты */
.mobile-nav-list li {
    position: relative;
}

.mobile-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-chevron {
    transition: transform 0.3s ease;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
}

.mobile-submenu.active {
    max-height: 500px;
}

.mobile-group-toggle.active .mobile-chevron {
    transform: rotate(180deg);
}





.close-mobile-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* Анимация гамбургера */
.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ======================== */
/* Герой-секция */
/* ======================== */
.hero {
    background-image: url('../img/head_back.webp');
    background-size: cover;
    background-position: center;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    margin-bottom: 3rem;
    top: -4.3rem;
}

.hero:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

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

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 1.3rem;
}

.contact-btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
}

.contact-btn:hover {
    background-color: transparent;
    color: var(--accent);
}

/* ======================== */
/* Основной контент */
/* ======================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ======================== */
/* Общие компоненты */
/* ======================== */
h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    text-align: center;
}



h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary);
}

h3 {
    font-size: 1.8rem;
}

p, li, a, span, .card, .service-text, .benefit-card p {
    font-size: 1.2rem;
    line-height: 1.7;
}

/* Карточки */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* Кнопки */
.cta-btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    margin: 1rem 0;
    cursor: pointer;
    text-align: center;
}

.cta-btn:hover {
    background-color: transparent;
    color: var(--accent);
}

.cta-btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--accent);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid var(--accent);
    margin: 1rem 0;
}

.cta-btn-outline:hover {
    background-color: var(--accent);
    color: white;
}

/* Подвал */
footer {
    background-color: var(--secondary);
    color: #fff;
    padding: 50px 0 0;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.footer-contact {
    flex: 1;
    min-width: 300px;
}

.footer-contact h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-contact p {
    opacity: 0.8;
}

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

.contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-method:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.contact-method i {
    font-size: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.footer-links {
    flex: 2;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: end;
}

.links-column {
    min-width: 180px;
}

.links-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
}

.links-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #4CAF50;
}

.links-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.links-column a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    height: 40px;
}

.footer-logo p {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
}

.copyright {
    text-align: center;
    opacity: 0.7;
    font-size: 14px;
}

.copyright p {
    margin: 5px 0;
}

.back-to-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.policy-link {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
}

.policy-link:hover {
    text-decoration: underline;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-trigger {
    cursor: pointer;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    padding: 1.5rem;
    position: relative;
    transform: translateY(-50px);
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #333;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6a11cb;
    box-shadow: 0 0 0 3px rgba(106, 17, 203, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 12px;
    width: 100%;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-text, .btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-loading {
    display: none;
}

.form-message {
    margin-top: 1rem;
    padding: 10px;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid #2ecc71;
    display: block;
}

.form-message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
    display: block;
}

.agreement {
    margin: 1rem 0;
}

.agreement label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.agreement input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 25px;
    width: 25px;
    background-color: #eee;
    border: 2px solid #ddd;
    border-radius: 4px;
}

.agreement:hover input ~ .checkmark {
    background-color: #ccc;
}

.agreement input:checked ~ .checkmark {
    background-color: #4361ee;
    border-color: #4361ee;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.agreement input:checked ~ .checkmark:after {
    display: block;
}

.error-message {
    color: #ff3333;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Анимации */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ======================== */
/* Секция "Свяжитесь со мной" */
/* ======================== */
#contact {
    margin: 4rem 0;
    text-align: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background: white;
}

.contact-method.phone {
    background-color: #f0f8ff;
}

.contact-method.email {
    background-color: #fff0f5;
}

.contact-method.telegram {
    background-color: #e6f7ff;
}

.contact-method.whatsapp {
    background-color: #faffe6;
}

.contact-method.viber {
    background-color: #e9ffe6;
}

.contact-method.instagram {
    background-color: #fff0f5;
}

.contact-method.facebook {
    background-color: #f0f8ff;
}

.contact-method.tiktok {
    background-color: #f0fff0;
}

.section-header h2,
.insurance-card h3,
.lenders-category h3 {
    font-size: 2.2rem; /* Особо жирные заголовки */
}

.service-title {
    font-size: 1.8rem !important; /* Заголовки услуг */
}

/* ======================== */
/* Адаптивные стили */
/* ======================== */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .mobile-nav-list li a {
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .contact-method {
        width: 100%;
        text-align: center;
    }

    .footer-top {
        flex-direction: column;
    }
    
    .footer-links {
        width: 100%;
        justify-content: normal;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .form-group input, 
    .form-group textarea {
        padding: 10px;
    }
    
    .cta-btn, 
    .cta-btn-outline {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}