/**
 * Глобальные стили и переменные
 */

/* CSS переменные */
:root {
    --primary-color: #00ade1;
    --secondary-color: #0d47a1;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border: #e0e0e0;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Базовые стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Секции */
.section {
    padding: 60px 0;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

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

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

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

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 20px;
    font-size: 14px;
}

/* Карточки */
.card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px var(--shadow);
}

/* Сетки */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Утилиты */
.text-center {
    text-align: center;
}

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

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Адаптивность */
@media screen and (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 26px;
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 40px 0;
    }
}

/* Изображения */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Списки */
ul, ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

li {
    margin-bottom: 8px;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-light);
    font-weight: 600;
}

/* Формы */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-dark);
}

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

/* Загрузка */
.loader {
    border: 3px solid var(--bg-light);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}