/*
Theme Name: Webwork Child
Theme URI: https://webwork-tracker.com/
Author: Webwork Tracker
Author URI: https://webwork-tracker.com/
Description:  Child theme, based on Webwork
Template: webwork

*/
@media only screen and (max-width: 768px) {
    .featured-image .epcl-loader {
        display: none;
    }

    .featured-image {
        max-height: 200px;
        overflow: hidden;
    }

    .featured-image img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .author-image {
        display: none !important;
    }

    .content {
        margin-top: 10px !important;
    }
}

img[src="https://www.webwork-tracker.com/blog/wp-content/themes/webwork/assets/images/svg-icons.svg"] {
    display: none !important;
}

.linguise_switcher_wrapper {
    display: none !important;
}

.footerIcons img {
    box-shadow: none !important
}

@media (min-width: 768px) {
    #footer #back-to-top.visible {
        right: 40px !important;
        bottom: 67px !important;
    }
}

/* Copy Link button — minimal icon-only style */
.permalink .copy.epcl-button {
    background: transparent !important;
    border: 1.5px solid #d8d8e8 !important;
    border-radius: 8px !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    width: 40px !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, background 0.2s ease !important;
    cursor: pointer !important;
}
.permalink .copy.epcl-button::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236449e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E") center / contain no-repeat;
    transition: opacity 0.2s ease;
}
.permalink .copy.epcl-button:hover {
    background: rgba(100, 73, 229, 0.06) !important;
    border-color: #6449e5 !important;
}

/* Related articles "View All Articles" button — secondary-bk-btn style */
section.related a.epcl-button:not([style*="display:none"]) {
    background: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    color: #2b2640 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    padding: 10px 22px !important;
    position: relative !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
}
section.related a.epcl-button::before {
    background: linear-gradient(90deg, #ff408f, #6449e5, #0fc7ff);
    border-radius: inherit;
    content: "";
    inset: -1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    pointer-events: none;
    position: absolute;
}
#single section.related a.epcl-button.ctag:hover,
section.related a.epcl-button:hover {
    background: #f5f5ff !important;
    color: #2b2640 !important;
}

/* Popular categories "Explore All" button — secondary-bk-btn style */
.epcl-popular-categories .right .epcl-button,
.epcl-popular-categories .right a.epcl-button {
    background: #fff !important;
    border: none !important;
    border-radius: 30px !important;
    color: #2b2640 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    padding: 10px 22px !important;
    position: relative !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
    display: inline-block !important;
}
.epcl-popular-categories .right .epcl-button::before,
.epcl-popular-categories .right a.epcl-button::before {
    background: linear-gradient(90deg, #ff408f, #6449e5, #0fc7ff);
    border-radius: inherit;
    content: "";
    inset: -1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    pointer-events: none;
    position: absolute;
}
.epcl-popular-categories .right .epcl-button:hover,
.epcl-popular-categories .right a.epcl-button:hover {
    background: #f5f5ff !important;
    color: #2b2640 !important;
}

/* Header signup button — gradient style matching main site primary-colorful-btn */
#header .subscribe-button,
#header a.subscribe-button {
    background: linear-gradient(94deg, #5a5afa 22.53%, #f425f4 98.96%) !important;
    border: none !important;
    border-radius: 28px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    padding: 8px 20px !important;
    box-shadow:
        6px  4px 20px 0 rgba(224, 44, 245, .15),
       -7px  0   20px 0 rgba(117, 90, 250, .25),
        3px  4px 20px 0 rgba(224, 44, 245, .10),
        5px -6px 20px 0 rgba(117, 90, 250, .15) !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
}
#header .subscribe-button:hover,
#header a.subscribe-button:hover {
    background: linear-gradient(94deg, #5436ff 34.99%, #f425f4 94.26%) !important;
    color: #fff !important;
    box-shadow:
        6px  4px 20px 0 rgba(224, 44, 245, .30),
       -7px  0   20px 0 rgba(117, 90, 250, .40),
        3px  4px 20px 0 rgba(224, 44, 245, .20),
        5px -6px 20px 0 rgba(117, 90, 250, .30) !important;
}


@media (max-width: 768px) {
    .weglot-default {
        display: none;
    }

    .content svg.icon {
        display: none;
    }

    .linguise_switcher {
        position: static !important;
        margin: 0 auto;
        display: block;
        width: fit-content;
    }

    .hero-image {
        display: none !important;
    }
}

.wwai-disclaimer {
    margin-top: 36px;
    padding: 20px 24px;
    border-left: 4px solid #8c8f94;
    background: #f6f7f7;
    font-size: 13px;
    line-height: 1.7;
    color: #50575e;
    border-radius: 0 4px 4px 0;
}

.wwai-disclaimer__title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3338;
    margin: 0 0 8px;
}

.wwai-disclaimer p {
    margin: 0 0 8px;
}

.wwai-disclaimer p:last-child {
    margin-bottom: 0;
}

.wwai-disclaimer a {
    color: #2271b1;
    text-decoration: underline;
}

.wwai-disclaimer a:hover {
    color: #135e96;
}

/* Post content links: keep same color on hover, add underline (override parent's black hover) */
div.text a:not([class]):hover,
div.text a:not([class]):hover strong,
#single .bottom-tags a:hover {
    color: var(--epcl-main-color) !important;
    text-decoration: underline;
}

