/* style.css */
:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --success: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--light);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

section {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

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

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary);
}

/* Header */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

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

.logo {
    position: relative;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo svg {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
}

.logo-text span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--secondary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding-top: 150px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    color: var(--primary);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* About Section */
.about {
    background-color: white;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h2 {
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Services Section */
.services {
    background-color: #f8fafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background-color: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Process Section */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 30px;
    right: -30px;
    width: 60px;
    height: 2px;
    background-color: var(--primary-light);
    opacity: 0.5;
}

/* Benefits Section */
.benefits {
    background-color: white;
}

.benefits-list {
    max-width: 800px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: var(--radius);
}

.benefit-icon {
    color: var(--secondary);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 5px;
}

/* Specialization Section */
.specialization {
    background-color: #f8fafc;
}

.specialization-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.tag {
    background-color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
}

.tag:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Contact Form Section */
.contact-form-section {
    background-color: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    background-color: #f8fafc;
    padding: 30px;
    border-radius: var(--radius);
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.contact-details {
    margin-top: 30px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail i {
    color: var(--secondary);
    font-size: 1.2rem;
    width: 30px;
}

.form-container {
    background-color: #f8fafc;
    padding: 30px;
    border-radius: var(--radius);
}

.form-container h3 {
    margin-bottom: 20px;
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

.form-submit {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--radius);
    text-align: center;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
}

.footer-logo span {
    color: var(--secondary);
}

.footer-contact a {
    color: var(--secondary);
    font-weight: 500;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container,
    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .step:not(:last-child):after {
        display: none;
    }
    
    .hero {
        padding-top: 120px;
    }
    
    .contact-container {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-buttons .btn {
        text-align: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .contact-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
}

/* Дополнительные стили для логотипа */
.logo-svg {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Адаптивность для логотипа */
@media (max-width: 576px) {
    .logo-svg {
        width: 40px;
        height: 40px;
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
}


/* Стили для юридических изображений */

.hero-image img,
.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.hero-image img:hover,
.about-image img:hover {
    transform: scale(1.02);
}

/* Заглушки для юридической тематики */
.legal-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.legal-placeholder:before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="%23ffffff" opacity="0.1" d="M50,20 L80,50 L50,80 L20,50 Z"/></svg>');
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.legal-placeholder i {
    font-size: 3.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.legal-placeholder p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.legal-placeholder .subtext {
    font-size: 0.9rem;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Декоративные элементы для заглушки */
.legal-elements {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.legal-elements i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero-image img,
    .about-image img,
    .legal-placeholder {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .hero-image img,
    .about-image img,
    .legal-placeholder {
        height: 300px;
    }
    
    .legal-placeholder i {
        font-size: 3rem;
    }
    
    .legal-elements i {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-image img,
    .about-image img,
    .legal-placeholder {
        height: 250px;
    }
    
    .legal-placeholder i {
        font-size: 2.5rem;
    }
    
    .legal-placeholder p {
        font-size: 1rem;
    }
    
    .legal-elements {
        gap: 10px;
    }
    
    .legal-elements i {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}


/* Стили для специализаций с tooltip */
.specialization-tag {
    position: relative;
    padding: 12px 20px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
    cursor: default;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 5px;
    vertical-align: middle;
}

.specialization-tag .tag-icon {
    font-size: 1.2rem;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.specialization-tag:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Стили для всплывающей подсказки */
.tag-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 10px 15px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Стрелочка для tooltip */
.tag-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--dark);
}

/* Показываем tooltip при наведении */
.specialization-tag:hover .tag-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

	/* Адаптивность для специализаций */
	@media (max-width: 768px) {
    .specialization-tag {
        padding: 10px 15px;
        font-size: 0.9rem;
        margin: 3px;
    }
    
    .tag-tooltip {
        display: none; /* На мобильных скрываем тултипы или делаем по-другому */
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 80vw;
        max-width: 90vw;
        white-space: normal;
        padding: 15px;
    }
    
    /* Альтернатива для мобильных - показывать при клике */
    .specialization-tag.active .tag-tooltip {
        display: block;
        opacity: 1;
        visibility: visible;
    }
	}
	
	
/* Улучшенные tooltip с анимацией */
.tag-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    pointer-events: none;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Стрелочка с градиентом */
.tag-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--dark);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.tag-tooltip:before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.1) 0%,
        rgba(59, 130, 246, 0.1) 50%,
        rgba(16, 185, 129, 0.1) 100%);
    border-radius: 12px;
    z-index: -1;
    opacity: 0.5;
}

/* Показываем tooltip с анимацией */
.specialization-tag:hover .tag-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    bottom: calc(100% + 10px);
}

/* Для тегов с иконками - дополнительный отступ */
.specialization-tag.has-icon {
    padding-left: 50px;
    position: relative;
}

/* Для длинных описаний - перенос строк */
.tag-tooltip.multiline {
    white-space: normal;
    text-align: left;
    line-height: 1.5;
    min-width: 250px;
    max-width: 350px;
}


/* Улучшенные tooltip для длинного текста */
.tag-tooltip {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, var(--dark) 0%, #2d3748 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: normal; /* ИЗМЕНИТЬ с nowrap на normal */
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    pointer-events: none;
    min-width: 200px;
    max-width: 300px; /* Максимальная ширина */
    text-align: left; /* Выравнивание по левому краю */
    line-height: 1.5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Автоматическая высота и перенос слов */
.tag-tooltip {
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    hyphens: auto; /* Автоматические переносы */
}

/* Стрелочка */
.tag-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--dark);
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

/* Показываем tooltip с анимацией */
.specialization-tag:hover .tag-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    bottom: calc(100% + 10px);
}

/* Адаптация для очень длинного текста */
.tag-tooltip.long-text {
    max-width: 350px;
    min-width: 250px;
    padding: 15px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .tag-tooltip {
        position: fixed;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
        width: 85vw;
        max-width: 85vw;
        min-width: auto;
        max-height: 70vh;
        overflow-y: auto;
        white-space: normal;
        text-align: center;
        padding: 20px;
        font-size: 1rem;
    }
    
    .tag-tooltip:after {
        display: none;
    }
}

