/* Hero */
.home-hero .card {
    border-radius: 14px;
}

.hero-card {
    position: relative;
}

.hero-card .hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Quick links card */
.quicklinks .card-body {
    padding: .75rem .875rem;
}

.quicklinks ul li+li {
    margin-top: .5rem;
}

.ql-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .875rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    transition: .18s ease;
}

.ql-item i.bi {
    font-size: 1.05rem;
    opacity: .9;
}

.ql-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .07);
    border-color: rgba(99, 102, 241, .25);
    background: linear-gradient(0deg, rgba(99, 102, 241, .05), rgba(99, 102, 241, .05)), #fff;
}

/* Sections */
.section-block {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.section-title {
    text-align: center;
    font-weight: 700;
    margin: 1.25rem 0 1rem;
}

/* Course/Affiliate card */
.card-course {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
}

.card-course .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.card-course .card-body {
    padding: 0.875rem 1rem 1rem;
}

.card-course .card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: .35rem;
}

.badge.border {
    border: 1px solid rgba(0, 0, 0, .12) !important;
}


/* Shop cards */
.card-shop {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-shop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.card-shop .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-shop .card-body {
    padding: .875rem 1rem 1rem;
}

.card-shop .card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 .25rem;
}

.card-shop .price-now {
    color: #dc3545;
    font-weight: 800;
}

.card-shop .price-old {
    color: #9aa0a6;
    text-decoration: line-through;
    font-size: .9rem;
}

.card-shop .off-badge {
    display: inline-block;
    font-size: .75rem;
    padding: .1rem .35rem;
    border-radius: .35rem;
    background: #fdecee;
    color: #cc3344;
    border: 1px solid rgba(204, 51, 68, .2);
}

/* Community cards */
.card-community {
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

.academy__keyword--list {
    overflow-x: auto;
    /* Enable horizontal scrolling */
    white-space: nowrap;
    /* Prevents wrapping of child elements */
}

.keyword--list__title {
    margin-bottom: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
}

.keyword--list-link {
    flex: 0 0 auto;
    /* Prevent shrinking and growing */
    font-size: 18px;
    text-decoration: none;
    color: #000000;
    margin: 7px 0;
}

.keyword--list-link .p-keyword {
    width: 100%;
    padding: 0.8em;
    padding-inline: 1.2em;
    display: flex;
    align-items: center;
}

.keyword--list-link input[type="checkbox"] {
    display: none;
}

.keyword--list-link input[type="checkbox"]+label {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 25px;
    background: #fff;
}

.keyword--list-link input[type="checkbox"]:checked+label {
    background-color: rgba(128, 129, 144, 1);
}

.keyword--list-link .p-keyword:hover {
    background-color: rgba(217, 217, 217, 1);
    color: #000000;
    border-radius: 25px;
    cursor: pointer;
}

.keyword--list-name {
    margin-left: 5px;
    font-size: clamp(12px, 2vw, 14px);
}

.remove-button {
    display: none;
    margin-left: 20px;
}

.keyword--list-seemore {
    border-radius: 25px;
    background: #fff;
    border: none;
    padding: 7px 15px;
    color: #808190;
    font-size: 14px;
    font-weight: 400;
}

.keyword--list-seemore:hover {
    background-color: rgba(128, 129, 144, 1);
    color: #fff;
    border-radius: 25px;
}

.keyword--list-seemore:active {
    background-color: rgb(104, 111, 187);
    color: #fff;
    border-radius: 25px;
}

.teacher-course--list--image {
    width: 100%;
    aspect-ratio: calc(1 / 0.5625);
    overflow: hidden;
}

.teacher-course--list--image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-course--list--title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.teacher-course--list--spvote {
    color: rgba(128, 129, 144, 1);
}

.teacher-course--list--student {
    color: rgba(128, 129, 144, 1);
}

.teacher-course--list--sale {
    color: #ca3f00;
}

.teacher-course--list--original {
    color: #808190;
}

.card-community:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.card-community .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-community .card-body {
    padding: .875rem 1rem 1rem;
}

.card-community .card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 .25rem;
}

/* Footer "Xem thêm" dùng chung */
.section-more {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.section-more .btn {
    min-width: 120px;
    font-weight: 600;
    border-color: #dee2e6;
    border-radius: 50px;
    transition: all .2s ease;
}

.section-more .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(13, 110, 253, 0.2);
}


/* === About & Help section === */
.card-instructor {
    border-radius: 16px;
}

.card-instructor .ins-stat {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 600;
}

.card-instructor .ins-stat:hover {
    text-decoration: underline;
}

/* Nút gradient "Đăng ký" */
.btn-gradient {
    background: linear-gradient(135deg, #6f7bf7 0%, #0d6efd 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(13, 110, 253, .2);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    text-transform: uppercase;
}

.btn-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(13, 110, 253, .28);
    color: #fff;
    opacity: .95;
}

/* Card hỏi đáp (gradient nền + form trong suốt) */
.card-ask {
    border-radius: 16px;
    background: linear-gradient(135deg, #8e5cf7 0%, #0d6efd 100%);
    box-shadow: 0 10px 24px rgba(13, 110, 253, .18);
}

.af-see-more {
    margin-top: 24px !important;
    /* cách xa item trên */
    padding-top: 8px;
    clear: both;
    /* ép nằm dưới hàng */
}

.af-list {
    position: relative;
    z-index: 1;
    padding-bottom: 30px;
    /* thêm khoảng trống để nút không dính item cuối */
}

.af-list .btn {
    z-index: 10;
    position: relative;
}


.card-ask .card-body {
    position: relative;
}

/* Input sáng viền trắng, nền trong suốt */
.form-control-clean {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, .7);
    color: #fff;
    border-radius: 10px;
}

.form-control-clean::placeholder {
    color: rgba(255, 255, 255, .85);
}

.form-control-clean:focus {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    border-color: #fff;
    box-shadow: none;
}

/* Nút gửi */
.card-ask .btn-light {
    border-radius: 10px;
    color: #0d6efd;
    font-weight: 700;
}

/* ========== HIỆU ỨNG CARD COURSE / COMMUNITY ========== */
.card-course,
.card-community {
    transition: all 0.3s ease;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background-color: #fff;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-course:hover,
.card-community:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-course .card-img-top,
.card-community .card-img-top {
    transition: transform 0.4s ease, filter 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-course:hover .card-img-top,
.card-community:hover .card-img-top {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.card-course .ratio,
.card-community .ratio {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.card-course .card-title a,
.card-community .card-title a {
    transition: color 0.3s ease;
}

.card-course:hover .card-title a,
.card-community:hover .card-title a {
    color: #0d6efd;
}

.card-course .badge,
.card-community .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    transition: transform 0.25s ease;
}

.card-course:hover .badge,
.card-community:hover .badge {
    transform: scale(1.1);
}


/* Responsive spacing */
@media (max-width: 1199.98px) {

    #about-help .card-ask,
    #about-help .card-instructor {
        border-radius: 14px;
    }
}



/* Responsive tweaks giống bố cục ảnh mẫu */
@media (min-width:1200px) {
    .home-hero {
        margin-bottom: .5rem;
    }
}