/* =========================================================
   MAIN PROPERTIES
   Подбор перчаток по защитным свойствам
   ========================================================= */

/* ---------- Section ---------- */

.basic-protective-properties {
    margin-top: 6rem;
}

.first-protective-row {
    justify-content: center;
}


/* ---------- Section heading ---------- */

.basic-protective-header {
    margin-bottom: 2rem;
    text-align: start;
}

.basic-protective-header h2 {
    padding-top: 2rem;
}


/* ---------- Bootstrap columns ---------- */

.col-protective {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}


/* ---------- Card ---------- */

.card-protective {
    position: relative;
    width: 100%;
    overflow: hidden;

    border: 2px solid var(--color-accent);
    background-color: var(--color-accent);
    color: #fff;

    transition:
        border-color 0.5s cubic-bezier(.4, 0, .2, 1),
        color 0.3s cubic-bezier(.4, 0, .2, 1);

    z-index: 1;
}


/* ---------- Whole card link ---------- */

.card-protective>a {
    display: flex;
    flex-direction: column;
    height: 100%;

    color: inherit;
    text-decoration: none;
}

.card-protective>a:hover {
    color: inherit;
    text-decoration: none;
}


/* ---------- Card heading area ---------- */

.card-body-protective {
    display: flex;
    align-items: center;

    /*
     * Единая высота заголовочной области.
     * Длинное "Маслобензостойкие" может переноситься,
     * но изображения всех карточек начинаются на одной линии.
     */
    min-height: 4.75rem;

    padding: 1rem;

    flex: 0 0 auto;
}

.card-title-protective {
    margin: 0;

    color: #fff;

    font-size: clamp(1rem, 1.35vw, 1.25rem);
    font-weight: 600;
    line-height: 1.25;
}


/* ---------- Card image ---------- */

.card-protective .card-img-bottom {
    display: block;

    width: 100%;
    height: auto;

    /*
     * Все исходники отображаются в единой области 3:2.
     * Исходные пропорции изображений могут быть разными.
     */
    aspect-ratio: 3 / 2;

    object-fit: cover;
    object-position: center;
}


/* ---------- Animated background ---------- */

.card-protective::before {
    content: "";

    position: absolute;
    inset: 0;

    background-color: var(--color-brand);

    transform: scaleX(0);
    transform-origin: left center;

    transition:
        transform 0.5s cubic-bezier(.4, 0, .2, 1);

    z-index: 0;
}


/*
 * Содержимое карточки располагается поверх
 * анимированного ::before.
 */
.card-protective>* {
    position: relative;
    z-index: 1;
}


/* ---------- Hover ---------- */

@media (hover: hover) and (pointer: fine) {

    .card-protective:hover::before {
        transform: scaleX(1);
    }

    .card-protective:hover {
        border-color: var(--color-brand);
        color: #fff;
    }
}


/* ---------- Keyboard focus ---------- */

.card-protective>a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: -5px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet / mobile */
@media (max-width: 767px) {

    .basic-protective-header {
        text-align: center;
    }

    .card-body-protective {
        min-height: 4.5rem;
    }
}


/* Phones */
@media (max-width: 575px) {

    .card-body-protective {
        min-height: 4.25rem;
    }

    .card-title-protective {
        font-size: 1rem;
    }
}


/* Narrow phones */
@media (max-width: 430px) {

    .col-protective {
        width: 90%;
    }
}


/* Very narrow phones */
@media (max-width: 320px) {

    .basic-protective-properties .container {
        padding-right: 0;
        padding-left: 0;
    }
}


/* Very low landscape screens */
@media (max-width: 570px) and (max-height: 320px) {

    .card-protective {
        width: 53%;
    }
}