/* Sidebar Categories / Topics Index: hide numbers, individual left border per item */
#sidebar .widget_epcl_topics_index .toggle-title .epcl-number {
    display: none;
}

#sidebar .widget_epcl_topics_index .post-list li .fw-semibold {
    display: none;
}

#sidebar .widget_epcl_topics_index .post-list {
    list-style: none;
    border-left: none !important;
    padding-left: 0;
    margin: 20px 0 0 0;
}

#sidebar .widget_epcl_topics_index .post-list li {
    border-left: 2px solid var(--epcl-border-color, #E9E8FF);
    padding-left: 10px;
    margin-bottom: 8px;
}

#sidebar .widget_epcl_topics_index .post-list li:last-child {
    margin-bottom: 0;
}

/* Footer: 4-column layout (social + 3 menu columns) */
#footer .widgets .widget {
    width: 25%;
}
#footer .widgets .widget:nth-child(3n) {
    width: 25%;
    padding-right: 60px;
}
#footer .widgets .widget:nth-child(4n) {
    padding-right: 0;
}

/* Mobile footer: single column, no decoration */
#footer .mobile-sidebar .widget {
    width: 100%;
    padding-right: 0;
}
#footer .mobile-sidebar .widget-title .decoration {
    display: none;
}

/* content-visibility: defer rendering of below-fold sections until they are
   near the viewport. contain-intrinsic-size gives the browser a size estimate
   so the scrollbar height stays stable before the content renders. */
#footer .widgets {
    content-visibility: auto;
    contain-intrinsic-size: 0 220px;
}

#epcl-related-stories {
    content-visibility: auto;
    contain-intrinsic-size: 0 480px;
}

section.siblings {
    content-visibility: auto;
    contain-intrinsic-size: 0 160px;
}

/* Siblings prev/next: remove separator gap, sit close together */
#single section.siblings article {
    flex: 1;
    width: auto;
    min-width: 0;
}

#single section.siblings article.prev {
    margin-right: 4px;
}

#single section.siblings article.next {
    margin-left: 4px;
}

/* Blog homepage intro — gradient-border CTA buttons */
.ww-intro-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.ww-intro-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    line-height: 24px;
    padding: 12px 24px;
    position: relative;
    text-decoration: none !important;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    width: fit-content;
}

/* Dark primary — matches homepage primary-bk-btn */
.ww-intro-btn--primary {
    background: #0e0a25;
    color: #fff !important;
    box-shadow:
        5px -6px 20px 0 rgba(117, 90, 250, .15),
        0   8px 20px 0 rgba(117, 90, 250, .15),
       -8px  0  20px 0 rgba(255,  64, 143, .30),
        10px 0  20px 0 rgba( 15, 199, 255, .20);
}

