﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
    font-family: 'Heebo';
    src: url('fonts/Heebo-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'TelAviv-Modernist';
    src: url('fonts/TelAviv-ModernistRegular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}


/* כרטיסיות קטגוריות */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 230px;
    margin: 0;
    background-color: #ffffff;
    border: 1px solid #aaa;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-align: center;
    gap: 0.75rem;
}

.category-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.category-card:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
    box-shadow: none;
    border-color: #aaa;
}

.category-card-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.category-card-name {
    font-size: 24px;
    font-weight: 400;
    font-family: 'TelAviv-Modernist', sans-serif;
    color: #2d2d2d;
    line-height: 1.3;
}

/* כרטיסיות תת-קטגוריות */
.subcategory-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 220px;
    height: 220px;
    margin: 0;
    background-color: #ffffff;
    border: 1px solid #aaa;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.subcategory-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.subcategory-card:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
    box-shadow: none;
    border-color: #aaa;
}

.subcategory-card-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2d;
}

/* גריד קטגוריות */
.categories-grid,
.subcategories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
}

/* שורת חיפוש גלובלית */
.search-bar-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.search-input-container {
    position: relative;
    width: 520px;
    max-width: 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

.search-input {
    width: 100%;
    border-radius: 8px;
    padding: 0.50rem 1rem 0.50rem 2.5rem;;
    padding-right: 2.5rem;
    font-size: 1rem;
    font-family: 'Heebo', sans-serif;
    border: 1.5px solid #aaa;
    background-color: #fff;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 45px;
    height: 45px;
    object-fit: contain;
    opacity: 0.6;
}

.ml-search-wrap .search-icon,
.mc-search-wrap .search-icon,
.mi-search-wrap .search-icon,
.au-search-wrap .search-icon {
    right: -0.2rem;
}

.yarden-title {
    font-family: 'TelAviv-Modernist', sans-serif;
    font-weight: 700;
    text-align: center;
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ═══════════════════════════════
   Breadcrumb
═══════════════════════════════ */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    padding: 2rem 0.5rem 0;
    font-size: 0.88rem;
    font-family: 'TelAviv-Modernist', sans-serif;
}

.breadcrumb-link {
    color: #766F62;
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: #4a4540;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #B8B2A8;
    font-size: 0.75rem;
    line-height: 1;
}

.breadcrumb-current {
    color: #2d2d2d;
    font-weight: 500;
}

.edit-btn {
    margin-top: 0.5rem;
    background: #fff;
    border: 1px solid #aaa;
    color: #333;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
}

.edit-btn:hover {
    background: #f0f0f0;
}

html, body {
    font-family: 'TelAviv-Modernist', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #FEFAEE;
}


h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}


.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ===== Content Cards ===== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(4, 280px);
    gap: 0.6rem;
    width: fit-content;
    margin: 0 auto;
}

.content-card {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 220px;
    padding: 20px 18px;
    background: #fff;
    border: 1px solid #aaa;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.content-card-date {
    position: absolute;
    top: 14px;
    right: 14px;
    font-size: 0.75rem;
    color: #757575;
    font-family: 'Heebo', sans-serif;
    line-height: 1;
}

.content-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

