/* Utilities */
.hide {
    display: none
}

/* Container */
.sectionsCardsContainer {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px
}

/* Header */
.sectionsCardsHeader {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--light-color);
    border-radius: 30px;
    padding: 32px 40px;
    margin-bottom: 24px;
}

.sectionsCardsHeaderTitle {
    font-size: 45px;
    line-height: 54px;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
}

.sectionsCardsHeaderSubtitle {
    font-size: var(--generic-font-two);
    line-height: 22px;
    opacity: .95;
}

/* Controls */
.sectionsCardsSearchRow {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.sectionsCardsSearchContainer {
    position: relative;
    flex: 1;
    max-width: 869px
}

.sectionsCardsSearchInput {
    width: 100%;
    height: 49px;
    border: 1px solid rgba(0, 0, 0, .45);
    border-radius: 65px;
    padding: 14px 80px 14px 28px;
    font-size: 13px;
    color: rgba(0, 0, 0, .60);
    background: var(--light-color-two);
    outline: none;
}

.sectionsCardsSearchInput::placeholder {
    color: rgba(0, 0, 0, .45)
}

.sectionsCardsSearchButton {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 39px;
    height: 37px;
    border-radius: 18.5px;
    background: var(--dark-color);
    display: block;
}

.sectionsCardsOrderContainer {
    position: relative
}

.sectionsCardsOrderToggle {
    display: inline-block;
    min-width: 200px;
    height: 47px;
    border: 1px solid rgba(0, 0, 0, .45);
    border-radius: 65px;
    padding: 14px 28px;
    font-size: 13px;
    color: rgba(0, 0, 0, .60);
    text-decoration: none;
    background: var(--light-color-two);
}

.sectionsCardsFilterButton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--dark-color);
    color: var(--light-color-two);
    border-radius: 45px;
    padding: 15px 33px;
    font-size: 13px;
    text-decoration: none;
    transition: background-color .25s ease;
}

.sectionsCardsFilterButton:hover {
    background: var(--dark-color-two)
}

.sectionsCardsFilterIcon {
    width: 16px;
    height: 14px;
    background: var(--light-color-two);
    display: inline-block
}

/* Grid */
.sectionsCardsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Card wrapper */
.sectionsCardsCard,
.sectionsCardsContactCard {
    position: relative;
    height: 437px;
    border-radius: 30px;
    overflow: hidden;
    background: var(--light-color-two);
    box-shadow: 0 0 14px rgba(0, 0, 0, .08);
}

/* Faces share same positioning */
.sectionsCardsCardFront,
.sectionsCardsCardBack {
    position: absolute;
    inset: 0;
    border-radius: 30px;
    overflow: hidden;
    will-change: opacity, transform;
    transition: opacity .35s ease, transform .35s ease;
}

/* Background image for back when provided via CSS var */
.sectionsCardsCardBack {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.sectionsCardsCardBackHasImage {
    background-image: var(--back-url);
    background-size: cover;
    background-position: center;
}

.sectionsCardsCardBackNoImage {
    background: var(--light-color);
}

/* Image */
.sectionsCardsCardImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Back content */
.sectionsCardsCardBackContent {
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* max-width: 85%; */
    height: 100%;
    justify-content: space-around;
}

.sectionsCardsCardTitle {
    font-size: 32px;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0
}

.sectionsCardsTitleDefaultFont {
    font-family: var(--font-family-primary), sans-serif
}

.sectionsCardsCardDescription {
    font-size: 14px;
    line-height: var(--generic-line-height-two)
}

.sectionsCardsReadMore,
.sectionsCardsContactCardContact{
    font-size: var(--generic-font-two);
    font-weight: 600;
    color: var(--main-color);
    text-decoration: none;
    background-color: var(--light-color-two);
    width: fit-content;
    padding: 10px 15px;
    border-radius: 45px;
    margin-top: auto;
}

.sectionsCardsReadMore:hover {
    text-decoration: underline
}

/* Plus (+) button for mobile */
.sectionsCardsPlusButton {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-color-two);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 19px;
    color: var(--dark-color);
    box-shadow: 0 0 14px rgba(0, 0, 0, .1);
    transition: transform .25s ease, background .25s ease, color .25s ease;
}

.sectionsCardsPlusButton:hover {
    transform: rotate(45deg);
    background: var(--dark-color);
    color: var(--light-color-two)
}

/* ---------------------------------------- */
/* ON / OFF visibility states (animated)    */
/* ---------------------------------------- */
/* We don’t use display:none so transitions can run. We gate clicks with pointer-events. */

.sectionsCardsCardFrontOn {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.sectionsCardsCardFrontOff {
    opacity: 0;
    transform: translateY(8px);
    visibility: hidden;
    pointer-events: none;
}

.sectionsCardsCardBackOn {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.sectionsCardsCardBackOff {
    opacity: 0;
    transform: translateY(-8px);
    visibility: hidden;
    pointer-events: none;
}

#sectionCardsButton {
    display: none;
    background-color: var(--dark-color-two);
    width: 300px;
}

/* contact card DNA */

.sectionsCardsContactCard {
    background-image: url(/assets/sectioncards/view/files/contact_dna_back.png);
    height: 300px;
    padding: 30px;
}

.sectionsCardsContactCardContent{
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    gap: 14px;
}

.sectionsCardsContactCardTitle{
    font-size: 16px;
    font-weight: 600;
}

.sectionsCardsContactCardDescription{
    font-size: 14px;
    line-height: var(--generic-line-height-two);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    .sectionsCardsCardFront,
    .sectionsCardsCardBack {
        transition: none
    }
}

/* Hide + on desktop */
@media (hover:hover) {
    .sectionsCardsMobileOnly {}
}

/* No results */
.sectionsCardsNoResults {
    text-align: center;
    padding: 60px 20px;
    color: rgba(0, 0, 0, .55);
    font-size: 18px
}

/* Responsive */
@media (max-width:1200px) {
    .sectionsCardsGrid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px
    }
}

@media (max-width:768px) {
    .sectionsCardsContainer {
        padding: 15px
    }

    .sectionsCardsHeader {
        flex-direction: column;
        text-align: center;
        padding: 30px;
        gap: 20px
    }

    .sectionsCardsHeaderTitle {
        font-size: 32px;
        line-height: 38px;
        white-space: normal
    }

    .sectionsCardsGrid {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .sectionsCardsCard {
        height: 350px
    }

    .sectionsCardsCardBack {
        padding: 32px 28px
    }
}

@media (max-width:480px) {
    .sectionsCardsHeader {
        padding: 20px
    }

    .sectionsCardsHeaderTitle {
        font-size: 24px;
        line-height: 28px
    }

    .sectionsCardsCard {
        height: 300px
    }

    .sectionsCardsCardTitle {
        font-size: 20px
    }

    .sectionsCardsPlusButton {
        width: 45px;
        height: 45px;
        font-size: 28px;
        right: 15px;
        bottom: 15px
    }
}