/* Контейнер аккордеона */
#dvsa-acc {
    margin: 30px 0;
    border-radius: 12px;
    overflow: hidden;
  font-family: "Nunito", Sans-serif;
}

/* Обертка для каждого элемента */
.accordion-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    transform: translateY(-1px);
}

/* Заголовок */
.accordion-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 10px 20px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 20px;
    align-items: center;
    border: none;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.accordion-header.active {
    background: linear-gradient(135deg, #007cba 0%, #006ba1 100%);
    color: white;
}

/* Элементы заголовка */
.test-number {
    font-weight: 700;
    color: #6c757d;
}

.accordion-header.active .test-number {
    color: #ffffff;
}

.test-date {
    font-weight: 500;
  	font-size: 18px;
}

.test-result {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
  	text-align: center;
}

.test-result.passed {
    background: #28a745;
    color: white;
}

.test-result.failed {
    background: #dc3545;
    color: white;
}

.test-odometer {
	font-weight: 500;
    font-size: 18px;
    color: #495057;
  	text-transform: lowercase;
}

.accordion-header.active .test-odometer {
    color: #ffffff;
}

/* Контент */
.accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: white;
}

.accordion-content.active {
    padding: 25px;
    max-height: 2000px;
    border-top: 1px solid #e9ecef;
}

/* Детали теста */
.mot-test-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item strong {
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-passed {
    color: #28a745;
    font-weight: 600;
}

.result-failed {
    color: #dc3545;
    font-weight: 600;
}

/* Секция дефектов */
.defects-section {
    margin-top: 20px;
}

.defects-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
}

.defect-item {
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.defect-item.dangerous {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
}

.defect-item.major {
    border-left-color: #fd7e14;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.defect-item.minor {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
}

.defect-item.advisory {
    border-left-color: #17a2b8;
    background: linear-gradient(135deg, #e6f7ff 0%, #d1f2ff 100%);
}

.defect-type {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 10px;
    color: white;
}

.defect-item.dangerous .defect-type { background: #dc3545; }
.defect-item.major .defect-type { background: #fd7e14; }
.defect-item.minor .defect-type { background: #ffc107; color: #000; }
.defect-item.advisory .defect-type { background: #17a2b8; }

.dangerous-flag {
    background: #dc3545;
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

.defect-text {
    margin: 10px 0 0 0;
    color: #2c3e50;
    line-height: 1.5;
    font-size: 14px;
}

.no-defects {
    text-align: center;
    padding: 30px;
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
    background: #f0fff4;
    border-radius: 8px;
    border: 2px dashed #28a745;
}

/* Адаптивность */
@media (max-width: 768px) {
    .accordion-header {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 15px;
    }
    
    .test-result {
        justify-self: start;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
    }
    
    .accordion-content.active {
        padding: 15px;
    }
    
    .defect-item {
        padding: 12px;
    }
    #dvsa-acc .test-odometer {
      position: absolute;
      right: 50px;
      top: 62px;
	}
    #dvsa-acc .accordion-header::after {
		position: absolute;
    	right: 15px;
    	top: 20px;
  	}
}

/* Иконка для заголовка */
.accordion-header::after {
    content: '▼';
    font-size: 12px;
    transition: transform 0.3s ease;
    justify-self: end;
}

.accordion-header.active::after {
    transform: rotate(180deg);
}
/* Убираем margin-bottom только у заголовка */
.accordion-header {
    margin-bottom: 0 !important;
}

/* И у активного состояния тоже */
.accordion-header.active {
    margin-bottom: 0 !important;
}

/* Убираем margin у контента */
.accordion-content {
    margin: 0 !important;
}

/* Отступы между элементами аккордеона через обертку */
.accordion-item {
    margin-bottom: 12px;
}

.accordion-item:last-child {
    margin-bottom: 0;
}
#dvsa-acc .accordion-header {position: relative;}