/**
 * P/O/WEBER — Product Programme Grid
 *
 * Version: 1.1.0
 *
 * Changelog:
 * 1.1.0
 * - Svi selektori ograničeni na .pow-reference-section.pow-products.
 * - Uklonjeno dvostruko renderiranje iste pozadinske slike.
 * - Dekorativni overlayi više ne mogu blokirati klikove.
 * - Dodan pristupačan focus-visible prikaz.
 * - Dodana prefers-reduced-motion podrška.
 * - Optimizirane hover animacije samo za uređaje koji ih podržavaju.
 * - Poboljšana stabilnost grida i mobilnog prikaza.
 */


/* =========================================================
   SECTION
========================================================= */

.pow-reference-section.pow-products {
    background: var(--pow-surface, #f3f6f8) !important;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.pow-reference-section.pow-products .pow-program-head {
    width: min(1420px, 89vw);
    max-width: 1600px;
    margin: 0 auto !important;
    padding: 108px 0 58px;
}

.pow-reference-section.pow-products .pow-program-head h2 {
    margin: 0;
    font-size: clamp(34px, 3.2vw, 54px);
    line-height: 1.04;
}

.pow-reference-section.pow-products .pow-program-head > p:last-child {
    max-width: 980px;
    margin-bottom: 0;
    color: var(--pow-body, #57626b);
    font-size: 18px;
    line-height: 1.7;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.pow-reference-section.pow-products .pow-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;

    width: min(1420px, 89vw);
    max-width: 1600px;
    margin: 0 auto !important;
    padding: 0 0 112px;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.pow-reference-section.pow-products .pow-program-card {
    --pow-card-image: none;

    position: relative;
    isolation: isolate;

    display: flex;
    min-width: 0;
    min-height: 270px;
    overflow: hidden;

    color: #ffffff !important;
    background-color: #30383f;

    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(15, 24, 31, 0.12);

    text-decoration: none !important;

    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease;
}


/* Background image */

.pow-reference-section.pow-products .pow-program-card::before {
    content: "";

    position: absolute;
    z-index: -2;
    inset: 0;

    background-color: #30383f;
    background-image: var(--pow-card-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    pointer-events: none;

    transition:
        transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1),
        filter 0.35s ease;
}


/* Dark overlay */

.pow-reference-section.pow-products .pow-program-card::after {
    content: "";

    position: absolute;
    z-index: -1;
    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(19, 27, 33, 0.32) 0%,
            rgba(22, 29, 35, 0.50) 44%,
            rgba(21, 25, 29, 0.92) 100%
        );

    pointer-events: none;
}


/* Blue decorative overlay */

.pow-reference-section.pow-products .pow-program-shade {
    position: absolute;
    z-index: 0;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(47, 117, 193, 0.10),
            transparent 48%
        );

    pointer-events: none;
}


/* =========================================================
   CARD META
========================================================= */

.pow-reference-section.pow-products .pow-program-meta {
    position: absolute;
    z-index: 2;
    top: 36px;
    left: 27px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;

    max-width: calc(100% - 54px);

    pointer-events: none;
}

.pow-reference-section.pow-products .pow-program-meta b {
    color: #7db0e7;
    font: 600 17px/1 Oswald, Arial, sans-serif;
    letter-spacing: 0.05em;
}

.pow-reference-section.pow-products .pow-program-meta em {
    display: inline-block;
    max-width: 100%;
    padding: 5px 7px;

    color: #cce0f5;
    background: rgba(28, 85, 144, 0.76);

    font: 500 12px/1.2 Oswald, Arial, sans-serif;
    font-style: normal;
    letter-spacing: 0.02em;
    text-transform: uppercase;

    overflow-wrap: anywhere;
}


/* =========================================================
   CARD CONTENT
========================================================= */

.pow-reference-section.pow-products .pow-program-content {
    position: absolute;
    z-index: 2;
    right: 27px;
    bottom: 24px;
    left: 27px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 7px 12px;
    align-items: end;

    pointer-events: none;
}

.pow-reference-section.pow-products .pow-program-content strong {
    grid-column: 1;

    color: #ffffff;
    font: 500 clamp(22px, 1.65vw, 29px)/1.12 Oswald, Arial, sans-serif;
    letter-spacing: -0.015em;
    text-transform: uppercase;

    overflow-wrap: anywhere;
}

.pow-reference-section.pow-products .pow-program-content small {
    grid-column: 1;

    color: #dce4eb;
    font: 400 16px/1.4 "Open Sans", Arial, sans-serif;

    overflow-wrap: anywhere;
}

.pow-reference-section.pow-products .pow-program-content i {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;

    color: #ffffff;
    font: 400 28px/1 "Open Sans", Arial, sans-serif;
    font-style: normal;

    transition: transform 0.2s ease;
}


/* =========================================================
   HOVER AND KEYBOARD FOCUS
========================================================= */

@media (hover: hover) and (pointer: fine) {

    .pow-reference-section.pow-products .pow-program-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 34px rgba(20, 34, 46, 0.20);
    }

    .pow-reference-section.pow-products .pow-program-card:hover::before {
        transform: scale(1.045);
        filter: saturate(1.05);
    }

    .pow-reference-section.pow-products
        .pow-program-card:hover
        .pow-program-content i {
        transform: translateX(5px);
    }
}

