/* ========================================
   Homepage — Principles section
   ======================================== */

.hp-principles {
    padding: 48px 0;
}

.hp-principles__title {
    font-family: 'FbMetali', 'Almoni Tzar', sans-serif;
    font-size: 36px;
    font-weight: 500;
    line-height: 40px;
    color: var(--hp-text);
    margin-bottom: 16px;
}

.hp-principles__desc {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    line-height: 24px;
    color: var(--hp-text);
    max-width: 700px;
    margin-bottom: 32px;
}

/* Category list */
.hp-principles__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hp-principle-category {
    padding-top: 24px;
    border-top: 1px solid var(--hp-border);
}

.hp-principle-category__title {
    font-family: 'FbMetali', 'Almoni Tzar', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 40px;
    color: var(--hp-text);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
}

.hp-principle-category__title::before {
    content: '\2190';
    display: inline-block;
    width: 0;
    overflow: hidden;
    transition: width 0.3s, margin 0.3s;
    font-size: 20px;
    margin-left: 0;
    order: -1;
}

.hp-principle-category:hover .hp-principle-category__title>span {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.hp-principle-category:hover .hp-principle-category__title::before {
    width: 24px;
    margin-left: 8px;
}

.hp-principle-category__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Badge */
.hp-badge {
    border: 1px solid var(--hp-border);
    border-radius: var(--hp-radius-badge);
    padding: 3px 9px;
    height: 22px;
    background: transparent;
    font-family: 'Heebo', sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: var(--hp-text-badge);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

/* Badge hover — colorful on category hover */
.hp-badge {
    transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+1) {
    background: #fce4ec;
    border-color: #f48fb1;
    color: #c2185b;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+2) {
    background: #fff3e0;
    border-color: #ffb74d;
    color: #e65100;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+3) {
    background: #fffde7;
    border-color: #ffd54f;
    color: #f57f17;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+4) {
    background: #e8f5e9;
    border-color: #81c784;
    color: #2e7d32;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+5) {
    background: #e0f7fa;
    border-color: #4dd0e1;
    color: #00838f;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+6) {
    background: #e8eaf6;
    border-color: #7986cb;
    color: #283593;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+7) {
    background: #f3e5f5;
    border-color: #ba68c8;
    color: #7b1fa2;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+8) {
    background: #fbe9e7;
    border-color: #ff8a65;
    color: #bf360c;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+9) {
    background: #f1f8e9;
    border-color: #aed581;
    color: #558b2f;
}

.hp-principle-category:hover .hp-badge:nth-child(10n+10) {
    background: #ede7f6;
    border-color: #9575cd;
    color: #4527a0;
}

/* Tablet+: two-column row per category (title right, badges left in RTL) */
@media (min-width: 800px) {
    .hp-principle-category {
        display: flex;
        align-items: flex-start;
        gap: 32px;
    }

    .hp-principle-category__title {
        flex: 1;
        white-space: nowrap;
        margin-bottom: 0;
    }

    .hp-principle-category__badges {
        flex: 1;
    }
}