{% load static %}

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    background: url("../images/bg/main.b20c296be029.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ─── Page Wrapper ──────────────────────────────────────────────────────────── */
#apphub {
    padding: 80px 24px 48px;
}

.apphub-header {
    width: 100%;
    text-align: center;
    margin-bottom: 48px;
}

.apphub-header .brand-logo {
    height: 48px;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.apphub-header h1 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-shadow: 0 2px 12px rgba(0,0,0,.5);
    margin: 0;
}

.apphub-header p {
    color: rgba(255,255,255,.65);
    font-size: .9rem;
    margin-top: 6px;
}

/* ─── Grid ──────────────────────────────────────────────────────────────────── */
.apphub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ─── App Card ──────────────────────────────────────────────────────────────── */
.app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 36px 24px 28px;
    color: #fff;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(248,103,30,.18) 0%, transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0,0,0,.45), 0 0 0 1px rgba(248,103,30,.4);
    background: rgba(255, 255, 255, 0.17);
    border-color: rgba(248, 103, 30, 0.55);
    color: #fff;
    text-decoration: none;
}

.app-card:hover::before {
    opacity: 1;
}

/* ─── Logo Container ────────────────────────────────────────────────────────── */
.app-card__logo-wrap {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: background .25s ease;
    flex-shrink: 0;
}

.app-card:hover .app-card__logo-wrap {
    background: rgba(248, 103, 30, 0.22);
    border-color: rgba(248, 103, 30, 0.4);
}

.app-card__logo {
    max-width: 62px;
    max-height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.3));
}

/* ─── Text ──────────────────────────────────────────────────────────────────── */
.app-card__name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0 0 8px;
    text-align: center;
    color: #fff;
    transition: color .2s;
}

.app-card:hover .app-card__name {
    color: #f8671e;
}

.app-card__desc {
    font-size: .82rem;
    color: rgba(255, 255, 255, 0.60);
    text-align: center;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

/* ─── Arrow badge ───────────────────────────────────────────────────────────── */
.app-card__arrow {
    margin-top: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(248,103,30,.0);
    border: 1px solid rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.45);
    font-size: .8rem;
    transition: background .25s, border-color .25s, color .25s, transform .25s;
}

.app-card:hover .app-card__arrow {
    background: #f8671e;
    border-color: #f8671e;
    color: #fff;
    transform: translateX(3px);
}

/* ─── Top-right actions ─────────────────────────────────────────────────────── */
.top-actions {
    position: fixed;
    top: 14px;
    right: 18px;
    z-index: 200;
    display: flex;
    gap: 8px;
}

.top-actions .btn {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: .8rem;
    border-radius: 8px;
    transition: background .2s, border-color .2s;
}

.top-actions .btn:hover {
    background: rgba(248,103,30,.75);
    border-color: #f8671e;
    color: #fff;
}

.top-actions .btn-warning {
    background: rgba(248,103,30,.75);
    border-color: #f8671e;
    color: #fff;
}

.top-actions .btn-warning:hover {
    background: rgba(202, 77, 14, 0.9);
    border-color: #f8671e;
    color: #fff;
}

/* ─── Empty state ───────────────────────────────────────────────────────────── */
.apphub-empty {
    color: rgba(255,255,255,.55);
    text-align: center;
    padding: 60px 0;
    font-size: .95rem;
}
