/* =========================================
   NUOCDIEN 2026 - DANH MỤC NỔI BẬT (STITCH)
   Block: global.service
   ========================================= */

/* Category block wrapper */
.nd-categories-block {
    padding: 10px 0 30px;
}

/* Header row */
.nd-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.nd-categories-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #00236f;
    margin: 0 0 8px 0;
}

.nd-categories-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.nd-categories-viewall {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #00236f;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Tăng khoảng cách với icon > */
}

.nd-categories-viewall:hover {
    color: #fea619;
}

/* ===========================
   GRID: 5 cột x 2 hàng
   Item 1: cột 1, span 2 hàng (thẻ đứng trái)
   Item 2: cột 2-3, hàng 1
   Item 3: cột 4-5, hàng 1
   Item 4: cột 2, hàng 2
   Item 5: cột 3, hàng 2
   Item 6: cột 4, hàng 2
   Item 7: cột 5, hàng 2
   =========================== */
.nd-categories-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    /* grid-template-rows: auto; */
    gap: 20px;
}

/* Item 1 — Cột trái, trải 2 hàng */
.nd-svc-item-1 {
    grid-column: 1 / span 3;
    grid-row: 1 / 3;
    background-color: #e0e2ee;
    border-radius: 16px;
}

/* Item 2 — Hàng 1, span 2 cột */
.nd-svc-item-2 {
    grid-column: 4 / span 6;
    grid-row: 1;
    background-color: #f5e9e2;
    border-radius: 16px;
}

/* Item 3 — Hàng 1, span 2 cột */
.nd-svc-item-3 {
    grid-column: 10 / span 6;
    grid-row: 1;
    background-color: #e0e2ee;
    border-radius: 16px;
}

