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

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --card-bg: #ffffff;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --header-height: 80px;
    --container-padding: clamp(1rem, 5vw, 2rem);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7ff 0%, #eef2ff 100%);
    color: var(--dark);
    min-height: 100vh;
    font-size: clamp(16px, 1.5vw, 18px);
}

/* Основной контейнер */
.container {
    max-width: min(1200px, 95vw);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Hero Section */
.hero-section {
    margin: clamp(1.5rem, 4vw, 3rem) auto;
    padding-top: 2rem;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--secondary);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(80px, 15vw, 150px);
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 2px;
}

/* Карточки */
.components-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.component-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.component-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.component-icon {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.component-icon i {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.component-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.component-card h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--primary);
    margin-bottom: 1rem;
}

.component-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Списки */
.component-card ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.component-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.component-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.highlight {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(247, 37, 133, 0.1));
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--secondary);
    display: inline-block;
    margin-bottom: 0.2rem;
}

/* Кнопки */
.btn-container {
    text-align: center;
    margin: clamp(2rem, 4vw, 3rem) 0;
    padding: clamp(1rem, 3vw, 2rem);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    padding: clamp(0.8rem, 2vw, 1.2rem) clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    border: none;
    cursor: pointer;
    min-width: min(200px, 60vw);
    min-height: 50px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.btn i {
    font-size: 1.2em;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .components-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .component-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .component-card {
        padding: 1.2rem;
    }
    
    .highlight {
        padding: 0.2rem 0.6rem;
        font-size: 0.9em;
    }
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Улучшение отображения текста */
h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    line-height: 1.3;
}

p, li {
    line-height: 1.7;
}
