:root {
    --p2c-blue: #005cc8;
    --p2c-navy: #1e4fae;
    --p2c-light: #ecf3fc;
    --p2c-dark: #132e4c;
    --p2c-teal: #25c4a6;
    --p2c-yellow: #edb547;
    --p2c-pink: #ec5e8a;
}

html {
    scroll-behavior: smooth;
}

section[id],
#lien-he {
    scroll-margin-top: 80px;
}

.text-black {
    color: black;
}

/* Logo P2C: lấy phần "p2c" từ logo sản phẩm */
.p2c-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.p2c-mark {
    height: 44px;
    width: auto;
}

.p2c-brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 18px;
    color: var(--p2c-navy);
}

.navbar .nav-link {
    font-weight: 500;
    transition: color .2s;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--p2c-blue) !important;
}

.dropdown-item:active {
    background-color: var(--p2c-blue);
}

/* Giới thiệu */
.eyebrow {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--p2c-pink);
    letter-spacing: .5px;
}

.title-tech {
    font-size: 16px;
    font-style: normal;
    text-align: justify;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: 0;
    color: var(--p2c-blue);
}

.arrow-icon {
    flex-shrink: 0;
    color: var(--p2c-blue);
    margin-top: 1px;
}

.btn-p2c {
    background-color: var(--p2c-blue);
    border-color: var(--p2c-blue);
    color: #fff;
    font-weight: 600;
    padding: 10px 22px;
}

.btn-p2c:hover {
    background-color: var(--p2c-navy);
    color: #fff;
}

.btn-outline-p2c {
    border: 1px solid var(--p2c-blue);
    color: var(--p2c-blue);
    font-weight: 600;
    padding: 10px 22px;
}

.btn-outline-p2c:hover {
    background-color: var(--p2c-light);
    color: var(--p2c-blue);
}

/* Khung banner cố định tỉ lệ để không nhảy chiều cao khi chuyển slide */
.slide-link {
    position: relative;
    display: block;
    aspect-ratio: 10 / 7;
    overflow: hidden;
    border-radius: 8px;
    background-color: #fff;
    text-decoration: none;
}

