:root {
    --primary-color: #18143E;
    --text-light: #ffffff;
    --spacing-large: 80px;
    --spacing-medium: 40px;
    --spacing-small: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--primary-color);
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(rgba(24, 20, 62, 0.7), rgba(24, 20, 62, 0.7)),
                url('assets/images/desktop-banner.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: var(--spacing-medium);
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    gap: var(--spacing-large);
    align-items: center;
}

.hero-text-column {
    flex: 1;
    position: relative;
}

.hero-image-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-small);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-soully {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.slogan {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-medium);
}

.hero-text {
    max-width: 800px;
}

.highlight-text {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: var(--spacing-small);
}

.description {
    max-width: 600px;
    font-size: 1.2rem;
    margin-bottom: var(--spacing-medium);
    opacity: 0.9;
}

.disclaimer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 80%;
    font-size: 0.8rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
    z-index: 1000;
    background-color: rgba(24, 20, 62, 0.9);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
    line-height: 1.8;
}

.disclaimer-hidden {
    transform: translateY(100%);
    opacity: 0;
}

/* Features Section */
.features {
    padding: var(--spacing-large) var(--spacing-medium);
    background-color: var(--primary-color);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.feature-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

/* Общие стили для изображений */
.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.feature-content {
    position: relative;
    z-index: 2;
    padding: var(--spacing-small);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}

/* Стили для первой и шестой ячейки */
.feature-item.wide,
.feature-column .feature-item:not(.feature-row .feature-item) {
    aspect-ratio: 1;
    position: relative;
    height: 0;
    padding-bottom: 100%;
}

.feature-item.wide .feature-content,
.feature-column .feature-item:not(.feature-row .feature-item) .feature-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.feature-item {
    padding: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.feature-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.feature-item p {
    opacity: 0.9;
    text-align: left;
    max-width: 90%;
}

.feature-item.right-column {
    grid-column: auto;
}

.feature-item.double-width {
    width: 100%;
}

.feature-item.full-width {
    grid-column: 1 / -1;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: fadeIn 0.8s ease-out forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

/* Media Queries */
@media (max-width: 1200px) {
    .hero-content {
        padding: 0 var(--spacing-medium);
    }
}

@media (max-width: 768px) {
    .hero {
        background: linear-gradient(rgba(24, 20, 62, 0.7), rgba(24, 20, 62, 0.7)),
                    url('assets/images/mobile-banner.webp');
        background-size: cover;
        background-position: center;
        padding: var(--spacing-medium) var(--spacing-small);
    }

    .hero h1 {
        font-size: 3rem;
    }

    .slogan {
        font-size: 2rem;
    }

    .highlight-text {
        font-size: 1.5rem;
    }

    .description {
        font-size: 1.1rem;
    }

    .disclaimer {
        position: fixed;
        bottom: 20px;
        right: 20px;
        max-width: 80%;
        font-size: 0.8rem;
    }

    .features,
    .gallery,
    .about-author,
    .program {
        padding: var(--spacing-medium) var(--spacing-small);
    }

    /* Полностью переопределяем структуру сетки */
    .feature-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
    }

    /* Убираем оригинальную структуру колонок */
    .feature-column {
        display: block;
    }

    .feature-row {
        display: block;
    }

    /* Все ячейки становятся одинаковыми блоками */
    .feature-item,
    .feature-item.wide,
    .feature-item.double-width,
    .feature-item.full-width {
        display: block;
        width: 100%;
        aspect-ratio: 1;
        margin-bottom: 4px;
    }

    /* Сброс позиционирования для всех ячеек */
    .feature-item {
        position: relative;
        height: auto;
        padding-bottom: 100%;
    }

    .feature-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: var(--spacing-small);
    }

    .feature-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-content {
        flex-direction: column;
        gap: var(--spacing-medium);
    }

    .hero-image-column {
        display: none;
    }

    .hero-image {
        max-height: 50vh;
    }

    .about-image-column {
        gap: var(--spacing-small);
        align-items: center;
        width: 100%;
    }

    .about-image {
        width: 50%;
        margin: 0 auto;
    }

    .program-image-column {
        align-items: center;
        width: 100%;
    }

    .program-image {
        width: 80%;
        margin: 0 auto;
    }
}

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

    .slogan {
        font-size: 1.8rem;
    }

    .highlight-text {
        font-size: 1.3rem;
    }

    .description {
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Style */
::selection {
    background: rgba(169, 169, 255, 0.3);
    color: var(--text-light);
}

/* Gallery Section */
.gallery {
    padding: var(--spacing-large) var(--spacing-medium);
    background-color: var(--primary-color);
}

.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 0 var(--spacing-small);
}

/* Позиционирование элементов в сетке */
.gallery-item:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }  /* 1-й скриншот */
.gallery-item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }  /* 2-й скриншот */
.gallery-title { grid-area: 1 / 3 / 2 / 5; }  /* Заголовок на 2 ячейки */
.gallery-item:nth-child(3) { grid-area: 2 / 1 / 3 / 2; }  /* 3-й скриншот */
.gallery-item:nth-child(4) { grid-area: 2 / 2 / 3 / 3; }  /* 4-й скриншот */
.gallery-item:nth-child(5) { grid-area: 2 / 3 / 3 / 4; }  /* 5-й скриншот */
.gallery-item:nth-child(6) { grid-area: 2 / 4 / 3 / 5; }  /* 6-й скриншот */
.gallery-item:nth-child(7) { grid-area: 3 / 2 / 4 / 3; }  /* 7-й скриншот */
.gallery-item:nth-child(8) { grid-area: 3 / 3 / 4 / 4; }  /* 8-й скриншот */

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-image {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.gallery-title {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    text-align: right;
    padding: 20px;
    padding-top: 0;
}

.gallery-title h2 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    margin-top: 0;
}

