/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #EEEEEE;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(120%) blur(8px);
    -webkit-backdrop-filter: saturate(120%) blur(8px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.org-badge {
    color: #444444;
    font-weight: 500;
}

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

.nav-menu a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px; /* немного меньше шрифт меню */
    position: relative; /* для анимации подчёркивания */
}

.nav-menu a:hover {
    color: #666666;
}

/* Анимированное подчёркивание для пунктов меню (кроме кнопки языка) */
.nav-menu a:not(.lang-link)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    background: #333333;
    transition: width 180ms cubic-bezier(.22,.61,.36,1);
}
.nav-menu a:hover:not(.lang-link)::after {
    width: 100%;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    background: transparent;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 140px;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.nav-text {
    color: #5a6c7d;
    font-size: 14px;
    font-weight: 500;
}

/* Кнопка переключения языка Eng — серый фон как кнопка */
.lang-link {
    font-size: 13px;
    font-weight: 600;
    color: #333333;
    background: #F2F2F2;
    border: 1px solid #D0D0D0;
    padding: 6px 10px;
    border-radius: 8px;
    line-height: 1;
    text-decoration: none;
}
.lang-link:hover {
    background: #E6E6E6;
    color: #000000;
}

/* Main content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column; /* элементы (container) идут вертикально */
    justify-content: flex-start; /* сверху по вертикали */
    align-items: center; /* центр по горизонтали */
    padding: 96px 0 40px;
    position: relative;
    overflow: visible;
    min-height: 100vh;
}

/* Canvas for animated background stripes (limited to main-content) */
.animated-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 3fr 2fr; /* 60% / 40%: колонка заголовка шире */
    gap: 60px;
    align-items: start; /* контент по верхнему краю */
    width: 100%;
    margin-top: 32px; /* увеличенный отступ сверху на десктопе */
}

.image-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-image {
    max-width: 100%;
    height: auto;
}

.text-section {
    padding-left: 20px;
}

.main-title {
    font-family: 'Dela Gothic One', 'Manrope', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 20px;
    line-height: 1.1;
}

.main-description {
    font-size: 15px; /* немного меньше шрифт */
    color: #555555;
    margin-top: 10px; /* опускаем абзац ниже */
    margin-bottom: 12px; /* уменьшаем расстояние до кнопки */
    line-height: 1.6;
}

.cta-button {
    background: #333333;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    align-self: flex-start; /* кнопка не растягивается по ширине колонки */
    width: auto;
}

/* Текстовая ссылка CTA вместо кнопки */
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    font-weight: 600;
    text-decoration: none;
}
.cta-link:hover { color: #000000; text-decoration: underline; }

/* Hero columns (new structure) */
.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 8px; /* компактнее между текстом и кнопкой */
    align-items: flex-start; /* контент сверху, по левому краю */
}

.hero-empty {
    min-height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1; /* занимает оставшееся вертикальное пространство внутри main-content */
}

/* Character in hero */
.character {
    position: relative;
    width: 280px;
    height: 280px;
}

.character-body {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 160ms cubic-bezier(.22,.61,.36,1);
    transform-origin: 50% 50%;
}

.eye {
    position: absolute;
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 3px solid #000000;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 140ms cubic-bezier(.22,.61,.36,1);
}

.eye-left { left: 92px; top: 96px; }
.eye-right { right: 92px; top: 96px; }

.pupil {
    width: 16px;
    height: 16px;
    background: #000000;
    border-radius: 50%;
    transform: translate(0, 0);
    transition: transform 140ms cubic-bezier(.22,.61,.36,1);
}

.mouth {
    position: absolute;
    left: 50%;
    top: 150px;
    width: 90px;
    height: 45px;
    transform: translateX(-50%);
    border-bottom: 8px solid #000000;
    border-radius: 0 0 90px 90px;
    transition: transform 160ms cubic-bezier(.22,.61,.36,1);
}

@media (max-width: 600px) {
    .character { width: 220px; height: 220px; }
    .eye { width: 36px; height: 36px; border-width: 3px; }
    .pupil { width: 14px; height: 14px; }
    .eye-left { left: 70px; top: 74px; }
    .eye-right { right: 70px; top: 74px; }
    .mouth { top: 120px; width: 74px; height: 38px; border-bottom-width: 7px; }
}

/* Footer styles */
.footer {
    background: #0F0F10;
    border-top: 1px solid #2A2A2A;
    padding: 56px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 0.5fr 1.1fr 1.5fr 1.5fr;
    gap: 32px;
    align-items: start;
}

.footer-brand { display: flex; align-items: center; }
.footer-logo-small { width: 32px; height: auto; }

