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

body {
    font-family: 'Ubuntu', sans-serif;
    background: #0F121C;
    color: white;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.gradient-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background: radial-gradient(ellipse 129.01% 127.54% at 100% 100%, 
                rgba(40, 254, 229, 0.3) 0%, 
                rgba(36, 98, 157, 0.3) 33%, 
                rgba(21, 18, 35, 0) 100%);
    pointer-events: none;
    z-index: -1;
}

.wrapper {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    padding: 40px 20px;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.red-square {
    width: 31px;
    height: 28px;
    background: url('../Img/logo ru.svg') center/cover no-repeat;
    flex-shrink: 0;
}

.title-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.title-group h1 {
    font-size: clamp(36px, 6vw, 48px);
    line-height: 1.2;
    font-weight: 400;
    color: white;
    max-width: 800px;
}

.subtitle {
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.4;
    color: white;
    opacity: 0.9;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.today-date {
    font-size: clamp(28px, 4vw, 32px);
    line-height: 1.2;
    color: white;
}

.gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

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

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: #191D29;
    cursor: pointer;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card-image img:hover {
    transform: scale(1.02);
}

/* Текст промпта поверх изображения (слева снизу) */
.image-prompt {
    /* font-weight: 600; */
    position: absolute;
    bottom: 0;
    /* left: 0; */
    /* height: 100%; */
    /* right: 0; */
    /* top: 0; */
    /* height: 87%; */
    background: linear-gradient(to top, rgb(14 25 38), #171e2e85);
    color: white;
    font-size: clamp(12px, 2.5vw, 18px);
    line-height: 1.4;
    padding: 24px;
    /* border-radius: 20px; */
    text-shadow: 0 1px 2px rgb(0 0 0);
    word-wrap: break-word;
    overflow: hidden;
    /* display: -webkit-box; */
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: calc(1.4em * 5);
    pointer-events: none;
    width: 100%;
}

/* Кнопка лайка поверх изображения (справа сверху) */
.like-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 30px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    color: white;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.2);
}

.like-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.like-button.liked .heart-icon {
    color: #ff4d4d;
}

.heart-icon {
    font-size: 16px;
    line-height: 1;
    color: white;
    transition: color 0.2s;
}

.likes-count {
    font-weight: 500;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    z-index: 1001;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 1002;
}

.modal-close:hover {
    background: rgba(255,255,255,0.4);
}

@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.5);
    }
    .image-prompt {
        font-size: 16px;
        padding: 16px 16px;
    }
    .like-button {
        padding: 4px 10px;
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }
    .gallery {
        grid-template-columns: 1fr;
    }
    .image-prompt {
        font-size: 16px;
    }
    .like-button {
        padding: 4px 8px;
    }
}
/* Добавьте в конец файла или после .today-date */

.section-title {
    font-size: clamp(24px, 4vw, 28px);
    line-height: 1.3;
    color: white;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 400;
    opacity: 0.9;
    border-left: 4px solid #C43E3E;
    padding-left: 16px;
}
/* Обеспечиваем, что секции архива занимают всю ширину */
.older-section {
    width: 100%;
    margin-bottom: 40px;
}

/* Убеждаемся, что галерея внутри секции отображается правильно */
.older-section .gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    width: 100%;
}

/* На мобильных устройствах адаптируем */
@media (max-width: 900px) {
    .older-section .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .older-section .gallery {
        grid-template-columns: 1fr;
    }
}
/* Остальные стили без изменений */