/* ====================== CÀI ĐẶT CHUNG ====================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    overflow-x: hidden;
}

/* ======================= HEADER ======================== */
/* Container chuẩn layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header bố cục ngang */
.header {
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 100px;
    display: flex;
    align-items: center;
}

/* Phần bên trong header */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}






@media (max-width: 480px) {
    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
    }

    .logo img {
        height: 34px;
        max-width: 160px;
    }

    .header-right {
        font-size: 14px;
    }

    .login-button {
        padding: 6px 12px;
        font-size: 14px;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    body.logged-in .header-inner {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    body.logged-in .logo {
        text-align: center;
        width: 100%;
    }

    body.logged-in .logo img {
        margin: 0 auto;
        display: block;
    }

    body.logged-in .header-right .user-info {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
}



/* Logo */
.logo img {
    height: 40px;
}

/* Nút đăng nhập */
.login-button {
    background-color: #ed1e79;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.logout-button {
    background-color: #ff1100;
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.login-button:hover {
    background-color: #c21565;
}

/* ======================= SLIDE ======================== */
.carousel {
    position: relative;
    width: 100vw;
    /* 👈 Chiếm toàn bộ màn hình */
    aspect-ratio: 1920 / 500;
    /* 👈 Giữ đúng tỷ lệ khung */
    margin: 0 auto 50px;
    overflow: hidden;


}

.carousel-container {
    display: flex;
    width: 100%;

    /* 👈 full chiều cao từ tỷ lệ .carousel */
    transition: transform 0.5s ease;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    z-index: 9;
}

.carousel-dots .dot {
    width: clamp(6px, 1.5vw, 12px);
    height: clamp(6px, 1.5vw, 12px);
    margin: 0 4px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dots .dot.active {
    background-color: #008000;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 9;
}

.carousel-button {
    background: white;
    border: 1px solid #ED1E79;
    border-radius: 50%;
    padding: 10px;
    margin: 0 20px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background-color: #ED1E79;
    border-color: #ED1E79;
}

.carousel-button:hover svg {
    stroke: white;
}


@media (max-width: 480px) {
    .carousel-dots .dot {
        width: 8px;
        height: 8px;
    }
}




/* ======================= CATEGORIES ======================== */
.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px 30px;
    justify-content: center;
    background: NONE;

}

.tag-filter {
    display: inline-block;
    padding: 6px 14px;
    background-color: #eee;
    border-radius: 20px;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;

}

.tag-filter.active {
    background-color: #ed1e79 !important;
    color: #fff !important;
}

.tag-filter.active {
    background-color: #ed1e79;
    color: #fff;
    font-weight: bold;
}

/* ======================= DOCUMENTS ======================== */

.documents-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

#product-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    /* Giới hạn độ rộng */
    width: 100%;
    margin: 0 auto 30px;
}

.document-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.document-card:hover {
    transform: scale(1.05);
}

.document-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Tỷ lệ khung hình 16:9 */
    object-fit: cover;
    display: block;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.document-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
}

.document-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.tab {
    font-size: 16px;
    color: #b9b9b9;
    margin-bottom: 10px;
}

.document-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background-color: #008000;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    width: 100%;
    margin-top: auto;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #ED1E79;
}

/* ======================= XEM THÊM ======================== */
.button-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.see-more-button {
    padding: 12px 30px;
    background-color: #ED1E79;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.see-more-button:hover {
    background-color: #D11769;
}

/* ======================= FOOTER ======================== */
.footer-cta {
    background-color: #1b801f;
    color: white;
    font-family: 'Open Sans', sans-serif;
}

.footer-bottom {
    background-color: #1b801f;
    text-align: center;
    padding: 16px;
    font-size: 0.9em;
    margin-top: 50px;

}

/* ======================= RESPONSIVE ======================== */
@media (max-width: 768px) {
    #product-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #product-container {
        grid-template-columns: 1fr;
    }
}



/* ========================================================================== */
/* login */
/* ========================================================================== */

.logo2 {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.login-wrapper {
    max-width: 360px;
    margin: 60px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

.login-wrapper h2 {
    margin-bottom: 20px;
    color: #ed1e79;
}

.login-wrapper input {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

.login-wrapper button {
    width: 100%;
    padding: 10px;
    background: #ed1e79;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

.login-wrapper .error-message {
    margin-bottom: 16px;
    color: #c21c54;
    background: #ffe2ed;
    padding: 10px;
    border-radius: 8px;
}

.login-wrapper .back-home {
    margin-top: 20px;
}

.login-wrapper .back-home a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}



/* ========================================================================== */
/* css vip */
/* ========================================================================== */

.vip-banner {
    background: linear-gradient(to right, red, orange);
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    animation: flash 1.5s infinite ease-in-out;
}

@keyframes flash {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        opacity: 1;
    }
}

.download-button.disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    pointer-events: auto;
}


#backToTop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #ed1e79;
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

#backToTop:hover {
    background: #c21565;
}

#backToTop i {
    margin: 0;
}


