/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --text-main: #d4d4d4;
    --text-muted: #6b6b6b;
    --accent: #bd2c00; /* Строгий "штамповый" красный */
    --accent-hover: #ff4112;
    --border: #333;
    --grid-line: rgba(255, 255, 255, 0.03);
    --transition: all 0.2s ease-in-out;
}

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

body {
    background-color: var(--bg-color);
    /* Фоновая сетка для "технического" вида */
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif; /* Основной текст читаемый */
    line-height: 1.6;
    overflow-x: hidden;
}

/* Типографика "Секретных материалов" */
h1, h2, h3, .logo, .tag, .btn, nav a {
    font-family: 'Courier Prime', monospace; /* Моноширинный шрифт */
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Навигация */
header {
    background: rgba(5, 5, 5, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--text-main);
    padding: 5px 10px;
}

.logo span {
    color: var(--accent);
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent);
}

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

/* Декоративная линия слева (как в досье) */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 1px;
    background: var(--border);
    display: none;
}

@media(min-width: 768px) {
    .container::before { display: block; }
}

/* Заголовки */
h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    display: inline-block;
}

.subtitle {
    display: block;
    margin-bottom: 50px;
    color: var(--accent);
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
}

/* Карточки */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--text-muted);
    transform: translateY(-5px);
}

.card-content {
    padding: 25px;
}

.tag {
    font-size: 0.7rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 2px 6px;
    margin-bottom: 15px;
    display: inline-block;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--card-bg);
    border: 1px solid var(--text-main);
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn:hover {
    background: var(--text-main);
    color: var(--bg-color);
}

/* --- СТИЛИ ГАЛЕРЕИ (CSS ONLY LIGHTBOX) --- */

/* Сетка миниатюр */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 16/9;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: grayscale(80%);
}

.gallery-item:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    padding: 8px;
    font-size: 0.75rem;
    font-family: 'Courier Prime', monospace;
    color: var(--text-main);
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* Механизм открытия на весь экран */
.lightbox {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Магия: когда ID в URL совпадает с ID элемента, показываем его */
.lightbox:target {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border: 1px solid var(--border);
    box-shadow: 0 0 50px rgba(189, 44, 0, 0.1);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-main);
    font-size: 2rem;
    text-decoration: none;
    font-family: sans-serif;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent);
}

.lightbox-details {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Courier Prime', monospace;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 40px;
    margin-top: 80px;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'Courier Prime', monospace;
} 
