/* ========================================
   vlapa.ru — основной файл стилей
   ======================================== */

/* ---------- Базовые стили ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, sans-serif;
    background: #0a0a0a;
    color: #eee;
    padding: 2rem 1rem;
    line-height: 1.5;
}

.container {
    max-width: 650px;
    margin: 0 auto;
    padding: 0, 15px;
}

.container {
    text-align: center;
}

h1, .tagline {
    text-align: center;
}

.tagline {
    color: #88ffaa;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* ---------- Заголовки и ссылки ---------- */
h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
    color: #88ffaa;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #88ffaa;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* ---------- Шапка сайта ---------- */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle {
    color: #aaa;
    margin-bottom: 2rem;
}

/* ---------- Бейджи и метки ---------- */
.category-badge {
    display: inline-block;
    background: #2a2a2a;
    border-radius: 20px;
    padding: 0.25rem 1rem;
    font-size: 0.8rem;
    color: #88ffaa;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    background: #2a2a2a;
    border-radius: 20px;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    color: #88ffaa;
}

/* ---------- Кнопки и карточки ---------- */
.links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
}

.button {
    width: 80%;
    box-sizing: border-box;
    display: block;
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1rem;
    text-decoration: none;
    color: #eee;
    font-weight: bold;
    transition: transform 0.1s, background 0.2s;
    border: 1px solid #333;
}

.button:hover {
    background: #2a2a2a;
    transform: scale(1.01);
}

/* Цветные границы для кнопок */
.yt { border-left: 4px solid #ff0000; }
.rutube { border-left: 4px solid #00a3ff; }
.vk { border-left: 4px solid #0077ff; }
.dzen { border-left: 4px solid #00ffcc; }
.git { border-left: 4px solid #f0f0f0; }

/* ---------- Сетка категорий (projects.html) ---------- */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.category-card {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid #333;
    transition: transform 0.1s, border-color 0.2s;
    text-decoration: none;
    color: #eee;
    display: block;
}

.category-card:hover {
    border-color: #88ffaa;
    transform: translateY(-4px);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.category-desc {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.8rem;
    color: #88ffaa;
}

/* ---------- Список проектов (категории) ---------- */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid #333;
    transition: all 0.2s;
}

.project-card:hover {
    border-color: #88ffaa;
    transform: translateX(4px);
}

.project-icon {
    width: 50px;
    height: 50px;
    background: #2a2a2a;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.project-info {
    flex: 1;
}

.project-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
    color: #fff;
}

.project-desc {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 0.5rem;
}

.project-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.project-links a {
    font-size: 0.8rem;
    color: #88ffaa;
    text-decoration: none;
    border-bottom: 1px dotted #88ffaa;
}

.project-links a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ---------- Галерея (gallery.html) ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.1s;
}

.gallery-item:hover {
    transform: translateY(-4px);
    border-color: #88ffaa;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-caption {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
}

/* Ограничение размера картинок в галерее */
.gallery .video-placeholder {
    background: #2a2a2a;
    text-align: center;
    padding: 1rem;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery .video-placeholder img {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* Для единообразия все карточки галереи */
.gallery .item {
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.gallery .video-placeholder {
    flex-shrink: 0;
}

.gallery .item-content {
    display: flex;
    justify-content: center;  /* центрирование по горизонтали */
    align-items: center;      /* центрирование по вертикали */
    height: 100%;             /* или конкретная высота, например 200px */
    width: 100%;              /* если нужно */
}

/* ---------- Видео блок ---------- */
.video-block {
    margin: 0 0 0.5rem 0;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    border-radius: 16px;
}

.video-title {
    font-size: 0.9rem;
    color: #88ffaa;
    margin-bottom: 0.5rem;
}

/* ---------- Подвал ---------- */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #555;
    font-size: 0.8rem;
}

.footer a {
    color: #88ffaa;
    text-decoration: none;
}

/* ---------- Адаптивность (мобильные устройства) ---------- */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        flex-direction: column;
        text-align: center;
    }
    
    .project-links {
        justify-content: center;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}
