﻿.heat-pump-section {
    position: relative;
    margin: 2rem auto;
}

section.heat-pump-section:after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 1920px;
    height: 100%;
    background-color: #e5dfd5;
    background-image: url("../HeatPumps/backgound.jpg");
    background-size: cover; /* optional but recommended */
    background-position: bottom;
    background-repeat: no-repeat;
    z-index: 1;
}

body.skin-layout section.heat-pump-section:after {
    width: 100%;
}

/* LOGO */
section.heat-pump-section .heat-pump-logo {
    position: absolute;
    z-index: 4;
    right: 24px;
    top: 0;
    width: 8rem;
}

    section.heat-pump-section .heat-pump-logo img {
        display: block;
        width: 100%;
        height: auto;
        filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
    }

/* TITLE */
section.heat-pump-section .heat-pump-title {
    position: relative;
    z-index: 2;
}

    section.heat-pump-section .heat-pump-title h2 {
        font-size: 2.5rem;
        font-weight: 700;
        font-family: "FA-TOC", Georgia, Times, serif;
        color: #151c73;
        line-height: 1.1;
        margin-bottom: 0.5rem;
    }

    section.heat-pump-section .heat-pump-title p {
        color: #151c73;
        font-weight: 600;
        margin-bottom: 2rem;
    }

@media screen and (max-width: 670px) {
    section.heat-pump-section .heat-pump-logo {
        right: 16px;
        width: 6rem;
    }

    section.heat-pump-section .heat-pump-title {
        width: 70%;
    }

        section.heat-pump-section .heat-pump-title h2 {
            font-size: 1.8rem;
        }
}

/* ITEMS */
section.heat-pump-section .item {
    position: relative;
    z-index: 2;
}

    section.heat-pump-section .item:after {
        border: none !important;
    }

section.heat-pump-section .item-image img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

@media screen and (min-width: 900px) {
    section.heat-pump-section .item:nth-child(2) {
        flex-direction: column-reverse;
    }
}

section.heat-pump-section .item-content {
    position: relative;
    aspect-ratio: 4/3;
    text-align: center;
    background: linear-gradient( to bottom, #fff 50%, rgba(255, 255, 255, 0) 70% ) !important;
    padding-bottom: 0 !important;
    overflow: hidden; /* important to keep ::before inside */
}

@media screen and (max-width: 900px) {
    section.heat-pump-section .item-content {
        aspect-ratio: auto;
    }
}

@media screen and (max-width: 670px) {
    section.heat-pump-section .item-content {
        background: linear-gradient( to bottom, #fff 75%, rgba(255, 255, 255, 0) 100% ) !important;
    }
}

section.heat-pump-section .item-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #fff 100%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
}

section.heat-pump-section .item-content .item-description .vertical-top {
    padding: 1.5rem;
}

section.heat-pump-section .item-content h4 {
    color: #151c73;
    font-size: 1.1rem;
    font-family: "Apercu-Pro", sans-serif;
}

@media screen and (min-width: 901px) {
    .section.heat-pump-section .item-content h4 {
        display: -webkit-box;
        -webkit-line-clamp: 5; /* 👈 limits to 5 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media screen and (max-width: 1100px) {
    section.heat-pump-section .item-content h4 {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 900px) {
    section.heat-pump-section .item-content .item-description .vertical-top {
        padding: 0.5rem 1rem 0.5rem;
    }
}

/* BUTTON */
section.heat-pump-section .item-content .item-description .button {
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #151c73;
    margin: auto;
    position: relative;
    margin-bottom: 2rem !important;
}

@media screen and (max-width: 1100px) {
    section.heat-pump-section .item-content .item-description .button {
        width: 3rem;
        height: 3rem;
    }
}

@media screen and (max-width: 670px) {
    section.heat-pump-section .item-content .item-description .button {
        margin-bottom: 0 !important;
    }
}

section.heat-pump-section .item-content .item-description .button span.arrow {
    position: absolute;
    display: block;
    width: 18px;
    height: 12px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

    section.heat-pump-section
    .item-content
    .item-description
    .button
    span.arrow:after {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        -webkit-transform: translate(0, -50%);
        transform: translate(0, -50%);
        display: block;
        width: 100%;
        height: 3px;
        background-color: white;
    }

    section.heat-pump-section
    .item-content
    .item-description
    .button
    span.arrow:before {
        content: "";
        position: absolute;
        right: 0;
        display: block;
        width: 12px;
        height: 12px;
        -webkit-transform: rotate(45deg);
        transform: rotate(45deg);
        border-top: 3px solid white;
        border-right: 3px solid white;
    }

@media screen and (max-width: 1100px) {
    section.heat-pump-section .item-content .item-description .button {
        padding: 0;
    }

        section.heat-pump-section .item-content .item-description .button span.arrow {
            width: 14px;
            height: 8px;
        }

            section.heat-pump-section
            .item-content
            .item-description
            .button
            span.arrow:after {
                height: 2px;
            }

            section.heat-pump-section
            .item-content
            .item-description
            .button
            span.arrow:before {
                width: 8px;
                height: 8px;
                border-top: 2px solid white;
                border-right: 2px solid white;
            }
}

/* HOVER EFFECTS */
@media (hover: hover) and (pointer: fine) {
    section.heat-pump-section .item-content:hover .item-description .button {
        background-color: #212529;
        transition: background-color 0.3s ease;
    }

    section.heat-pump-section .item-content .item-description .button:hover {
        transform: scale(1.1);
        transition: transform 0.3s ease;
    }

    section.heat-pump-section .item-content:hover .item-description h4 {
        color: #212529;
        transition: color 0.3s ease;
    }

        section.heat-pump-section .item-content:hover .item-description h4 a:hover {
            color: inherit;
        }

    section.heat-pump-section .item-content:hover::before {
        opacity: 1;
    }
}
