/* ===== Detay sayfası hero ===== */
.detail-hero {
    position: relative;
    padding: 2rem 0 1.75rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    color: #212529;
}

.detail-hero-inner {
    position: relative;
}

.detail-hero .detail-back-link {
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    font-size: .85rem;
    margin-bottom: .75rem;
    text-decoration: none;
}

.detail-hero .detail-back-link:hover {
    color: #0a2342;
}

.detail-hero-breadcrumb .breadcrumb {
    --bs-breadcrumb-divider-color: #adb5bd;
    font-size: .8rem;
    margin-bottom: .9rem;
}

.detail-hero-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.detail-hero-breadcrumb .breadcrumb-item.active {
    color: #495057;
}

.detail-hero-title {
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    margin-bottom: .5rem;
    max-width: 46rem;
    color: #0a2342;
}

.detail-hero-desc {
    color: #6c757d;
    max-width: 42rem;
    margin-bottom: .9rem;
    font-size: .95rem;
}

.detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.1rem;
    font-size: .85rem;
    color: #495057;
}

.detail-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.detail-hero-meta-sep {
    opacity: .5;
}

/* ===== Media library ===== */
.media-library {
    --ml-accent: #0a2342;
}

.media-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    padding: .6rem;
    margin-bottom: 1.25rem;
}

.media-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.media-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    border: none;
    background: transparent;
    color: #495057;
    font-weight: 600;
    font-size: .85rem;
    padding: .55rem .9rem;
    border-radius: .7rem;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.media-tab:hover {
    background: #f1f3f5;
}

.media-tab.active {
    background: var(--ml-accent);
    color: #fff;
}

.media-tab-count {
    font-size: .72rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .06);
}

.media-tab.active .media-tab-count {
    background: rgba(255, 255, 255, .2);
}

.media-toolbar-actions {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.media-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: #f1f3f5;
    border-radius: .7rem;
    padding: .5rem .8rem;
    min-width: 220px;
}

.media-search i {
    color: #adb5bd;
}

.media-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: .85rem;
    width: 100%;
}

.media-sort {
    border: 1px solid #e9ecef;
    background: #fff;
    border-radius: .7rem;
    padding: .5rem .8rem;
    font-size: .85rem;
    color: #495057;
}

.media-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.media-filters {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    padding: 1.1rem;
    position: sticky;
    top: 1rem;
}

.media-filters-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 1rem;
    color: #212529;
}

.media-filter-group {
    margin-bottom: 1.1rem;
}

.media-filter-group:last-child {
    margin-bottom: 0;
}

.media-filter-group h6 {
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #868e96;
    margin-bottom: .55rem;
}

.media-filter-check {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .84rem;
    color: #495057;
    padding: .32rem 0;
    cursor: pointer;
}

.media-filter-check input {
    accent-color: var(--ml-accent);
    cursor: pointer;
}

.media-filter-check span {
    margin-left: auto;
    font-size: .72rem;
    color: #adb5bd;
    font-weight: 600;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1rem;
}

.media-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 3rem 1rem;
    color: #adb5bd;
    font-size: .9rem;
    text-align: center;
}

.media-empty i {
    font-size: 1.8rem;
}

.media-card {
    background: #fff;
    border-radius: .9rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .9rem 1.6rem -0.6rem rgba(15, 23, 42, .2);
}

.media-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #111;
    overflow: hidden;
}

.media-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.media-card:hover .media-card-thumb img {
    transform: scale(1.06);
}

.media-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #e11d48;
    font-size: 1.7rem;
}

.media-kind-badge {
    position: absolute;
    top: .5rem;
    left: .5rem;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

.media-kind-badge--photo { background: #6366f1; }
.media-kind-badge--video { background: #e11d48; }

.media-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e11d48;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}

.media-card:hover .media-play-badge {
    transform: translate(-50%, -50%) scale(1.1);
}

.media-file-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    background: color-mix(in srgb, currentColor 8%, #f8f9fa);
    font-size: 2.2rem;
}

.media-file-ext {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
}

.media-card-body {
    padding: .8rem .9rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    flex: 1;
}

.media-card-title {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: .74rem;
    color: #adb5bd;
}

.media-card-date {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.media-card-view {
    color: var(--ml-accent);
    font-weight: 600;
    text-decoration: none;
}

.media-card-view:hover {
    text-decoration: underline;
}

.media-card-action {
    margin-left: auto;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    transition: background .15s, color .15s;
}

.media-card-action:hover {
    background: var(--ml-accent);
    color: #fff;
}

.media-pagination {
    display: flex;
    justify-content: center;
    gap: .35rem;
    margin-top: 1.5rem;
}

.media-page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 .5rem;
    border: 1px solid #e9ecef;
    background: #fff;
    border-radius: .55rem;
    font-size: .82rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.media-page-btn:hover:not(:disabled) {
    background: #f1f3f5;
}

.media-page-btn.active {
    background: var(--ml-accent);
    color: #fff;
    border-color: var(--ml-accent);
}

.media-page-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

@media (max-width: 991.98px) {
    .media-body {
        grid-template-columns: 1fr;
    }

    .media-filters {
        position: static;
    }

    .media-toolbar-actions {
        width: 100%;
    }

    .media-search {
        flex: 1;
    }
}
