/* ПОРТФОЛ КАРУСЕЛЬ — итоговые стили (текст поверх изображения) */
.portfol {
    margin: 0px auto;
    padding: 40px;
    position: relative;
}

.portfol_header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 30px;
}

.portfol_h2 {
    font-size: 32px;
    color: #3a3232;
    margin-bottom: 1px;
    position: relative;
    display: inline-block;
}

.rating-stars22 {
    color: #fff8f4;
    -webkit-text-stroke: 2px #ea6425;
    text-stroke: 2px #ea6425;
    font-size: 32px;
    letter-spacing: 11px;
    margin-left: 8px;
}

.portfol_header p {
    font-size: 18px;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.portfol_header strong {
    color: #100f0f;
}

.portfol_carousel-container {
    position: relative;
}

.portfol_carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: ;
    gap: 25px;
    padding: 20px 10px;
    margin-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.portfol_carousel::-webkit-scrollbar {
    display: none;
}

/* Карточка портфолио — с позиционированием для наложения текста */
.portfol_item {
    position: relative;
    min-width: 300px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #afafaf;
    flex-shrink: 0;
}

.portfol_item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: #c4a97a;
}

.portfol_image {
    position: relative;
    height: 350px;
    overflow: hidden;
    display: block;
}

.portfol_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfol_item:hover .portfol_image img {
    transform: scale(1.1);
}

/* Текстовая плашка поверх изображения внизу */
.portfol_title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
    padding: 12px 16px;
    text-align: left;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    transition: background 0.3s ease;
    z-index: 2;
    box-sizing: border-box;
}

.portfol_title h3 {
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 5px;
    font-weight: 600;
}

.portfol_title p {
    font-size: 14px;
    color: #f0f0f0;
    margin: 0;
    line-height: 1.3;
}

.portfol_item:hover .portfol_title {
    background: rgba(0, 0, 0, 0.8);
}

/* Стрелки навигации карусели */
.portfol_arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(232, 213, 181, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    color: #3a3232;
    font-size: 24px;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.portfol_arrow:hover {
    background-color: #c4a97a;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.portfol_arrow-left {
    left: -25px;
}

.portfol_arrow-right {
    right: -25px;
}

/* Модальное окно */
.portfol_modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
    touch-action: pan-y;
}

.portfol_modal-content-container {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfol_modal-slider {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfol_modal-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portfol_modal-content {
    max-width: 90%;
    max-height: 90%;
    border: 5px solid #afafaf;
    border-radius: 5px;
    touch-action: pan-y;
}

.portfol_close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #afafaf;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.portfol_close:hover {
    color: white;
}

.portfol_nav {
    text-align: center;
    margin-top: 30px;
    display: none;
}

.portfol_dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: #c4a97a;
    border-radius: 50%;
    margin: 0 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.portfol_dot.active {
    background: #3a3232;
    transform: scale(1.3);
}

/* Стрелки в модальном окне */
.portfol_modal-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(232, 213, 181, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    border: none;
    color: #3a3232;
    font-size: 24px;
    transition: all 0.3s;
}

.portfol_modal-arrow:hover {
    background-color: #c4a97a;
    color: white;
}

.portfol_modal-arrow-left {
    left: 20px;
}

.portfol_modal-arrow-right {
    right: 20px;
}

/* Кнопка "Все фото" */
.all_photo_b {
    position: relative;
    z-index: 3;
    min-height: 44px;
    cursor: pointer;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    background: #ea6624;
    color: white;
    text-decoration: none;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.0rem;
    transition: all 0.3s ease;
    margin: 30px auto 0;
    display: block;
    width: fit-content;
    text-align: center;
    text-transform: uppercase;
}

.all_photo_b:hover,
.all_photo_b:active {
    background: #ff6d00;
    color: #fff;
    border-color: #ff6d00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .portfol {
        padding: 30px;
    }
    .portfol_item {
        min-width: 280px;
    }
    .portfol_arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .portfol_arrow-left {
        left: -20px;
    }
    .portfol_arrow-right {
        right: -20px;
    }
    .portfol_modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .portfol {
        padding: 25px 20px;
        margin: 10px;
    }
    .portfol_h2 {
        font-size: 28px;
    }
    .portfol_header p {
        font-size: 16px;
    }
    .portfol_image {
        height: 250px;
    }
    .portfol_title {
        padding: 8px 12px;
    }
    .portfol_title h3 {
        font-size: 18px;
    }
    .portfol_title p {
        font-size: 12px;
    }
    .portfol_arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .portfol_modal-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .portfol {
        padding: 1px 5px;
    }
    .portfol_h2 {
        font-size: 24px;
    }
    .portfol_item {
        min-width: 260px;
    }
    .portfol_title h3 {
        font-size: 16px;
    }
    .portfol_title p {
        font-size: 11px;
    }
    .portfol_title {
        padding: 6px 10px;
    }
    .portfol_modal-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .all_photo_b {
        padding: 11px 24px;
        font-size: 14px;
        min-height: 44px;
        max-width: 280px;
    }
}