/* =============================================
   RESOURCES PAGE — resources.css
   Dark + gold theme palette
   ============================================= */

body {
    background: var(--phx-bg-900) !important;
}

/* =============================================
   HERO
   ============================================= */
section.resources_hero {
    background: var(--phx-bg-900);
    padding-bottom: 0 !important;

    .program_label {
        display: inline-block;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: #c59b32;
        margin-bottom: 12px;
        padding: 6px 14px;
        border: 1px solid rgba(197, 155, 50, 0.3);
        border-radius: 4px;
        -webkit-border-radius: 4px;
        background: rgba(197, 155, 50, 0.06);
    }

    h1 {
        font-family: 'Gilroy', sans-serif;
        font-weight: 800;
        font-size: clamp(1.8rem, 3vw, 2.6rem);
        color: var(--phx-text-primary) !important;
        line-height: 1.1;
        margin-bottom: 10px;
    }

    p {
        color: var(--phx-text-muted);
        font-size: 0.95rem;
        margin: 0;
    }
}

/* =============================================
   MAIN SECTION
   ============================================= */
section.resources_main {
    background: var(--phx-bg-900);
    padding-top: 40px !important;
}

/* =============================================
   POST CARD
   ============================================= */
.post_card {
    height: 100%;

    .post_card_link {
        display: flex;
        flex-direction: column;
        height: 100%;
        text-decoration: none;
        color: inherit;
        width: 100%;
    }
}

.post_card_image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    -webkit-border-radius: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.06);

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease;
    }

    .post_card_link:hover & img {
        transform: scale(1.05);
    }

    .post_card_placeholder {
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(197, 155, 50, 0.08), rgba(197, 155, 50, 0.04));
    }
}

.post_card_content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.post_card_cat {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #c59b32;
    font-family: 'Instrument Sans', sans-serif;
}

.post_card_title {
    font-family: 'Gilroy', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--phx-text-primary);
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;

    .post_card_link:hover & {
        color: #c59b32;
    }
}

.post_card_excerpt {
    color: var(--phx-text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    margin: 0;
    flex: 1;
    font-family: 'Instrument Sans', sans-serif;
}

.post_card_read {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--phx-text-primary);
    font-family: 'Gilroy', sans-serif;
    margin-top: 4px;
    padding-bottom: 2px;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.45);
    width: fit-content;
    transition: color 0.3s ease, border-color 0.3s ease;

    .post_card_link:hover & {
        color: #c59b32;
        border-color: #c59b32;
    }
}

/* =============================================
   PAGINATION
   ============================================= */
.resources_pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        border-radius: 6px;
        -webkit-border-radius: 6px;
        font-size: 0.88rem;
        font-weight: 600;
        font-family: 'Gilroy', sans-serif;
        text-decoration: none;
        border: 1px solid rgba(255, 255, 255, 0.16);
        color: var(--phx-text-soft);
        background: var(--phx-surface-700);
        transition: all 0.3s ease;

        &:hover {
            border-color: rgba(197, 155, 50, 0.5);
            color: #c59b32;
            background: rgba(197, 155, 50, 0.06);
        }

        &.current {
            background: #c59b32;
            border-color: #c59b32;
            color: #000000;
        }

        &.dots {
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.35);
            cursor: default;
            &:hover { background: transparent; border: none; color: rgba(255, 255, 255, 0.35); }
        }
    }
}

/* No posts */
.no_posts {
    padding: 60px 0;
    text-align: center;

    p {
        color: var(--phx-text-soft);
        margin-bottom: 20px;
    }

    a {
        display: inline-block;
        padding: 12px 28px;
        background: #c59b32;
        color: #000;
        font-weight: 700;
        border-radius: 8px;
        -webkit-border-radius: 8px;
        text-decoration: none;
        transition: background-color 0.3s ease;
        width: auto;

        &:hover { background-color: #a07820; }
    }
}

/* =============================================
   SIDEBAR
   ============================================= */
.resources_sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;

    @media (max-width: 991px) {
        position: static;
        margin-top: 40px;
    }
}