.ww-intro-btn--primary::before {
    background: linear-gradient(90deg, #f425f4, #0fc7ff);
    border-radius: inherit;
    content: "";
    position: absolute;
    inset: -1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 2px;
    pointer-events: none;
}

.ww-intro-btn--primary:hover {
    color: #fff !important;
    box-shadow:
        5px -6px 20px 0 rgba(117, 90, 250, .4),
        0   8px 20px 0 rgba(117, 90, 250, .4),
       -8px  0  20px 0 rgba(255,  64, 143, .5),
        10px 0  20px 0 rgba( 15, 199, 255, .4);
}

/* White secondary — matches homepage secondary-bk-btn */
.ww-intro-btn--secondary {
    background: #fff;
    color: #2b2640 !important;
}

.ww-intro-btn--secondary::before {
    background: linear-gradient(90deg, #ff408f, #6449e5, #0fc7ff);
    border-radius: inherit;
    content: "";
    position: absolute;
    inset: -1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    padding: 1px;
    pointer-events: none;
}

.ww-intro-btn--secondary:hover {
    background: #f5f5ff;
    color: #2b2640 !important;
}

@media (max-width: 768px) {
    /* Homepage intro: hide demo, show signup full-width */
    .ww-intro-btns .ww-intro-btn--secondary {
        display: none;
    }
    .ww-intro-btns .ww-intro-btn--primary {
        width: 100%;
        justify-content: center;
    }

    /* Footer CTA: hide signup, show demo full-width */
    .ww-footer-cta-btns .ww-intro-btn--primary {
        display: none;
    }
    .ww-footer-cta-btns .ww-intro-btn--secondary {
        display: flex;
        width: 100%;
        justify-content: center;
    }
}

/* Sidebar CTA */
.ww-sidebar-cta {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--epcl-large-shadow);
}

.ww-sidebar-cta__inner {
    position: relative;
    padding: 28px 20px 24px;
    text-align: center;
    background: linear-gradient(45deg, #6449e5 31.44%, #9666d6 60.18%, #6782cd 81.52%, #0acee5 93.59%);
    border-radius: 14px;
    overflow: hidden;
}

.ww-sidebar-cta__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/rectangle-bg.webp') 50% / cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

.ww-sidebar-cta__title {
    position: relative;
    font-family: var(--epcl-title-font-family, sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.35;
    z-index: 1;
}

.ww-sidebar-cta__desc {
    position: relative;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 20px;
    line-height: 1.6;
    z-index: 1;
}

.ww-sidebar-cta__buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1;
}

.ww-sidebar-cta__btn {
    display: flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    height: 54px;
    background: #fff;
    border: 2px solid hsla(0, 0%, 100%, 0.2);
    color: #2b2640 !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 14px;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
    line-height: 1;
    z-index: 10;
}

.ww-sidebar-cta__btn:hover {
    background: #fff !important;
    color: #2b2640 !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

.ww-sidebar-cta__btn .black_text {
    color: #2b2640 !important;
}

.ww-sidebar-cta__btn img {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    object-fit: contain;
}

/* Mid-content CTA (between prev/next and related articles) */
.ww-mid-cta {
    margin: 40px 0 10px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(100, 73, 229, 0.25);
}

.ww-mid-cta__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 36px 40px;
    background: linear-gradient(45deg, #6449e5 31.44%, #9666d6 60.18%, #6782cd 81.52%, #0acee5 93.59%);
    border-radius: 20px;
    overflow: hidden;
}

.ww-mid-cta__inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/rectangle-bg.webp') 50% / cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

.ww-mid-cta__text {
    position: relative;
    flex: 1;
    min-width: 0;
    z-index: 1;
}

.ww-mid-cta__text .ww-mid-cta__title {
    font-family: var(--epcl-title-font-family, sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 8px !important;
    line-height: 1.3;
}

.ww-mid-cta__text .ww-mid-cta__desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.88) !important;
    margin: 0 !important;
    line-height: 1.6;
}

.ww-mid-cta__buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    z-index: 1;
}

.ww-mid-cta__btn {
    display: flex;
    align-items: center;
    align-self: stretch;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    height: 54px;
    min-width: 170px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
    line-height: 1;
    background: #fff;
    border: 2px solid hsla(0, 0%, 100%, 0.2);
    color: #2b2640 !important;
    z-index: 10;
}

.ww-mid-cta__btn:hover {
    background: #fff !important;
    color: #2b2640 !important;
    transform: translateY(-2px);
    text-decoration: none !important;
}

.ww-mid-cta__btn .black_text {
    color: #2b2640 !important;
}

.ww-mid-cta__btn img {
    width: 31px;
    height: 31px;
    flex-shrink: 0;
    object-fit: contain;
}

@media (max-width: 900px) {
    .ww-mid-cta__inner {
        flex-direction: column;
        text-align: center;
        padding: 32px 28px;
        gap: 24px;
    }

    .ww-mid-cta__buttons {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }

    .ww-mid-cta__btn {
        flex: 1;
        max-width: 200px;
    }
}

@media (max-width: 600px) {
    .ww-mid-cta__inner {
        padding: 28px 20px;
    }

    .ww-mid-cta__buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .ww-mid-cta__btn {
        max-width: 100%;
    }
}