﻿
/* =========================================
       DREAMTREE PORTFOLIO / REEL SECTION
       Responsive Screen Height
       ========================================= */
.portfolio-section {
    width: 100%;
    padding: 80px 20px;
    background: #ffffff;
    box-sizing: border-box;
}

.portfolio-container {
    padding-top: 20px;
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}


/* =========================================
       SECTION HEADING
       ========================================= */

.section-heading {
    margin: 0 auto 45px;
    text-align: center;
}

    .section-heading span {
        display: inline-block;
        margin-bottom: 10px;
        color: #4b41e1;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }

    .section-heading h2 {
        margin: 0 0 15px;
        color: #00236f;
        font-size: 42px;
        font-weight: 700;
        line-height: 1.15;
    }

    .section-heading p {
        margin: 0;
        color: #64748b;
        font-size: 16px;
        line-height: 1.7;
    }


/* =========================================
       PORTFOLIO GRID
       ========================================= */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}


/* =========================================
       PORTFOLIO CARD
       ========================================= */

.portfolio-card {
    position: relative;
    display: block;
    width: 100%;
    /*
           Height automatically based
           on screen height
        */
    height: 42vh;
    min-height: 280px;
    max-height: 450px;
    overflow: hidden;
    border-radius: 18px;
    background: #e5e7eb;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .portfolio-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
    }


/* =========================================
       MEDIA CONTAINER
       ========================================= */

.portfolio-media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e5e7eb;
}


/* =========================================
       POSTER IMAGE
       ========================================= */

.portfolio-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.7s ease;
}


/* =========================================
       VIDEO
       ========================================= */

.portfolio-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    background: #e5e7eb;
    transition: opacity 0.5s ease, transform 0.7s ease;
}


/* =========================================
       VIDEO PLAYING
       ========================================= */

.portfolio-card.video-playing
.portfolio-video {
    opacity: 1;
}

.portfolio-card.video-playing
.portfolio-poster {
    opacity: 0;
}


/* =========================================
       VIDEO HOVER ZOOM
       ========================================= */

.portfolio-card:hover
.portfolio-video {
    transform: scale(1.03);
}


/* =========================================
       OVERLAY
       ========================================= */

.portfolio-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    min-height: 130px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    padding: 45px 20px 20px;
    box-sizing: border-box;
    color: #ffffff;
    background: linear-gradient( to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 35%, rgba(0, 0, 0, 0.15) 70%, transparent 100% );
    pointer-events: none;
}


    /* =========================================
       PROJECT TEXT
       ========================================= */

    .portfolio-overlay h3 {
        margin: 0 0 5px;
        color: #ffffff;
        font-size: 17px;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .portfolio-overlay p {
        margin: 0;
        color: rgba(255, 255, 255, 0.85);
        font-size: 13px;
        line-height: 1.4;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }


/* =========================================
       ARROW
       ========================================= */

.portfolio-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 19px;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover
.portfolio-arrow {
    color: #00236f;
    background: #ffffff;
    transform: translate(2px, -2px);
}


/* =========================================
       LARGE TABLET
       ========================================= */

@media (max-width: 1100px) {

    .portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portfolio-card {
        height: 68vh;
        min-height: 360px;
        max-height: 600px;
    }
}


/* =========================================
       TABLET
       ========================================= */

@media (max-width: 850px) {

    .portfolio-section {
        padding: 70px 20px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .portfolio-card {
        height: 65vh;
        min-height: 350px;
        max-height: 550px;
    }

    .section-heading h2 {
        font-size: 36px;
    }
}


/* =========================================
       MOBILE
       ========================================= */

@media (max-width: 600px) {

    .portfolio-section {
        padding: 60px 12px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

        .section-heading h2 {
            font-size: 30px;
        }

        .section-heading p {
            font-size: 14px;
        }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .portfolio-card {
        width: 100%;
        height: 65vh;
        min-height: 320px;
        max-height: 500px;
        border-radius: 14px;
    }

    .portfolio-overlay {
        min-height: 100px;
        padding: 35px 12px 12px;
        gap: 8px;
    }

        .portfolio-overlay h3 {
            font-size: 14px;
        }

        .portfolio-overlay p {
            font-size: 11px;
        }

    .portfolio-arrow {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 15px;
    }
}


/* =========================================
       SMALL MOBILE
       ========================================= */

@media (max-width: 380px) {

    .portfolio-section {
        padding-left: 8px;
        padding-right: 8px;
    }

    .portfolio-grid {
        gap: 8px;
    }

    .portfolio-card {
        height: 60vh;
        min-height: 300px;
    }

    .portfolio-overlay {
        padding-left: 9px;
        padding-right: 9px;
    }

        .portfolio-overlay h3 {
            font-size: 12px;
        }

        .portfolio-overlay p {
            font-size: 10px;
        }

    .portfolio-arrow {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 13px;
    }
}