/* Items 4-7 — Hàng 2, mỗi ô 1 cột */
.nd-svc-item-4,
.nd-svc-item-5,
.nd-svc-item-6,
.nd-svc-item-7,
.nd-svc-item-8,
.nd-svc-item-9,
.nd-svc-item-10 {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.nd-svc-item-4 {
    grid-column: 4 / span 3;
    grid-row: 2;
}

.nd-svc-item-5 {
    grid-column: 7 / span 3;
    grid-row: 2;
}

.nd-svc-item-6 {
    grid-column: 10 / span 3;
    grid-row: 2;
}

.nd-svc-item-7,
.nd-svc-item-8,
.nd-svc-item-9,
.nd-svc-item-10 {
    grid-column: 13 / span 3;
    grid-row: 2;
}

/* Items 8-10 - Hàng 3 (span 5 columns each) */
.nd-svc-item-8 {
    grid-column: 1 / span 6;
    grid-row: 3;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.nd-svc-item-9 {
    grid-column: 7 / span 6;
    grid-row: 3;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.nd-svc-item-10 {
    grid-column: 13 / span 3;
    grid-row: 3;
}

/* Link wrapper */
.nd-svc-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: inherit;
}

.nd-svc-link:hover {
    text-decoration: none;
}

/* Content wrapper */
.nd-svc-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: left;
}

/* Icon / Image */
.nd-svc-icon {
    margin-bottom: 16px;
}

.nd-svc-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

/* --- Thẻ lớn (Item 1): Icon trong hình vuông xanh --- */
.nd-svc-item-1 .nd-svc-icon img {
    width: 56px;
    height: 56px;
    padding: 12px;
    background-color: #00236f;
    border-radius: 12px;
}

/* --- Thẻ banner hàng 1 (Item 2, 3): Icon ở góc phải --- */
.nd-svc-item-2 .nd-svc-link,
.nd-svc-item-3 .nd-svc-link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.nd-svc-item-2 .nd-svc-icon,
.nd-svc-item-3 .nd-svc-icon {
    order: 2;
    margin-bottom: 0;
    margin-left: 20px;
    flex-shrink: 0;
}

.nd-svc-item-2 .nd-svc-icon img,
.nd-svc-item-3 .nd-svc-icon img {
    width: 64px;
    height: 64px;
    opacity: 0.7;
}

/* --- Ô nhỏ (Items 4-7): Icon cam, canh giữa --- */
.nd-svc-item-4 .nd-svc-link,
.nd-svc-item-5 .nd-svc-link,
.nd-svc-item-6 .nd-svc-link,
.nd-svc-item-7 .nd-svc-link,
.nd-svc-item-8 .nd-svc-link,
.nd-svc-item-9 .nd-svc-link,
.nd-svc-item-8 .nd-svc-link,
.nd-svc-item-9 .nd-svc-link,
.nd-svc-item-10 .nd-svc-link {
    align-items: center;
    text-align: center;
    padding: 24px 16px;
}

.nd-svc-item-4 .nd-svc-icon img,
.nd-svc-item-5 .nd-svc-icon img,
.nd-svc-item-6 .nd-svc-icon img,
.nd-svc-item-7 .nd-svc-icon img,
.nd-svc-item-8 .nd-svc-icon img,
.nd-svc-item-9 .nd-svc-icon img,
.nd-svc-item-8 .nd-svc-icon img,
.nd-svc-item-9 .nd-svc-icon img,
.nd-svc-item-10 .nd-svc-icon img {
    width: 48px;
    height: 48px;
}

/* Center content for small items */
.nd-svc-item-4 .nd-svc-content,
.nd-svc-item-5 .nd-svc-content,
.nd-svc-item-6 .nd-svc-content,
.nd-svc-item-7 .nd-svc-content,
.nd-svc-item-8 .nd-svc-content,
.nd-svc-item-9 .nd-svc-content,
.nd-svc-item-8 .nd-svc-content,
.nd-svc-item-9 .nd-svc-content,
.nd-svc-item-10 .nd-svc-content {
    align-items: center;
    text-align: center;
}

/* Title */
.nd-svc-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #00236f;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Ô nhỏ: title nhỏ hơn */
.nd-svc-item-4 .nd-svc-title,
.nd-svc-item-5 .nd-svc-title,
.nd-svc-item-6 .nd-svc-title,
.nd-svc-item-7 .nd-svc-title,
.nd-svc-item-8 .nd-svc-title,
.nd-svc-item-9 .nd-svc-title,
.nd-svc-item-8 .nd-svc-title,
.nd-svc-item-9 .nd-svc-title,
.nd-svc-item-10 .nd-svc-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Note */
.nd-svc-note {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.nd-svc-note:empty {
    display: none;
}

/* Button */
.nd-svc-btn {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #00236f;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.nd-svc-link:hover .nd-svc-btn {
    color: #fea619;
}

/* Ẩn nút chi tiết ở các ô nhỏ */
.nd-svc-item-4 .nd-svc-btn,
.nd-svc-item-5 .nd-svc-btn,
.nd-svc-item-6 .nd-svc-btn,
.nd-svc-item-7 .nd-svc-btn,
.nd-svc-item-10 .nd-svc-btn,
.nd-svc-item-8 .nd-svc-btn,
.nd-svc-item-9 .nd-svc-btn {
    display: none;
}

.nd-svc-item-8 .nd-svc-note,
.nd-svc-item-9 .nd-svc-note {
    display: none;
}

/* Hover effects */
.nd-svc-item-1:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.nd-svc-item-2:hover,
.nd-svc-item-3:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.nd-svc-item-4:hover,
.nd-svc-item-5:hover,
.nd-svc-item-6:hover,
.nd-svc-item-7:hover,
.nd-svc-item-8:hover,
.nd-svc-item-9:hover,
.nd-svc-item-8:hover,
.nd-svc-item-9:hover,
.nd-svc-item-10:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.nd-svc-item-4:hover .nd-svc-title,
.nd-svc-item-5:hover .nd-svc-title,
.nd-svc-item-6:hover .nd-svc-title,
.nd-svc-item-7:hover .nd-svc-title,
.nd-svc-item-8:hover .nd-svc-title,
.nd-svc-item-9:hover .nd-svc-title,
.nd-svc-item-8:hover .nd-svc-title,
.nd-svc-item-9:hover .nd-svc-title,
.nd-svc-item-10:hover .nd-svc-title {
    color: #fea619;
}

/* Transition cho tất cả items */
.nd-svc-item-1,
.nd-svc-item-2,
.nd-svc-item-3,
.nd-svc-item-4,
.nd-svc-item-5,
.nd-svc-item-6,
.nd-svc-item-7,
.nd-svc-item-8,
.nd-svc-item-9,
.nd-svc-item-10 {
    transition: all 0.3s ease;
}


/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1199px) {
    .nd-categories-grid {
        gap: 16px;
    }

    .nd-svc-link {
        padding: 20px;
    }
}

@media (max-width: 991px) {
    .nd-categories-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .nd-svc-item-1 {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .nd-svc-item-2 {
        grid-column: 1;
        grid-row: auto;
    }

    .nd-svc-item-3 {
        grid-column: 2;
        grid-row: auto;
    }

    .nd-svc-item-4,
    .nd-svc-item-5,
    .nd-svc-item-6,
    .nd-svc-item-7,
    .nd-svc-item-8,
    .nd-svc-item-9,
    .nd-svc-item-10 {
        grid-column: auto;
        grid-row: auto;
    }

    .nd-categories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 767px) {

    .nd-svc-item-1,
    .nd-svc-item-2,
    .nd-svc-item-3,
    .nd-svc-item-8,
    .nd-svc-item-10 {
        grid-column: 1 / 3;
    }

    .nd-svc-item-2 .nd-svc-link,
    .nd-svc-item-3 .nd-svc-link,
    ;
    align-items: flex-start;
}

.nd-svc-item-2 .nd-svc-icon,
.nd-svc-item-3 .nd-svc-icon,
;
margin-left: 0;
}

.nd-categories-block {
    padding: 40px 0;
}

.nd-categories-title {
    font-size: 24px;
}
}