/* ================================================================
   IGS – Frontend Gallery Styles  v1.5
   ================================================================ */

/* ── Shimmer animation (dùng chung cho gallery & post card) ─ */
@keyframes igs-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* Mixin placeholder: card container hiển thị shimmer khi ảnh chưa load */
.igs-image-card:not(.igs-img-ready),
.igsp-thumbnail-link:not(.igsp-img-ready) {
    background: linear-gradient(
        90deg,
        #e8e8e8 25%,
        #d4d4d4 50%,
        #e8e8e8 75%
    );
    background-size: 400% 100%;
    animation: igs-shimmer 1.6s ease infinite;
}

/* Dark theme: shimmer tối hơn */
.igs-theme-dark .igs-image-card:not(.igs-img-ready),
.igsp-theme-dark .igsp-thumbnail-link:not(.igsp-img-ready) {
    background: linear-gradient(
        90deg,
        #2a2a2a 25%,
        #363636 50%,
        #2a2a2a 75%
    );
    background-size: 400% 100%;
    animation: igs-shimmer 1.6s ease infinite;
}

/* Khi card đã load xong: tắt shimmer, khôi phục màu nền */
.igs-image-card.igs-img-ready   { animation: none; background: var(--igs-card-bg); }
.igsp-thumbnail-link.igsp-img-ready { animation: none; background: transparent; }

/* ── Ảnh: mặc định ẩn, fade-in khi ready ── */
.igs-image-card img,
.igsp-thumbnail {
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: opacity;
}
.igs-image-card.igs-img-ready   img { opacity: 1; }
.igsp-thumbnail-link.igsp-img-ready .igsp-thumbnail { opacity: 1; }

/* ── Variables ──────────────────────────────────────────── */
.igs-gallery {
    --igs-cols:       5;
    --igs-gap:        12px;
    --igs-radius:     12px;
    --igs-card-bg:    #fff;
    --igs-heading-c:  #1a5fa8;
    --igs-wrap-bg:    transparent;
    --igs-wrap-pad:   0;
    --igs-btn-bg:     #e53935;
    --igs-btn-c:      #fff;
    --igs-more-c:     #e53935;
    font-family: inherit;
    margin: 0;
    padding: var(--igs-wrap-pad);
    background: var(--igs-wrap-bg);
    position: relative;
}

/* ── Dark theme ─────────────────────────────────────────── */
.igs-theme-dark {
    --igs-heading-c: #f5c518;
    --igs-wrap-bg:   #111;
    --igs-wrap-pad:  16px 20px;
    --igs-card-bg:   transparent;
    --igs-more-c:    #e53935;
    border-radius: 10px;
}

/* ── Header row: tiêu đề + link Xem thêm ──────────────── */
.igs-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 10px;
}
.igs-gallery .igs-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--igs-heading-c);
    margin: 0;
    padding: 0;
    line-height: 1.3;
    border: none;
}
.igs-gallery .igs-more-link {
    font-size: 14px;
    color: var(--igs-more-c);
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}
.igs-gallery .igs-more-link:hover { text-decoration: underline; }

/* ================================================================
   KIỂU: ROW — hàng ngang, thanh cuộn mỏng
   ================================================================ */
.igs-display-row .igs-images-wrap {
    display: flex;
    gap: var(--igs-gap);
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch;
}
.igs-display-row .igs-images-wrap::-webkit-scrollbar      { height: 4px; }
.igs-display-row .igs-images-wrap::-webkit-scrollbar-track { background: transparent; }
.igs-display-row .igs-images-wrap::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.igs-display-row .igs-image-card { flex: 0 0 auto; width: 110px; }

/* ================================================================
   KIỂU: GRID — lưới cố định
   ================================================================ */
.igs-display-grid .igs-images-wrap {
    display: grid;
    grid-template-columns: repeat( var(--igs-cols, 5), 1fr );
    gap: var(--igs-gap);
}

/* ================================================================
   KIỂU: SLIDER — kéo ngang, KHÔNG thanh cuộn
   ================================================================ */
.igs-display-slider {
    position: relative;
}
.igs-display-slider .igs-images-wrap {
    display: flex;
    gap: var(--igs-gap);
    overflow-x: scroll;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* Ẩn hoàn toàn thanh cuộn trên mọi trình duyệt */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge cũ */
}
.igs-display-slider .igs-images-wrap::-webkit-scrollbar { display: none; } /* Chrome, Safari */

