/**
 * Action Cards Component (Ported from Nexhost Template index-5.html)
 * Colors adapted to project tokens:
 * --nl-color-bg (Primary Blue for gradient)
 * --nl-color-accent (Secondary Blue)
 */

.nl-action-cards {
    padding: 0 0 40px;
    background-color: transparent;
}

.nl-action-cards__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .nl-action-cards__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Service Item (h5_nh_service-item) --- */

.nl-service-item {
    position: relative;
    z-index: 1;
    cursor: pointer;
    border-radius: 8px;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

/* Image Container */
.nl-service-img {
    position: relative;
    z-index: 1;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.nl-service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

/* Gradient Overlay (Hidden by default, shown on hover in template logic) */
.nl-service-img::before {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    content: "";
    border-radius: 8px;
    /* Template gradient adapted to Corporate Blue/Green logic or keeping dark overlay */
    /* Unified accent blue (#173750) */
    background: linear-gradient(180deg, rgba(23, 55, 80, 0.9), rgba(23, 55, 80, 0.72));
    z-index: 2;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s linear;
}

/* Hover Content (Text on Overlay) - centered */
.nl-service-img-content {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 3;
    padding: 0 20px 40px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s linear;
    transform: translateY(20px);
}

/* Default Content (White Card at bottom) */
.nl-service-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -40px;
    /* Partial overlap/hidden bottom */
    z-index: 3;
    padding: 0 20px;
    transition: all 0.3s linear;
}

/* Icons */
.nl-service-icon-wrapper {
    width: 56px;
    height: 56px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 22px;
    color: #173750;
}

.nl-service-content .nl-service-icon-wrapper {
    background-color: #173750;
    color: #fff;
    margin-bottom: -28px;
    /* Pull icon up */
    position: relative;
    z-index: 4;
}

.nl-service-content-info {
    border-radius: 8px;
    box-shadow: 0px 8px 48px 0px rgba(0, 0, 0, 0.12);
    background: #fff;
    padding: 32px 20px 20px;
    text-align: center;
    margin-bottom: 30px;
}

/* Typography */
.nl-service-title {
    font-family: 'Lato', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #173750;
    margin: 0;
    line-height: 1.2;
}

.nl-service-desc {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.nl-service-img-content .nl-service-title {
    color: #fff;
    margin-bottom: 10px;
}

/* Hover State Logic */
.nl-service-item:hover .nl-service-img::before {
    opacity: 1;
    visibility: visible;
}

.nl-service-item:hover .nl-service-img-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nl-service-item:hover .nl-service-img-content .nl-service-icon-wrapper {
    background: #173750 !important;
}

.nl-service-item:hover .nl-service-content {
    bottom: 60px;
    /* Moves up? Or behaves differently? */
    /* Template said: bottom: 60px; opacity: 0; visibility: hidden; */
    /* Wait, the template moves the default content UP and HIDES it? */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
}

.nl-service-item:hover img {
    transform: scale(1.5);
}

/* Highlighted card — green border + glow */
.nl-service-item--highlight {
    border: 8px solid #0acf97;
    box-shadow: 0 4px 20px rgba(10, 207, 151, 0.35), 0 0 40px rgba(10, 207, 151, 0.12);
}
.nl-service-item--highlight .nl-service-img {
    border-radius: 0;
}
.nl-service-item--highlight .nl-service-content .nl-service-icon-wrapper {
    background-color: #0acf97;
}
.nl-service-item--highlight .nl-service-content-info {
    border-top: 3px solid #0acf97;
}
@media (max-width: 991px) {
    .nl-service-item--highlight {
        order: -1;
    }
}
