/* ==========================================================
   batch3.2-title-fix.css (Batch 3.2)
   Fix judul website yang masih terpotong "...".

   Akar masalah:
   - .logo punya flex-shrink:0 (tidak bisa menyusut)
   - .logo-text punya max-width terbatas + nowrap → ellipsis

   Solusi: .logo boleh fleksibel mengisi ruang, teks pakai
   ruang yang tersedia (bukan max-width kaku), font auto-scale.
   ========================================================== */

/* Logo container boleh menyusut & mengisi ruang tersedia */
.nav-inner .logo,
.navbar .logo {
    flex-shrink: 1 !important;
    min-width: 0 !important;     /* WAJIB agar child bisa truncate/shrink dengan benar */
    flex: 1 1 auto !important;   /* ambil ruang sebanyak mungkin */
    overflow: hidden;
}

/* Wrapper teks: ambil ruang penuh dari .logo */
.logo-text-wrap {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden;
}

/* JUDUL: font auto-scale + lebar mengikuti ruang tersedia (bukan max-width kaku).
   Dengan min-width:0 di parent, teks akan mengisi ruang yang ada;
   ellipsis hanya muncul kalau benar-benar tidak muat setelah font mengecil. */
.logo-text {
    font-size: clamp(0.8rem, 3vw, 1.05rem) !important;
    max-width: none !important;      /* hapus batas kaku */
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: clamp(0.6rem, 2.2vw, 0.72rem) !important;
    max-width: none !important;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
}

/* Logo gambar tetap, jangan ikut shrink */
.navbar .logo-img,
.nav-inner .logo-img {
    flex-shrink: 0 !important;
}

/* Di mobile, beri ruang nav lebih efisien: kurangi padding & gap
   supaya teks judul dapat ruang lebih lebar */
@media (max-width: 640px) {
    .nav-inner {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
        gap: 0.5rem;
    }
    .logo {
        gap: 0.45rem;
    }
    /* Beri judul napas lebih: turunkan font minimum agar muat utuh */
    .logo-text {
        font-size: clamp(0.72rem, 3.6vw, 0.95rem) !important;
    }
    .logo-subtitle {
        font-size: clamp(0.58rem, 2.6vw, 0.68rem) !important;
    }
}

/* Sangat sempit (≤380px) */
@media (max-width: 380px) {
    .logo-text {
        font-size: clamp(0.68rem, 3.8vw, 0.88rem) !important;
    }
}
