/* --- ГЛОБАЛЬНЫЕ НАСТРОЙКИ --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #404957;
    --white: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

html, body {
    max-width: 100%;
    overflow-x: hidden; /* Убирает горизонтальную прокрутку вправо */
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
}

/* --- АНИМАЦИИ --- */
.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 1. ШАПКА И НАВИГАЦИЯ (Десктоп) --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f1f5f9;
    height: 80px; /* Фиксация высоты против прыжков */
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    white-space: nowrap; /* Запрещает перенос текста на новую строку */
    flex-shrink: 0; /* Не дает логотипу сжиматься */
}

.logo-img {
    height: 40px; /* Высота логотипа, подбирается под текст */
    width: auto;
    object-fit: contain;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

/* Уменьшаем расстояние между пунктами меню, чтобы они дольше влезали в ряд */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-menu a:hover { color: var(--primary); }

/* Выпадающий список (Dropdown Desktop) */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    width: 300px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
}

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

.dropdown-menu li a {
    padding: 10px 20px;
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
}

.sub-category {
    padding: 10px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 1px;
}

.menu-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2100;
}

.menu-burger span {
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 2px;
}

/* Hero Section в стиле Elementor без фонового изображения*/
/* .hero {
    padding: 100px 10% 140px;
    background: radial-gradient(circle at top right, #eff6ff 0%, #ffffff 50%);
    text-align: center;
} */

/* --- Hero Section с фоном --- */
.hero {
    padding: 140px 10% 180px;
    background: linear-gradient(rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.85)), 
                url('../image/hero-bg-img.png'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Кнопки */

.btn {
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

/* Модальное окно */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.succes {
    font-size: 18px;
    color: #2d3748;
    text-align: center;
    margin-top: 30px; 
}

.disp {
    display: none;
}

.input-group {
    margin-bottom: 1.5rem;
}

input, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}

input:focus {
    border-color: var(--primary);
    ring: 2px solid #bfdbfe;
}

/* Карточки услуг */

.services {
    padding: 0 10% 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: -60px;
}

.service-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    text-align: center;
    transition: 0.3s;
}

/* TITLE */
.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.6rem;
}

/* TEXT */
.service-card p {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.55;
}

/* LINK */
.service-card a {
    text-decoration: none;
}

.service-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: #e7e7e7;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 40px 10%;
    background: var(--primary);
    color: white;
    text-align: center;
}

.stat-item h2 { font-size: 2.5rem; margin-bottom: 5px; }
.stat-item p { font-size: 0.9rem; opacity: 0.9; }

.benefits { padding: 100px 10%; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }

.benefit-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.benefit-card:hover .icon-wrapper {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

.icon-wrapper {
    width: 54px;
    height: 54px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.icon-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem;

    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    
    color: var(--primary);
}

/* --- старая версия ---.icon-box {
    width: 60px;
    height: 60px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
} */

/* Секция Как мы работаем */
.steps-section {
    padding: 100px 10%;
    background: #ffffff;
}

.section-text {
    width: 85%; /* Ширина контейнера */
    text-align: center;
    margin: 0 auto; /* Авто-отступы по бокам центрируют блок */
    margin-bottom: 60px;
}

.section-text h2 {
    margin: 20px 0;
}

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

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #0f172a;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    position: relative;
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

.step-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.step-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0 10px;
}

.step-number:hover {
    transform: translateY(-10px);
}

/* FAQ Section */
.faq-section {
    padding: 100px 10%;
    background: #f8fafc; /* Светло-серый фон для разделения блоков */
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    margin-bottom: 1rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease-out;
    background: var(--white);
}

