/* css/home.css - стили только для главной страницы */

/* Слайдер */
.hero-slider {
    position: relative;
    height: 550px;
    overflow: hidden;
    background: #f8f9fa;
    padding: 0;
}

.slider-container {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    color: #2c3e50;
    max-width: 600px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    margin-left: 10%;
}

.slide-content h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #5a6b7a;
}

.slider-controls {
    position: absolute;
    bottom: 54px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.slider-prev:hover,
.slider-next:hover {
    background: #b7975c;
    color: #ffffff;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #b7975c;
    transform: scale(1.2);
}

/* Категории каталога */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 40px 0;
}

.category-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: #ffffff;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.category-image {
    height: 250px;
    overflow: hidden;
}

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

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

.category-info {
    padding: 20px;
    text-align: center;
}

.category-info h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.category-info .btn-text {
    display: inline-block;
    margin-top: 10px;
}

/* Сетка для 8 преимуществ */
.preim-grid-8 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.preim-item {
    text-align: center;
    padding: 30px 20px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.preim-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(183, 151, 92, 0.1);
}

.preim-item-title {
    font-size: 1.3em;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 20px;
}

.preim-item-img {
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preim-item-img img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.preim-item-text {
    color: #7f8c8d;
    font-size: 0.95em;
    line-height: 1.6;
    flex-grow: 1;
}

/* featured-products - стили для блока "Наши работы" на главной странице */

.featured-products {
    padding: 80px 0;
    background: #ffffff;
}

.featured-products h2 {
    margin-bottom: 50px;
}

.products-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 40px 0;
}

/* Карточка товара */
.featured-products .product-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-products .product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(183, 151, 92, 0.15);
}

/* Изображение товара */
.featured-products .product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(100%);
}

.featured-products .product-card:hover .product-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Кнопка "Наши работы" на карточке */
.featured-products .btn-raboty {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(183, 151, 92, 0.9);
    color: #ffffff;
    border: none;
    padding: 8px 15px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.featured-products .product-card:hover .btn-raboty {
    opacity: 1;
}

.featured-products .btn-raboty:hover {
    background: #b7975c;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(183, 151, 92, 0.3);
}

.featured-products .btn-raboty i {
    font-size: 12px;
}

/* Информация о товаре */
.featured-products .product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.featured-products .product-info h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 500;
    line-height: 1.4;
    flex-grow: 1;
}

/* Код макета */
.featured-products .product-code {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.featured-products .product-code span {
    color: #b7975c;
    font-weight: 500;
}

/* Кнопка заказа */
.featured-products .order-btn {
    background: #b7975c;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.featured-products .order-btn:hover {
    background: #a17e4a;
    transform: translateY(-2px);
}

/* Ссылка "Смотреть весь каталог" */
.featured-products .catalog-link {
    text-align: center;
    margin-top: 20px;
}

.featured-products .btn-secondary {
    background: transparent;
    border: 2px solid #b7975c;
    color: #2c3e50;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.featured-products .btn-secondary:hover {
    background: #b7975c;
    color: #fff;
    transform: translateY(-2px);
}

/* Спиннер загрузки */
.featured-products .loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #b7975c;
    font-size: 18px;
}

.featured-products .loading-spinner i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

       /* Кнопка вызова */
        .call-section {
            padding: 60px 0;
            text-align: center;
            background: linear-gradient(135deg, #b7975c 0%, #8a6d3c 100%);
            color: #fff;
            border-radius: 20px;
            margin: 60px 0;
        }
        
        .call-section h2 {
            color: #fff;
            margin-bottom: 20px;
        }
        
        .call-section h2:after {
            background: #fff;
        }
        
        .call-section p {
            color: rgba(255, 255, 255, 0.9);
            font-size: 1.2em;
            margin-bottom: 30px;
        }
        
        .call-section .btn {
            background: #fff;
            color: #b7975c;
            border: none;
            padding: 15px 50px;
            font-size: 1.2em;
        }
        
        .call-section .btn:hover {
            background: #f0f0f0;
            transform: translateY(-3px);
        }


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 1200px) {
    .products-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .featured-products .product-image {
        height: 240px;
    }
}