.pow-reference-section.pow-products .pow-program-card:focus {
    outline: none;
}

.pow-reference-section.pow-products .pow-program-card:focus-visible {
    outline: 3px solid var(--pow-blue, #2f75c1);
    outline-offset: 4px;

    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(20, 34, 46, 0.20);
}

.pow-reference-section.pow-products
    .pow-program-card:focus-visible::before {
    transform: scale(1.035);
}

.pow-reference-section.pow-products
    .pow-program-card:focus-visible
    .pow-program-content i {
    transform: translateX(5px);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

    .pow-reference-section.pow-products .pow-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pow-reference-section.pow-products .pow-program-card {
        min-height: 290px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .pow-reference-section.pow-products .pow-program-head {
        width: 100%;
        padding: 74px 24px 42px;
    }

    .pow-reference-section.pow-products .pow-program-head h2 {
        font-size: 43px;
    }

    .pow-reference-section.pow-products
        .pow-program-head > p:last-child {
        font-size: 16px;
    }

    .pow-reference-section.pow-products .pow-product-grid {
        grid-template-columns: 1fr;
        gap: 16px;

        width: 100%;
        padding: 0 20px 78px;
    }

    .pow-reference-section.pow-products .pow-program-card {
        min-height: 252px;
    }

    .pow-reference-section.pow-products .pow-program-meta {
        top: 27px;
        left: 22px;
        max-width: calc(100% - 44px);
    }

    .pow-reference-section.pow-products .pow-program-content {
        right: 22px;
        bottom: 20px;
        left: 22px;
    }

    .pow-reference-section.pow-products .pow-program-content strong {
        font-size: 24px;
    }

    .pow-reference-section.pow-products .pow-program-content small {
        font-size: 14px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .pow-reference-section.pow-products .pow-program-card,
    .pow-reference-section.pow-products .pow-program-card::before,
    .pow-reference-section.pow-products .pow-program-content i {
        transition: none !important;
    }

    .pow-reference-section.pow-products .pow-program-card:hover,
    .pow-reference-section.pow-products .pow-program-card:focus-visible,
    .pow-reference-section.pow-products .pow-program-card:hover::before,
    .pow-reference-section.pow-products
        .pow-program-card:focus-visible::before,
    .pow-reference-section.pow-products
        .pow-program-card:hover
        .pow-program-content i,
    .pow-reference-section.pow-products
        .pow-program-card:focus-visible
        .pow-program-content i {
        transform: none;
    }
}