/* =========================================
   PROCATE - Category Page Styles
   Match: "Danh mục cấp 1" Stitch Design
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- HERO SECTION ---- */
.nd-hero-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
    padding: 12px 0 10px;
}

.nd-hero-content {
    flex: 1;
    min-width: 0;
}

/* Breadcrumb */
.nd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #6b7280;
}

.nd-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.nd-breadcrumb a:hover {
    color: #00236f;
    text-decoration: none;
}

.nd-breadcrumb a.active {
    color: #00236f;
    font-weight: 500;
    pointer-events: none;
}

.nd-breadcrumb i {
    font-size: 11px;
    color: #9ca3af;
    margin: 0 2px;
}

/* Hero Title */
.nd-hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #00236f;
    line-height: 1.15;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

/* Hero Description */
.nd-hero-desc {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #4a5568;
    max-width: 560px;
}

.nd-hero-desc p,
.nd-hero-desc * {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    background: none !important;
}

/* Badge area (right side) */
.nd-hero-badge-wrap {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 10px;
}

.nd-hero-badge {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fffbf0;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    min-width: 144px;
}

.nd-hero-badge .icon {
    font-size: 40px;
    color: #f59e0b;
    flex-shrink: 0;
}

.nd-hero-badge .title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #00236f;
    margin: 0 0 2px 0;
}

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

/* ---- CATEGORY GRID ---- */
.nd-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 0 30px 0;
}

/* Card wrapper */
.nd-cat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    text-decoration: none !important;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.nd-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 35, 111, 0.10);
    border-color: #c7d2fe;
    text-decoration: none;
}

/* Overlay link covers whole card */
.nd-cat-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Image area */
.nd-cat-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
    border-bottom: 1px solid #e5e7eb;
}

.nd-cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
    display: block;
    padding: 0;
    margin: 0;
}

.nd-cat-card:hover .nd-cat-card-img img {
    transform: scale(1.04);
}

/* Label in top-right corner of image */
.nd-cat-card-labels {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.nd-cat-card-label {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.nd-cat-card-label.highlight {
    background: #00236f;
    color: #ffffff;
}

.nd-cat-card-label.new {
    background: #fea619;
    color: #ffffff;
}

/* Card body */
.nd-cat-card-body {
    padding: 21px 0px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
}

.nd-cat-card-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #00236f;
    margin: 0 0 1px 0;
    line-height: 1.3;
    transition: color 0.2s;
}

.nd-cat-card:hover .nd-cat-card-body h3 {
    color: #fea619;
}

.nd-cat-desc {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 16px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Strip inline styles from CMS description */
.nd-cat-desc *,
.nd-hero-desc * {
    font-family: 'Inter', sans-serif !important;
    color: inherit !important;
    background: none !important;
    font-size: inherit !important;
}

/* CTA button */
.nd-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #00236f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color 0.2s, gap 0.2s;
    text-decoration: none;
    margin-top: auto;
}

.nd-cat-btn .icon {
    font-size: 11px;
    transition: transform 0.2s;
}

.nd-cat-card:hover .nd-cat-btn {
    color: #fea619;
    gap: 10px;
}

.nd-cat-card:hover .nd-cat-btn .icon {
    transform: translateX(3px);
}

/* ---- CONSULT SECTION ---- */
.nd-consult-section {
    background: #00236f;
    border-radius: 16px;
    padding: 52px 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
}

.nd-consult-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.nd-consult-content h2 {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.nd-consult-content p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.65;
    margin: 0 0 28px 0;
    max-width: 520px;
}

.nd-consult-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nd-btn-primary {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #00236f;
    background: #fea619;
    padding: 13px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nd-btn-primary:hover {
    background: #ffb733;
    color: #00236f;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(254, 166, 25, 0.4);
}

.nd-btn-outline {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 11px 26px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nd-btn-outline:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.nd-consult-bg {
    position: absolute;
    right: -60px;
    top: -60px;
    width: 320px;
    height: 320px;
    opacity: 0.06;
    pointer-events: none;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1399px) {
    .nd-category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1199px) {
    .nd-category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .nd-hero-section {
        flex-direction: column;
        gap: 24px;
        padding: 32px 0 28px;
    }

    .nd-hero-title {
        font-size: 32px;
    }

    .nd-hero-badge-wrap {
        padding-top: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nd-hero-badge {
        min-width: unset;
        flex: 1;
    }

    .nd-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .nd-consult-section {
        flex-direction: column;
        padding: 40px 32px;
        text-align: center;
    }

    .nd-consult-content p {
        max-width: 100%;
    }

    .nd-consult-actions {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .nd-hero-section {
        gap: 16px;
        padding: 16px 0 16px;
    }

    .nd-hero-title {
        font-size: 22px;
    }

    .nd-hero-badge {
        padding: 10px;
    }

    .nd-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .nd-cat-card-body {
        padding: 5px 5px 6px;
    }

    .nd-cat-card-body h3 {
        font-size: 13px;
        margin-bottom: 2px;
        line-height: 1.2;
    }

    .nd-cat-desc {
        display: none; /* Hide category description on small mobile */
    }

    .nd-cat-btn {
        font-size: 8.5px;
        gap: 2px;
        margin-top: 4px;
    }

    .nd-cat-btn .icon {
        font-size: 8.5px;
    }

    .nd-ctg-card {
        padding: 5px;
    }
}