.project-logo-wrap {
    margin-top: 0px;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.project-logo-wrap .project-logo {
    height: 24px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    padding: 2px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.project-logo-wrap .project-logo:hover {
    transform: scale(1.05);
}




.project-logo-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 12px 0 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 0px;
    justify-content: center;
}

.project-logo-filter {
    height: 50px;
    /* chiều cao khung */
    width: 150px;
    padding: 6px;
    /* tạo khoảng cách giữa ảnh & khung */
    box-sizing: border-box;
    background: #fff;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}


.project-logo-filter:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(237, 30, 121, 0.4);
}

.project-logo-filter.active {
    outline: 1px solid #ED1E79;
    outline-offset: 1px;




    .active-filter-bar {
        border-top: 1px solid #ddd;
        border-bottom: 1px solid #ddd;
        padding: 10px 0 6px 0;
        margin-bottom: 16px;
        font-size: 14px;
        color: #555;
    }

    .active-filter {
        display: inline-flex;
        align-items: center;
        background: #f3f3f3;
        border-radius: 30px;
        padding: 6px 12px;
        margin-right: 8px;
        margin-top: 6px;
        font-weight: 500;
    }

    .active-filter button {
        background-color: #e74c3c;
        color: white;
        border: none;
        border-radius: 50%;
        margin-left: 8px;
        cursor: pointer;
        width: 20px;
        height: 20px;
        line-height: 18px;
        font-size: 12px;
        text-align: center;
        padding: 0;
        transition: background 0.2s;
    }

    .active-filter button:hover {
        background-color: #c0392b;
    }

}

.active-filter {
    display: inline-block;
    background: #eee;
    padding: 6px 10px;
    margin-right: 8px;
    border-radius: 20px;
    font-size: 14px;
}

.active-filter button {
    background: none;
    border: none;
    margin-left: 6px;
    cursor: pointer;
    font-weight: bold;
    color: #ED1E79;
}

.filter-status {
    margin-bottom: 16px;
}


.document-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;
    max-height: 4.5em;
    position: relative;
}

.document-description.expanded {
    -webkit-line-clamp: unset;
    max-height: none;
    overflow: visible;
}

.toggle-desc {
    color: #007bff;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}

.document-description-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0px;
    /* 👈 tạo khoảng cách đẹp giữa mô tả và nút */
}

.toggle-desc {
    align-self: flex-start;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    color: #007bff;
    cursor: pointer;
    margin-bottom: 20px;
}



#backToTop {
    position: fixed;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ED1E79;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    cursor: pointer;
}


#facebookGroupBtn {
    position: fixed;
    bottom: 20px;
    right: 70px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1877F2;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    animation: attentionPulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(24, 119, 242, 0.6);
    transition: transform 0.3s ease;
}

#facebookGroupBtn:hover {
    transform: scale(1.15) rotate(3deg);
}

/* 🌟 Hiệu ứng tỏa sáng & ripple động */
@keyframes attentionPulse {
    0% {
        box-shadow: 0 0 10px rgba(24, 119, 242, 0.5), 0 0 0 0 rgba(24, 119, 242, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(24, 119, 242, 0.8), 0 0 0 10px rgba(24, 119, 242, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 10px rgba(24, 119, 242, 0.5), 0 0 0 0 rgba(24, 119, 242, 0);
        transform: scale(1);
    }
}



#backToTop {
    right: 20px;
}

#facebookGroupBtn {
    right: 70px;
    text-decoration: none;
}

#facebookGroupBtn i {
    font-size: 16px;
}


#zaloGroupBtn {
    position: fixed;
    bottom: 20px;
    right: 120px; /* Dịch xa hơn Facebook */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0088FF; /* Màu Zalo */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer;
    animation: attentionPulseZalo 2.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(0, 136, 255, 0.5);
    transition: transform 0.3s ease;
}

#zaloGroupBtn:hover {
    transform: scale(1.15) rotate(-3deg);
}

/* 🔵 Zalo glow effect */
@keyframes attentionPulseZalo {
    0% {
        box-shadow: 0 0 10px rgba(0, 136, 255, 0.4), 0 0 0 0 rgba(0, 136, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 136, 255, 0.8), 0 0 0 10px rgba(0, 136, 255, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 10px rgba(0, 136, 255, 0.4), 0 0 0 0 rgba(0, 136, 255, 0);
        transform: scale(1);
    }
}

#chuonchuonshopGroupBtn {
    position: fixed;
    bottom: 20px;
    right: 170px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    background: url('img/shop.svg') center/cover no-repeat;
    background-color: transparent;
    z-index: 1000;
    cursor: pointer;
    animation: attentionPulseShop 2.5s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.5);
    transition: transform 0.3s ease;
}

#chuonchuonshopGroupBtn:hover {
    transform: scale(1.15);
}

@keyframes attentionPulseShop {
    0% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.4), 0 0 0 0 rgba(255, 152, 0, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8), 0 0 0 10px rgba(255, 152, 0, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 10px rgba(255, 152, 0, 0.4), 0 0 0 0 rgba(255, 152, 0, 0);
        transform: scale(1);
    }
}


