﻿/* Общие стили для всех страниц */
/* Поддержка Safari для Grid и Flex */
@supports (display: grid) {
    .ads-grid {
        display: grid;
    }
}

/* Fallback для старых версий Safari */
.ads-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 25px;
}

.ad-card {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 280px;
    flex: 1 1 280px;
}
.ad-slogan {
    font-style: italic;
    color: #4fc3f7;
    margin: 5px 0;
    font-size: 0.9rem;
    border-left: 3px solid #4fc3f7;
    padding-left: 10px;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

/* Навигация */
.navbar {
    background: linear-gradient(135deg, #FFFF00, #0033cc, #00cc00, #0033cc, #00cc00, #FFFF00);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
  height: 32px; /* подгони под свой размер */
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

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

/* Секции */
.section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

h2 {
    color: #0033cc;
    border-bottom: 3px solid #4fc3f7;
    padding-bottom: 10px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title {
    color: #1a2a6c;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Кнопки */
button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    /*transition: all 0.3s ease;*/
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: #1a2a6c;
    color: white;
}

.btn-primary:hover {
    background-color: #2a3a8c;
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background-color: #c62828;
}

.btn-success {
    background-color: #43a047;
    color: white;
}

.btn-success:hover {
    background-color: #2e7d32;
}

/* Карточки */
.feature-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Видео */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Админ панель */
.admin-panel {
    background-color: #fff8e1;
    border: 2px dashed #ffb300;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.admin-form input,
.admin-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.admin-form textarea {
    grid-column: 1 / -1;
}

/* Рекламная сетка */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

.ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.ad-content {
    padding: 20px;
}

.ad-title {
    font-weight: bold;
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a2a6c;
}

.ad-link {
    display: inline-block;
    background-color: #4fc3f7;
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: background 0.3s;
    width: 100%;
}

.ad-link:hover {
    background-color: #039be5;
}

.ad-actions {
    padding: 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* Подвал */
footer {
    background: linear-gradient(135deg, #FFFF00, #00CC00, #0033CC, #FFFF00, #00CC00);
    color: white;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1a2a6c, #2a3a8c);
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .admin-form {
        grid-template-columns: 1fr;
    }
    
    .ads-grid {
        grid-template-columns: 1fr;
    }
}

/* Уведомления */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

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

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}