.igs-display-slider .igs-images-wrap {
    cursor: grab;
    user-select: none;
}
.igs-display-slider .igs-images-wrap.igs-dragging {
    cursor: grabbing;
    scroll-behavior: auto; /* tắt smooth khi đang kéo */
}
/* Chặn click link khi đang drag */
.igs-display-slider .igs-images-wrap.igs-dragging a,
.igs-display-slider .igs-images-wrap.igs-dragging .igs-card-btn {
    pointer-events: none;
}

.igs-display-slider .igs-image-card { flex: 0 0 auto; width: 110px; }

/* ── Nút mũi tên (slider) ── */
.igs-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    padding: 0 4px;
}
.igs-arrow {
    pointer-events: all;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
}
.igs-arrow:hover { background: rgba(0,0,0,.85); }

/* ================================================================
   CARD — chung cho tất cả kiểu
   ================================================================ */
.igs-gallery .igs-image-card {
    border-radius: var(--igs-radius);
    overflow: hidden;
    background: var(--igs-card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: transform .2s ease, box-shadow .2s ease;
    border: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.igs-gallery .igs-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

.igs-gallery .igs-img-link { display: block; line-height: 0; }

.igs-gallery .igs-image-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
}

/* ── Nút dưới ảnh (Đặt cược →) ── */
.igs-gallery .igs-card-btn {
    display: block;
    text-align: center;
    background: var(--igs-btn-bg);
    color: var(--igs-btn-c) !important;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 4px;
    text-decoration: none !important;
    line-height: 1.2;
    border-radius: 0 0 var(--igs-radius) var(--igs-radius);
    white-space: nowrap;
    transition: filter .15s;
    cursor: pointer;
}
.igs-gallery .igs-card-btn:hover { filter: brightness(1.12); }

/* ── Dark theme card adjustments ── */
.igs-theme-dark .igs-image-card {
    background: #1e1e1e;
    border-color: rgba(255,255,255,.1);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .igs-display-grid .igs-images-wrap {
        grid-template-columns: repeat( max(2, calc(var(--igs-cols, 5) - 2)), 1fr );
    }
    .igs-display-row .igs-image-card,
    .igs-display-slider .igs-image-card {
        width: 90px;
    }
}
@media (max-width: 480px) {
    .igs-display-grid .igs-images-wrap {
        grid-template-columns: repeat( max(2, calc(var(--igs-cols, 5) - 3)), 1fr );
    }
    .igs-gallery .igs-heading { font-size: 15px; }
}

/* ================================================================
   IGSP – POST CATEGORY SHORTCODE
   ================================================================ */

.igsp-wrap {
    --igsp-cols:      3;
    --igsp-gap:       20px;
    --igsp-radius:    10px;
    --igsp-card-bg:   #fff;
    --igsp-heading-c: #1a5fa8;
    --igsp-more-c:    #e53935;
    --igsp-title-c:   #1d2327;
    --igsp-excerpt-c: #555;
    --igsp-btn-bg:    #e53935;
    --igsp-btn-c:     #fff;
    --igsp-meta-c:    #999;
    --igsp-shadow:    0 2px 8px rgba(0,0,0,.1);
    font-family: inherit;
    margin: 0;
}

/* Dark theme */
.igsp-theme-dark {
    --igsp-card-bg:   #1e1e1e;
    --igsp-heading-c: #f5c518;
    --igsp-title-c:   #f0f0f0;
    --igsp-excerpt-c: #bbb;
    --igsp-meta-c:    #777;
    --igsp-shadow:    0 2px 8px rgba(0,0,0,.35);
    background: #111;
    border-radius: 10px;
    padding: 16px 20px;
}

/* ── Header row ── */
.igsp-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 10px;
}
.igsp-wrap .igsp-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--igsp-heading-c);
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.3;
}
.igsp-wrap .igsp-more-link {
    font-size: 14px;
    color: var(--igsp-more-c);
    text-decoration: none;
    white-space: nowrap;
    font-weight: 600;
    flex-shrink: 0;
}
.igsp-wrap .igsp-more-link:hover { text-decoration: underline; }

/* ================================================================
   GRID layout
   ================================================================ */
.igsp-display-grid .igsp-posts {
    display: grid;
    grid-template-columns: repeat( var(--igsp-cols, 3), 1fr );
    gap: var(--igsp-gap);
}

