/* Основные стили темы MetalCorp */

:root {
    --primary-color: #455a64;
    --secondary-color: #607d8b;
    --accent-color: #90a4ae;
    --light-color: #cfd8dc;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --border-radius: 16px;
}

* {
    transition: all 0.3s ease;
}

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--light-color) 0%, #ffffff 100%);
}

/* Sticky Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--light-color);
    box-shadow: 0 2px 20px rgba(69, 90, 100, 0.1);
}

.navbar-brand .navbar-item {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.navbar-item:hover {
    color: var(--secondary-color) !important;
    transform: translateY(-2px);
}

/* Hero Section - Split */
.hero-split {
    min-height: 80vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
}

/* Hero Section - New Homepage */
.hero-section {
    min-height: 70vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--light-color);
    margin-bottom: 2.5rem;
}

.hero-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.button {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 1rem 2rem;
    border: none;
    transition: all 0.3s ease;
}

.button.is-primary {
    background: var(--accent-color);
    color: var(--text-dark);
}

.button.is-primary:hover {
    background: var(--secondary-color);
    color: var(--text-light);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(69, 90, 100, 0.3);
}

.button.is-outlined {
    border: 2px solid var(--light-color);
    color: var(--text-light);
    background: transparent;
}

.button.is-outlined:hover {
    background: var(--light-color);
    color: var(--text-dark);
    transform: scale(1.05);
}

/* Masonry Layout */
.masonry-container {
    padding: 4rem 0;
    background: #ffffff;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.masonry-item {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(69, 90, 100, 0.1);
    transition: all 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(69, 90, 100, 0.2);
}

.masonry-item.tall {
    grid-row: span 2;
}

.masonry-item.wide {
    grid-column: span 2;
}

.masonry-item img {
    width: 100%;
    border-radius: calc(var(--border-radius) - 8px);
    margin-bottom: 1.5rem;
}

.masonry-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.masonry-item p {
    color: var(--secondary-color);
    line-height: 1.7;
}

/* Services Grid */
.services-section {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--light-color) 100%);
    padding: 5rem 0;
}

.service-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(69, 90, 100, 0.1);
    height: 100%;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(69, 90, 100, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--text-light);
    font-size: 2rem;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 300;
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    max-width: 600px;
    margin: 0 auto;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--light-color);
    padding: 3rem 0;
}

.footer a {
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--light-color);
}

/* Хлебные крошки (breadcrumbs) */
.breadcrumbs {
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
    font-size: 0.875rem;
    color: #777;
}
.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumbs a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}
.breadcrumbs span {
    color: #555;
}

/* Страница-контейнер для записей и статических страниц */
.page-content {
    max-width: 800px;
    margin: 2rem auto 3rem;
    padding: 0 1rem 2rem;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Картинка в шапке страницы */
.page-content .post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Заголовок страницы */
.page-content h1 {
    font-size: 1.75rem;
    margin: 1.5rem 0 1rem;
    line-height: 1.3;
    color: var(--primary-color);
    text-align: center;
}

/* Текстовое содержимое */
.page-content .content p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Cписок записей */
.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

/* Random Posts Section */
.random-posts {
    background: #ffffff;
    padding: 4rem 0;
}

/* Blog Link Container */
.blog-link-container {
    text-align: center;
    margin-top: 3rem;
}

.blog-link {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-link:hover {
    background: var(--accent-color);
    color: var(--text-dark);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(69, 90, 100, 0.3);
}

/* Карточка записи */
.post-item {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(69, 90, 100, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.post-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(69, 90, 100, 0.2);
}

/* Картинка */
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Заголовок */
.post-item h3 {
    font-size: 1.4rem;
    margin: 1.5rem 1.5rem 1rem;
    line-height: 1.4;
}

.post-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.post-item h3 a:hover {
    color: var(--accent-color);
}

/* Краткий текст */
.post-item p {
    margin: 0 1.5rem 1.5rem;
    color: var(--secondary-color);
    flex: 1 0 auto;
}

/* "Read More" Link */
.post-item > a:last-of-type {
    align-self: flex-start;
    margin: 0 1.5rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.post-item > a:last-of-type:hover {
    background: var(--accent-color);
    transform: scale(1.05);
}

/* Пагинация */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    font-weight: 600;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--light-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.next.page-numbers,
.prev.page-numbers {
    border-color: transparent;
    color: var(--primary-color);
}

.next.page-numbers:hover,
.prev.page-numbers:hover {
    color: var(--accent-color);
    background: transparent;
}

/* 404 страница */
.error-404 {
    text-align: center;
    padding: 5rem 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-404 h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.error-404 p {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 2rem 0;
    }
    
    .hero-section .columns {
        flex-direction: column-reverse;
    }
    
    .hero-section .column {
        padding: 1rem;
    }
    
    .hero-image {
        margin-bottom: 2rem;
    }
    
    .masonry-grid {
        grid-template-columns: 1fr;
    }
    
    .masonry-item.wide {
        grid-column: span 1;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .random-posts {
        padding: 2rem 0;
    }
}

/* Bulma CSS Framework */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.columns {
    display: flex;
    flex-wrap: wrap;
    margin-left: -1rem;
    margin-right: -1rem;
}

.column {
    flex: 1;
    padding: 1rem;
}

.is-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.is-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.is-vcentered {
    align-items: center;
}

.has-text-centered {
    text-align: center;
}

.is-large {
    font-size: 1.5rem;
}

.is-fullwidth {
    width: 100%;
}

@media (max-width: 768px) {
    .column.is-6,
    .column.is-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Меню в шапке */
#top_menus {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.25rem;
    list-style: none;
    padding: 1.5rem 0;
}

#top_menus .nav-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.2s ease-in-out;
}

#top_menus .nav-link:hover,
#top_menus .nav-link:focus {
    color: var(--accent-color);
}

/* Активный пункт меню */
#top_menus .current-menu-item .nav-link,
#top_menus .current_page_item .nav-link {
    color: var(--accent-color);
    cursor: default;
}

/* Меню в подвале */
.footer-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.footer-menu a {
    font-size: 0.875rem;
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-menu a:hover,
.footer-menu a:focus {
    color: #ffffff;
    text-decoration: underline;
}

/* Мобильное меню */
.navbar-burger {
    display: none;
    cursor: pointer;
    height: 3.25rem;
    width: 3.25rem;
    margin-left: auto;
    position: relative;
}

.navbar-burger span {
    background-color: var(--primary-color);
    display: block;
    height: 2px;
    left: calc(50% - 8px);
    position: absolute;
    transform-origin: center;
    transition: all 0.3s ease-out;
    width: 16px;
}

.navbar-burger span:nth-child(1) {
    top: calc(50% - 6px);
}

.navbar-burger span:nth-child(2) {
    top: calc(50%);
}

.navbar-burger span:nth-child(3) {
    top: calc(50% + 6px);
}

.navbar-burger.is-active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.navbar-burger.is-active span:nth-child(2) {
    opacity: 0;
}

.navbar-burger.is-active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
    .navbar-burger {
        display: block;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--light-color);
        box-shadow: 0 2px 20px rgba(69, 90, 100, 0.1);
    }
    
    .navbar-menu.is-active {
        display: block;
    }
    
    .navbar-end {
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }
    
    .navbar-item {
        padding: 0.75rem 1rem;
    }
    
    #top_menus {
        justify-content: center;
    }
}