﻿/* Extracted from template/template.php */
/* Дополнительные стили для адаптации */

/* Базовые стили для блока FAQ с картинкой */
.faq {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 40px;
    align-items: center;
    margin: 40px 0;
}

.faq__content {
    padding-right: 30px;
}

.faq__image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.faq__image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 1024px) {
    .choose-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .faq-accordion__title {
        text-align: center;
        width: 100%;
        padding: 0 15px;
    }

    .item__title {
        text-align: center;
        width: 100%;
    }

    .faq-accordion__header {
        display: flex;
        justify-content: center;
        text-align: center;
    }

    .faq-accordion__content {
        text-align: center;
        padding: 0 15px;
    }

    .faq-text {
        text-align: center;
        margin: 0 auto;
        max-width: 500px;
    }

    .tabs {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .tabs__item {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
        max-width: 300px;
        display: flex;
        justify-content: center;
    }

    .tabs__link {
        padding: 12px 8px;
        font-size: var(--font-sm);
        white-space: normal;
        line-height: 1.3;
        min-height: 250px;
        width: 100%;
        text-align: center;
    }

    .tabContent__item table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        margin: 0 auto;
    }

    .faq {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .faq__image {
        margin-top: 0px;
        display: flex;
        justify-content: center;
        width: auto;
    }

    .faq__image img {
        max-width: 100%;
        height: auto;
        width: auto;
        max-height: 300px;
        object-fit: contain;
    background: #f8f9fa;
    }

    .choose {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .choose-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }

    .choose__item {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .intro__inner {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .intro__title {
        font-size: var(--font-md);
        text-align: center;
    }

    .services {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .section__title {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tabs__link {
        font-size: var(--font-xs);
        padding: 10px 5px;
    }

    .intro__title {
        font-size: var(--font-sm);
    }
}

/* Общие стили для табов */
.tabs {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tabs__item {
    flex: 0 0 calc(50% - 15px);
    margin-bottom: 10px;
}

.tabs__link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: block;
    padding: 12px 10px;
    border: 1px solid #ccc;
    text-align: center;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    border-radius: 4px;
    word-break: break-word;
    white-space: normal;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabs__link:hover {
    background-color: #ddd;
}

/* Стили для таблиц */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

@media (max-width: 768px) {
    table {
        font-size: var(--font-sm);
    }

    th, td {
        padding: 8px 5px;
    }
}

@media (max-width: 480px) {
    table {
        font-size: var(--font-xs);
    }

    th, td {
        padding: 6px 4px;
    }
}

@media (max-width: 425px) {
    .faq__image {
        width: auto;
    }

    .faq__image img {
        
        max-width: 90%;
    }

    .faq-accordion__title {
        padding: 0 10px;
        font-size: var(--font-base);
    }

    .faq-accordion__content {
        padding: 0 10px;
    }

    .faq-text {
        max-width: 100%;
        font-size: var(--font-sm);
        line-height: 1.4;
    }
}

@media (max-width: 375px) {
    .faq__image {
        width: auto;
    }

    .faq__image img {
        max-height: 200px;
        max-width: 85%;
    }
}

/* Стили для раздела "Почему выбирают ЛИПФАСАД48" */
.why-choose {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    padding: 60px 0;
    position: relative;
}

.why-choose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

.choose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.choose-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.choose-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.choose-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-red);
}

.choose-card:hover::before {
    left: 100%;
}

.choose-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-2xl);
    box-shadow: 0 8px 20px rgba(45, 80, 22, 0.3);
}

.choose-card-title {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
}

.choose-card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-dark));
    border-radius: 2px;
}

.choose-card-text {
    font-size: var(--font-sm);
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
}

/* Стили для товаров из XML */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-red);
}

.product-image {
    width: 100%;
    height: 250px;
    
    object-fit: contain;
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-light);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-price {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.product-description {
    font-size: var(--font-sm);
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
}

/* Стили для кнопок */
.button {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
}

/* Стили для аккордеона */
.faq-accordion__item.active .faq-accordion__header {
    color: var(--white);
}

.faq-accordion__header {
    background: var(--bg-light);
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-red);
}

/* Стили для интро */
.intro-button {
    color: var(--white);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.intro-button span {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--white);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.intro-button:hover span {
    transform: scaleX(1);
}

/* Дополнительные стили для адаптивности и компонентов */

@media (max-width: 1024px) {
    .choose-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 карточки в ряду на планшетах */
        gap: 20px;
        padding: 0 15px;
    }
}
    