/* ===== Preview ===== */
.content-preview {
    position: absolute;
    top: 10px;
    left: -15px;
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.preview-icon-wrap {
    position: relative;
    width: 90px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-blob {
    position: absolute;
    inset: 0;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
}

.content-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    line-height: 0;
}

.content-type-img {
    width: 90px;
    height: 42px;
    object-fit: contain;
}

.content-type-label {
    display: inline-block;
    font-family: 'Heebo', sans-serif;
    display: none;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #1a1a1a;
    padding: 1px 6px;
    border-radius: 20px;
    margin-top: -2px;
    line-height: 1;
}

/* ===== Info ===== */
.content-info {
    flex: 1;
    overflow: hidden;
    text-align: center;
    padding-top: 32px;
}

.content-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #222;
    font-family: 'Heebo', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-card-desc {
    font-size: 15px;
    font-weight: 400;
    font-family: 'Heebo', sans-serif;
    color: #8A8A8A;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ── ContentCard: כפתור "מידע נוסף" ──────────────────────────── */
.cc-more-btn {
    background: none;
    border: none;
    padding: 0;
    color: #999;
    font-size: 0.78rem;
    font-family: 'Heebo', sans-serif;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 2px;
}
.cc-more-btn:hover { color: #555; text-decoration: underline; }

/* ── ContentCard: modal תיאור מלא ────────────────────────────── */
.cc-desc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-desc-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 32px 32px 28px;
    max-width: 640px;
    width: 90%;
    min-height: 160px;
    text-align: right;
    direction: rtl;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cc-desc-modal-title {
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}
.cc-desc-modal-body {
    font-family: 'Heebo', sans-serif;
    font-size: 0.93rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
    white-space: pre-line;
}
.cc-desc-modal-close {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1.05rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
}
.cc-desc-modal-close:hover { background: #f5f5f5; }

/* ===== Actions ===== */
.content-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    flex-shrink: 0;
}

.content-card-btn {
    flex: 1;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Heebo', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
    box-sizing: border-box;
}

.content-card-btn:hover {
    opacity: 0.82;
}

.content-card-btn-primary {
    background: #CADBF8;
    color: #1a1a1a;
    border: none;
    gap: 6px;
}

.content-card-btn-secondary {
    background: transparent;
    color: #2d2d2d;
    border: 1.5px solid #ccc;
    gap: 6px;
}

.play-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.btn-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ===== Upload / Edit Form Styles ===== */
.upload-page-wrapper {
    max-width: 980px;
    margin: 0 auto;
    padding: 32px 24px 80px;
    direction: rtl;
    box-sizing: border-box;
    overflow-x: hidden;
}

.upload-loading {
    text-align: center;
    color: #707070;
    margin-top: 2rem;
}

.upload-form-card {
    background: white;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #aaa;
}

.upload-section {
    margin-top: 20px;
}

.upload-section:first-child {
    margin-top: 0;
}

.upload-section-label {
    font-size: 14px;
    font-weight: 600;
    color: #2B2B2B;
    margin-bottom: 10px;
    font-family: 'TelAviv-Modernist', sans-serif;
}

.upload-section-file {
    background: none;
}

.content-type-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem;
}

.content-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #aaa;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    user-select: none;
}

.content-type-card:hover {
    border-color: #70B4FD;
    background: #F8FBFF;
}

.content-type-card.selected {
    border-color: #70B4FD;
    background: #F8FBFF;
    box-shadow: 0 0 0 3px rgba(112, 180, 253, 0.18);
}

.content-type-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.content-type-name {
    font-size: 24px;
    font-family: 'TelAviv-Modernist', sans-serif;
    color: #2B2B2B;
}

.upload-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #2B2B2B;
    font-family: 'TelAviv-Modernist', sans-serif;
}

.form-field input,
.form-field select,
.form-field textarea {
    height: 44px;
    border-radius: 12px;
    border: 1px solid #E6E6E6;
    padding: 0 14px;
    background: white;
    font-size: 14px;
    font-family: 'TelAviv-Modernist', sans-serif;
    direction: rtl;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
    outline: none;
}

.form-field textarea {
    height: 44px;
    min-height: 44px;
    max-height: none;
    padding-top: 12px;
    resize: none;
    overflow: hidden;
    font-family: 'TelAviv-Modernist', sans-serif;
    line-height: 1.45;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.upload-dropzone {
    position: relative;
    border: 2px dashed #D8D8D8;
    border-radius: 16px;
    padding: 16px 20px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-dropzone:hover {
    border-color: #70B4FD;
    background: #F8FBFF;
}

.dropzone-icon {
    font-size: 1.6rem;
    color: #70B4FD;
    display: block;
    margin-bottom: 6px;
}

.dropzone-icon-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 10px;
    opacity: 0.45;
}

/* Link input card — mirrors the dropzone card */
.link-input-card {
    border: 1px solid #D8D8D8;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    min-height: 140px;
    transition: border-color 0.2s, background 0.2s;
}

.link-input-card:focus-within {
    border-color: #70B4FD;
    background: #F8FBFF;
}

.link-input-card-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    opacity: 0.45;
}