.igsp-display-grid .igsp-post-card {
    display: flex;
    flex-direction: column;
    background: var(--igsp-card-bg);
    border-radius: var(--igsp-radius);
    overflow: hidden;
    box-shadow: var(--igsp-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.igsp-display-grid .igsp-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

.igsp-display-grid .igsp-thumbnail-link { display: block; line-height: 0; }
.igsp-display-grid .igsp-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.igsp-display-grid .igsp-post-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ================================================================
   LIST layout
   ================================================================ */
.igsp-display-list .igsp-posts {
    display: flex;
    flex-direction: column;
    gap: var(--igsp-gap);
}

.igsp-display-list .igsp-post-card {
    display: flex;
    gap: 0;
    align-items: stretch;
    background: var(--igsp-card-bg);
    border-radius: var(--igsp-radius);
    overflow: hidden;
    box-shadow: var(--igsp-shadow);
    transition: box-shadow .2s ease;
}
.igsp-display-list .igsp-post-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

.igsp-display-list .igsp-thumbnail-link {
    flex-shrink: 0;
    width: 160px;
    display: block;
    line-height: 0;
}
.igsp-display-list .igsp-thumbnail {
    width: 160px;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
    display: block;
}

.igsp-display-list .igsp-post-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Nội dung chung cho cả hai layout ── */
.igsp-wrap .igsp-post-meta {
    font-size: 12px;
    color: var(--igsp-meta-c);
    margin-bottom: 6px;
}

.igsp-wrap .igsp-post-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.4;
    color: var(--igsp-title-c);
    border: none;
    padding: 0;
}
.igsp-wrap .igsp-post-title a {
    color: inherit;
    text-decoration: none;
}
.igsp-wrap .igsp-post-title a:hover { text-decoration: underline; }

.igsp-wrap .igsp-post-excerpt {
    font-size: 13px;
    color: var(--igsp-excerpt-c);
    line-height: 1.55;
    margin-bottom: 12px;
    flex: 1;
}

.igsp-wrap .igsp-read-btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: auto;
    background: var(--igsp-btn-bg);
    color: var(--igsp-btn-c) !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: filter .15s;
}
.igsp-wrap .igsp-read-btn:hover { filter: brightness(1.12); }

/* ================================================================
   SLIDER layout — post category
   ================================================================ */
.igsp-display-slider {
    position: relative;
}

/* Outer wrapper: clip + context cho arrow */
.igsp-display-slider .igsp-slider-outer {
    position: relative;
    overflow: hidden;       /* ← clip track, ẩn phần thừa */
    border-radius: var(--igsp-radius);
    /* GPU layer riêng → tránh repaint lan ra phần còn lại của trang */
    transform: translateZ(0);
}

/* Track cuộn ngang */
.igsp-display-slider .igsp-slider-track {
    display: flex;
    gap: 16px;              /* ← phải khớp với $gap_px = 16 trong PHP */
    overflow-x: scroll;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0 12px;   /* chỉ vertical, không horizontal */
    /* Ẩn thanh cuộn */
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    user-select: none;
    /* Tối ưu: báo browser đây là scroll container */
    will-change: scroll-position;
    contain: layout style;
}
.igsp-display-slider .igsp-slider-track::-webkit-scrollbar { display: none; }
.igsp-display-slider .igsp-slider-track.igsp-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}
.igsp-display-slider .igsp-slider-track.igsp-dragging a,
.igsp-display-slider .igsp-slider-track.igsp-dragging .igsp-read-btn {
    pointer-events: none;
}

/* Mỗi card: chiều rộng tính từ CSS vars (responsive tự động) */
.igsp-display-slider .igsp-post-card {
    flex: 0 0 calc((100% - var(--igsp-gap-total, 32px)) / var(--igsp-slider-cols, 3));
    width: calc((100% - var(--igsp-gap-total, 32px)) / var(--igsp-slider-cols, 3));
    min-width: 0;   /* tránh flex blow-out */
    display: flex;
    flex-direction: column;
    background: var(--igsp-card-bg);
    border-radius: var(--igsp-radius);
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
    transition: box-shadow .2s ease;
    border: 1px solid rgba(0,0,0,.06);
}
.igsp-display-slider .igsp-post-card:hover {
    /* KHÔNG translateY — outer có overflow:hidden nên card bị clip → giật
       Dùng shadow đậm hơn + thumbnail zoom (trong card) để tạo cảm giác lift */
    box-shadow: 0 8px 28px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
}

