/* === ОСНОВНЫЕ НАСТРОЙКИ === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8f0fc 100%);
    color: #4a5568;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ХЕДЕР === */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
}

/* Навигация для десктопа */
#mainNav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

#mainNav ul li a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#mainNav ul li a:hover {
    color: #7aa5d9;
}

/* Бургер-меню (скрыто на десктопе) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 28px;
    height: 2px;
    background: #4a5568;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* === ЗАГОЛОВОК === */
.section-title {
    text-align: center;
    font-size: 2rem;
    margin: 40px 0 30px;
    color: #4a5568;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #7aa5d9;
}

/* === СЕТКА - 3 КАРТИНКИ В РЯДУ === */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px 0;
 margin-top: 0rem;

}

/* === КАРТОЧКА === */
.magazine-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем всё содержимое по горизонтали */
    text-align: center; /* Центрируем текст */
}

.magazine-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(122, 165, 217, 0.1);
}

/* Ссылка с картинкой - центрируем */
.magazine-card a:first-child {
    display: flex;
    justify-content: center; /* Центрируем по горизонтали */
    width: 100%;
    line-height: 0;
}

/* ИЗОБРАЖЕНИЕ - центрировано */
.magazine-cover {
    width: 100%;
    max-width: 300px; /* Ограничиваем максимальную ширину */
    height: auto;
    aspect-ratio: 5/7;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    margin: 0 auto; /* Центрируем */
}

.magazine-card:hover .magazine-cover {
    transform: scale(1.03);
}

/* Контент карточки */
.magazine-info {
    padding: 20px 15px 15px;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center; /* Центрируем содержимое */
    width: 100%;
}

.magazine-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.4;
    text-align: center; /* Центрируем текст */
}

.magazine-info p {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 15px;
    line-height: 1.5;
    flex: 1;
    text-align: center; /* Центрируем текст */
}

/* Кнопка */
.btn {
    display: inline-block;
    padding: 8px 20px;
    background: #f0f5ff;
    color: #4a5568;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    margin: 0 auto; /* Центрируем кнопку */
}
.btn2 {
    display: inline-block;
    padding: 8px 10px;
    background: #f0f5ff;
    color: #4a5568;
    text-decoration: none;
    border-radius: 0px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    margin: 0 auto; /* Центрируем кнопку */
}

.btn:hover {
    background: #7aa5d9;
    color: white;
    border-color: #7aa5d9;
}
.btn2:hover {
    background: #d7e5f5;
    color: white;
    border-color: #d7e5f5;
}


/* Основное изображение (если есть) */
.mfp-img2.img-shadow {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: block;
    margin: 30px auto;
}

/* === ФУТЕР === */
footer {
    background: #fff;
    margin-top: 60px;
    padding: 40px 0 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
}

.footer-links a {
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #7aa5d9;
}

.copyright {
    color: #a0aec0;
    font-size: 0.85rem;
}

/* === АДАПТИВНОСТЬ === */

/* Планшеты - переход на 2 колонки */
@media (max-width: 900px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .magazine-cover {
        max-width: 260px;
    }
}

/* Мобильные устройства - 1 колонка */
@media (max-width: 600px) {
    /* Бургер-меню */
    .menu-toggle {
        display: flex;
    }
    
    /* Скрываем навигацию по умолчанию */
    #mainNav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1000;
    }
    
    #mainNav.active {
        visibility: visible;
        opacity: 1;
    }
    
    #mainNav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        padding: 0;
    }
    
    #mainNav ul li a {
        font-size: 1.2rem;
        color: #2d3748;
    }
    
    /* Анимация бургера */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Сетка - 1 колонка */
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin: 30px 0 20px;
    }
    
    /* На мобильных картинка на всю ширину */
    .magazine-cover {
        max-width: 100%; /* На мобильных на всю ширину */
        width: 100%;
    }
    
    .magazine-info h3 {
        font-size: 1rem;
    }
    
    .logo img {
        height: 40px;
    }
}

/* Маленькие телефоны */
@media (max-width: 400px) {
    .magazine-grid {
        max-width: 100%;
    }
    
    .magazine-info {
        padding: 15px 12px;
    }
    
    .magazine-info h3 {
        font-size: 0.95rem;
    }
    
    .magazine-info p {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

/* Большие экраны */
@media (min-width: 1400px) {
    .magazine-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1300px;
        margin: 0 auto;
    }
    
    .magazine-cover {
        max-width: 300px;
    }
}
/* === КНОПКА "НАВЕРХ" С ИКОНКОЙ === */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #7aa5d9;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(122, 165, 217, 0.3);
    z-index: 999;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #6389b8;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(122, 165, 217, 0.4);
}

.scroll-to-top i {
    font-size: 24px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .scroll-to-top i {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .scroll-to-top i {
        font-size: 18px;
    }
}
/* === ОДНА КАРТОЧКА ПО ЦЕНТРУ === */
.magazine-grid0 {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 20px;
}

.magazine-card0 {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
}

/* Центрируем картинку */
.magazine-card0 a:first-child {
    display: flex;
    justify-content: center;
    background: #f8fafd;
    width: 100%;
}

.magazine-card0 .magazine-cover {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: contain;
}

.magazine-card0 .magazine-info {
    padding: 15px 15px 20px;
    text-align: center;
}

.magazine-card0 .btn {
    display: inline-block;
    padding: 8px 25px;
    background: #f0f5ff;
    color: #4a5568;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.magazine-card0 .btn:hover {
    background: #7aa5d9;
    color: white;
}

/* Адаптивность */
@media (max-width: 480px) {
    .magazine-card0 {
        max-width: 280px;
    }
    
    .magazine-card0 .magazine-cover {
        max-height: 320px;
    }
}
h3 {
    text-transform: uppercase;
 font-family: "Roboto", monospace;
}