:root {
    --bg-color: #080808;
    --text-white: #ffffff;
    --text-grey: #888888;
    --accent-purple: #9d8df1;
    --grid-line: rgba(255, 255, 255, 0.05);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Lexend', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-white);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* Фоновая сетка */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    border-bottom: 1px solid var(--grid-line);
}

.header-left {
    display: flex;
    gap: 40px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 2px;
}

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

.stats {
    color: var(--text-grey);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #00ff00;
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.lang {
    color: var(--text-grey);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-request {
    text-decoration: none;
    color: var(--text-white);
    border: 1px solid var(--text-white);
    padding: 8px 20px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-request:hover {
    background: white;
    color: black;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Сетка контента */
.main-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 10px;
    padding: 10px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Базовые стили плиток */
.tile {
    background: #111;
    position: relative;
    overflow: hidden;
    padding: 30px;
    display: flex;
    align-items: flex-end;
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid transparent;
}

a.tile {
    text-decoration: none;
    color: inherit;
    display: flex;
}

.tile:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tool-tile:hover {
    background: #1a1a1a;
}

/* Размеры плиток */
.tile-large {
    grid-column: span 2;
    grid-row: span 2;
}

.tile-wide {
    grid-column: span 2;
}

.tile-square, .tile-medium {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tile-medium {
    align-items: flex-end;
    justify-content: flex-start;
}

.tile-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Специфичные плитки */
.ai-news-tile {
    background: linear-gradient(45deg, #1a1a1a, #000);
    border-left: 4px solid var(--accent-purple) !important;
}

.tile-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-purple);
    color: black;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 2px;
}

/* Типографика внутри плиток */
.tile-content {
    z-index: 2;
    width: 100%;
}

.tile-category {
    font-size: 0.7rem;
    color: var(--text-grey);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.tile-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 0.9;
}

.tile-title span {
    display: block;
    font-size: 1rem;
    font-weight: 300;
    margin-top: 15px;
    color: #ccc;
    font-family: var(--font-main);
}

.tile-title-small {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1.1;
}

.tile-title-medium {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    line-height: 1;
}

.tile-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-grey);
    margin-top: 15px;
    letter-spacing: 2px;
}

/* Акценты и фигуры */
.accent-purple {
    background-color: var(--accent-purple);
    color: black;
}

.abstract-shape {
    width: 60px;
    height: 60px;
    background: white;
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-inner {
    transform: rotate(-45deg);
    font-size: 1.5rem;
    color: black;
}

.abstract-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    border: 2px solid white;
    padding: 10px 15px;
    letter-spacing: 2px;
}

/* Секция услуг / Категории */
.services-section {
    padding: 80px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.services-icons {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--grid-line);
    padding-top: 40px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--text-grey);
    transition: 0.3s;
    cursor: pointer;
}

.service-item:hover {
    color: white;
    transform: translateY(-3px);
}

.service-item .icon {
    font-size: 2.5rem;
}

.service-item span {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Адаптивность для мобильных */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }
    .tile-large, .tile-wide {
        grid-column: span 2;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    .services-icons {
        flex-wrap: wrap;
        gap: 30px;
    }
    .service-item {
        width: 45%;
    }
}
/* AI News Page Specific Styles */
.news-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-btn {
    background-color: #333;
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.filter-btn:hover {
    background-color: var(--hover-color);
    border-color: var(--text-color);
}

.filter-btn.active {
    background-color: #007bff; /* Пример активного цвета */
    border-color: #007bff;
    color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-card {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #333;
}

.news-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card h2 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

.news-card p {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

/* Gallery Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0.7;
    transition: opacity 0.3s ease, background 0.3s ease;
    font-size: 14px;
}
@media (min-width: 900px) {
    .gallery-nav { opacity: 0; }
    .news-tile-image-container:hover .gallery-nav { opacity: 1; }
}
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav:hover { background: rgba(0, 0, 0, 0.9); }
