/* assets/css/list-layout.css */
.candidates-list {
    max-width: 1000px;
    margin: 10px auto 40px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.candidate-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: none;
    border-radius: 12px;
    position: relative;
    padding: 25px 30px 25px 190px;
    text-decoration: none !important;
    min-height: 140px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 0 0 1px rgba(218, 37, 29, 0.2);
    border: 1px dashed rgba(218, 37, 29, 0.5);
}

/* Clockwise Light Racing Border Effect */
.candidate-item::before {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 400%;
    height: 400%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            #ffcc00 15deg,
            #da251d 30deg,
            transparent 45deg);
    animation: rotate-border 4s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -2;
}

.candidate-item::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #fff;
    border-radius: 10px;
    z-index: -1;
    opacity: 1;
}

.candidate-item:hover {
    box-shadow: 0 15px 40px rgba(218, 37, 29, 0.25);
    transform: translateX(20px);
    border: none;
}

.candidate-item:hover::before {
    opacity: 1;
}

.item-content {
    flex: 1;
    z-index: 5;
    text-align: left;
}

.item-name {
    color: #da251d;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    line-height: 1.2;
}

.item-job {
    color: #444;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
    text-align: justify;
}

/* Image on the LEFT */
.item-img-box {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid #da251d;
    background: #fff;
    padding: 3px;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.candidate-item:hover .item-img-box {
    transform: translateY(-50%) scale(1.05);
}

.item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 900px) {
    .candidate-item {
        padding-left: 160px;
    }

    .item-img-box {
        width: 120px;
        height: 120px;
    }

    .item-name {
        font-size: 20px;
    }
}

@media (max-width: 600px) {
    .candidate-item {
        padding: 25px 20px 20px 20px;
        /* Giảm padding top từ 40px xuống 25px */
        flex-direction: column;
        text-align: center;
        transform: none !important;
    }

    .item-img-box {
        position: relative;
        left: auto;
        top: auto;
        transform: none !important;
        margin: 0 auto 15px;
        /* Giảm margin bottom chút ít */
        display: block;
        width: 160px;
        /* Tăng kích thước ảnh trên mobile */
        height: 160px;
    }

    .candidate-item:hover .item-img-box {
        transform: scale(1.05) !important;
    }

    .item-name {
        text-align: center;
    }

    .item-job {
        text-align: justify;
    }
}