.link-input-card input {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #E6E6E6;
    padding: 0 12px;
    font-size: 0.9rem;
    font-family: 'TelAviv-Modernist', sans-serif;
    direction: ltr;
    text-align: left;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.link-input-card input:focus {
    border-color: #555;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
    outline: none;
}

.dropzone-text {
    color: #6F6F6F;
    font-size: 0.88rem;
    font-family: 'TelAviv-Modernist', sans-serif;
    margin-bottom: 4px;
}

.dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* Dropzone + URL זה לצד זה בתוך אזור הקובץ */
.file-upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: stretch;
    margin-top: 8px;
}

.file-upload-row .upload-dropzone {
    min-height: 140px;
}

.file-upload-row .form-field {
    display: flex;
    flex-direction: column;
}

.file-upload-row .form-field input {
    flex: 1;
    height: auto;
}

@media (max-width: 768px) {
    .file-upload-row {
        grid-template-columns: 1fr;
    }
}

.upload-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.filter-group h6 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.filter-option label {
    font-size: 14px;
    cursor: pointer;
}

.upload-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #F0F7FF;
    color: #2B6CB0;
    font-size: 14px;
    font-weight: 500;
}

.upload-message-success {
    background: #e6f4ea;
    color: #2d6a3f;
    border: 1px solid #a8d5b0;
}

.upload-message-error {
    background: #FFF5F5;
    color: #C53030;
    border: 1px solid #FEB2B2;
}

/* Admin form inputs — global so CSS isolation doesn't block InputText */
.au-input {
    border: 1.5px solid #E8E8E8;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: 'Heebo', sans-serif;
    color: #2d2d2d;
    background: #FAFAF7;
    outline: none;
    transition: border-color 0.15s;
    direction: rtl;
    width: 100%;
    box-sizing: border-box;
}
.au-input:focus {
    border-color: #70B4FD;
    background: white;
}

.upload-submit-row {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.upload-submit-btn {
    padding: 14px 32px;
    border-radius: 14px;
    background: #70B4FD;
    color: white;
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-family: 'TelAviv-Modernist', sans-serif;
    transition: opacity 0.15s ease;
}

.upload-submit-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.upload-submit-btn:active:not(:disabled) {
    filter: brightness(0.9);
}

.upload-submit-btn:focus-visible {
    outline: 2px solid #70B4FD;
    outline-offset: 1px;
}

.upload-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edit-cancel-btn {
    padding: 14px 32px;
    border-radius: 14px;
    background: white;
    color: #555;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid #E0E0E0;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.edit-cancel-btn:hover:not(:disabled) {
    background: #F5F5F0;
    border-color: #ccc;
}

.edit-cancel-btn:active:not(:disabled) {
    background: #F0F0EB;
    border-color: #aaa;
    color: #333;
}

.edit-cancel-btn:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 1px;
}

.edit-cancel-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Content Grid Responsive Breakpoints ===== */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: repeat(3, 280px);
    }
}

