/*----------------------------------------*/
/*  RESOURCES (page-resources.php) — also  */
/*  Product landing (page-productlanding)  */
/*  No Figma frame. Photo head, then one   */
/*  white card per top category: its      */
/*  sub-categories open (global.js         */
/*  `.resources-item.active`) onto the     */
/*  series links, which reload with        */
/*  ?current= and open #resources-popup    */
/*  with the files (custom.js). Below      */
/*  1200px the cards fold on their title.  */
/*  Replaces the RESOURSES SECTION and     */
/*  RESOUSES BANNER & PAGE blocks in       */
/*  style.css.                             */
/*----------------------------------------*/

body:is(.page-template-page-resources, .page-template-page-productlanding) .block-entry > .container {
    max-width: calc(var(--in-wide) + var(--rd-gutter) * 2);
    width: 100%;
    padding: 0 var(--rd-gutter);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .block-entry .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    margin: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .block-entry .row > [class*="col-"] {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}


/*--------------------*/
/* - CATEGORY CARDS   */
/*--------------------*/
body:is(.page-template-page-resources, .page-template-page-productlanding) .resourses-sec {
    padding: 20px 0 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: start;
    gap: 16px;
    max-width: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page > .megamenu-column {
    display: block;
    width: auto;
    margin: 0;
    padding: 24px;
    background-color: var(--rd-white);
    border-radius: var(--rd-radius);
}

/* productCat() closes on an empty column */
body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page > .megamenu-column:empty {
    display: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-title {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 12px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--rd-line-on-light);
    border-radius: 0;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rd-txt-on-light);
    cursor: default;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-title::before {
    content: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-title i {
    display: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-toggle {
    position: static;
    display: block;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-toggle-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* sub-category */
body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item {
    position: relative;
    margin: 0;
    border-radius: var(--rd-radius);
    transition: background-color var(--rd-transition);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item::before {
    content: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item.active {
    margin: 0;
    background-color: var(--rd-surface);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-title {
    position: relative;
    display: block;
    padding: 12px 40px 12px 12px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rd-txt-on-light);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item.active .resources-title {
    font-weight: 500;
}

/* line chevron */
body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-title::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    opacity: .6;
    transform: translateY(-75%) rotate(45deg);
    transition: transform var(--rd-transition), opacity var(--rd-transition);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item.active .resources-title::before {
    top: 50%;
    opacity: 1;
    transform: translateY(-25%) rotate(-135deg);
}

/* series links — closed until global.js slides them open (the item for
   ?current= is printed open inline) */
body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-drop-down {
    display: none;
    padding: 0 12px 12px;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-drop-down a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 0;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rd-txt-on-light-muted);
    transition: color var(--rd-transition);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-drop-down a::before {
    content: '';
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--rd-accent);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-drop-down a.act {
    font-weight: 500;
    color: var(--rd-txt-on-light);
}

@media (min-width: 1200px) {
    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item:not(.active):hover {
        background-color: var(--rd-surface);
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-item .resources-drop-down a:hover {
        color: var(--rd-txt-on-light);
    }
}


/*--------------------*/
/* - CONTACT CTA      */
/*--------------------*/
body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec {
    padding: clamp(40px, 3.1vw, 60px) 0 var(--in-section);
    text-align: left;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec .row > [class*="col-"] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px;
    background-color: var(--rd-white);
    border-radius: var(--rd-radius);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec .rd-heading {
    margin: 0;
    font-size: clamp(26px, 1.8vw, 34px);
}


/*--------------------*/
/* - FILES POPUP      */
/*--------------------*/
body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-container {
    max-width: none;
    padding: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .row {
    display: flex;
    flex-wrap: nowrap;
    gap: 40px;
    margin: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .row > [class*="col-"] {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    padding: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .row > .col-lg-4 {
    flex: 0 0 300px;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resourses-info .title-main {
    margin: 0 60px 30px 0;
    font-size: clamp(30px, 2.2vw, 42px);
    line-height: 1.16;
    font-weight: 300;
    letter-spacing: 0;
    color: var(--rd-txt-on-light);
    text-transform: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resourses-info .title-main .title {
    display: block;
    margin-top: 10px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 400;
    color: var(--rd-txt-on-light-muted);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .empty-space {
    display: none;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resourses-info {
    display: flex;
    flex-direction: column;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 8px;
    padding: 14px 16px;
    background-color: var(--rd-surface);
    border-radius: var(--rd-radius);
    transition: background-color var(--rd-transition);
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry .icon,
body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry > img {
    width: 28px;
    height: auto;
    margin: 0;
    flex-shrink: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry .btn-link {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
    color: var(--rd-txt-on-light);
    overflow-wrap: anywhere;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry .btn-link::before {
    content: none;
}

/* the whole row is the hit area */
body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry .btn-link::after {
    content: '';
    position: absolute;
    inset: 0;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry {
    position: relative;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resourses-img {
    max-width: none;
    padding-bottom: 100%;
    background-color: var(--rd-surface);
    border-radius: var(--rd-radius);
    overflow: hidden;
}

body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resourses-img img {
    padding: 20px;
}

@media (min-width: 1200px) {
    body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry:hover {
        background-color: #E8E8E8;
    }
}


/*--------------------*/
/* - TABLET (<1200px) */
/*--------------------*/
@media (max-width: 1199px) {
    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page > .megamenu-column {
        padding: 0;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-title {
        margin: 0;
        padding: 20px 48px 20px 20px;
        border-bottom: 0;
        cursor: pointer;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-title::after {
        content: '';
        position: absolute;
        top: 50%;
        right: 22px;
        width: 9px;
        height: 9px;
        border: solid var(--rd-txt-on-light);
        border-width: 0 1.5px 1.5px 0;
        transform: translateY(-75%) rotate(45deg);
        transition: transform var(--rd-transition);
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-column.active .megamenu-title::after {
        transform: translateY(-25%) rotate(-135deg);
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page .megamenu-toggle {
        display: none;
        padding: 0 8px 12px;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .row {
        flex-direction: column-reverse;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .row > .col-lg-4 {
        flex-basis: auto;
        width: 200px;
    }
}


/*--------------------*/
/* - PHONE (<768px)   */
/*--------------------*/
@media (max-width: 767px) {
    body:is(.page-template-page-resources, .page-template-page-productlanding) .resourses-sec {
        padding-top: 15px;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .resources-page {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec {
        padding-bottom: 60px;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec .row > [class*="col-"] {
        padding: 20px;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) .simple-sec .btn {
        width: 100%;
    }

    body:is(.page-template-page-resources, .page-template-page-productlanding) #resources-popup .resources-link-entry .btn-link {
        font-size: 14px;
    }
}


/*--------------------*/
/* - PRODUCT LANDING  */
/*--------------------*/
body.page-template-page-productlanding .header-empty-space,
body.page-template-page-productlanding .footer-empty-space {
    display: none;
}

body.page-template-page-productlanding .productlanding-head {
    padding: clamp(60px, 5.2vw, 100px) 0 clamp(30px, 2.1vw, 40px);
}

body.page-template-page-productlanding .resourses-sec {
    padding-bottom: var(--in-section);
}
