/**
 * Стили для виджета "Карточка-аккордеон"
 */

/* --- Базовые сбросы --- */
.accordion-card * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* --- Стили карточки --- */
.accordion-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px 20px 0px 20px;
    max-width: 550px;
    width: 100%;
    position: relative;
    border-left: 5px solid #2b5fd9;
    margin: 0 auto;
}

/* --- Шапка --- */
.accordion-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.accordion-card .card-image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #e2e6ea;
}

.accordion-card .card-title {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
    margin: 0;
}

.accordion-card .card-subtitle {
    font-size: 16px;
    color: #808080;
    line-height: 1.4;
    margin-top: 6px;
    margin-bottom: 0;
}

/* --- Скрываемый контент --- */
.accordion-card .card-content-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

/* Когда класс .is-open добавлен через JS, контент показывается */
.accordion-card.is-open .card-content-wrapper {
    max-height: 600px;
    opacity: 1;
    margin-top: 15px;
}

.accordion-card .divider {
    width: 100%;
    height: 1px;
    background-color: #d1d5db;
    margin-bottom: 20px;
}

.accordion-card .services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.accordion-card .services-list li {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 500;
    color: #555658;
    gap: 12px;
}

.accordion-card .check-icon {
    width: 22px;
    height: 22px;
    background-color: #2b5fd9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.accordion-card .check-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* --- Панель "Позвонить" --- */
.accordion-card .action-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Показываем кнопку при открытии */
.accordion-card.is-open .action-bar {
    opacity: 1;
    margin-top: 20px;
    padding-bottom: 20px;
    pointer-events: auto;
}

.accordion-card .phone-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-card .phone-icon svg {
    stroke: #2b5fd9;
}

.accordion-card .call-link {
    font-size: 16px;
    font-weight: 700;
    color: #2b5fd9;
    text-decoration: none;
    border-bottom: 2px solid #2b5fd9;
    padding-bottom: 2px;
    text-transform: uppercase;
}

.accordion-card .call-link:hover {
    opacity: 0.8;
}
 
/* --- Кнопка переключения --- */
.accordion-card .toggle-btn {
    position: absolute;
    bottom: 0px;
    right: 20px;
    color: white !important;
    background: #2D58CB;
    border: none;
    border-radius: 20px 20px 0 0;
    padding: 8px 16px;
    font-size: 14px;
    color: #2b5fd9;
    cursor: pointer;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
    transition: color 0.3s ease;
}

.accordion-card .toggle-btn:hover {
    opacity: 0.8;
}

.accordion-card .toggle-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s ease;
}

/* Состояние кнопки при открытой карточке */
.accordion-card.is-open .toggle-btn svg {
    transform: rotate(180deg);
    
}

.accordion-card.is-open .toggle-btn{
    background-color: white;
    color:#2D58CB !important; 
}

/* --- Адаптив --- */
@media (max-width: 480px) {
    .accordion-card .card-header {
        flex-direction: column;
    }

    .accordion-card .card-image {
        width: 70px;
        height: 70px;
    }
}