@media (max-width: 960px) {
    .content-grid {
        grid-template-columns: repeat(2, 280px);
    }
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .content-card {
        width: 100%;
        max-width: 100%;
        height: auto;
        box-sizing: border-box;
    }

    .category-card {
        width: 100%;
        max-width: 220px;
        box-sizing: border-box;
        height: 160px;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .subcategory-card {
        width: 100%;
        max-width: 220px;
        box-sizing: border-box;
        height: auto;
        min-height: 115px;
        padding: 0.75rem;
    }

    .categories-grid,
    .subcategories-grid {
        gap: 0.5rem;
    }
}

/* ===== Upload / Edit form — single column on mobile ===== */
@media (max-width: 600px) {
    .upload-details-grid {
        grid-template-columns: 1fr;
    }

    .upload-page-wrapper {
        padding: 16px 14px 60px;
    }

    .upload-form-card {
        padding: 16px;
    }

    .content-type-grid {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== Manage Content ===== */
.mc-title {
    font-size: 24px !important;
    font-family: 'TelAviv-Modernist', sans-serif !important;
    font-weight: 400 !important;
}

/* ===== Delete Popup ===== */
.delete-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-modal {
    background: white;
    border-radius: 22px;
    padding: 32px 28px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 420px;
    width: 90%;
    direction: rtl;
    text-align: center;
}

.delete-modal-title {
    font-family: 'TelAviv-Modernist', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2B2B2B;
    margin: 0 0 12px;
}

.delete-modal-body {
    font-size: 0.95rem;
    font-family: 'TelAviv-Modernist', sans-serif;
    color: #555;
    line-height: 1.7;
    margin: 0 0 20px;
}

.delete-modal-error {
    font-size: 0.875rem;
    color: #c0392b;
    margin: 0 0 12px;
}

.delete-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.delete-btn-cancel {
    padding: 10px 22px;
    border-radius: 12px;
    background: white;
    border: 1px solid #E0E0E0;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    font-family: 'TelAviv-Modernist', sans-serif;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.delete-btn-cancel:hover:not(:disabled) {
    background: #F5F5F0;
    border-color: #ccc;
}

.delete-btn-cancel:active:not(:disabled) {
    background: #F0F0EB;
    border-color: #aaa;
    color: #333;
}

.delete-btn-cancel:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 1px;
}

.delete-btn-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.delete-btn-confirm {
    padding: 10px 22px;
    border-radius: 12px;
    background: #E53E3E;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'TelAviv-Modernist', sans-serif;
    cursor: pointer;
    transition: opacity 0.15s;
}

.delete-btn-confirm:hover:not(:disabled) {
    opacity: 0.88;
}

.delete-btn-confirm:active:not(:disabled) {
    filter: brightness(0.9);
}

.delete-btn-confirm:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 1px;
}

.delete-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════
   Summary strip — shared across ManageContent, ManageLibrary, MyItems
═══════════════════════════════════════════════════════════ */
.summary-strip-v3 {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin: 0 auto 20px;
    direction: ltr;
}

.summary-stat-v3 {
    position: relative;
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 56px 22px;
}

.summary-divider-v3 {
    width: 1px;
    flex-shrink: 0;
    background: #3d3d3d;
    align-self: stretch;
}

.summary-value-v3 {
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    color: #1F1F1F;
    font-family: 'TelAviv-Modernist', sans-serif;
}

.summary-label-v3 {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: .78rem;
    color: #999;
    font-family: 'TelAviv-Modernist', sans-serif;
    text-align: center;
}

@media (max-width: 600px) {
    .summary-value-v3 { font-size: 1.4rem; }
    .summary-stat-v3  { padding: 0 24px 28px; }
    .summary-label-v3 { line-height: 1; }
}

/* ═══════════════════════════════════════════════════════════
   Wizard — Stepper
═══════════════════════════════════════════════════════════ */
.wizard-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 auto 28px;
    width: 100%;
    max-width: 520px;
    direction: rtl;
}
.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;
}
.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Heebo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    background: #E8E8E8;
    color: #999;
    transition: background 0.2s, color 0.2s;
}
.wizard-step--active .wizard-step-circle {
    background: #ACDDF1;
    color: #2d2d2d;
}
.wizard-step--done .wizard-step-circle {
    background: #C0E2B8;
    color: #2d2d2d;
}
.wizard-step-label {
    font-family:'TelAviv-Modernist', sans-serif;
    font-size: 0.85rem;
    color: #707070;
    white-space: nowrap;
}
.wizard-step--active .wizard-step-label,
.wizard-step--done   .wizard-step-label {
    color: #1a1a1a;
}
.wizard-step-line {
    position: relative;
    flex: 0 1 clamp(12px, 3vw, 40px);
    height: 2px;
    margin: 0 8px;
    margin-bottom: 22px;
}
.wizard-step-line::before {
    content: "";
    position: absolute;
    top: 0;
    left: -8px;
    right: -8px;
    height: 2px;
    background: #E8E8E8;
    transition: background 0.2s;
}
.wizard-step-line--done::before { background: #C0E2B8; }

/* ═══════════════════════════════════════════════════════════
   Wizard — Step body
═══════════════════════════════════════════════════════════ */
.wizard-step-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ═══════════════════════════════════════════════════════════
   File / Link choice buttons
═══════════════════════════════════════════════════════════ */
.file-link-choice {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.file-link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid #D6D6D6;
    border-radius: 14px;
    background: #FFFFFF;
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    color: #1A1A1A;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
    direction: rtl;
}
.file-link-btn:hover {
    border-color: #70B4FD;
    background: #F0F7FF;
}
.file-link-btn--active {
    border-color: #70B4FD;
    background: #E8F1FF;
    color: #3266C4;
    font-weight: 600;
}
.file-link-btn-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.75;
}