/* Thumbnail wrapper: position relative để đặt overlay */
.igsp-display-slider .igsp-thumbnail-link {
    display: block;
    line-height: 0;
    position: relative;
    overflow: hidden;
}
.igsp-display-slider .igsp-thumbnail {
    width: 100%;
    height: 175px;
    object-fit: cover;
    display: block;
    /* zoom ảnh khi hover — GPU layer riêng, không gây reflow */
    transition: transform .3s ease;
    will-change: transform;
}
.igsp-display-slider .igsp-post-card:hover .igsp-thumbnail {
    transform: scale(1.04);
}
/* Gradient overlay mờ phía dưới thumbnail */
.igsp-display-slider .igsp-thumbnail-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,.18), transparent);
    pointer-events: none;
}

/* Body card */
.igsp-display-slider .igsp-post-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

/* Title trong slider */
.igsp-display-slider .igsp-post-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0;
    color: var(--igsp-title-c);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Excerpt trong slider */
.igsp-display-slider .igsp-post-excerpt {
    font-size: 12.5px;
    color: var(--igsp-excerpt-c);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin: 0;
}

/* Button trong slider */
.igsp-display-slider .igsp-read-btn {
    align-self: flex-start;
    margin-top: auto;
    padding: 5px 14px;
    font-size: 11.5px;
}

/* ── Mũi tên slider: overlay lên cạnh track ── */
.igsp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.92);
    color: #333;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, transform .2s, box-shadow .2s;
    flex-shrink: 0;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.igsp-arrow:hover {
    background: var(--igsp-btn-bg, #e53935);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
}
/* Arrows đặt TRONG outer (overlay lên cạnh track) */
.igsp-arrow-prev { left: 10px; }
.igsp-arrow-next { right: 10px; }

/* Dark theme arrows */
.igsp-theme-dark .igsp-arrow {
    background: rgba(40,40,40,.88);
    color: #fff;
}
.igsp-theme-dark .igsp-arrow:hover {
    background: var(--igsp-btn-bg, #e53935);
}

/* Progress bar autoplay */
.igsp-progress-bar {
    height: 3px;
    background: rgba(0,0,0,.1);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    margin-top: 6px;
}
.igsp-theme-dark .igsp-progress-bar {
    background: rgba(255,255,255,.12);
}
.igsp-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--igsp-btn-bg, #e53935);
    border-radius: inherit;
}

/* Dark theme card */
.igsp-theme-dark .igsp-display-slider .igsp-post-card {
    border-color: rgba(255,255,255,.08);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .igsp-display-grid .igsp-posts {
        grid-template-columns: repeat( max(2, calc(var(--igsp-cols, 3) - 1)), 1fr );
    }
    .igsp-display-grid .igsp-thumbnail { height: 140px; }
    .igsp-display-list .igsp-thumbnail-link { width: 120px; }
    .igsp-display-list .igsp-thumbnail { width: 120px; }
    /* Slider tablet: dùng --igsp-slider-cols-md (tối đa 2, PHP tính sẵn) */
    .igsp-display-slider .igsp-post-card {
        flex: 0 0 calc((100% - var(--igsp-gap-total-md, 16px)) / var(--igsp-slider-cols-md, 2));
        width: calc((100% - var(--igsp-gap-total-md, 16px)) / var(--igsp-slider-cols-md, 2));
    }
    .igsp-display-slider .igsp-thumbnail { height: 150px; }
}
@media (max-width: 480px) {
    .igsp-display-grid .igsp-posts {
        grid-template-columns: repeat( max(1, calc(var(--igsp-cols, 3) - 1)), 1fr );
    }
    .igsp-display-list .igsp-post-card { flex-direction: column; }
    /* Slider mobile: luôn 1 card full width */
    .igsp-display-slider .igsp-post-card {
        flex: 0 0 100%;
        width: 100%;
    }
    .igsp-display-slider .igsp-thumbnail { height: 180px; }
    .igsp-display-list .igsp-thumbnail-link { width: 100%; }
    .igsp-display-list .igsp-thumbnail { width: 100%; height: 180px; min-height: unset; }
    .igsp-display-list .igsp-post-body { padding: 12px; }
    .igsp-wrap .igsp-heading { font-size: 15px; }
}

/* ================================================================
   AUTO-PLAY PROGRESS BAR
   ================================================================ */
.igs-progress-bar {
    height: 3px;
    background: rgba(0,0,0,.12);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    margin-top: 8px;
}
.igs-theme-dark .igs-progress-bar {
    background: rgba(255,255,255,.12);
}
.igs-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--igs-btn-bg, #e53935);
    border-radius: inherit;
    /* transition được set bằng JS */
}

