/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --accent: #f97316;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray: #f1f5f9;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s ease;
}

/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== ШАПКА ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

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

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

.logo:hover {
    color: var(--primary-dark);
}

.header-nav {
    display: flex;
    gap: 32px;
}

.header-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-medium);
    padding: 8px 0;
    position: relative;
}

.header-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

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

.header-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Мобильное меню */
@media (max-width: 768px) {
    .header-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        padding: 24px;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 16px;
    }
    
    .header-nav.mobile-open .header-link {
        font-size: 16px;
        padding: 12px 0;
    }
}

/* ===== ГЛАВНЫЙ ЭКРАН ===== */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== СЕКЦИИ ===== */
.section {
    padding: 80px 0;
}

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 12px;
}

.section h2 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

/* ===== СОДЕРЖАНИЕ ===== */
.section-toc {
    background: var(--bg-light);
    padding: 60px 0;
}

.toc-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 32px;
    text-align: center;
}

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

.toc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.toc-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.toc-num {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toc-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

/* ===== КОМПАНИИ ===== */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.company-card {
    position: relative;
    height: 280px;
    perspective: 1000px;
    cursor: default;
}

.company-card--link {
    cursor: pointer;
}

.company-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.company-card:hover .company-card-inner {
    transform: rotateY(180deg) scale(1.05);
}

.company-card-front,
.company-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.company-card-front {
    display: flex;
    flex-direction: column;
}

.company-card-back {
    transform: rotateY(180deg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.company-image {
    height: 180px;
    overflow: hidden;
}

.company-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-name {
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.company-card-back .company-name {
    padding: 0;
    margin-bottom: 12px;
    font-size: 16px;
}

.company-desc {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.9;
}

.company-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 100px;
    z-index: 10;
}

.company-link-hint {
    margin-top: auto;
    font-size: 12px;
    opacity: 0.8;
    text-align: center;
}

/* ===== О САЙТЕ ===== */
.section-about {
    background: var(--bg-light);
}

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

.about-image {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.about-text {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 16px;
    line-height: 1.7;
}

.about-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 32px 0 20px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.advantage-icon {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.advantage-text {
    font-size: 14px;
    color: var(--text-medium);
}

/* ===== ЭТАПЫ РАБОТЫ ===== */
.section-steps {
    background: var(--bg-white);
}

.steps-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.steps-timeline::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
}

.step-item {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    position: relative;
}

.step-item:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.step-content {
    flex: 1;
    padding-top: 20px;
}

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.step-desc {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ===== ВСЕ ПОДРОБНОСТИ ===== */
.section-details {
    background: var(--bg-white);
}

.details-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.details-wrapper h2 {
    margin-bottom: 32px;
}

.details-content p {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 20px;
}

.details-content p:last-child {
    margin-bottom: 0;
}

.details-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50%;
    opacity: 0.2;
}

/* ===== ЦЕНЫ ===== */
.price-table-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    padding: 8px;
    box-shadow: var(--shadow-md);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.price-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.price-table th {
    padding: 20px 24px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-table th:last-child {
    text-align: right;
}

.price-table td {
    padding: 20px 24px;
    font-size: 15px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-table td:last-child {
    text-align: right;
}

.price-table tbody tr {
    transition: var(--transition);
}

.price-table tbody tr:hover {
    background: var(--bg-light);
}

.price-value {
    font-weight: 600;
    color: var(--primary);
}

/* ===== ГАЛЕРЕЯ ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* ===== FAQ ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-white);
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.faq-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    color: var(--text-medium);
}

.faq-item.active .faq-icon {
    background: var(--primary);
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 24px;
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ===== ФУТЕР ===== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    color: white;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
}

.footer-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.footer-link {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== АДАПТИВ: ПЛАНШЕТ ===== */
@media (max-width: 1024px) {
    .companies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .toc-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 40px;
    }
}

/* ===== АДАПТИВ: МАЛЕНЬКИЙ ПЛАНШЕТ ===== */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section h2 {
        margin-bottom: 32px;
    }
    
    .companies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .company-card {
        height: 240px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .about-image {
        max-height: 300px;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-timeline::before {
        left: 32px;
    }
    
    .step-number {
        width: 64px;
        height: 64px;
        font-size: 20px;
    }
    
    .step-item {
        gap: 24px;
    }
    
    .details-wrapper {
        padding: 32px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .footer-inner {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-contacts {
        text-align: left;
    }
}

/* ===== АДАПТИВ: ТЕЛЕФОН ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 100px 0 48px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-item {
        padding: 16px;
    }
    
    .companies-grid {
        grid-template-columns: 1fr;
    }
    
    .company-card {
        height: 260px;
    }
    
    .step-item {
        flex-direction: column;
        gap: 16px;
    }
    
    .steps-timeline::before {
        display: none;
    }
    
    .step-number {
        width: 56px;
        height: 56px;
        font-size: 18px;
    }
    
    .step-content {
        padding-top: 0;
    }
    
    .details-wrapper {
        padding: 24px;
    }
    
    .details-decoration {
        display: none;
    }
    
    .price-table th,
    .price-table td {
        padding: 16px;
        font-size: 14px;
    }
    
    .faq-question {
        padding: 20px;
    }
    
    .faq-question-text {
        font-size: 15px;
    }
    
    .faq-answer p {
        padding: 0 20px 20px;
        font-size: 14px;
    }
}
