/* =========================================
   BASE STYLES
   ========================================= */
.sifency-portfolio--grid {
    display: grid;
    width: 100%;
}

.sifency-portfolio-item {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
}

.sifency-portfolio-image {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.sifency-portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.sifency-portfolio-content {
    display: flex;
    flex-direction: column;
}

.sifency-portfolio-categories {
    margin-bottom: 5px;
}

.sifency-portfolio-title {
    margin: 0;
}

.sifency-portfolio-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.sifency-pf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s;
    width: fit-content;
}

.sifency-image-overlay,
.sifency-portfolio-style-1 .sifency-portfolio-image::after {
    transition: all 0.4s ease-in-out;
}

/* =========================================
   STYLE 1: Overlay Gradient (Modern)
   Image full height. Gradient overlay on bottom.
   Content slides up on hover.
   ========================================= */
.sifency-portfolio-style-1 .sifency-portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    z-index: 1;
}

.sifency-portfolio-style-1 .sifency-portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.sifency-portfolio-style-1 .sifency-portfolio-item:hover .sifency-portfolio-content {
    transform: translateY(0);
}

.sifency-portfolio-style-1 .sifency-portfolio-item:hover img {
    transform: scale(1.1);
}

.sifency-portfolio-style-1 .sifency-item-count {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 12px;
}

.sifency-portfolio-style-1 .sifency-pf-btn {
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.1s;
}

.sifency-portfolio-style-1 .sifency-portfolio-item:hover .sifency-pf-btn {
    opacity: 1;
    transform: translateY(0);
}


/* =========================================
   STYLE 2: Classic Card (Clean)
   Image top, White card content bottom overlapping slightly.
   Box shadow lift effect.
   ========================================= */
.sifency-portfolio-style-2 .sifency-portfolio-item {
    background: transparent;
    overflow: visible;
}

.sifency-portfolio-style-2 .sifency-portfolio-content {
    width: 85%;
    margin: -40px auto 0;
    /* Overlap image */
    padding: 25px;
    position: relative;
    z-index: 2;
    text-align: center;
    transition: transform 0.3s ease;
}

.sifency-portfolio-style-2 .sifency-portfolio-item:hover .sifency-portfolio-content {
    transform: translateY(-5px);
}

.sifency-portfolio-style-2 .sifency-item-count {
    position: absolute;
}


/* =========================================
   STYLE 3: Interactive List (Hover Image)
   Grid becomes a vertical list. Image floats on cursor.
   ========================================= */
.sifency-portfolio-style-3 .sifency-portfolio--grid {
    display: block;
    /* Force list view */
}

.sifency-portfolio-style-3 .sifency-portfolio-item {
    background: transparent;
    padding: 0px 0px 30px 0px;
    overflow: visible;
}

.sifency-portfolio-style-3 .sifency-list-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 5;
}

.sifency-portfolio-style-3 .sifency-list-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sifency-portfolio-style-3 .sifency-item-count {
    color: #ccc;
}

.sifency-portfolio-style-3 .sifency-list-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.sifency-portfolio-style-3 .sifency-list-icon i {
    transform: rotate(-45deg);
    transition: transform 0.3s;
}

.sifency-portfolio-style-3 .sifency-portfolio-item:hover .sifency-list-icon i {
    transform: rotate(0deg);
}

/* Floating Image */
.sifency-hover-reveal-img {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sifency-hover-reveal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 99;
}

/* Mobile: Hide floating image, show static if needed */
@media(max-width: 768px) {
    .sifency-hover-reveal-img {
        display: none;
    }

    .sifency-portfolio-style-3 .sifency-list-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .sifency-portfolio-style-3 .sifency-list-right {
        width: 100%;
        justify-content: space-between;
    }
}


/* =========================================
   STYLE 4: Minimal Hover (Box)
   Black overlay on hover with centered text.
   ========================================= */
.sifency-portfolio-style-4 .sifency-portfolio-image {
    opacity: 1;
    transition: opacity 0.4s ease;
}


.sifency-portfolio-style-4 .sifency-portfolio-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    text-align: center;
    width: 100%;
    padding: 20px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

.sifency-portfolio-style-4 .sifency-portfolio-item:hover .sifency-portfolio-content {
    transform: translate(-50%, -50%);
    opacity: 1;
}

.sifency-portfolio-style-4 .sifency-content-style {
    color: rgba(255, 255, 255, 0.8);
}

.sifency-portfolio-style-4 .sifency-pf-btn {
    justify-content: center;
    padding: 8px 20px;
    margin-top: 15px;
}


/* =========================================
   STYLE 5: Alternating Split (Masonry Feel)
   Forces single column layout in alternating directions.
   ========================================= */
.sifency-portfolio-style-5.sifency-portfolio--grid {
    grid-template-columns: 1fr;
    gap: 0;
}

.sifency-portfolio-style-5 .sifency-portfolio-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.sifency-portfolio-style-5 .sifency-portfolio-item.even-item {
    flex-direction: row-reverse;
}

.sifency-portfolio-style-5 .sifency-portfolio-image,
.sifency-portfolio-style-5 .sifency-portfolio-content {
    width: 50%;
    flex: 1;
}

.sifency-portfolio-style-5 .sifency-portfolio-content {
    padding: 40px;
    justify-content: center;
    align-items: flex-start;
}

.sifency-portfolio-style-5 .sifency-item-count {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
}

@media (max-width: 768px) {

    .sifency-portfolio-style-5 .sifency-portfolio-item,
    .sifency-portfolio-style-5 .sifency-portfolio-item.even-item {
        flex-direction: column;
    }

    .sifency-portfolio-style-5 .sifency-portfolio-image,
    .sifency-portfolio-style-5 .sifency-portfolio-content {
        width: 100%;
    }

    .sifency-portfolio-style-5 .sifency-portfolio-content {
        padding: 30px 20px;
    }
}