/**
 * Общие CSS стили для всего проекта
 * Устраняет дублирование стилей
 */

/* === БАННЕРНАЯ СИСТЕМА === */

/* Баннерная зона */
.banner-zone {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px auto;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.banner-container {
    width: 100%;
    text-align: center;
}

.banner-container img {
    max-width: 100%;
    height: auto;
    border: none;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.banner-container .banner-html {
    max-width: 100%;
    overflow: hidden;
}

/* Адаптивность для баннеров */
@media (max-width: 768px) {
    .banner-zone {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .banner-container img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .banner-zone {
        padding: 8px;
        margin-bottom: 10px;
    }
    
    /* Скрываем баннеры на очень маленьких экранах */
    .banner-zone {
        display: none;
    }
}

/* === БАЗОВЫЕ КОМПОНЕНТЫ === */

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4A8EBC;
    color: white;
}

.btn-primary:hover {
    background: #3a7ca8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 142, 188, 0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 30px;
}

/* Карточки */
.card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: bold;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

/* Изображения */
.img-rounded {
    border-radius: 6px;
}

.img-circle {
    border-radius: 50%;
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.img-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Аватары */
.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 24px;
    height: 24px;
}

.avatar-md {
    width: 40px;
    height: 40px;
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-placeholder {
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4A8EBC;
    box-shadow: 0 0 0 3px rgba(74, 142, 188, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Сообщения */
.alert {
    padding: 15px 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

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

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.p-0 { padding: 0; }
.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }

/* Цвета текста */
.text-muted { color: #6c757d; }
.text-primary { color: #4A8EBC; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Предотвращает зум на iOS */
    }
}