@media (max-width: 768px) {
    /* Центрируем все заголовки аккордеона */
    .faq-accordion__title {
        text-align: center;
        width: 100%;
        padding: 0 15px;
    }
    
    /* Центрируем все элементы с классом item__title */
    .item__title {
        text-align: center;
        width: 100%;
    }
    
    /* Центрируем заголовки в аккордеоне FAQ */
    .faq-accordion__header {
        display: flex;
        justify-content: center;
        text-align: center;
    }
    
    /* Центрируем контент аккордеона */
    .faq-accordion__content {
        text-align: center;
        padding: 0 15px;
    }
    
    /* Центрируем текст внутри аккордеона */
    .faq-text {
        text-align: center;
        margin: 0 auto;
        max-width: 500px;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .tabs__item {
        flex: 0 0 auto;
        margin-right: 0;
        margin-bottom: 10px;
        width: 100%;
        max-width: 300px;
        display: flex;
        justify-content: center;
    }
    
    .tabs__link {
        padding: 12px 8px;
        font-size: var(--font-sm);
        white-space: normal;
        line-height: 1.3;
        min-height: 250px;
        width: 100%;
        text-align: center;
    }
    
    .tabContent__item table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        margin: 0 auto;
    }
    
    .faq {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .faq__image {
        margin-top: 0px;
        display: flex;
        justify-content: center;
        width: auto;
    }
    
    .faq__image img {
        max-width: 100%;
        height: 250px;
        width: auto;
        max-height: 300px; 
        object-fit: contain; 
    background: #f8f9fa;
    }
    
    .choose {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .choose-grid {
        grid-template-columns: 1fr; /* 1 карточка в ряду на мобильных */
        gap: 15px;
        padding: 0 10px;
    }
    
    .choose__item {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .intro__inner {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .intro__title {
        font-size: var(--font-md);
        text-align: center;
    }
    
    .services {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    /* Центрирование заголовков секций */
    .section__title {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tabs__link {
        font-size: var(--font-xs);
        padding: 10px 5px;
    }
    
    .intro__title {
        font-size: var(--font-sm);
    }
}

/* Общие стили для табов */
.tabs {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.tabs__item {
    flex: 0 0 calc(50% - 15px);
    margin-bottom: 10px;
}

.tabs__link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: block;
    padding: 12px 10px;
    border: 1px solid #ccc;
    text-align: center;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    border-radius: 4px;
    word-break: break-word;
    white-space: normal;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tabs__link:hover {
    background-color: #ddd;
}

/* Стили для таблиц */
table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #ddd;
    padding: 12px 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Адаптивные таблицы для мобильных */
@media (max-width: 768px) {
    table {
        font-size: var(--font-sm);
    }
    
    th, td {
        padding: 8px 5px;
    }
}

@media (max-width: 480px) {
    table {
        font-size: var(--font-xs);
    }
    
    th, td {
        padding: 6px 4px;
    }
}

@media (max-width: 425px) {
    .faq__image {
        width: auto;
    }

    .faq__image img {
        
        max-width: 90%; 
    }

    .faq-accordion__title {
        padding: 0 10px;
        font-size: var(--font-base); 
    }
    
    .faq-accordion__content {
        padding: 0 10px;
    }
    
    .faq-text {
        max-width: 100%;
        font-size: var(--font-sm);
        line-height: 1.4;
    }
}

@media (max-width: 375px) {
    .faq__image {
        width: auto;
    }
    
    .faq__image img {
        max-height: 200px;
        max-width: 85%;
    }
}

/* Стили для раздела "Почему выбирают ЛИПФАСАД48" */
.why-choose {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
    padding: 60px 0;
    position: relative;
}

.why-choose::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
}

.choose-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.choose-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
}

.choose-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.choose-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-red);
}

.choose-card:hover::before {
    left: 100%;
}

.choose-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-2xl);
    box-shadow: 0 8px 20px rgba(45, 80, 22, 0.3);
}

.choose-card-title {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    position: relative;
}

.choose-card-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-dark));
    border-radius: 2px;
}

.choose-card-text {
    font-size: var(--font-sm);
    line-height: 1.6;
    color: var(--text-light);
    margin: 0;
}

/* Стили для товаров из XML */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-red);
}

.product-image {
    width: 100%;
    height: 250px;
    
    object-fit: contain;
    background: #f8f9fa;
    border-bottom: 2px solid var(--border-light);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: var(--font-base);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.product-price {
    font-size: var(--font-md);
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.product-description {
    font-size: var(--font-sm);
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.product-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
}

/* Стили для кнопок и акцентных элементов */
.button {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, var(--primary-red-dark) 0%, var(--primary-red) 100%);
}

/* Стили для аккордеона */
.faq-accordion__item.active .faq-accordion__header {
    color: var(--white);
}

.faq-accordion__header {
    background: var(--bg-light);
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-red);
}

/* Стили для интро */
.intro-button {
    color: var(--white);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

.intro-button span {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--white);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.intro-button:hover span {
    transform: scaleX(1);
}


/* Кликабельные элементы товаров */
.product-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: var(--primary-red);
}