/* ═══════════════════════════════════════════════════════════
   Char counter
═══════════════════════════════════════════════════════════ */
.char-counter {
    float: left;
    font-size: 0.78rem;
    font-family: 'Heebo', sans-serif;
    color: #737373;
    font-weight: 400;
    margin-right: auto;
    margin-left: 0;
}
.char-counter--warn { color: #E07000; }

/* ═══════════════════════════════════════════════════════════
   Accordion groups
═══════════════════════════════════════════════════════════ */
.accordion-group {
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}
.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Heebo', sans-serif;
    font-size: 0.95rem;
    color: #333;
    direction: rtl;
    text-align: right;
    gap: 8px;
    transition: background 0.15s;
}
.accordion-header:hover { background: #F6F6F6; }
.accordion-title { flex: 1; font-weight: 600; }
.accordion-badge {
    background: #0061B6;
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.accordion-arrow {
    font-size: 1.1rem;
    color: #999;
    transform: rotate(90deg);
    display: inline-block;
    transition: transform 0.2s;
}
.accordion-arrow--open { transform: rotate(-90deg); }
.accordion-body {
    padding: 10px 18px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    border-top: 1px solid #F0F0F0;
    direction: rtl;
}
.filter-option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
}
.filter-option-label input[type="checkbox"] {
    accent-color: #0061B6;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   Wizard navigation bar
═══════════════════════════════════════════════════════════ */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #F0F0F0;
    direction: rtl;
}

/* ═══════════════════════════════════════════════════════════
   Wizard nav buttons (Upload / Edit pages)
═══════════════════════════════════════════════════════════ */
.wizard-nav-btn {
    flex: none;
    height: 36px;
    padding: 0 32px;
    border-radius: 10px;
    font-size: 14px;
}
.wizard-nav-btn.content-card-btn-secondary {
    background: #CADBF8;
    color: #1a1a1a;
    border: none;
}
.wizard-nav-btn.content-card-btn-primary {
    background: #FEC899;
    color: #1a1a1a;
    border: none;
}

/* ═══════════════════════════════════════════════════════════
   Upload / Edit hero title (above form card on steps 2-3)
═══════════════════════════════════════════════════════════ */
.upload-hero-title {
    margin-top: 4px;
    margin-bottom: 28px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ═══════════════════════════════════════════════════════════
   Target summary (step 1 sub-form header)
═══════════════════════════════════════════════════════════ */
.upload-target-summary {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0F0F0;
}
.upload-target-label {
    font-family: 'Heebo', sans-serif;
    font-size: 0.92rem;
    color: #444;
}

/* ═══════════════════════════════════════════════════════════
   File / link fieldset wrapper
═══════════════════════════════════════════════════════════ */
.file-link-fieldset {
    border: none;
    padding: 0;
    margin: 20px 0 0;
}
.file-link-legend {
    font-size: 0.95rem;
    font-weight: 600;
    color: #6F6F6F;
    font-family: 'Heebo', sans-serif;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}
.file-link-fieldset .file-link-choice {
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   Method content wrapper (fixed height — dropzone / link)
═══════════════════════════════════════════════════════════ */
.upload-method-content {
    margin-top: 16px;
    height: 200px;
    display: flex;
    flex-direction: column;
}
.upload-method-content .link-input-card input {
    height: 44px;
    border-radius: 12px;
}
.upload-method-content .upload-dropzone,
.upload-method-content .link-input-card {
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed #C8C8C8;
    border-radius: 16px;
    padding: 20px 24px;
}
.upload-method-content .upload-dropzone:hover,
.upload-method-content .link-input-card:focus-within {
    border-color: #70B4FD;
}

/* ═══════════════════════════════════════════════════════════
   Selected file display inside dropzone
═══════════════════════════════════════════════════════════ */
.dropzone-selected-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Card selection state
═══════════════════════════════════════════════════════════ */
.category-card.selected {
    border-color: #70B4FD;
    background: #F8FBFF;
    box-shadow: 0 0 0 3px rgba(112, 180, 253, 0.18);
}

/* ═══════════════════════════════════════════════════════════
   Link mode helper text
═══════════════════════════════════════════════════════════ */
.link-input-hint {
    font-size: 0.78rem;
    margin-top: -4px;
    margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   Step 3 micro-copy
═══════════════════════════════════════════════════════════ */
.upload-microcopy {
    font-size: 0.85rem;
    color: #6F6F6F;
    font-family: 'Heebo', sans-serif;
    margin-bottom: 12px;
}

/* ═══════════════════════════════════════════════════════════
   Filter accordion (step 3)
═══════════════════════════════════════════════════════════ */
.filter-accordion-list { /* no extra margin needed */ }

.filter-acc-item + .filter-acc-item {
    border-top: 1px solid #EBEBEB;
}
.filter-acc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 13px 4px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: 'Heebo', sans-serif;
    border-radius: 6px;
}
.filter-acc-header:hover { background: #FAFAFA; }
.filter-acc-name {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2d;
    text-align: right;
}
.filter-acc-count {
    font-size: 0.8rem;
    color: #3266C4;
    font-weight: 400;
    white-space: nowrap;
}
.filter-acc-chevron {
    font-size: 0.72rem;
    color: #999;
    flex-shrink: 0;
}
.filter-acc-body { padding: 4px 4px 16px; }
.filter-acc-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 20px;
}

/* ═══════════════════════════════════════════════════════════
   File-type chips (step 3, knowledge-base)
═══════════════════════════════════════════════════════════ */
.ftype-chips-area { margin-bottom: 16px; }
.ftype-chips-area .filter-group-title {
    font-family: 'Heebo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2d;
    margin: 0 0 10px 0;
}
.ftype-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ftype-chip {
    padding: 5px 16px;
    border-radius: 20px;
    border: 1.5px solid #D6D6D6;
    background: #fff;
    font-family: 'Heebo', sans-serif;
    font-size: 0.88rem;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.ftype-chip--selected {
    background: #CADBF8;
    border-color: #AECDFF;
}
.ftype-chip:hover:not(.ftype-chip--selected):not(.ftype-chip--disabled) {
    background: #EEF4FF;
    border-color: #AECDFF;
}
.ftype-chip--disabled,
.ftype-chip[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}
.filter-section-divider {
    border: none;
    border-top: 1px solid #EBEBEB;
    margin: 16px 0;
}

