/* ==========================================================================
   Trang Cẩm Nang / Giải Pháp MEKOONG (/cam-nang)
   ========================================================================== */

.ds-gp-page {
    max-width: var(--ds-container-width, 1230px);
    margin: 0 auto;
    padding: 24px 15px 60px;
}

/* ---------- Hero ---------- */
.ds-gp-hero {
    margin-bottom: 24px;
}

.ds-gp-hero__title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 8px;
}

.ds-gp-hero__desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* ---------- Tabs ---------- */
.ds-gp-tabs-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.ds-gp-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
}

.ds-gp-tabs::-webkit-scrollbar {
    display: none;
}

.ds-gp-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.ds-gp-tab svg {
    flex-shrink: 0;
}

.ds-gp-tab:hover {
    color: #16a34a;
}

.ds-gp-tab--active {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.ds-gp-tabs-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #4b5563;
    cursor: pointer;
    transition: 0.2s;
}

.ds-gp-tabs-arrow:hover {
    background: #f3f4f6;
    color: #16a34a;
}

/* ---------- Bộ lọc ---------- */
.ds-gp-filters {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 28px;
}

.ds-gp-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ds-gp-filter label {
    font-size: 12px;
    color: #6b7280;
}

.ds-gp-filter select {
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    background: #fff;
}

.ds-gp-filter select:disabled {
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.75;
}

/* ---------- Lưới thẻ giải pháp ---------- */
.ds-gp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 10px;
}

.ds-gp-loading {
    text-align: center;
    padding: 40px 0;
    color: #6b7280;
    font-size: 14px;
}

.ds-gp-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #6b7280;
    font-size: 14px;
}

.ds-gp-demo-note {
    font-size: 13px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0 30px;
}

.ds-gp-card {
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: 0.25s;
}

.ds-gp-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.ds-gp-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f3f4f6;
}

.ds-gp-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ds-gp-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    color: #fff;
}

.ds-gp-card__badge--pho-bien {
    background: #16a34a;
}

.ds-gp-card__badge--moi {
    background: #ea580c;
}

.ds-gp-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ds-gp-card__title-link {
    text-decoration: none;
}

.ds-gp-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    line-height: 1.4;
}

.ds-gp-card__meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ds-gp-card__meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
}

.ds-gp-card__desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ds-gp-card__actions {
    display: flex;
    gap: 10px;
}

.ds-gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}

.ds-gp-card__actions .ds-gp-btn {
    flex: 1;
}

.ds-gp-btn--outline {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.ds-gp-btn--outline:hover {
    border-color: #16a34a;
    color: #16a34a;
}

.ds-gp-btn--solid {
    background: #16a34a;
    border: 1px solid #16a34a;
    color: #fff;
}

.ds-gp-btn--solid:hover {
    background: #15803d;
    color: #fff;
}

/* ---------- CTA cuối trang ---------- */
.ds-gp-cta {
    display: flex;
    align-items: center;
    gap: 18px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 18px 24px;
    flex-wrap: wrap;
}

.ds-gp-cta__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    color: #16a34a;
}

.ds-gp-cta__text {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ds-gp-cta__text strong {
    font-size: 15px;
    color: #111827;
}

.ds-gp-cta__text span {
    font-size: 13px;
    color: #6b7280;
}

.ds-gp-cta__actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ds-gp-cta__actions .ds-gp-btn {
    padding: 10px 18px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1200px) {
    .ds-gp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ds-gp-filters {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ds-gp-hero__title {
        font-size: 22px;
    }
    .ds-gp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ds-gp-filters {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .ds-gp-card__actions {
        flex-direction: column;
    }
    .ds-gp-cta {
        flex-direction: column;
        text-align: center;
    }
    .ds-gp-cta__actions {
        width: 100%;
        flex-direction: column;
    }
    .ds-gp-cta__actions .ds-gp-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ds-gp-grid {
        grid-template-columns: 1fr;
    }
    .ds-gp-filters {
        grid-template-columns: 1fr 1fr;
    }
}
