/* ============================================================
   DSGO OVERRIDE: Prevent GoDaddy Site Designer from injecting
   --dsgo-text-color cascade into query loop sections
   ============================================================ */



/* ============================================================
   SHARED: Clickable cards, equal height, button at bottom
   ============================================================ */

/* Make each post list item a flex column so cards stretch */
.our-resources .wp-block-post-template,
.latest-news .wp-block-post-template {
    align-items: stretch !important;
}

.our-resources .wp-block-post-template > li,
.latest-news .wp-block-post-template > li {
    display: flex;
    flex-direction: column;
}

/* The inner card group fills the li and pushes button to bottom */
.our-resources .wp-block-post > .wp-block-group,
.latest-news .wp-block-post > .wp-block-group {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

.our-resources .wp-block-post > .wp-block-group:hover,
.latest-news .wp-block-post > .wp-block-group:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

/* Invisible overlay link to make the whole card clickable */
.our-resources .wp-block-post > .wp-block-group .card-click-overlay,
.latest-news .wp-block-post > .wp-block-group .card-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* Keep interactive elements above the overlay */
.our-resources .wp-block-post > .wp-block-group a,
.our-resources .wp-block-post > .wp-block-group button,
.latest-news .wp-block-post > .wp-block-group a,
.latest-news .wp-block-post > .wp-block-group button {
    position: relative;
    z-index: 2;
}

/* ============================================================
   RESOURCES: "View All Resources" link with chevron
   ============================================================ */

.our-resources .wp-block-group:first-child a:not(.wp-block-read-more):not(.card-click-overlay) {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.our-resources .wp-block-group:first-child a:not(.wp-block-read-more):not(.card-click-overlay):hover {
    gap: 8px;
}

/* Replace ">" with a chevron — keep link text visible, append chevron after */
.our-resources .wp-block-group:first-child a:not(.wp-block-read-more):not(.card-click-overlay)::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.our-resources .wp-block-group:first-child a:not(.wp-block-read-more):not(.card-click-overlay):hover::after {
    transform: translateX(4px);
}

/* ============================================================
   RESOURCES: forced 4 columns, tighter gap, VIEW button
   ============================================================ */

.our-resources .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

/* VIEW read-more as a centered gradient button */
.our-resources .wp-block-read-more {
    display: block !important;
    text-align: center;
    padding: 10px 24px;
    background: linear-gradient(180deg, rgb(12, 35, 64) 0%, rgb(8, 24, 45) 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 6px;
    margin-top: auto;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
    min-width: 100px;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.our-resources .wp-block-read-more:hover {
    opacity: 0.85;
    filter: brightness(1.1);
}

.our-resources .wp-block-read-more .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ============================================================
   NEWS: 3 columns, tighter gap, chevron, unlinked category,
         divider + bottom row pinned to bottom
   ============================================================ */

.latest-news .wp-block-post-template {
    gap: 16px !important;
}

/* Pin the separator and the date/chevron row to the bottom of the card */
.latest-news .wp-block-post > .wp-block-group .wp-block-separator {
    margin-top: auto;
    margin-bottom: 0;
}

/* The flex row (date + chevron) sits right after the separator, full width */
.latest-news .wp-block-post > .wp-block-group .wp-block-group:last-child {
    margin-top: 0;
    width: 100% !important;
    align-self: stretch;
}

/* Replace ">" arrow with a right-pointing chevron SVG */
.latest-news .wp-block-read-more {
    font-size: 0;
    display: inline-flex !important;
    align-items: center;
    text-decoration: none !important;
    transition: transform 0.2s ease;
}

/* Animate chevron on card hover by targeting the read-more inside a hovered card */
.latest-news .wp-block-post > .wp-block-group:hover .wp-block-read-more {
    transform: translateX(4px);
}

.latest-news .wp-block-read-more::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    flex-shrink: 0;
}

.latest-news .wp-block-read-more .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* Category tag: not linked/underlined, plain text */
.latest-news .taxonomy-category a {
    pointer-events: none;
    text-decoration: none !important;
    color: inherit !important;
}

.latest-news .taxonomy-category a:hover {
    text-decoration: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .our-resources .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .latest-news .wp-block-post-template.columns-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .our-resources .wp-block-post-template,
    .latest-news .wp-block-post-template.columns-3 {
        grid-template-columns: 1fr !important;
    }
}
