/* ============================================
   БАЗОВЫЕ СБРОСЫ И НАСТРОЙКИ
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ============================================
   ОБЩИЕ СТИЛИ ДЛЯ СЕКЦИЙ И БЛОКОВ
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow: hidden;
}

.section {
    padding: 50px 0 30px;
    width: 100%;
    overflow: hidden;
}

.section--gray {
    background-color: #f0f0f0;
}

.section--white {
    background-color: #ffffff;
}

.section__title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
    word-wrap: break-word;
    max-width: 100%;
}

.section__subtitle {
    font-size: 20px;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 75px;
    color: #333;
    padding: 0 15px;
}

/* ============================================
   БЛОК "О ЖУРНАЛЕ"
   ============================================ */
.about__content {
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
}

.about__text {
    text-align: center;
    font-size: 20px;
    line-height: 1.9;
    margin-bottom: 30px;
    color: #222;
    word-wrap: break-word;
    max-width: 100%;
    padding: 0 5px;
}

.about__text:last-child {
    margin-bottom: 0;
}

.about__gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 50px;
    width: 100%;
}

.about__gallery-item {
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.about__gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.about__gallery-item:hover img {
    transform: scale(1.03);
}

/* ============================================
   РЕДКОЛЛЕГИЯ
   ============================================ */
.team {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 30px;
    width: 100%;
}

.team__member {
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.team__photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    border: 3px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.team__member:hover .team__photo {
    border-color: #000000;
}

.team__name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.team__role {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.team__bio {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    word-wrap: break-word;
}

/* ============================================
   КОНТАКТЫ
   ============================================ */
.contacts {
    text-align: center;
    padding: 20px 0;
    width: 100%;
}

.contacts__item {
    margin-bottom: 10px;
    font-size: 18px;
    word-wrap: break-word;
    padding: 0 10px;
}

.contacts__item strong {
    font-weight: 600;
}

.contacts__item a {
    color: #000000;
    transition: color 0.3s ease;
    word-wrap: break-word;
}

.contacts__item a:hover {
    color: #064d2b;
}

/* ============================================
   ПАРТНЕРЫ (для блока "Где купить")
   ============================================ */
.grid--partners {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
    gap: 30px;
    width: 100%;
}

.grid__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.partner-logo-wrapper {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    padding: 10px;
}

.partner-logo {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Специально для Wildberries - уменьшенное изображение */
.grid__item:first-child .partner-logo {
    max-height: 70%;
    max-width: 70%;
}

.btn--mt {
    margin-top: 5px;
}

/* ============================================
   ПАРТНЕРЫ (для блока "Партнеры журнала")
   ============================================ */
.grid--partners-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr) !important;
    align-items: center;
    gap: 20px 30px;
    width: 100%;
}

.partners__logo {
    max-height: 120px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.partners__logo:hover {
    filter: none;
    transform: scale(1.05);
}

/* ============================================
   ПОДПИСКА
   ============================================ */
.grid--subscription {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 900px !important;
    margin: 0 auto !important;
}

.card--subscription {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 25px 20px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.card--subscription:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1) !important;
}

.card__icon {
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 60px !important;
    padding: 8px !important;
}

.card__icon img {
    max-height: 45px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.card__subtitle {
    font-size: 16px !important;
    margin-bottom: 12px !important;
    font-weight: 600 !important;
    word-wrap: break-word !important;
}

.card--subscription .btn {
    margin-top: auto !important;
    min-width: 130px !important;
    padding: 8px 20px !important;
    font-size: 13px !important;
    min-height: 38px !important;
}

/* ============================================
   ФУТЕР
   ============================================ */
footer {
    background-color: #ffffff;
    padding: 30px 20px;
    border-top: 1px solid #eaeaea;
    width: 100%;
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 80px;
    width: 100%;
    padding: 0 10px;
}

.footer__copyright {
    font-size: 14px;
    color: #000000;
    word-wrap: break-word;
}

.footer__social {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.footer__social .social-links__link svg {
    width: 30px;
    height: 30px;
    fill: #000000;
    transition: fill 0.3s ease;
}

.footer__social .social-links__link:hover svg {
    fill: #064d2b;
}

/* ============================================
   КНОПКА "НАВЕРХ" (СКРОЛЛ-ТОП)
   ============================================ */
.scroll-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    background: #000000 !important;
    border: none !important;
    border-radius: 30px !important;
    padding: 10px 18px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 1000 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    font-family: inherit !important;
}

.scroll-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.scroll-top:hover {
    background: #064d2b !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
}

.scroll-top:active {
    transform: translateY(0px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.scroll-top svg {
    width: 14px !important;
    height: 14px !important;
    fill: #ffffff !important;
    transition: transform 0.3s ease !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.scroll-top:hover svg {
    transform: translateY(-2px) !important;
}

/* ============================================
   СОЦИАЛЬНЫЕ ИКОНКИ
   ============================================ */
.social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.social-links__link {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.social-links__link svg {
    width: 30px;
    height: 30px;
    fill: #000000;
    transition: fill 0.3s ease;
}

.social-links__link:hover svg {
    fill: #064d2b;
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ БОЛЬШИХ ЭКРАНОВ (1200px+)
   ============================================ */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 40px;
    }

    .section {
        padding: 50px 0 40px;
    }

    .section__title {
        font-size: 38px;
        margin-bottom: 50px;
    }

    .section__subtitle {
        font-size: 22px;
        margin-bottom: 80px;
    }

    .about__text {
        font-size: 22px;
        line-height: 2;
        margin-bottom: 35px;
    }

    .about__gallery {
        gap: 30px;
        margin-top: 60px;
    }

    .about__gallery-item img {
        height: 350px;
    }

    .team {
        gap: 50px 40px;
    }

    .team__photo {
        width: 140px;
        height: 140px;
    }

    .team__name {
        font-size: 22px;
    }

    .team__role {
        font-size: 16px;
    }

    .team__bio {
        font-size: 15px;
    }

    .grid--partners {
        gap: 40px;
    }

    .partner-logo-wrapper {
        max-width: 220px;
    }

    .grid--subscription {
        gap: 25px !important;
        max-width: 900px !important;
    }

    .card--subscription {
        padding: 30px 25px !important;
    }

    .card__icon {
        height: 70px !important;
    }

    .card__icon img {
        max-height: 50px !important;
    }

    .card__subtitle {
        font-size: 18px !important;
    }

    .card--subscription .btn {
        min-width: 140px !important;
        padding: 10px 24px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }

    .partners__logo {
        max-height: 150px;
        max-width: 220px;
    }

    .contacts__item {
        font-size: 20px;
    }

    .footer__container {
        min-height: 100px;
        padding: 20px 0;
    }
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ СРЕДНИХ ЭКРАНОВ (961-1199px)
   ============================================ */
@media (min-width: 961px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 30px;
    }

    .section {
        padding: 40px 0 35px;
    }

    .section__title {
        font-size: 34px;
    }

    .about__text {
        font-size: 20px;
    }

    .about__gallery {
        gap: 25px;
    }

    .about__gallery-item img {
        height: 280px;
    }

    .team {
        gap: 40px 30px;
    }

    .team__photo {
        width: 130px;
        height: 130px;
    }

    .grid--partners {
        gap: 30px;
    }

    .partner-logo-wrapper {
        max-width: 180px;
    }

    .grid--subscription {
        gap: 20px !important;
        max-width: 100% !important;
    }

    .card--subscription {
        padding: 25px 20px !important;
    }

    .card__icon {
        height: 60px !important;
    }

    .card__icon img {
        max-height: 40px !important;
    }

    .card__subtitle {
        font-size: 16px !important;
    }

    .card--subscription .btn {
        min-width: 120px !important;
        padding: 8px 18px !important;
        font-size: 13px !important;
        min-height: 36px !important;
    }

    .partners__logo {
        max-height: 130px;
        max-width: 180px;
    }

    .scroll-top {
        padding: 9px 16px !important;
        font-size: 13px !important;
        bottom: 25px !important;
        right: 25px !important;
    }

    .scroll-top svg {
        width: 13px !important;
        height: 13px !important;
    }
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ ПЛАНШЕТОВ (641-960px)
   ============================================ */
@media (min-width: 641px) and (max-width: 960px) {
    .container {
        padding: 0 20px;
    }

    .about__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__gallery-item img {
        height: 250px;
    }

    .section__title {
        font-size: 32px;
    }

    .about__text {
        font-size: 19px;
    }

    .team {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px 25px;
    }

    .team__photo {
        width: 110px;
        height: 110px;
    }

    .grid--partners {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px 30px;
    }

    .partner-logo-wrapper {
        max-width: 160px;
    }

    .grid--subscription {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        max-width: 100% !important;
    }

    .card--subscription {
        padding: 25px 18px !important;
    }

    .card__icon {
        height: 55px !important;
    }

    .card__icon img {
        max-height: 38px !important;
    }

    .card__subtitle {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .card--subscription .btn {
        min-width: 110px !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        min-height: 34px !important;
    }

    .partners__logo {
        max-height: 140px;
        max-width: 180px;
    }

    .grid--partners-5 {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .scroll-top {
        padding: 9px 16px !important;
        font-size: 13px !important;
        bottom: 25px !important;
        right: 25px !important;
    }

    .scroll-top svg {
        width: 13px !important;
        height: 13px !important;
    }
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ МАЛЕНЬКИХ ПЛАНШЕТОВ (481-640px)
   ============================================ */
@media (min-width: 481px) and (max-width: 640px) {
    .container {
        padding: 0 15px;
    }

    .about__gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .about__gallery-item img {
        height: 200px;
    }

    .grid--partners {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .about__text {
        font-size: 17px;
    }

    .contacts__item {
        font-size: 17px;
    }

    .section__title {
        font-size: 26px;
    }

    .team {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }

    .team__photo {
        width: 100px;
        height: 100px;
    }

    .team__name {
        font-size: 18px;
    }

    .team__role {
        font-size: 14px;
    }

    .team__bio {
        font-size: 13px;
    }

    .grid--subscription {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        max-width: 400px !important;
    }

    .card--subscription {
        padding: 20px 15px !important;
        max-width: 100% !important;
    }

    .card__icon {
        height: 50px !important;
        margin-bottom: 10px !important;
    }

    .card__icon img {
        max-height: 35px !important;
    }

    .card__subtitle {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }

    .card--subscription .btn {
        min-width: 110px !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        min-height: 34px !important;
    }

    .partner-logo-wrapper {
        max-width: 140px;
    }

    .partners__logo {
        max-height: 120px;
        max-width: 160px;
    }

    .grid--partners-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Увеличенная кнопка для мобильных */
    .scroll-top {
        padding: 10px 16px !important;
        font-size: 13px !important;
        border-radius: 25px !important;
        bottom: 20px !important;
        right: 20px !important;
    }

    .scroll-top svg {
        width: 13px !important;
        height: 13px !important;
    }
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ МОБИЛЬНЫХ ТЕЛЕФОНОВ (до 480px)
   ============================================ */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .section {
        padding: 30px 0 20px;
    }

    .section__title {
        font-size: 22px;
        margin-bottom: 25px;
    }

    .section__subtitle {
        font-size: 16px;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    .about__content {
        padding: 0 5px;
    }

    .about__text {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 20px;
        padding: 0 5px;
    }

    .about__gallery {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }

    .about__gallery-item img {
        height: 200px;
    }

    .grid--partners {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .grid--partners-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid--subscription {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        max-width: 340px !important;
    }

    .card--subscription {
        padding: 18px 14px !important;
        max-width: 100% !important;
    }

    .card__icon {
        height: 45px !important;
        margin-bottom: 8px !important;
        padding: 6px !important;
    }

    .card__icon img {
        max-height: 32px !important;
    }

    .card__subtitle {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    .card--subscription .btn {
        min-width: 100px !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
        min-height: 32px !important;
    }

    .team {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px 15px;
    }

    .team__photo {
        width: 90px;
        height: 90px;
    }

    .team__name {
        font-size: 16px;
    }

    .team__role {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .team__bio {
        font-size: 12px;
        line-height: 1.4;
    }

    .contacts__item {
        font-size: 15px;
        padding: 0 5px;
    }

    .partner-logo-wrapper {
        max-width: 120px;
    }

    .partners__logo {
        max-height: 110px;
        max-width: 140px;
    }

    .footer__container {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        min-height: auto;
        padding: 10px 5px;
    }

    .footer__copyright {
        font-size: 12px;
        order: 2;
    }

    .footer__social {
        order: 1;
    }

    .footer__social .social-links__link svg {
        width: 26px;
        height: 26px;
    }

    /* Увеличенная кнопка для мобильных */
    .scroll-top {
        padding: 9px 14px !important;
        font-size: 12px !important;
        border-radius: 22px !important;
        bottom: 16px !important;
        right: 16px !important;
        gap: 5px !important;
        min-width: 70px !important;
        min-height: 38px !important;
    }

    .scroll-top svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* ============================================
   АДАПТАЦИЯ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ (до 360px)
   ============================================ */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }

    .section__title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .about__text {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }

    .about__gallery-item img {
        height: 160px;
    }

    .team {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px 12px;
    }

    .team__photo {
        width: 75px;
        height: 75px;
    }

    .team__name {
        font-size: 14px;
    }

    .team__role {
        font-size: 12px;
    }

    .team__bio {
        font-size: 11px;
    }

    .grid--partners {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .grid--partners-5 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid--subscription {
        gap: 10px !important;
        max-width: 300px !important;
    }

    .card--subscription {
        padding: 14px 10px !important;
    }

    .card__icon {
        height: 40px !important;
        margin-bottom: 6px !important;
        padding: 5px !important;
    }

    .card__icon img {
        max-height: 28px !important;
    }

    .card__subtitle {
        font-size: 13px !important;
        margin-bottom: 6px !important;
    }

    .card--subscription .btn {
        min-width: 90px !important;
        padding: 5px 12px !important;
        font-size: 11px !important;
        min-height: 30px !important;
    }

    .partner-logo-wrapper {
        max-width: 100px;
    }

    .partners__logo {
        max-height: 100px;
        max-width: 120px;
    }

    .contacts__item {
        font-size: 14px;
    }

    .footer__container {
        padding: 8px 5px;
        gap: 10px;
    }

    .footer__copyright {
        font-size: 11px;
    }

    .footer__social .social-links__link svg {
        width: 24px;
        height: 24px;
    }

    /* Увеличенная кнопка для очень маленьких экранов */
    .scroll-top {
        padding: 7px 12px !important;
        font-size: 11px !important;
        border-radius: 18px !important;
        bottom: 12px !important;
        right: 12px !important;
        gap: 4px !important;
        min-width: 60px !important;
        min-height: 34px !important;
    }

    .scroll-top svg {
        width: 10px !important;
        height: 10px !important;
    }
}