/* Общие стили для страниц справочника */
.reference-page {
    background: #1a1a1a;
    min-height: 100vh;
}

/* Заголовок страницы */
.reference-header {
    background: #282828;
    height: 7.5rem;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.reference-title {
    color: #FFF;
    font-family: Unbounded, sans-serif;
    font-size: 2rem;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
    position:relative;
    z-index:10;
}

.reference-image-1 {
    width: 567.84px;
    height: 567.84px;
    position: absolute;
    left: 745.32px;
    top: -288px;
    transform-origin: 0 0;
    transform: rotate(37.836deg) scale(1, 1);
    filter: blur(5px);
    object-fit: cover;
    aspect-ratio: 1;
}

.reference-image-2 {
    width: 18.19175rem;
    height: 18.19175rem;
    transform: rotate(-50.000deg) scale(1, 1);
    filter: blur(5px);
    position: absolute;
    right: -5rem;
    top: -204px;
    object-fit: cover;
    aspect-ratio: 1;
}

/* Контент */
.reference-content {
    padding: 2rem 0;
}

/* Фильтры */
.filters-section {
    background: #282828;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filters-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end; /* Выравнивание по низу */
}

.filter-item {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-search {
    min-width: 300px;
}

.filter-label {
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-select,
.filter-input {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 1rem;
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    padding: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

/* Кастомная стрелка для select */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%233a3a3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

.filter-select:hover,
.filter-select:focus {
    border-color: #ffc75b;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23FFA800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.filter-input:hover,
.filter-input:focus {
    border-color: #ffc75b;
}

.filter-select option {
    background: #282828;
    color: #fff;
}

/* Сетка стилей */
.styles-grid,
.schools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Карточка стиля */
.style-card,
.school-card {
    background: #282828;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .style-card:hover,
    .school-card:hover {
        background: #1a1a1a;
    }

.style-card-header,
.school-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.style-name,
.school-name {
    color: #FFF;
    font-family: Montserrat, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.style-code,
.school-country-flag {
    background: #ffc75b;
    color: #1a1a1a;
    font-family: Montserrat, sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.style-original-name,
.school-country {
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 0.9375rem;
    font-style: italic;
    margin: 0 0 0.75rem 0;
}

.style-meta,
.school-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1rem;
}

.style-category,
.style-subcategory,
.school-type,
.school-category {
    color: #ffc75b;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
}

.style-separator {
    color: #666;
}

.style-characteristics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.characteristic {
    display: flex;
    gap: 0.5rem;
}

.char-label {
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 80px;
}

.char-value {
    color: #FFF;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
}

/* Информация о школе */
.school-info {
    margin-bottom: 0.75rem;
}

.info-label {
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

.info-value {
    color: #FFF;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    display: block;
}

/* Вкусовой профиль */
.school-flavor-profile {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #3a3a3a;
}

.flavor-title {
    color: #ffc75b;
    font-family: Montserrat, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.flavor-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flavor-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flavor-label {
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 0.75rem;
    min-width: 80px;
}

.flavor-scale {
    flex: 1;
    height: 0.5rem;
    background: #1a1a1a;
    border-radius: 0.25rem;
    overflow: hidden;
}

.flavor-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffc75b 0%, #FF8800 100%);
    border-radius: 0.25rem;
    transition: width 0.3s ease;
}

/* Пустое состояние */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #B8B8B8;
    font-family: Montserrat, sans-serif;
    font-size: 1.125rem;
}

/* HTMX индикатор загрузки */
.htmx-request .styles-grid,
.htmx-request .schools-grid {
    opacity: 0.5;
    pointer-events: none;
}

/* Адаптив */
@media (max-width: 768px) {
    .filters-section {
        position: relative;
    }
    .reference-title {
        font-size: 1.5rem;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-item,
    .filter-search {
        min-width: 100%;
        width: 100%;
    }

    .filter-select,
    .filter-input {
        width: 100%;
        box-sizing: border-box;
    }

    .styles-grid,
    .schools-grid {
        grid-template-columns: 1fr;
    }

    .reference-image-1,
    .reference-image-2 {
        display: none;
    }
    .reference-header {
        height: auto;
        padding: 1rem 0;
    }
}
