/* Single Thematic Card - Minimal Styles */

:root {
    --stc-primary: #c65d00;
    --stc-primary-hover: #a54d00;
    --stc-text: #2c3e50;
    --stc-text-secondary: #7f8c8d;
    --stc-quote-text: #6b7280;
    --stc-border: #e8e8e8;
    --stc-bg-cart: #ffffff;
    --stc-bg-hover: #faf8f5;
    --stc-radius: 12px;
    --stc-transition: all 0.3s ease;
}

/* Карточка */
.stc-card-wrapper {
    width: 100%;
}

.stc-card-wrapper .group-item {
    background: var(--stc-bg-cart);
    border: 1px solid var(--stc-border);
    border-radius: var(--stc-radius);
    transition: var(--stc-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    cursor: pointer; /* Вся карточка кликабельна */
}

.stc-card-wrapper .group-item:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.stc-card-wrapper .group-item.active {
    border-color: var(--stc-primary);
    box-shadow: 0 12px 32px rgba(198, 93, 0, 0.15);
}

/* Убираем pointer с раскрытого контента, чтобы не закрывалась при клике на текст */
.stc-card-wrapper .group-item.active .group-content {
    cursor: default;
}

/* Кнопки и ссылки остаются кликабельными */
.stc-card-wrapper .cta-button,
.stc-card-wrapper .group-content a {
    cursor: pointer;
}

/* Заголовок */
.stc-card-wrapper .group-header {
    display: flex;
    align-items: flex-start;
    padding: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-height: 160px;
}

.stc-card-wrapper .group-header:hover {
    background: var(--stc-bg-hover);
}

.stc-card-wrapper .group-header:focus {
    outline: 2px solid var(--stc-primary);
    outline-offset: 2px;
}

/* Иконка */
.stc-card-wrapper .group-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: var(--stc-radius);
    margin-right: 20px;
    font-size: 28px;
    line-height: 1;
}

/* Цветовые схемы для иконок */
.stc-card-wrapper .group-item[data-group="1"] .group-icon { 
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe); 
}
.stc-card-wrapper .group-item[data-group="1"]:hover { 
    border-color: #4f46e5; 
}

.stc-card-wrapper .group-item[data-group="2"] .group-icon { 
    background: linear-gradient(135deg, #e0f2fe, #bae6fd); 
}
.stc-card-wrapper .group-item[data-group="2"]:hover { 
    border-color: #0284c7; 
}

.stc-card-wrapper .group-item[data-group="3"] .group-icon { 
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff); 
}
.stc-card-wrapper .group-item[data-group="3"]:hover { 
    border-color: #9333ea; 
}

.stc-card-wrapper .group-item[data-group="4"] .group-icon { 
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0); 
}
.stc-card-wrapper .group-item[data-group="4"]:hover { 
    border-color: #475569; 
}

