﻿/* ================================================
   HOME NĂNG LỰC - CSS ĐÃ CẢI TIẾN HOVER + MOBILE
   (Giữ nguyên hầu hết CSS cũ của bạn)
   ================================================ */

.p-capacity-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 194.5px 0 0 0;
}

.full-b-nl {
    background: url(/Design/img/DongXuyen/nl.png) no-repeat;
    background-size: cover;
}

ul.p-capacity-list.rs {
    display: grid;
    grid-auto-rows: minmax(min-content, max-content);
    column-gap: 19px;
    row-gap: 11px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.p-capacity-img {
    height: 479px;
    position: relative;
    overflow: hidden; /* thêm để zoom ảnh không bị tràn */
    border-radius: 194.5px 0 0 0;
}

a.p-capacity-link {
    position: relative;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.p-capacity-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== HOVER CHUYÊN NGHIỆP ==================== */

.p-capacity-link:hover {
    transform: translateY(-12px);
}

    .p-capacity-link:hover .p-capacity-img img {
        transform: scale(1.08); /* zoom nhẹ, mượt */
    }

.p-capacity-img:before {
    content: "";
    position: absolute;
    background: linear-gradient(0deg, #00326C 0%, rgba(0, 50, 108, 0.00) 100%);
    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.25);
    left: 0;
    bottom: 0;
    width: 100%;
    height: 190px;
    transition: opacity 0.4s ease;
    opacity: 0.85;
}

.p-capacity-link:hover .p-capacity-img:before {
    opacity: 1; /* overlay đậm hơn khi hover */
}

/* Vòng tròn năng lực - Hover đẹp & mượt */
.decor-title-capacity {
    position: absolute;
    left: 0;
    bottom: -71px;
    right: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 165px;
    height: 165px;
    background: radial-gradient(79.83% 60.51% at 50% 39.49%, #22A8FA 0%, #035B8F 100%);
    border: 1px solid #fff;
    border-radius: 50%;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.p-capacity-link:hover .decor-title-capacity {
    bottom: -55px; /* nổi lên cao hơn */
    transform: scale(1.12);
    box-shadow: 0 15px 35px rgba(34, 168, 250, 0.45);
}

.full-b-nl .home-capacity-w {
    padding-top: 63px;
    padding-bottom: 66px;
}

.decor-n-capacity {
    text-align: center;
    margin: auto;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.p-capacity-link:hover .decor-n-capacity {
    transform: translateY(-6px);
}

.decor-n-capacity img {
    margin: auto;
    transition: transform 0.4s ease;
}

.p-capacity-link:hover .decor-n-capacity img {
    transform: scale(1.05);
}

.decor-n-capacity h3 {
    color: #FFF;
    text-align: center;
    font-family: 'Inter_24pt-Medium';
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 142%;
    text-transform: uppercase;
    margin: 0 22px;
    margin-top: 13px;
}

/* Giữ nguyên phần title & background cũ */
.home-capacity-w .top-cef-home {
    text-align: left;
    margin-right: 0;
    margin-left: 55px;
    margin-bottom: 44px;
}

.home-capacity-w .svg-decor-cer {
    right: auto;
    left: -36px;
    z-index: 1;
    top: -33px;
}

.home-capacity-w {
    padding-top: 0px;
    padding-bottom: 30px;
    position: relative;
}

/* ==================== RESPONSIVE - DÙNG TỐT TRÊN MOBILE ==================== */

@media (max-width: 1200px) {
    ul.p-capacity-list.rs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    ul.p-capacity-list.rs {
        column-gap: 0px;
        row-gap: 76px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .p-capacity-item {
        width: 48%;
    }

        .p-capacity-item:last-child {
            width: 100%;
        }

    .p-capacity-img {
        height: 185px; /* phù hợp mobile */
    }

    .home-capacity-w:before {
        display: none;
    }

    .home-capacity-w .svg-decor-cer {
        left: -15px;
    }

    .p-capacity-img {
        height: 420px; /* giảm chiều cao trên tablet */
        border-radius: 62.5px 0 0 0;
    }

        .p-capacity-img img {
            border-radius: 62.5px 0 0 0;
        }

    .decor-title-capacity {
        width: 155px;
        height: 155px;
        bottom: -65px;
    }
}

@media (max-width: 576px) {
    ul.p-capacity-list.rs {
        column-gap: 0px;
        row-gap: 76px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .p-capacity-item {
        width: 48%;
    }

        .p-capacity-item:last-child {
            width: 100%;
        }

    .p-capacity-img {
        height: 185px;
    }

    .decor-title-capacity {
        width: 120px;
        height: 120px;
        bottom: -60px;
    }

    .decor-n-capacity h3 {
        font-size: 10px;
        margin: 0 15px;
        margin-top: 10px;
    }

    .home-capacity-w .top-cef-home {
        margin-left: 15px;
        margin-bottom: 35px;
    }

    .decor-n-capacity img {
        width: 33%;
    }

    .home-capacity-w {
        padding-top: 60px;
        padding-bottom: 50px;
    }
}