.faq-item.active .faq-answer {
    padding-bottom: 1.5rem;
    max-height: 200px; /* Достаточно для текста */
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Блок Державного реестра */
.ua-gerb-img {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    opacity: 0.7;
    filter: grayscale(0.5);
}

.ua-gerb-img img {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
}

.derz-org-name {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* Обращаемся к span внутри нашего класса */
.derz-org-name span {
    font-weight: 700; 
    font-size: 1.1rem; 
    letter-spacing: 1px;
}

/* Обращаемся к ссылкам внутри span */
.derz-org-name span a {
    text-decoration: none; /* Убирает подчеркивание */
    color: #1e293b;        /* Цвет текста */
    transition: color 0.3s ease;
}

/* Эффект при наведении на ссылку */
.derz-org-name span a:hover {
    color: #2563eb; /* Цвет меняется на фирменный синий при наведении */
    text-decoration: none;
}

/* Стили для страниц конкретных услуг */
.service-hero {
    padding: 100px 10% 60px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.service-content {
    padding: 80px 10%;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
}

.service-main-text h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #0f172a;
}

.service-main-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Боковая панель с формой или быстрыми контактами */
.service-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.cta-box {
    background: var(--primary);
    color: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2); 
}

.cta-box h3 { margin-bottom: 15px; color: white; }
.cta-box p { margin-bottom: 25px; opacity: 0.9; }

.seo-village-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.village-tag {
    font-size: 0.85rem;
    padding: 5px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    color: #475569;
    border: 1px solid #e2e8f0;
}
.highlight-box {
    border-left: 5px solid var(--primary);
    background: #f8fafc;
    padding: 25px;
    margin: 30px 0;
    border-radius: 0 15px 15px 0;
}

/* Список преимуществ конкретной услуги */
.check-list {
    list-style: none;
    margin-top: 30px;
}

.check-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.check-list i { color: var(--primary); margin-top: 5px; }

/* Сторінка Контакти */
.contacts-page {
    padding: 80px 10%;
    background: #f8fafc;
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card-item {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.contact-card-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg { width: 28px; height: 28px; }

.map-container {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 450px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

/* Специфічні стилі для сторінки Юр. осіб */
.business-section {
    padding: 80px 10%;
}

.business-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 100px 10%;
    border-radius: 0 0 50px 50px;
    text-align: center;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.business-card {
    background: white;
    padding: 35px;
    border-radius: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.business-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.object-tag {
    display: inline-block;
    padding: 8px 16px;
    background: #eff6ff;
    color: var(--primary);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 5px;
}

.section-accent {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 15px;
}

/* Стили для вкладок Документов */
.docs-section {
    padding: 80px 10%;
}

.tabs-container {
    max-width: 1000px;
    margin: 0 auto;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

.tab-content {
    display: none;
    background: white;
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    border: 1px solid #f1f5f9;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* Стилі для внутрішніх груп документів */
.doc-list {
    list-style: none;
}

.doc-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f9;
}

.doc-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 800;
    background: #eff6ff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.doc-note {
    margin-top: 30px;
    padding: 20px;
    background: #fff9eb;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

.doc-group {
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    overflow: hidden;
}

.doc-group-title {
    background: #f8fafc;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #2d3748;
    transition: background 0.3s;
}

.doc-group-title:hover {
    background: #edf2f7;
}

.doc-group-content {
    display: none; /* Сховано за замовчуванням */
    padding: 20px;
    background: white;
}

.doc-group.active .doc-group-content {
    display: block;
}

.doc-group.active .doc-group-title {
    border-bottom: 1px solid #edf2f7;
    color: var(--primary);
}

.doc-group-title::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--primary);
}

.doc-group.active .doc-group-title::after {
    content: '−';
}

/* Футер */
footer {
    background: #0f172a; /* Глубокий темно-синий */
    color: #94a3b8;
    padding: 80px 10% 40px;
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 40px;
}

.footer-brand h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}

.footer-brand p {
    line-height: 1.6;
}

.footer-info h4 {
    color: var(--white);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-info p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

/* Ссылка на телефон и почту */
.footer-link {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link:hover {
    color: var(--primary);
}

/* --- 6. МЕДИА-ЗАПРОСЫ (АДАПТИВНОСТЬ) --- */

/* Переходная зона: Меню начинает поджимать (1100px - 1250px) */
@media (max-width: 1250px) {
    nav { padding: 15px 3%; }
    .nav-menu { gap: 1rem; }
    .nav-menu a { font-size: 0.95rem; }
}

/* Планшеты и малые ноуты: ВКЛЮЧАЕМ БУРГЕР (1100px) */
@media (max-width: 1100px) {
    nav .btn-primary:not(.mobile-only .btn) { display: none !important; }
    .menu-burger { display: flex; }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 30px;
        gap: 20px;
        transition: 0.4s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 2000;
        visibility: hidden;
    }

    .nav-menu.active { right: 0; visibility: visible; }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: #f8fafc;
        border-left: 4px solid var(--primary);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
    }

    .dropdown.active > .dropdown-menu { display: block !important; }
}

/* Средние экраны (до 968px) */
@media (max-width: 968px) {
    .benefits, .contacts-grid, .service-content { grid-template-columns: 1fr; }
    .hero { padding: 100px 5% 120px; }
}

/* Телефоны (до 768px) */
@media (max-width: 768px) {
    nav { height: 70px; }
    .logo { font-size: 1.1rem; }
    .logo-img { height: 35px; }
    
    .stats-bar { flex-direction: column; gap: 30px; }
    .benefits {
        display: flex;
        flex-direction: column; /* В один столбик */
        gap: 40px;
        padding: 60px 20px;
    }

    .benefits h2 {
        font-size: 1.8rem; /* Уменьшаем заголовок */
        text-align: center;
    }

    .benefit-card {
        flex-direction: column; /* Иконка над текстом */
        align-items: center;
        text-align: center;
    }

    .benefit-card h4 {
        font-size: 1.1rem;
    }
    
    .benefit-card p {
        font-size: 0.9rem;
    }
    
    .footer-content { text-align: center; }
    .footer-info p { justify-content: center; }
}

/* Линия-соединитель (только для десктопа) */
@media (min-width: 1024px) {
    .step-item:not(:last-child)::after {
        content: ''; 
        position: absolute; 
        top: 40px; 
        left: 60%; 
        width: 80%; 
        border-top: 2px dashed #e2e8f0; 
        z-index: 1;
    }
}