@media (max-width: 768px) {
    .featured-products {
        padding: 50px 0;
    }
    
    .products-grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-products .product-image {
        height: 220px;
    }
    
    .featured-products .btn-raboty {
        opacity: 1;
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .featured-products .product-info h3 {
        font-size: 1em;
    }
    
    .featured-products .order-btn {
        padding: 10px;
        font-size: 13px;
    }
}


@media (max-width: 480px) {
    .featured-products .product-image {
        height: 200px;
    }
}

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

@media (max-width: 576px) {
    .preim-grid-8 {
        grid-template-columns: 1fr;
    }
}

/* Стили для слайдера статей */
.useful-knowledge .slider-container {
    position: relative;
    margin: 40px 0;
}

.articles-slider {
    display: flex;
    gap: 30px;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.slider-item {
    flex: 0 0 calc(33.333% - 20px);
    min-width: calc(33.333% - 20px);
    transition: transform 0.3s ease;
}

@media (max-width: 992px) {
    .slider-item {
        flex: 0 0 calc(50% - 15px);
        min-width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
    .slider-item {
        flex: 0 0 100%;
        min-width: 100%;
    }
}

.article-card {
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(183, 151, 92, 0.15);
}

.article-card .article-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(100%);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.article-card .article-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #b7975c;
    color: #ffffff;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8em;
    font-weight: 500;
    z-index: 2;
}

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

.article-card .article-date {
    color: #b7975c;
    font-size: 0.8em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-card .article-date i {
    font-size: 0.9em;
}

.article-card h3 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.1em;
    line-height: 1.4;
}

.article-card .article-description {
    color: #7f8c8d;
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

.article-card .article-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b7975c;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    margin-top: auto;
}

.article-card .article-read-more i {
    transition: transform 0.3s ease;
}

.article-card .article-read-more:hover {
    color: #a17e4a;
}

.article-card .article-read-more:hover i {
    transform: translateX(5px);
}

.slider-controls {
    position: absolute;
    bottom: 60px;
    display: flex;
    gap: 15px;
}

.slider-controls-useful {
    bottom: -20px;
}

.slider-prev,
.slider-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #b7975c;
    color: #b7975c;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
    background: #b7975c;
    color: #ffffff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .slider-controls {
        position: relative;
        top: 0;
        justify-content: center;
        margin-top: 20px;
    }
    
    .useful-knowledge .slider-container {
        margin: 20px 0;
    }
}

/* Стили для блока photo-contact */
.photo-contact {
    padding: 0;
    background: #f8f9fa;
}

.contact-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 280px;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(183, 151, 92, 0.15);
}

.contact-card--left {
    text-align: center;
}

.contact-card--left .contact-person {
    margin-bottom: 20px;
}

.contact-card--left .person-photo {
    margin-bottom: 15px;
}

.contact-card--left .person-contacts {
    margin-top: 20px;
}

.contact-card--right .persons-row {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.contact-card--right .contact-person {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.contact-card .person-photo img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #b7975c;
    transition: all 0.3s ease;
}

.contact-card .person-photo img:hover {
    transform: scale(1.05);
    border-color: #a17e4a;
}

.contact-card .person-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 10px;
}

.contact-card--right .persons-contacts {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.person-phone {
    margin-bottom: 10px;
}

.person-phone a {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.person-phone a:hover {
    color: #b7975c;
}

.person-phone i {
    color: #b7975c;
    margin-right: 8px;
}

.person-address {
    color: #7f8c8d;
    font-size: 0.9em;
}

.person-address i {
    color: #b7975c;
    margin-right: 5px;
}

@media (max-width: 768px) {
    .photo-contact {
        padding: 30px 0;
    }
    
    .contact-cards {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-card {
        padding: 20px;
    }
    
    .contact-card--left .person-photo img {
        width: 100px;
        height: 100px;
    }
    
    .contact-card--left .person-name {
        font-size: 1.2em;
    }
    
    .contact-card--right .person-photo img {
        width: 80px;
        height: 80px;
    }
    
    .contact-card--right .person-name {
        font-size: 1em;
    }
    
    .person-phone a {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .contact-card--right .persons-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .contact-card--right .contact-person {
        min-width: auto;
    }
}

/* Сетка для товаров - 4 карточки в ряд */
.products-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin: 40px 0;
}

@media (max-width: 1200px) {
    .products-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .products-grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .products-grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #b7975c;
    font-size: 18px;
}

.loading-spinner i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .btn-raboty {
        opacity: 1;
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-info h3 {
        font-size: 1em;
    }
}