.stories-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: start;
    margin-bottom: 50px;
}

.stories-back {
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0px;
    color: var(--color-text-light-green);
    margin-bottom: 35px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.stories-back:hover {
    opacity: 0.8;
}

.stories-title {
    font-weight: 500;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: 0px;
    text-align: start;
    vertical-align: middle;
    text-transform: uppercase;
    color: var(--color-text-dark-green);
}

.stories-description {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--color-text-primary);
}

/* Стили для сетки карточек */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 auto;
    max-width: 1400px;
    margin-bottom: 50px;
}

/* Стили для карточек историй успеха */
.stories-card {
    position: relative;
    overflow: hidden;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.stories-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stories-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s ease;
}

.stories-card:hover img {
    transform: scale(1.03);
}

.stories-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.stories-card-title {
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--color-text-dark-green);
    margin-bottom: 5px;
}

.stories-card-position {
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--color-text-light-green);
    margin-bottom: 15px;
}

.stories-card-button {
    margin-top: auto;
    background: none;
    border: none;
    color: rgba(61, 61, 61, 0.5);
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    padding: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.stories-card-button:hover {
    opacity: 0.8;
}

.stories-card-button img {
    width: 16px;
    height: 16px;
}

.stories-button {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 20px;
}

.stories-button-show {
    height: 50px;
    padding: 16px 24px;
    width: auto;
    background-color: var(--color-dark-green);
    color: #fff;
}

.stories-button-show:hover {
    color: var(--color-light-green);
}

.stories-button-return {
    height: 50px;
    padding: 16px 40px; 
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stories-button-return:hover svg path {
    fill: white;
}


/* Адаптивность для планшетов */
@media (max-width: 992px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 576px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }

    /* .stories-card img {
        height: 240px;
    } */

    .stories-title {
        font-size: 24px;
        line-height: 30px;
    }
}

@media (max-width: 480px) {
    .stories-button {
		flex-direction: column;
		gap: 10px;
	}

	a.stories-button-return {
		justify-content: center;
	}
}

/* Стили для модального окна */
.story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.story-modal.active {
    display: flex;
}

.story-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
}

.story-modal-content {
    position: relative;
    width: 90%;
    max-width: 1300px;
    max-height: 676px;
	height: 80vh;
    background-color: #fff;
    z-index: 1002;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: row;
    overflow: hidden;
	margin-top: 50px;
}

.story-modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.story-modal-close:hover {
    transform: scale(1.2);
}

.story-modal-left {
    width: 26%;
    min-width: 260px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    background-color: var(--color-light-green);
}

.story-modal-left h2 {
    font-weight: 500;
    font-size: 30px;
    line-height: 36px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--color-text-dark-green);
    margin-bottom: 6px;
    text-transform: none;
}

.story-modal-left>p {
    font-weight: 400;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: var(--color-text-dark-green);
    margin-bottom: -18px;
    width: 67%;
    z-index: 3;
}

.story-modal-image {
    position: relative;
    width: 260px;
    height: 305px;
    margin-bottom: 32px;
    overflow: hidden;
}

.story-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 100%, 0 100%);
}

.quotes {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px
}

.quote {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 8px;
}

.quote img {
    width: 18px;
    height: 16px;
    margin-bottom: 0;
    margin-top: 6px;
}

.quote p {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    color: var(--color-text-dark-green);
}

.story-modal-right {
    width: 74%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.story-modal-right h3 {
    font-weight: 500;
    font-size: 30px;
    line-height: 100%;
    letter-spacing: 0px;
    vertical-align: middle;
    text-transform: uppercase;
    color: var(--color-text-dark-green);
    margin-bottom: 15px;
}

.story-modal-right p {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    vertical-align: middle;
    color: rgba(61, 61, 61, 1);
    margin-bottom: 15px;
    z-index: 3;
}

.story-modal-right p:last-child {
    margin-bottom: 0;
}

.story-modal-text {
    overflow-y: auto;
    max-height: 600px;
    padding-right: 15px;
}

/* Стилизация полосы прокрутки */
.story-modal-text::-webkit-scrollbar {
    width: 3px;
}

.story-modal-text::-webkit-scrollbar-track {
    background: rgba(208, 208, 208, 1);
    border-radius: 10px;
}

.story-modal-text::-webkit-scrollbar-thumb {
    background: var(--color-dark-green);
}

.story-modal-text::-webkit-scrollbar-thumb:hover {
    background: #06473C;
}

/* ---------------- АДАПТИВНОСТЬ ДЛЯ МОДАЛЬНОГО ОКНА ---------------- */
/* ► Большие планшеты / небольшие десктопы */
@media (max-width: 1199px) {
    .story-modal-content {
        max-width: 1000px;
    }
    .story-modal-left {
        width: 34%;
        min-width: 220px;
        padding: 30px;
    }
    .story-modal-right {
        width: 66%;
        padding: 30px;
    }
}

/* ► Планшеты */
@media (max-width: 992px) {
    .story-modal-content {
        flex-direction: column;
        width: 90%;
        max-width: 600px;
        max-height: 80vh;
    }
    .story-modal-left,
    .story-modal-right {
        width: 100%;
    }
    .story-modal-left {
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }
    .story-modal-left>p {
        width: 100%;
    }
    .story-modal-image {
        width: 200px;
        height: 240px;
		margin-top: 20px;
		margin-bottom: 0;
    }

	.story-modal-right {
		height: auto;
		max-height: calc(80vh - 372px);
	}
		
}

/* ► Мобильные устройства в альбомной ориентации */
@media (max-width: 768px) {
    .story-modal-content {
        flex-direction: column;
        width: 95%;
        padding: 0;
    }
    .story-modal-left,
    .story-modal-right {
        padding: 24px 16px;
    }
    .story-modal-left h2 {
        font-size: 24px;
        line-height: 30px;
    }
    .story-modal-left>p {
        font-size: 18px;
        line-height: 26px;
    }
    .story-modal-right h3 {
        font-size: 24px;
    }
    .story-modal-right p {
        font-size: 14px;
        line-height: 22px;
    }
}

@media only screen and (max-width: 992px) and (orientation: landscape) {
	.story-modal-content {
		flex-direction: row;
	}

	.story-modal-right {
		max-height: none !important;
	}
}

/* ► Мобильные устройства в портретной ориентации */
@media (max-width: 576px) {
    .story-modal-left {
        padding: 20px 14px;
    }
    .story-modal-image {
        width: 160px;
        height: 190px;
        margin-bottom: 24px;
    }
    .quote p {
        font-size: 14px;
        line-height: 20px;
    }
    .story-modal-right {
        padding: 20px 14px;
		max-height: calc(80vh - 318px);
    }
    .story-modal-text {
        max-height: 45vh;
    }

}