/* ===== СТРАНИЦА 4 ===== */
.page4-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 90px;
    box-sizing: border-box;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page4-container::-webkit-scrollbar {
    display: none;
}

/* Сетка для карточек (2 колонки) */
.items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

/* Базовая карточка */
.item-card {
    border-radius: 20px;
    padding: 15px;
    border: none;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    height: auto;
}

/* Контейнер для верхней части */
.card-top {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

/* Левая часть - изображение */
.card-image-container {
    flex: 1;
    max-width: calc(50% - 7.5px);
}

.card-image {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Правая часть - текст */
.card-text-container {
    flex: 1;
    max-width: calc(50% - 7.5px);
    display: flex;
    flex-direction: column;
}

/* Стили текста */
.card-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #999999;
    margin: 0 0 15px 0;
    text-align: center;
    text-shadow: none;
    background: transparent;
    border: none;
}

.card-description {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: 29px;
    color: #999999;
    margin: 0 15px;
    flex: 1;
    word-wrap: break-word;
    background: transparent;
    border: none;
}

/* Нижняя часть карточки */
.card-bottom {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    /* Убираем align-items: stretch */
}

/* Левая нижняя часть - метаданные */
.card-meta {
    flex: 1;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 28px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Высота будет определяться контентом */
}

.card-meta p {
    margin: 5px 0;
    color: #999999;
}

.card-meta strong {
    color: #999999;
    font-weight: 500;
    min-width: 82px;
    display: inline-block;
}

/* Правая нижняя часть - контактная карточка */
.card-contact {
    flex: 1;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    height: 0; /* временно, пока JS не установит нужную высоту */
    min-height: 0; /* убираем min-height */
}

.contact-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.contact-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.contact-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.contact-button {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    text-align: center;
    padding: 12px 20px;
    border-radius: 15px;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    cursor: pointer;
    z-index: 2;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Цвета для разных платформ при наведении */
.contact-button[data-platform="behance"]:hover {
    background: rgba(23, 105, 255, 0.66);
}

.contact-button[data-platform="youtube"]:hover {
    background: rgba(255, 0, 0, 0.66);
}

.contact-button[data-platform="github"]:hover {
    background: rgba(0, 3, 51, 0.66);
}

.contact-button[data-platform="instagram"]:hover {
    background: linear-gradient(45deg, rgba(255, 220, 128, 0.66),
                                      rgba(252, 175, 69, 0.66), 
                                      rgba(247, 119, 55, 0.66), 
                                      rgba(245, 96, 64, 0.66), 
                                      rgba(253, 29, 29, 0.66), 
                                      rgba(225, 48, 108, 0.66), 
                                      rgba(193, 53, 132, 0.66), 
                                      rgba(131, 58, 180, 0.66), 
                                      rgba(88, 81, 219, 0.66), 
                                      rgba(64, 93, 230, 0.66));
    border: none;
}

.contact-button[data-platform="twitter"]:hover {
    background: rgba(20, 23, 26, 0.66);
}

.contact-button[data-platform="pinterest"]:hover {
    background: rgba(230, 0, 35, 0.66);
}

.contact-button[data-platform="dribbble"]:hover {
    background: rgba(234, 76, 137, 0.66);
}

.contact-button[data-platform="tiktok"]:hover {
    background: rgba(0, 0, 0, 0.66);
}

.contact-button[data-platform="telegram"]:hover {
    background: rgba(0, 136, 204, 0.66);
}

.contact-button[data-platform="gmail"]:hover {
    background: rgba(8, 133, 27, 0.66);
}

.contact-button[data-platform="kavyar"]:hover {
    background: rgba(0, 133, 255, 0.66);
}

.contact-button[data-platform="gumroad"]:hover {
    background: rgba(255, 144, 232, 0.66);
}

.contact-button[data-platform="threads"]:hover {
    background: rgba(0, 0, 0, 0.66);
}

.contact-button[data-platform="default"]:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Нижний баннер */
.bottom-banner {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 80px;
    margin-bottom: 0px;
    padding: 0 15px;
    box-sizing: border-box;
}

.banner-image {
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: 20px;
    object-fit: cover;
    display: block;
}

/* ===== АДАПТИВНОСТЬ ТЕКСТА ===== */

/* Для больших экранов (2560x1440 и выше) */
@media (min-width: 2000px) {
    .card-description,
    .card-meta {
        font-size: 21px;
    }
    
    .card-title {
        font-size: 24px;
    }
}

/* Для средних экранов (1920x1080) */
@media (min-width: 1600px) and (max-width: 1999px) {
    .card-description,
    .card-meta {
        font-size: 18px;
    }
    
    .card-title {
        font-size: 28px;
    }
}

/* Базовый размер уже 14px для 1920x1080 и ниже */

/* Для маленьких экранов */
@media (max-width: 1366px) {
    .card-description,
    .card-meta {
        font-size: 14px;
    }
    
    .card-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .page4-container {
        padding: 30px;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .card-top {
        flex-direction: column;
    }
    
    .card-image-container,
    .card-text-container {
        max-width: 100%;
    }
    
    .card-description,
    .card-meta {
        font-size: 14px;
    }
    
    .card-title {
        font-size: 24px;
    }
    
    .contact-button {
        font-size: 16px;
        padding: 10px 16px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    
    .bottom-banner {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .contact-button {
        font-size: 14px;
        padding: 8px 12px;
        bottom: 8px;
        left: 8px;
        right: 8px;
    }
}

/* Для очень больших экранов (4K и выше) */
@media (min-width: 3000px) {
    .card-description,
    .card-meta {
        font-size: 24px;
    }
    
    .card-title {
        font-size: 36px;
    }
    
    .card-meta p {
        margin: 10px 0;
    }
}