/* ============================================================
   GNO Archive Layout — gal-style.css v2.1
   ============================================================ */

/* ── Ẩn article gốc Kadence sau khi transform ── */
.gal-original-hidden {
    display: none !important;
}

/* ── Reset grid/flex của Kadence wrapper ── */
.gal-active-wrapper {
    display: block !important;
    grid-template-columns: unset !important;
    gap: 0 !important;
}

/* ════════════════════════════════════════════
   ARCHIVE LIST LAYOUT
   ════════════════════════════════════════════ */

.gal-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 18px !important;
    padding: 18px 0 !important;
    border-bottom: 1px solid #e8e8e8 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: background 0.15s ease;
}
.gal-item:last-of-type {
    border-bottom: none !important;
}
.gal-item:hover {
    background: #fafafa !important;
}

/* Thumbnail */
.gal-thumb {
    flex: 0 0 220px !important;
    width: 220px !important;
    height: 148px !important;
    overflow: hidden !important;
    border-radius: 4px !important;
    background: #f0f0f0 !important;
    position: relative !important;
}
.gal-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 4px !important;
    transition: transform 0.3s ease !important;
}
.gal-item:hover .gal-thumb img {
    transform: scale(1.04) !important;
}
.gal-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    color: #bbb; font-size: 36px;
}

/* Content column */
.gal-content {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 0 !important;
}

/* Category tag */
.gal-meta {
    display: flex;
    align-items: center;
    gap: 6px;
}
.gal-category {
    font-size: 12px;
    color: #c0392b;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gal-category:hover { text-decoration: underline; }

/* Title */
.gal-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
    color: #1a1a1a !important;
    border: none !important;
}
.gal-title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 0.15s !important;
}
.gal-title a:hover { color: #c0392b !important; }

/* Excerpt */
.gal-excerpt {
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    color: #555 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
}

/* Date */
.gal-date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* ════════════════════════════════════════════
   WIDGET "TIN ĐỌC NHIỀU"
   ════════════════════════════════════════════ */

.gal-popular-widget {
    font-family: inherit;
    width: 100%;
}

/* List */
.gal-popular-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Item */
.gal-popular-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    position: relative !important;
    transition: background 0.12s;
}
.gal-popular-item:first-child {
    border-top: none !important;
}
.gal-popular-item:last-child {
    border-bottom: none !important;
}
.gal-popular-item:hover { background: #fafafa; }

/* Thumbnail nhỏ */
.gal-popular-thumb {
    flex: 0 0 76px !important;
    width: 76px !important;
    height: 58px !important;
    border-radius: 3px !important;
    overflow: hidden !important;
    background: #eee !important;
    position: relative !important;
}
.gal-popular-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 3px !important;
}

/* Số thứ tự lớn mờ góc phải thumbnail */
.gal-popular-number {
    position: absolute !important;
    bottom: -2px !important;
    right: 3px !important;
    font-size: 34px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    color: rgba(255,255,255,0.6) !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25) !important;
    pointer-events: none !important;
    user-select: none !important;
    font-style: italic !important;
    z-index: 2 !important;
}
.gal-popular-item:nth-child(1) .gal-popular-number { color: rgba(255,210,60,0.80) !important; }
.gal-popular-item:nth-child(2) .gal-popular-number { color: rgba(210,210,210,0.70) !important; }
.gal-popular-item:nth-child(3) .gal-popular-number { color: rgba(205,150,70,0.70) !important; }

/* No thumbnail */
.gal-popular-no-thumb {
    flex: 0 0 76px !important;
    width: 76px !important;
    height: 58px !important;
    background: linear-gradient(135deg, #f5f5f5, #e5e5e5);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 22px;
    position: relative;
}

/* Content */
.gal-popular-content {
    flex: 1 1 0 !important;
    min-width: 0 !important;
}
.gal-popular-title {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    padding: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    overflow: hidden !important;
}
.gal-popular-title a {
    color: inherit !important;
    text-decoration: none !important;
}
.gal-popular-title a:hover { color: #c0392b !important; }

.gal-popular-date {
    font-size: 11.5px;
    color: #aaa;
    margin-top: 5px;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
    .gal-thumb { flex: 0 0 160px !important; width: 160px !important; height: 110px !important; }
    .gal-title { font-size: 15px !important; }
}
@media (max-width: 480px) {
    .gal-item  { flex-direction: column !important; gap: 10px !important; }
    .gal-thumb { flex: none !important; width: 100% !important; height: 180px !important; }
}
