/* 
   Дизайн-система для сайта 'Виталий Москалев — Художественная ковка'
   Цвета: Графит #2c3e50, Медь #bc7c4b
*/

:root {
    --bg-main: #2c3e50;
    --bg-card: #34495e;
    --accent: #bc7c4b;
    --accent-hover: #d4935d;
    --text: #f0f2f5;
    --text-muted: #bdc3c7;
    --border-copper: rgba(188, 124, 75, 0.15);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
}

/* Базовые стили */
body, .kovka-landing {
    background-color: var(--bg-main) !important;
    color: var(--text);
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    line-height: 1.6;
}

/* Типографика */
h1, h2, h3, h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 { font-size: clamp(1.5rem, 4vw, 2rem); }

/* Ссылки */
a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Кнопки */
.kovka-btn, 
.elementor-button, 
button, 
input[type='submit'],
.cat-grid a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #a66a3d) !important;
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 6px;
    border: none !important;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-align: center;
}

.kovka-btn:hover, 
.elementor-button:hover, 
button:hover, 
input[type='submit']:hover,
.cat-grid a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    filter: brightness(1.1);
}

/* Карточки и блоки */
.kovka-card, 
.elementor-widget-container, 
.rev article,
.cat-grid a {
    background-color: var(--bg-card);
    border: 1px solid var(--border-copper);
    padding: 24px;
    border-radius: 8px;
    transition: var(--transition);
}

.rev article:hover,
.cat-grid a:hover {
    background-color: rgba(52, 73, 94, 0.8);
    border-color: var(--accent);
}

/* Специфичные блоки из главная.txt */
.topbar, .kovka-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-top: 1px solid var(--border-copper);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.cat-grid a {
    text-decoration: none;
    flex-direction: column;
    height: auto;
}

.ic { font-size: 24px; margin-bottom: 10px; }

/* Адаптивность */
@media (max-width: 768px) {
    .kovka-btn, 
    .elementor-button, 
    button, 
    input[type='submit'] {
        width: 100%;
        display: flex;
    }
    
    h1, h2 {
        text-align: center;
        font-size: 1.5rem;
    }

    .nav ul {
        flex-direction: column;
        align-items: center;
    }

    .cat-grid {
        grid-template-columns: 1fr;
    }
}
/* Исправление цвета заголовков */
h1, h2, h3, h4 {
    color: #ffffff !important;
}
/* Убираем шахматное расположение — делаем ровную сетку */
.cat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    justify-items: stretch !important;
    text-align: left !important;
}

.cat-grid a {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

@media (max-width: 768px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .cat-grid {
        grid-template-columns: 1fr !important;
    }
}