/* ================================================================
   IGF – FOOTER SHORTCODE  [igs_footer]
   ================================================================ */

.igf-wrap {
    --igf-cols:        3;
    --igf-gap:         32px;
    --igf-bg:          #1a1a2e;
    --igf-text-c:      #ccc;
    --igf-heading-c:   #fff;
    --igf-link-c:      #adbdcc;
    --igf-link-hover:  #fff;
    --igf-border-c:    rgba(255,255,255,.08);
    --igf-divider-c:   rgba(255,255,255,.1);
    font-family: inherit;
    box-sizing: border-box;
}

/* ── Dark theme (mặc định footer) ── */
.igf-theme-dark {
    background: var(--igf-bg);
    color: var(--igf-text-c);
    padding: 48px 24px 32px;
}

/* ── Light theme ── */
.igf-theme-light {
    --igf-bg:          #f5f5f5;
    --igf-text-c:      #444;
    --igf-heading-c:   #1d2327;
    --igf-link-c:      #555;
    --igf-link-hover:  #1a5fa8;
    --igf-border-c:    rgba(0,0,0,.08);
    --igf-divider-c:   rgba(0,0,0,.1);
    background: var(--igf-bg);
    color: var(--igf-text-c);
    padding: 48px 24px 32px;
}

/* ── Grid layout: cột chia đều ── */
.igf-grid {
    display: grid;
    grid-template-columns: repeat( var(--igf-cols, 3), 1fr );
    gap: var(--igf-gap);
    max-width: 1200px;
    margin: 0 auto;
}

/* Ghi đè số cột cụ thể (fallback cho trình duyệt cũ không hiểu custom props) */
.igf-cols-1 .igf-grid { grid-template-columns: 1fr; }
.igf-cols-2 .igf-grid { grid-template-columns: repeat(2, 1fr); }
.igf-cols-3 .igf-grid { grid-template-columns: repeat(3, 1fr); }
.igf-cols-4 .igf-grid { grid-template-columns: repeat(4, 1fr); }
.igf-cols-5 .igf-grid { grid-template-columns: repeat(5, 1fr); }

/* ── Mỗi cột ── */
.igf-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Đường kẻ dọc ngăn cách cột (trừ cột đầu) */
.igf-col + .igf-col {
    border-left: 1px solid var(--igf-divider-c);
    padding-left: var(--igf-gap);
    margin-left: calc( -1 * var(--igf-gap) );
}

/* ── Tiêu đề cột ── */
.igf-col-heading {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--igf-heading-c);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--igf-divider-c);
    line-height: 1.3;
}

/* ── Nội dung trong cột ── */
.igf-col-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--igf-text-c);
}

/* Links */
.igf-col-content a {
    color: var(--igf-link-c);
    text-decoration: none;
    transition: color .15s;
}
.igf-col-content a:hover {
    color: var(--igf-link-hover);
    text-decoration: underline;
}

/* Lists */
.igf-col-content ul,
.igf-col-content ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
.igf-col-content li {
    padding: 3px 0;
    border-bottom: 1px solid var(--igf-border-c);
}
.igf-col-content li:last-child { border-bottom: none; }
.igf-col-content li::before {
    content: '›';
    margin-right: 6px;
    color: var(--igf-heading-c);
    opacity: .6;
}

/* Paragraphs & headings */
.igf-col-content p  { margin: 0 0 8px; }
.igf-col-content p:last-child { margin-bottom: 0; }
.igf-col-content h1,
.igf-col-content h2,
.igf-col-content h3,
.igf-col-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--igf-heading-c);
    margin: 10px 0 4px;
}
.igf-col-content strong { color: var(--igf-heading-c); font-weight: 600; }

/* Images trong cột */
.igf-col-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .igf-cols-5 .igf-grid { grid-template-columns: repeat(3, 1fr); }
    .igf-cols-4 .igf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .igf-wrap { padding: 32px 16px 24px; }
    .igf-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
    .igf-cols-1 .igf-grid { grid-template-columns: 1fr !important; }
    /* Bỏ đường kẻ dọc trên mobile */
    .igf-col + .igf-col {
        border-left: none;
        border-top: 1px solid var(--igf-divider-c);
        padding-left: 0;
        margin-left: 0;
        padding-top: 20px;
    }
}
@media (max-width: 420px) {
    .igf-grid { grid-template-columns: 1fr !important; }
    .igf-col + .igf-col { margin-left: 0; padding-left: 0; }
}
