/* ==========================================================================
   Doc4Energy Child Theme – Custom Styles
   ========================================================================== */

/* --- Navigation: Active ancestor highlight --- */
.current-menu-ancestor {
    font-weight: bold !important;
}

/* --- Blog Cards: Hover effects --- */
.wp-block-query .wp-block-group.has-base-2-background-color {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-query .wp-block-group.has-base-2-background-color:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* --- Blog Cards: Image hover --- */
.wp-block-query .wp-block-post-featured-image img {
    transition: transform 0.3s ease;
}

.wp-block-query .wp-block-post-featured-image:hover img {
    transform: scale(1.03);
}

.wp-block-query .wp-block-post-featured-image {
    overflow: hidden;
}

/* --- Read More Link --- */
.wp-block-read-more {
    transition: opacity 0.2s ease;
}

.wp-block-read-more:hover {
    opacity: 0.75;
}

/* --- Pagination --- */
.wp-block-query-pagination-numbers .page-numbers {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.wp-block-query-pagination-numbers .page-numbers.current {
    background-color: var(--wp--preset--color--accent, #c0392b);
    color: #fff;
}

.wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
    background-color: var(--wp--preset--color--accent-4, #ecf0f1);
}

/* --- Sticky Contact Buttons --- */
.d4e-sticky-contact {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    z-index: 9999;
}

.d4e-sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.d4e-phone {
    background-color: #d65f00;
    border-radius: 4px 0 0 0;
}

.d4e-phone:hover {
    background-color: #b85200;
    width: 60px;
    color: #ffffff;
}

.d4e-email {
    background-color: #d65f00;
    border-radius: 0 0 0 4px;
}

.d4e-email:hover {
    background-color: #b85200;
    width: 60px;
    color: #ffffff;
}

.d4e-sticky-btn svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .d4e-sticky-btn {
        width: 44px;
        height: 44px;
    }

    .d4e-sticky-btn svg {
        width: 20px;
        height: 20px;
    }

    .d4e-sticky-btn:hover {
        width: 44px;
    }

    /* Blog grid: 1 column on mobile */
    .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Blog grid: 2 columns on tablet */
    .wp-block-query .wp-block-post-template.is-layout-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