.stc-card-wrapper .group-item[data-group="5"] .group-icon { 
    background: linear-gradient(135deg, #fed7aa, #fdba74); 
}
.stc-card-wrapper .group-item[data-group="5"]:hover { 
    border-color: #ea580c; 
}

.stc-card-wrapper .group-item[data-group="6"] .group-icon { 
    background: linear-gradient(135deg, #dcfce7, #bbf7d0); 
}
.stc-card-wrapper .group-item[data-group="6"]:hover { 
    border-color: #16a34a; 
}

.stc-card-wrapper .group-item[data-group="7"] .group-icon { 
    background: linear-gradient(135deg, #fee2e2, #fecaca); 
}
.stc-card-wrapper .group-item[data-group="7"]:hover { 
    border-color: #dc2626; 
}

.stc-card-wrapper .group-item[data-group="8"] .group-icon { 
    background: linear-gradient(135deg, #fef3c7, #fde68a); 
}
.stc-card-wrapper .group-item[data-group="8"]:hover { 
    border-color: #d97706; 
}

/* Основной контейнер для текста */
.stc-card-wrapper .group-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Верхний уровень: заголовок + кнопка */
.stc-card-wrapper .group-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.stc-card-wrapper .group-title {
    font-size: 1.5rem;
    color: var(--stc-text);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
    flex: 1;
    min-width: 0;
}

/* Переключатель (кнопка) */
.stc-card-wrapper .group-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--stc-primary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--stc-transition);
    flex-shrink: 0;
}

.stc-card-wrapper .toggle-icon {
    transition: transform 0.3s ease;
}

.stc-card-wrapper .group-item.active .toggle-icon {
    transform: rotate(180deg);
}

/* Нижний уровень: подзаголовок */
.stc-card-wrapper .group-preview-block {
    width: 100%;
}

.stc-card-wrapper .group-subtitle {
    font-size: 1rem;
    color: var(--stc-text-secondary);
    margin: 0 0 6px 0;
    font-weight: 500;
    line-height: 1.4;
}

.stc-card-wrapper .group-preview {
    font-size: 1rem;
    color: var(--stc-quote-text);
    font-style: italic;
    margin: 8px 0 0 0;
    font-weight: 400;
    line-height: 1.5;
}

/* Контент карточки (раскрытое состояние) */
.stc-card-wrapper .group-item {
    display: grid;
    grid-template-rows: auto 0fr;
    transition: grid-template-rows 0.4s ease;
}

.stc-card-wrapper .group-item.active {
    grid-template-rows: auto 1fr;
}

.stc-card-wrapper .group-content {
    overflow: hidden;
    padding: 0 32px;
}

.stc-card-wrapper .group-item.active .group-content {
    padding: 0 32px 32px;
}

/* Внутренняя структура контента */
.stc-card-wrapper .group-content-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Grid строка: изображение + текст */
.stc-card-wrapper .group-content-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
}

/* Изображение */
.stc-card-wrapper .group-image {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: var(--stc-radius);
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.stc-card-wrapper .group-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.stc-card-wrapper .group-image:hover img {
    transform: scale(1.05);
}

/* Текст рядом с изображением */
.stc-card-wrapper .group-text-intro {
    padding-top: 6px;
}

.stc-card-wrapper .group-intro-description {
    font-size: 17px;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

.stc-card-wrapper .group-intro-description p {
    margin: 0 0 16px 0;
    line-height: 1.7;
}

.stc-card-wrapper .group-intro-description p:last-child {
    margin-bottom: 0;
}

/* Основной текст на всю ширину */
.stc-card-wrapper .group-text-main {
    width: 100%;
}

.stc-card-wrapper .group-description {
    font-size: 17px;
    color: #555;
    line-height: 1.7;
    font-weight: 400;
}

.stc-card-wrapper .group-description p {
    margin: 0 0 16px 0;
    line-height: 1.7;
}

.stc-card-wrapper .group-description p:last-child {
    margin-bottom: 0;
}

/* Чек-лист */
.stc-card-wrapper .group-questions {
    width: 100%;
    padding-bottom: 8px;
}

.stc-card-wrapper .group-questions ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
    margin: 0;
}

.stc-card-wrapper .group-questions li {
    position: relative;
    padding-left: 32px;
    font-size: 16px;
    color: #444;
    line-height: 1.6;
}

.stc-card-wrapper .group-questions li:before {
    content: '—';
    position: absolute;
    left: 10px;
    color: var(--stc-text-secondary);
    font-weight: 500;
}

/* CTA Кнопки */
.stc-card-wrapper .cta-button-wrapper {
    display: flex;
    gap: 16px;
    padding-top: 24px;
    margin-top: auto;
    flex-wrap: wrap;
}

.stc-card-wrapper .cta-button {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    transition: var(--stc-transition);
    text-decoration: none;
    text-align: center;
    min-width: 180px;
    border: 2px solid transparent;
    letter-spacing: -0.01em;
}

.stc-card-wrapper .cta-button--consult {
    background: white;
    color: var(--stc-primary);
    border: 2px solid var(--stc-primary);
}

.stc-card-wrapper .cta-button--consult:hover {
    background: var(--stc-bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 93, 0, 0.2);
    text-decoration: none;
    color: var(--stc-primary);
}

.stc-card-wrapper .cta-button:not(.cta-button--consult) {
    background: var(--stc-primary);
    color: white;
    border: 2px solid var(--stc-primary);
}

.stc-card-wrapper .cta-button:not(.cta-button--consult):hover {
    background: transparent;
    color: var(--stc-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 93, 0, 0.3);
    text-decoration: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stc-card-wrapper .group-header {
        padding: 20px;
        min-height: 140px;
    }
    
    .stc-card-wrapper .group-icon {
        width: 48px;
        height: 48px;
        margin-right: 16px;
        font-size: 24px;
    }
    
    .stc-card-wrapper .group-title {
        font-size: 1.25rem;
    }
    
    .stc-card-wrapper .group-content {
        padding: 0 20px;
    }
    
    .stc-card-wrapper .group-item.active .group-content {
        padding: 0 20px 24px;
    }
    
    .stc-card-wrapper .group-content-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .stc-card-wrapper .group-image {
        width: 160px;
        height: 160px;
    }
    
    .stc-card-wrapper .group-questions ul {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stc-card-wrapper .cta-button-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .stc-card-wrapper .cta-button {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .stc-card-wrapper .group-header {
        padding: 16px;
        min-height: 145px;
    }
    
    .stc-card-wrapper .group-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        margin-right: 12px;
    }
    
    .stc-card-wrapper .group-title {
        font-size: 16px;
    }
    
    .stc-card-wrapper .group-content {
        padding: 0 16px;
    }
    
    .stc-card-wrapper .group-item.active .group-content {
        padding: 0 16px 20px;
    }
    
    .stc-card-wrapper .group-image {
        width: 140px;
        height: 140px;
    }
    
    .stc-card-wrapper .cta-button {
        width: 100%;
        max-width: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .stc-card-wrapper * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
