section {
    position: relative;
}

.nav-pc {
    background-image: none;
    background-color: #002980;
}

.nav-pc.scrolled {
    background-image: linear-gradient(
        to bottom,
        color-mix(in oklab, #040509 100%, transparent) 0%,
        color-mix(in oklab, #020204 90%, transparent) 40%,
        color-mix(in oklab, #04090d 60%, transparent) 100%
    );
    background-color: #00298000;
}

.title-section {
    width: 100%;
    font-size: 36px;
    font-weight: 600;
}

.button_translate {
    transform: translate(0.75rem);
}

.nav-pc {
    background-image: none;
    background-color: #002980;
}

.nav-pc.scrolled {
    background-image: linear-gradient(
        to bottom,
        color-mix(in oklab, #040509 100%, transparent) 0%,
        color-mix(in oklab, #020204 90%, transparent) 40%,
        color-mix(in oklab, #04090d 60%, transparent) 100%
    );
    background-color: #00298000;
}

/* ---------------------------------------------- DEVICE ---------------------------------------------- */
.device_box {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
}

.content {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 2.5rem;
    width: 100%;
    max-width: 750px;
}

.btn-advise {
    padding: 5px 6px 5px 26px;
}

.img_device {
    width: 100%;
    max-width: 430px;
    height: 450px;
    position: relative;
}

.device {
    position: absolute;
    overflow: hidden;
    background: transparent;
    z-index: 20;
}

.device-frame {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    width: 100%;
    height: 100%;
}

.device-screen {
    position: absolute;
    overflow-y: hidden;
    background: #fff;
    border-radius: 4px;
}

.device-screen img {
    width: 100%;
    transition: transform 3s ease;
}

/* Hover hiệu ứng trượt lên */
.device:hover .device-screen img {
    transform: translateY(-60%);
}

/* Desktop */
.device-desktop {
    top: -0.25rem;
    right: 50%;
    width: 342px;
    height: 280px;
    transform: translateX(50%);
}

.device-desktop .device-screen {
    width: 286px;
    height: 150px;
    left: 2rem;
    top: 1.25rem;
}

/* Laptop */
.device-laptop {
    top: 7rem;
    left: -4.5rem;
    width: 320px;
    height: 320px;
}

.device-laptop .device-screen {
    width: 207px;
    height: 129px;
    left: 3.5rem;
    top: 6.2rem;
}

/* Tablet */
.device-tablet {
    top: 9.25rem;
    right: -3.75rem;
    width: 240px;
    height: 260px;
}

.device-tablet .device-screen {
    width: 114px;
    height: 149px;
    left: 3.875rem;
    top: 3.5rem;
}

/* Mobile */
.device-mobile {
    bottom: 35%;
    right: 87px;
    width: 160px;
    height: 160px;
    transform: translateY(50%);
}

.device-mobile .device-screen {
    width: 55px;
    height: 126px;
    left: 3.25rem;
    top: 1rem;
}

/* ---------------------------------------------- STATS ---------------------------------------------- */
.theme-stats {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 3rem;
}

.theme-stats h2 {
    font-weight: 600;
}

.flex_end {
    justify-content: flex-end !important;
}

.theme-stats-title {
    font-size: 2.25rem;
    text-align: center;
    font-weight: 600;
    width: 80%;
    margin: 0 auto;
}

.theme-stats-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    place-items: center;
    margin-top: 2rem;
}

.theme-stat-item {
    color: #fff;
    background: transparent;
    border-radius: 0.75rem;
    white-space: nowrap;
    padding: 1rem;
    width: 15rem;
    text-align: center;
}

.theme-stat-number {
    font-size: 3.75rem;
    font-weight: 700;
    font-family: "Anton", sans-serif;
    -webkit-text-stroke: 2px #0148b9;
    color: transparent;
}

.theme-stat-name {
    margin-top: 0.25rem;
    color: #111827;
    font-size: 15px;
}

.theme-stat-desc {
    font-weight: 600;
}

/* ---------------------------------------------- ALL THEMES ---------------------------------------------- */
/* Wrapper */
.theme-search-wrapper {
    padding: 2rem 0;
    position: relative;
}

/* Container */
.theme-search-container {
    max-width: 87.5%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Form */
.theme-search-form {
    width: 100%;
}

/* Box */
.theme-search-box {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.25rem;
}

/* Input */
.theme-search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    /* py-3 px-4 */
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: #374151;
    /* text-gray-700 */
}

.theme-search-input::placeholder {
    color: #6b7280;
    /* placeholder-gray-500 */
}

/* Button */
.theme-search-btn {
    cursor: pointer;
    color: #fff;
    border-radius: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
    border-radius: 50%;
    width: auto;
    display: flex;
    align-items: center;
}

.theme-search-btn img {
    border-radius: 50%;
}

.theme-search-btn:hover {
    opacity: 0.8;
}

/* Popup */
.theme-search-popup {
    position: absolute;
    top: 5.5rem;
    /* top-22 ~ 88px */
    left: 4.5rem;
    /* sm:left-18 */
    width: 1060px;
    max-height: 600px;
    margin-top: 0.25rem;
    z-index: 50;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    display: none;
}

.cate_theme {
    padding: 1.5rem 0;
}

.cate_theme_grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    place-items: center;
    max-width: 1050px;
    margin: 0px auto;
}

.cat_item {
    text-align: center;
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid #000000a9;
    padding: 0.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cat_item > p {
    font-weight: 500;
}

.cat_item > p {
    font-weight: 500;
}

.cat_item:hover {
    background-color: var(--color-main);
    color: #fff;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.section_device {
    padding: 1rem 0;
}

/* ---------------------------------------------- RESPONSIVE ---------------------------------------------- */

/* Tablet & nhỏ hơn (≤1199px) */
@media (max-width: 1199px) {
    .device_box {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    .content {
        max-width: 100%;
    }
}

@media (max-width: 991px) {
    .cate_theme_grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile trung bình (≤640px) */
@media (max-width: 767px) {
    .theme-stats {
        margin-top: 5rem;
    }

    .theme-stats-title {
        font-size: 1.5rem;
        width: 100%;
    }

    .theme-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-stat-item {
        width: 100%;
    }

    .theme-search-popup {
        left: 0;
        width: 100%;
    }

    .section_theme {
        padding-bottom: 0.5rem;
    }

    .cate_theme_grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile nhỏ (≤575px) */
@media (max-width: 575px) {
    .device-mobile {
        bottom: 16%;
    }

    .device-laptop {
        left: -2rem;
    }

    .device-tablet {
        top: 11rem;
        right: -3.5rem;
    }

    .cate_theme_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .theme-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .title-section {
        font-size: 24px;
    }

    .device_box {
        gap: 3.5rem;
    }

    .section_device {
        padding: 3.5rem 0 0 0;
    }

    .theme-search-container {
        max-width: 95%;
    }

    .cate_theme_grid {
        padding: 0 1rem;
    }
}