.slide-link > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Slide cho app có ảnh chụp màn hình dọc: logo bên trái, 2 điện thoại bên phải */
.slide-phones {
    display: flex;
    align-items: stretch;
    gap: 4%;
    padding: 7% 6% 9%;
    background: linear-gradient(135deg, var(--p2c-light), #fff 75%);
}

.slide-phones.slide-chess {
    background: linear-gradient(135deg, #fdf0e4, #fff 75%);
}

.slide-phones.slide-watch {
    background: linear-gradient(135deg, #ece9fb, #fff 75%);
}

.slide-phones.slide-dictionary {
    background: linear-gradient(135deg, #e3effd, #fff 75%);
}

.slide-phones-info {
    flex: 1 1 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

img.slide-phones-logo {
    width: 100%;
    max-width: 230px;
    height: auto;
}

.slide-phones-logo.speak-logo img {
    height: 52px;
}

.slide-phones-logo .speak-logo-name {
    font-size: 30px;
}

.slide-phones-logo .speak-logo-tag {
    font-size: 11px;
}

.slide-phones-text {
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 600;
    line-height: 1.45;
    color: var(--p2c-dark);
}

.slide-phones-shots {
    position: relative;
    flex: 1 1 54%;
}

.phone-shot {
    position: absolute;
    height: 100%;
    width: auto;
    border: 4px solid #1c1c1e;
    border-radius: 18px;
    background-color: #fff;
    box-shadow: 0 14px 30px rgba(19, 46, 76, .22);
}

.phone-shot.back {
    top: 6%;
    right: 40%;
    height: 92%;
    transform: rotate(-6deg);
    opacity: .95;
}

.phone-shot.front {
    top: 0;
    right: 4%;
}

@media (max-width: 575.98px) {
    #carouselProducts .carousel-control-prev,
    #carouselProducts .carousel-control-next {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .phone-shot {
        border-width: 3px;
        border-radius: 12px;
    }

    .slide-phones-logo.speak-logo img {
        height: 38px;
    }

    .slide-phones-logo .speak-logo-name {
        font-size: 22px;
    }
}

.slide-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #fff;
    color: var(--p2c-blue);
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: background-color .2s, color .2s;
}

.slide-link:hover .slide-badge {
    background: var(--p2c-blue);
    color: #fff;
}

.carousel-control-prev,
.carousel-control-next {
    height: 30%;
    margin: auto 0;
}

/* Sản phẩm */
.product-section {
    padding-top: 70px;
    padding-bottom: 40px;
}

.product-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid #e3ebf6;
    border-top: 4px solid var(--accent);
    box-shadow: 0 2px 10px rgba(19, 46, 76, .06);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.product-card.study {
    --accent: var(--p2c-teal);
}

.product-card.watch {
    --accent: var(--p2c-yellow);
}

.product-card.dictionary {
    --accent: var(--p2c-pink);
}

.product-card.chess {
    --accent: #e98a3a;
}

.product-card.speak {
    --accent: var(--p2c-navy);
}

/* Logo P2C Speak dựng bằng biểu tượng p2c + chữ, cùng kiểu logo các app khác */
.speak-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.speak-logo img {
    height: 44px;
    width: auto;
}

.speak-logo-text {
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--p2c-navy);
    line-height: 1;
}

.speak-logo-name {
    font-size: 25px;
}

.speak-logo-tag {
    margin-top: 4px;
    font-size: 9px;
    font-weight: 600;
}

/* Ảnh chụp màn hình dọc: lấy phần bàn cờ */
.product-thumb.portrait img {
    object-position: center 28%;
}

.product-card.speak .product-thumb img {
    object-position: center 8%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(19, 46, 76, .15);
}

.product-thumb {
    background-color: var(--p2c-light);
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .3s;
}

.product-card:hover .product-thumb img {
    transform: scale(1.04);
}

.product-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.product-logo {
    height: 44px;
    width: auto;
    align-self: flex-start;
    margin-bottom: 12px;
}

.product-link {
    margin-top: auto;
    margin-bottom: 14px;
    font-weight: 600;
    color: var(--p2c-blue);
    text-decoration: none;
}

.product-link svg {
    vertical-align: -5px;
    transition: transform .2s;
}

.product-card:hover .product-link svg {
    transform: translateX(4px);
}

/* Các nút cửa hàng nằm trên stretched-link để vẫn nhấn được */
.product-stores {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.appstore {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0px;
    transition: transform .2s;
}

.appstore img {
    width: 120px;
    height: auto;
    display: block;
}

.appstore:hover {
    transform: translateY(-2px);
}

.policy-link {
    font-size: 13px;
    color: #6c757d;
}

.policy-link:hover {
    color: var(--p2c-blue);
}

/* Giá trị mang lại */
.evalution-section {
    background-color: var(--p2c-light);
    padding-top: 70px;
    padding-bottom: 70px;
}

.div-item-value {
    border-radius: 8px;
    background-color: #fff;
    padding: 20px;
    margin-bottom: 15px;
}

.star-icon {
    color: var(--p2c-blue);
}

.p-item-des {
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0;
}

.row-flex {
    display: flex;
    flex-wrap: wrap;
}

.row-flex > [class*="col-"] {
    margin-bottom: 30px;
}

.content {
    height: 100%;
    padding: 20px 20px 10px;
}

/* Hướng dẫn */
.video-content {
    max-width: 960px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.nav-pills .nav-link {
    color: var(--p2c-blue);
    font-weight: 600;
}

.nav-pills .nav-link.active {
    background-color: var(--p2c-blue);
}

/* Footer */
.footer-clean {
    background-color: var(--p2c-dark);
}

.footer-clean footer > .container > .row > [class*="col-"] {
    margin-bottom: 20px;
}

.footer-brand .p2c-mark {
    height: 52px;
}

.footer-mail {
    word-break: break-all;
}

.footer-links li {
    margin-bottom: 6px;
}

.footer-links a,
.footer-mail {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover,
.footer-mail:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 991.98px) {
    #gioi-thieu .col-lg-7 {
        margin-top: 30px;
    }
}

/* Nút chuyển ngôn ngữ VI / EN */
.lang-switch {
    display: inline-flex;
    flex-shrink: 0;
    border: 1px solid #005cc8;
    border-radius: 20px;
    overflow: hidden;
}

.lang-switch button {
    border: 0;
    background: transparent;
    color: #005cc8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    padding: 4px 10px;
    transition: background-color .2s, color .2s;
}

.lang-switch button:hover {
    background: #ecf3fc;
}

.lang-switch button.active {
    background: #005cc8;
    color: #fff;
}

/* Ảnh App Store của Study là khổ iPad dọc 3:4: lấy phần đầu có tiêu đề */
.product-card.study .product-thumb img {
    object-position: center 8%;
}

/* Icon app dạng ô vuông bo góc (P2C Study, P2C Watch) */
.app-icon-img {
    border-radius: 22%;
    box-shadow: 0 0 0 1px rgba(19, 46, 76, .08), 0 2px 6px rgba(19, 46, 76, .12);
}

/* Ảnh App Store của Dictionary là khổ iPad dọc 3:4: lấy phần đầu có tiêu đề */
.product-card.dictionary .product-thumb img {
    object-position: center 8%;
}
