/* Основные стили */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f39c12;
    --text-color: #333;
    --background-color: #f5f5f5;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Шапка сайта */
header {
    background-color: white;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1rem;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Основной контент */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Секция с историями */
.stories {
    margin: 3rem 0;
}

.story-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.story-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.story-card p {
    position: relative;
    overflow: hidden;
    max-height: 100px;
    transition: max-height 0.5s ease;
}

.story-card.expanded p {
    max-height: 1000px;
}

.story-card .read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.story-card p::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.story-card.expanded p::after {
    opacity: 0;
}

.read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    margin-top: 1rem;
    font-weight: bold;
}

/* Стили для изображений в историях */
.story-image {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.story-image img {
    width: 100%;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.story-image img:hover {
    transform: scale(1.05);
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 16/9;
    transition: transform 0.3s ease;
    object-position: top;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Подвал */
footer {
    text-align: center;
    padding: 2rem;
    background-color: white;
    margin-top: 3rem;
}

.mouse {
    width: 40px;
    height: 40px;
    background-image: url('../images/mouse.png');
    background-size: contain;
    background-repeat: no-repeat;
    position: fixed;
    z-index: 9999;
    cursor: pointer;
    transition: 
        left 2s ease-out,
        top 2s ease-out,
        width 0.3s ease-out,
        height 0.3s ease-out,
        transform 0.3s ease-out;
}

.mouse.enlarged {
    width: 80px;
    height: 80px;
    transform: scale(1.5);
}

/* Адаптивность */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .story-image img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}