/* 
 * Стили для блога (перенос из tmp/css/style_blog.css)
 * Автор: Элитный веб-дизайнер
 * Дата: 2025
 */

/* Сброс стилей и базовые настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e74c3c;
    --secondary-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --font-main: 'Roboto', Arial, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #c0392b;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.75rem;
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

/* Шапка сайта */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

.logo:hover {
    text-decoration: none;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 1.5rem;
}

.nav-menu a {
    color: var(--dark-color);
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu .active a {
    color: var(--primary-color);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-color);
}

/* Слоган */
.slogan {
    font-style: italic;
    color: var(--gray-color);
    margin-bottom: 0;
}

/* Контактная информация в шапке */
.header-contact {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.header-contact p {
    margin-bottom: 0.3rem;
}

/* Hero секция */
.hero {
    background-color: var(--light-color);
    padding: 5rem 0;
    text-align: center;
    margin-bottom: 3rem;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--gray-color);
}

/* Карточки блога */
.blog-grid {
    margin-bottom: 3rem;
}

/* Сетка карточек как на главной: используем bootstrap mb-4/gutters gx-4 gy-5 */
.blog-card { height: 100%; }
.blog-card-img { position: relative; padding-top: 56.25%; overflow: hidden; }
.blog-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Выравниваем внутренние отступы карточек и межколоночный зазор как на главной */
.blog-card-content { padding: 1.5rem; display: flex; flex-direction: column; height: 100%; }
.blog-card-title { margin-bottom: 0.5rem; }
.blog-card-excerpt { flex-grow: 1; }
.read-more { margin-top: auto; }

.blog-card {
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.blog-card-img {
    position: relative;
    padding-top: 56.25%; /* 16:9 соотношение */
    overflow: hidden;
}

.blog-card-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.blog-card-date {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.75rem;
}

.blog-card-excerpt {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: auto;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 3rem 0;
}

.pagination li {
    margin: 0 0.25rem;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--dark-color);
}

.pagination a:hover {
    background-color: var(--light-color);
    text-decoration: none;
}

.pagination .active a {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .prev a,
.pagination .next a {
    width: auto;
    padding: 0 15px;
}

/* Страница отдельного поста */
.post-header {
    margin-bottom: 2rem;
}

.post-meta {
    color: var(--gray-color);
    margin-bottom: 1rem;
}

.post-featured-img {
    margin-bottom: 2rem;
    border-radius: 5px;
    overflow: hidden;
}

.post-content {
    margin-bottom: 3rem;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
}

.post-content img {
    border-radius: 5px;
    margin: 1.5rem 0;
}

/* Страница контактов */
.contact-form {
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
}

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 5px;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* Страница "О нас" */
.about-section {
    margin-bottom: 3rem;
}

.about-img {
    margin-bottom: 2rem;
    border-radius: 5px;
    overflow: hidden;
}

/* Подвал сайта */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-col {
    margin-bottom: 2rem;
}

.footer h4 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.footer-menu li {
    margin-bottom: 0;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-menu a:hover {
    color: #fff;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    /* убран верхний бордер, чтобы не было оранжевой/светлой линии */
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Адаптивность */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .footer-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .footer-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 991px) {
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 767px) {
    .header-inner {
        flex-wrap: wrap;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .footer-col {
        width: 100%;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Lightbox для изображений */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* Плавный скролл */
html {
    scroll-behavior: smooth;
}