.footer-menu-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-menu-list a { color: #EAEAEA; text-decoration: none; font-weight: 600; font-size: 14px; }
.footer-menu-list a:hover { color: #FFFFFF; text-decoration: underline; }

.footer-heading { font-family: 'Lora', Georgia, 'Times New Roman', serif; font-weight: 700; color: #F5F5F5; margin-bottom: 8px; font-size: 14px; }
.footer-address p { color: #CFCFCF; line-height: 1.5; font-size: 14px; }

.footer-copy { display: block; }
.footer-copy p { color: #B0B0B0; font-size: 14px; flex: 1; }
.scroll-top { margin-left: auto; height: 36px; padding: 8px 12px; width: auto; min-width: 36px; border-radius: 18px; border: 1px solid #3A3A3A; background: #1C1C1E; color: #EDEDED; cursor: pointer; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.scroll-top:hover { background: #2A2A2A; }

.footer-bottom { border-top: 1px solid #2A2A2A; margin-top: 24px; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; }
.footer-bottom-left { color: #B0B0B0; font-size: 14px; }
.footer-bottom-right { display: flex; align-items: center; gap: 8px; }

@media (max-width: 768px) {
    .footer { padding: 40px 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; justify-items: center; text-align: center; }
    .footer-menu-list { justify-items: center; }
    .footer-bottom { justify-content: center; flex-direction: column; gap: 10px; text-align: center; }
    .footer-copy p { text-align: center; }
    .scroll-top { display: none; }
}

/* Responsive design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
        text-align: center;
        margin-top: 120px; /* ещё больше отступа на мобильных, чтобы хедер не перекрывал */
    }
    
    .text-section {
        padding-left: 0;
    }
    
    .main-title {
        font-size: 30px;
    }
    
    .main-description {
        font-size: 15px; /* согласуем размер на мобильных */
        margin-top: 10px; /* сохраняем смещение вниз */
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .main-image {
        max-width: 60%;
        height: auto;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-text {
        text-align: center;
        font-size: 10px;
    }
    
    .footer-email {
        font-size: 10px;
    }
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    font-family: 'Dela Gothic One', 'Manrope', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
    line-height: 1.1;
}

/* Mission */
.mission-section {
    background: #FFFFFF;
}
.mission-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
.mission-image { display: flex; justify-content: flex-start; align-items: flex-start; }
.mission-illustration { width: 100%; max-width: 420px; height: auto; border-radius: 16px; }
.mission-text { display: flex; flex-direction: column; justify-content: center; align-self: stretch; }
.mission-text p {
    color: #333333;
    line-height: 1.6;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .mission-grid { grid-template-columns: 1fr; }
    .mission-image { justify-content: center; }
    .mission-illustration { max-width: 80%; }
}

/* Help */
.help-intro p {
    color: #333333;
    line-height: 1.6;
}

.help-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 20px;
}

.help-card {
    padding: 16px 0 20px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 0;
    justify-content: flex-start;
}

.help-card-icon {
    width: 64px;
    height: auto;
    display: block;
}

.help-card-subtext {
    display: none;
}

.help-card-title {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

.help-card-desc {
    font-size: 14px;
    color: #555555;
    line-height: 1.5;
}

/* Если остались декоративные цифры — скрываем */
.help-card-number { display: none; }

.help-card-number {
    font-size: 140px;
    font-weight: 200;
    line-height: 1;
    color: #DDDDDD;
    /* лёгкая стилизация под тонкие цифры, можно поменять цвет */
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Универсальная сетка для 70/30 и 30/70 */
    gap: 20px;
    margin-top: 20px;
    grid-auto-flow: row;
    grid-auto-rows: auto;
}

.blog-card {
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    position: relative;
}


/* Явное позиционирование карточек по колонкам/строкам */
.blog-card.large1 { grid-column: 1 / span 7; grid-row: 1; }
.blog-card.small1 { grid-column: 8 / span 3; grid-row: 1; }
.blog-card.small2 { grid-column: 1 / span 3; grid-row: 2; }
.blog-card.large2 { grid-column: 4 / span 7; grid-row: 2; }

/* Компактные правые карточки: изображение слева, контент справа */
.blog-card.compact {
    display: block;
}

.blog-card.compact .blog-image-wrap {
    border-radius: 12px 12px 0 0;
    aspect-ratio: 1 / 1;
    height: auto;
}

.blog-card.compact .blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card.compact .blog-card-body {
    padding: 16px 16px 20px;
}

.blog-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #FFFFFF;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.blog-card.featured .blog-image-wrap {
    aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-card.large1 { grid-column: auto; grid-row: auto; }
    .blog-card.small1 { grid-column: auto; grid-row: auto; }
    .blog-card.small2 { grid-column: auto; grid-row: auto; }
    .blog-card.large2 { grid-column: auto; grid-row: auto; }
}

/* Mobile adjustments for new hero layout */
@media (max-width: 768px) {
    .hero-right { align-items: center; }
}

/* Mobile hero ordering and spacing adjustments */
@media (max-width: 768px) {
    /* минимальный верхний отступ на мобильных для .content-wrapper */
    .content-wrapper { margin-top: 8px; }
    /* персонажа выводим перед текстом */
    .main-content > .container.hero-empty { order: -1; }
    /* на мобильных не растягиваем персонажа по высоте и делаем отступ 20px снизу */
    .hero-empty { flex: 0 0 auto; margin-bottom: 20px; }
    /* центрируем контент по вертикали внутри первого блока на мобильных */
    .main-content { justify-content: center; }
}

@media (max-width: 768px) {
    .blog-card.compact { display: block; }
    .blog-card.compact .blog-image-wrap { height: 200px; border-radius: 12px 12px 0 0; aspect-ratio: auto; }
    .blog-card.compact .blog-image { object-fit: contain; }
}

.blog-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin: 0;
    display: block;
}

.blog-card-body {
    /* Увеличиваем отступы слева/справа/снизу, верх оставляем как есть */
    padding: 16px 24px 24px;
}

.blog-title {
    font-family: 'Oswald', 'Manrope', sans-serif;
    font-size: 20px;
    color: #333333;
    line-height: 1.2;
    margin-bottom: 8px;
    font-weight: 600;
}

.blog-excerpt {
    color: #555555;
    line-height: 1.4;
}

.blog-meta {
    font-size: 12px;
    color: #777777;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-readmore {
    display: inline-block;
    margin-top: 10px;
    color: #333333;
    font-weight: 500;
    text-decoration: underline;
}

.blog-readmore:hover {
    color: #000000;
    text-decoration: none;
}

/* Tags before titles */
.blog-tags {
    list-style: none;
    margin: 0 0 6px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tags li {
    font-size: 12px;
    color: #333333;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 4px 8px;
}

/* New label for first article */
.blog-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #333333;
    color: #FFFFFF;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    line-height: 1;
}

/* Footer logo opacity */
.footer-logo-small {
    opacity: 0.3;
}

/* Override footer heading font to playful rounded */
.footer-heading {
    font-family: 'Dela Gothic One', 'Manrope', sans-serif;
}

/* Footer additions */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-meta {
    font-size: 12px;
    color: #555555;
    opacity: 0.9;
}

/* Responsive sections */
@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .help-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .help-card {
        min-height: 0;
        padding: 16px 0 16px;
    }
    .help-card-icon { width: 48px; }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Единый размер верхних изображений на мобильных */
    .blog-image-wrap { height: 200px; aspect-ratio: auto; }
    .blog-image { object-fit: contain; }

    .footer-meta {
        font-size: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 28px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .cta-button {
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* Subscribe (Newsletter) */
/* Центрированная подписка */
.subscribe-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.subscribe-centered .section-title { margin-bottom: 8px; }
.subscribe-centered .subscribe-text {
    max-width: 720px;
    width: 100%;
    margin: 0 auto 12px;
    text-align: center;
}
.subscribe-form { justify-content: center; }
.subscribe-input { max-width: 420px; width: 100%; }

/* Больше отступа снизу после блока подписки */
.subscribe-section { padding-bottom: 160px; }

.subscribe-text {
    color: #333333;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.subscribe-form {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.subscribe-input {
    flex: 1;
    min-width: 220px;
    padding: 12px 14px;
    border: 1px solid #D0D0D0;
    border-radius: 10px;
    font-size: 14px;
}

.subscribe-button {
    background: #333333;
    color: #FFFFFF;
    border: none;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
}
.subscribe-button:hover { background: #000000; }

.subscribe-note {
    font-size: 12px;
    color: #777777;
    margin: 0;
}

@media (max-width: 768px) {
    .subscribe-form { flex-direction: column; align-items: stretch; }
    .subscribe-button { width: 100%; }
    .subscribe-section { padding-bottom: 96px; }
}

/* Smooth in-page scrolling and anchor offset for fixed header */
html { scroll-behavior: smooth; }
.main-content, .section, .footer { scroll-margin-top: 96px; }
@media (max-width: 768px) {
  .main-content, .section, .footer { scroll-margin-top: 120px; }
}