/* Swiper Base Styles */
.swiper {
    width: 100%;
    height: 100%;
    padding: 20px 0;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
}

/* Navigation buttons */
.swiper-button-next,
.swiper-button-prev {
    color: #e67e22;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* Pagination */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #ccc;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #e67e22;
}

/* Portfolio Slider Specific */
.portfolio-swiper .swiper-slide {
    height: 400px;
}

.portfolio-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.portfolio-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    text-align: left;
    font-size: 15px;
}

/* Testimonials Slider Specific */
.testimonials-swiper .swiper-slide {
    height: auto;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid #e67e22;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-swiper .swiper-slide {
        height: 300px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}

/* Кнопка "Подробнее" для портфолио */
.portfolio-detail-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(45deg, #e67e22, #f39c12);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
    z-index: 20;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.portfolio-detail-btn:hover {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    transform: translateY(-2px) translateX(-2px);
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
    color: white;
    text-decoration: none;
}

.portfolio-detail-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.portfolio-detail-btn:hover i {
    transform: translateX(3px);
}

/* Анимация появления кнопки */
.portfolio-slide {
    position: relative;
    overflow: hidden;
}

.portfolio-detail-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.portfolio-slide:hover .portfolio-detail-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Альтернативный стиль - всегда видимая кнопка */
.portfolio-detail-btn.always-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Вариант с иконкой стрелки в круге */
.portfolio-detail-btn.circle-icon {
    padding: 15px;
    width: 50px;
    height: 50px;
    justify-content: center;
}

.portfolio-detail-btn.circle-icon span {
    display: none;
}

.portfolio-detail-btn.circle-icon:hover {
    width: auto;
    padding: 15px 20px;
}

.portfolio-detail-btn.circle-icon:hover span {
    display: inline;
}

/* Адаптивность */
@media (max-width: 768px) {
    .portfolio-detail-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .portfolio-detail-btn.circle-icon {
        width: 45px;
        height: 45px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .portfolio-detail-btn {
        bottom: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    /* На мобильных делаем кнопку всегда видимой */
    .portfolio-detail-btn {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Карточки элемента декора */
.decor-card {
    width: 100%;
    height: 100%;
    background: white;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.decor-card:hover {
    transform: translateY(-5px);
}

.decor-img-container {
    height: 250px;
    overflow: hidden;
    border-radius: 5px;
    position: relative;
}

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

.decor-info {
    padding: 20px;
}

a.decor-detail-link {
    text-decoration: none;
    color: #1a1e21;
}

/* Before After Preview Section on Homepage */
.before-after-preview {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 100%;
}

.before-after-preview:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.ba-preview-container {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
}

.ba-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.before-after-preview:hover .ba-preview-image {
    transform: scale(1.1);
}

.ba-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.2) 0%,
        rgba(0,0,0,0.7) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: white;
    opacity: 0;
    transition: all 0.3s ease;
}

.before-after-preview:hover .ba-preview-overlay {
    opacity: 1;
}

.ba-preview-overlay h5 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.before-after-preview:hover .ba-preview-overlay h5 {
    transform: translateY(0);
}

.ba-preview-overlay .btn {
    transform: translateY(20px);
    transition: transform 0.3s ease 0.2s;
    background: rgba(255,255,255,0.9);
    color: #2c3e50;
    border: none;
    font-weight: 600;
}

.before-after-preview:hover .ba-preview-overlay .btn {
    transform: translateY(0);
}

.ba-preview-overlay .btn:hover {
    background: white;
    transform: translateY(-2px);
}

/* Badge for image count */
.ba-preview-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #e67e22, #f39c12);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
}

/* Stats for preview cards */
.ba-preview-stats {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.ba-preview-stat {
    text-align: center;
    flex: 1;
}

.ba-preview-stat-value {
    font-weight: 700;
    color: #e67e22;
    font-size: 1rem;
    display: block;
}

.ba-preview-stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
}

/* Alternative design with before/after toggle */
.ba-toggle-preview {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ba-toggle-before,
.ba-toggle-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.ba-toggle-after {
    opacity: 0;
}

.ba-toggle-preview:hover .ba-toggle-after {
    opacity: 1;
}

.ba-toggle-label {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Section title styling */
.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, #e67e22, #f39c12);
    border-radius: 2px;
}

/* Animation for section appearance */
.before-after-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.before-after-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
    .ba-preview-container {
        height: 250px;
    }

    .ba-preview-overlay {
        padding: 15px;
        opacity: 1;
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.1) 0%,
            rgba(0,0,0,0.8) 100%
        );
    }

    .ba-preview-overlay h5 {
        font-size: 1.1rem;
        transform: translateY(0);
    }

    .ba-preview-overlay .btn {
        transform: translateY(0);
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .ba-preview-stats {
        padding: 10px;
    }

    .ba-preview-stat-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .ba-preview-container {
        height: 200px;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .ba-preview-badge {
        top: 10px;
        right: 10px;
        padding: 4px 10px;
        font-size: 0.7rem;
    }
}