.gallery-title h3 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 20px;
}

.gallery-title p {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.8;
    white-space: pre-line;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 768px) {
    .gallery {
        padding: var(--spacing-medium) 0;
    }

    .gallery-grid {
        display: flex;
        gap: 20px;
        padding: 0 var(--spacing-small);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-item {
        flex: 0 0 calc(100% - var(--spacing-small) * 2);
        scroll-snap-align: center;
        transform: none;
        height: auto;
    }

    .gallery-item:hover {
        transform: none;
    }

    .gallery-image {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    /* Стилизация скроллбара */
    .gallery-grid::-webkit-scrollbar {
        height: 4px;
    }

    .gallery-grid::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }

    .gallery-grid::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    .gallery-title {
        display: none; /* Скрываем заголовок в мобильной версии */
    }
}

/* About Author Section */
.about-author {
    padding: var(--spacing-large) var(--spacing-medium);
    background-color: var(--primary-color);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-medium);
    padding: 0 var(--spacing-small);
}

.about-text-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.about-text-column h2 {
    font-size: 4.5rem;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 0;
}

.about-logo {
    font-size: 4.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--spacing-small);
}

.about-logo .icon-soully {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.about-image-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-small);
    align-items: flex-start;
}

.about-image {
    width: 50%;
    height: auto;
    border-radius: 16px;
}

.about-author-name {
    font-size: 1.4rem;
    line-height: 1.6;
    opacity: 0.9;
}

.author-highlight {
    color: #8FBFFA;
}

.author-list {
    list-style: none;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-top: -10px;
}

.author-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
}

.author-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 20px;
    height: 20px;
    background-image: url('assets/images/logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    filter: blur(1px);
}

@media (max-width: 768px) {
    .about-author {
        padding: var(--spacing-medium) var(--spacing-small);
    }

    .about-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-medium);
        padding: 0;
    }

    .about-text-column {
        align-items: center;
        text-align: center;
    }

    .about-logo {
        font-size: 2.2rem;
        justify-content: center;
    }

    .about-text-column h2 {
        font-size: 2.2rem;
        text-align: center;
    }

    .about-image-column {
        gap: var(--spacing-small);
    }

    .about-author-name {
        font-size: 1.2rem;
    }

    .about-image {
        width: 50%;
    }

    .author-list {
        font-size: 1.1rem;
    }
}

/* Program Section */
.program {
    padding: var(--spacing-large) var(--spacing-medium);
    background-color: var(--primary-color);
}

.program-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-medium);
    padding: 0 var(--spacing-small);
}

.program-text-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding-left: 0;
    min-height: 400px;
}

.program-text-column h2 {
    font-size: 3.8rem;
    font-weight: 400;
    line-height: 1.2;
    margin: 0;
    text-align: left;
}

.program-image-column {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.program-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.app-store-link {
    display: block;
    transition: transform 0.3s ease;
}

.app-store-link:hover {
    transform: translateY(-5px);
}

.app-store-button {
    width: 180px;
    height: auto;
}

.program-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--spacing-small) / 2);
}

.program-links .privacy-link {
    font-size: 1rem;
    margin-top: -10px;  /* Немного приблизим к кнопке */
}

/* Удаляем старую секцию privacy */
.privacy {
    display: none;
}

@media (max-width: 768px) {
    .program {
        padding: var(--spacing-medium) var(--spacing-small);
    }

    .program-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-medium);
        padding: 0;
    }

    .program-text-column {
        min-height: auto;
        gap: var(--spacing-medium);
    }

    .program-text-column h2 {
        font-size: 2.2rem;
    }

    .app-store-button {
        width: 140px;
    }

    .program-links {
        width: 100%;
        gap: calc(var(--spacing-small) / 2);  /* Уменьшаем отступ для мобильной версии */
    }
}

/* Privacy Section */
.privacy-page {
    background-color: var(--primary-color);
    min-height: 100vh;
    padding: var(--spacing-large) var(--spacing-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-large);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    color: var(--text-light);
}

.privacy-content h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-medium);
    color: #8FBFFA;
}

.privacy-content .last-updated {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: var(--spacing-large);
}

.privacy-content section {
    margin-bottom: var(--spacing-large);
}

.privacy-content h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-small);
    color: #8FBFFA;
}

.privacy-content p {
    line-height: 1.6;
    margin-bottom: var(--spacing-small);
    opacity: 0.9;
}

.privacy-content ul {
    list-style: none;
    padding-left: 20px;
    margin-bottom: var(--spacing-small);
}

.privacy-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.privacy-content ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #8FBFFA;
}

.privacy-content h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-small);
    color: #8FBFFA;
    margin-top: var(--spacing-medium);
}

@media (max-width: 768px) {
    .privacy-page {
        padding: var(--spacing-medium) var(--spacing-small);
        align-items: flex-start;
    }

    .privacy-content {
        padding: var(--spacing-medium);
    }

    .privacy-content h1 {
        font-size: 2rem;
    }

    .privacy-content h2 {
        font-size: 1.3rem;
    }
}

.email-link {
    color: #8FBFFA;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.email-link:hover {
    opacity: 0.8;
}