.sidebar_widget {
    border-radius: 12px;
    -webkit-border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(var(--phx-gold-500-rgb), 0.18);
}

/* Subscribe widget */
.sidebar_subscribe {
    border: none;

    .subscribe_bg_wrap {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        -webkit-border-radius: 12px;

        img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            min-height: 180px;
        }

        .subscribe_overlay {
            position: absolute;
            inset: 0;
            background: rgba(10, 10, 10, 0.72);
        }

        .subscribe_inner {
            position: relative;
            z-index: 1;
            padding: 24px 20px 20px;

            .subscribe_heading {
                font-family: 'Gilroy', sans-serif;
                font-weight: 700;
                font-size: 0.95rem;
                color: #ffffff;
                margin-bottom: 16px;
                line-height: 1.4;
            }

            /* CF7 subscribe form */
            .wpcf7-form {
                display: flex;
                flex-direction: column;
                gap: 10px;

                p { display: contents; }

                .wpcf7-form-control-wrap {
                    display: block;
                    width: 100%;
                }

                input[type="email"] {
                    width: 100%;
                    padding: 12px 14px;
                    border-radius: 6px;
                    -webkit-border-radius: 6px;
                    border: 1px solid rgba(255, 255, 255, 0.15);
                    background: rgba(255, 255, 255, 0.1);
                    color: #ffffff;
                    font-size: 0.88rem;
                    font-family: 'Instrument Sans', sans-serif;
                    outline: none;
                    transition: border-color 0.3s ease;
                    -webkit-appearance: none;
                    appearance: none;

                    &::placeholder { color: rgba(255, 255, 255, 0.4); }
                    &:focus { border-color: rgba(197, 155, 50, 0.6); }
                }

                input[type="submit"] {
                    width: 100%;
                    padding: 13px;
                    border-radius: 6px;
                    -webkit-border-radius: 6px;
                    border: none;
                    background: #c59b32;
                    color: #000000;
                    font-weight: 700;
                    font-size: 0.9rem;
                    font-family: 'Gilroy', sans-serif;
                    cursor: pointer;
                    transition: background-color 0.3s ease;

                    &:hover { background-color: #a07820; }
                }

                .wpcf7-response-output {
                    color: rgba(255, 255, 255, 0.7) !important;
                    font-size: 0.78rem !important;
                    padding: 8px 12px !important;
                    margin: 4px 0 0 !important;
                    border-radius: 6px !important;
                    border: 1px solid rgba(255,255,255,0.15) !important;
                }

                .wpcf7-mail-sent-ok {
                    border-color: rgba(80,200,120,0.4) !important;
                    background: rgba(80,200,120,0.1) !important;
                    color: rgb(80,200,120) !important;
                }
            }
        }
    }
}

/* Recent posts widget */
.sidebar_recent {
    background: var(--phx-surface-700);
    padding: 0;

    .recent_post_item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        transition: background-color 0.2s ease;
        width: 100%;

        &:last-child { border-bottom: none; }

        &:hover { background: rgba(197, 155, 50, 0.05); }

        .rp_thumb {
            width: 52px;
            height: 52px;
            flex-shrink: 0;
            border-radius: 8px;
            -webkit-border-radius: 8px;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.08);

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                display: block;
            }

            .rp_thumb_placeholder {
                width: 100%;
                height: 100%;
                background: rgba(197, 155, 50, 0.08);
            }
        }

        .rp_info {
            flex: 1;
            min-width: 0;
        }

        .rp_cat {
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: #c59b32;
            margin-bottom: 4px;
            font-family: 'Instrument Sans', sans-serif;
        }

        .rp_title {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--phx-text-primary);
            line-height: 1.35;
            margin-bottom: 4px;
            font-family: 'Gilroy', sans-serif;
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            transition: color 0.2s ease;
        }

        &:hover .rp_title { color: #c59b32; }

        .rp_date {
            font-size: 0.72rem;
            color: var(--phx-text-soft);
            font-family: 'Instrument Sans', sans-serif;
        }
    }
}