﻿/* ================================================
   HOME PROFILE - CSS CẢI TIẾN (Modern Hover + Responsive)
   ================================================ */

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

li.p-profile-item {
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

    li.p-profile-item:hover {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
        transform: translateY(-8px);
    }

.p-profile-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

    .p-profile-link:hover {
        transform: scale(1.03);
    }

.p-profile-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3; /* Tỷ lệ 300x225 như thiết kế cũ */
    width: 100%;
}

    .p-profile-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

.p-profile-link:hover .p-profile-img img {
    transform: scale(1.12);
}

/* Overlay + Text */
.decor-title-profile {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 50px;
    text-align: center;
    z-index: 2;
    transition: background 0.4s ease;
}

.p-profile-link:hover .decor-title-profile {
    background: linear-gradient( rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100% );
}

.decor-n-profile {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.p-profile-link:hover .decor-n-profile {
    transform: scale(1.08);
}

.decor-n-profile h3 {
    margin: 0;
    color: #FFF;
    font-family: 'CormorantUnicase-Bold';
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.decor-n-profile span {
    color: #FFF;
    font-family: 'Inter_24pt-Regular', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    display: block;
    margin-top: 4px;
    opacity: 0.95;
}

/* ================================================
   RESPONSIVE
   ================================================ */

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

@media (max-width: 992px) {
    ul.p-profile-list.rs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1px;
        row-gap: 1px;
    }

    .decor-title-profile {
        padding: 20px 30px;
    }
}

@media (max-width: 576px) {
    ul.p-profile-list.rs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1px;
        row-gap: 1px;
    }

    .p-profile-img {
        aspect-ratio: 4 / 3; /* Giữ tỷ lệ đẹp trên mobile */
    }

    .decor-n-profile h3 {
        font-size: 16px;
    }

    .decor-n-profile span {
        font-size: 12px;
    }

    .decor-title-profile {
        padding: 20px 24px;
    }
}

/* Optional: Animation khi load trang (rất mượt) */
@keyframes profileFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.p-profile-item {
    animation: profileFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

    /* Stagger nhẹ cho các item */
    .p-profile-item:nth-child(2) {
        animation-delay: 80ms;
    }

    .p-profile-item:nth-child(3) {
        animation-delay: 160ms;
    }

    .p-profile-item:nth-child(4) {
        animation-delay: 240ms;
    }

    .p-profile-item:nth-child(5) {
        animation-delay: 320ms;
    }