/*
Theme Name: Twenty Twenty-Five Child
Template: twentytwentyfive
Description: Child theme of Twenty Twenty-Five
Version: 1.0.0
*/

/* Single post: gradient border + subtle background */
body.single-post main.wp-block-group > .wp-block-group.alignfull:first-child {
    position: relative;
    background: rgba(139, 92, 246, 0.03) !important;
    border-radius: 16px;
    margin-left: clamp(1rem, 5vw, calc(50% - 520px)) !important;
    margin-right: clamp(1rem, 5vw, calc(50% - 520px)) !important;
}

body.single-post main.wp-block-group > .wp-block-group.alignfull:first-child::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(
        135deg,
        #6366f1 0%,
        #8b5cf6 20%,
        #a855f7 40%,
        #06b6d4 60%,
        #3b82f6 80%,
        #6366f1 100%
    ) !important;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
}

/* Highlighter effect on hyperlinks inside blog post content */
body.single-post .wp-block-post-content a {
    text-decoration: none !important;
    position: relative;
    background: linear-gradient(104deg, rgba(255, 220, 100, 0) 0.9%, rgba(255, 220, 100, 1.25) 2.4%, rgba(255, 220, 100, 0.5) 5.8%, rgba(255, 220, 100, 0.1) 93%, rgba(255, 220, 100, 0.7) 96%, rgba(255, 220, 100, 0) 98%), linear-gradient(183deg, rgba(255, 220, 100, 0) 0%, rgba(255, 220, 100, 0.3) 7.9%, rgba(255, 220, 100, 0) 15%);
    padding: 0.1em 6px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    border-radius: 7.5px;
    text-shadow: -12px 12px 9.8px rgba(255, 220, 100, 0.7), 21px -18.1px 7.3px rgba(255, 255, 255, 1), -18.1px -27.3px 30px rgba(255, 255, 255, 1);
}

body.single-post .wp-block-post-content a::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    border-radius: 7.5px;
    background: linear-gradient(104deg, rgba(130, 255, 173, 0) 0.9%, rgba(130, 255, 173, 1.25) 2.4%, rgba(130, 255, 173, 0.5) 5.8%, rgba(130, 255, 173, 0.1) 93%, rgba(130, 255, 173, 0.7) 96%, rgba(130, 255, 173, 0) 98%), linear-gradient(183deg, rgba(130, 255, 173, 0) 0%, rgba(130, 255, 173, 0.3) 7.9%, rgba(130, 255, 173, 0) 15%);
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.4s ease;
    pointer-events: none;
}

body.single-post .wp-block-post-content a:hover::after {
    clip-path: inset(0 0 0 0);
}

body.single-post .wp-block-post-content a:hover {
    text-shadow: -12px 12px 9.8px rgba(130, 255, 173, 0.7), 21px -18.1px 7.3px rgba(255, 255, 255, 1), -18.1px -27.3px 30px rgba(255, 255, 255, 1);
}

/* Date icon on homepage blog list */
.date-icon-box {
    flex-shrink: 0;
    width: 54px;
    height: 58px;
    background: #fcfcfc;
    background: linear-gradient(to bottom, #fcfcfc 0%, #ececec 100%);
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: default;
    position: relative;
}

.date-icon-day {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    color: #444;
    padding-top: 2px;
}

.date-icon-month {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(to bottom, #c0392b 0%, #962d22 100%);
    width: 100%;
    text-align: center;
    padding: 3px 0;
    margin-top: auto;
}

/* Full date tooltip on hover */
.date-icon-box::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.date-icon-box:hover::after {
    opacity: 1;
}

/* Post row layout */
.post-row-with-date-icon {
    align-items: center !important;
}

.post-row-with-date-icon .wp-block-post-terms.category-label {
    flex-shrink: 0;
}

/* Category labels */
.cat-label {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.4;
}

/* Desktop: wrapper is transparent — title and label remain direct flex siblings */
.title-label-col {
    display: contents;
}

/* Desktop: restore original visual order (label to the right of title) */
.post-row-with-date-icon .wp-block-post-title { order: 2; }
.post-row-with-date-icon .wp-block-post-terms { order: 3; }

/* Mobile: wrapper becomes a flex column — label (first in DOM) sits above title */
@media (max-width: 768px) {
    .post-row-with-date-icon {
        align-items: flex-start !important;
    }

    .title-label-col {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-width: 0;
        gap: 2px;
    }

    .title-label-col .wp-block-post-terms.category-label {
        margin: 0 !important;
        line-height: 0;
        font-size: 0;
    }

    .title-label-col .wp-block-post-terms.category-label .cat-label {
        font-size: 0.55rem;
        line-height: 1.4;
        padding: 2px 7px;
    }

    .title-label-col .wp-block-post-title {
        margin: 0 !important;
    }
}

/* Header brand: DDV logo + Blog */
.ddv-blog-brand {
    margin: 0;
}

.ddv-blog-brand__link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none !important;
}

.ddv-blog-brand__logo {
    display: block;
    width: auto;
    height: clamp(1.75rem, 3vw, 2.35rem);
}

.ddv-blog-brand__text {
    font-size: clamp(1.2rem, 1rem + 0.7vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

@media (max-width: 600px) {
    .ddv-blog-brand__link {
        gap: 0.65rem;
    }

    .ddv-blog-brand__logo {
        height: 1.55rem;
    }

    .ddv-blog-brand__text {
        font-size: 1.1rem;
    }
}

/* Homepage pagination: center controls and show arrow-only previous/next links. */
body.home.blog .wp-block-query-pagination {
    justify-content: center !important;
    align-items: center;
    gap: 0.9rem;
}

body.home.blog .wp-block-query-pagination.is-content-justification-space-between > .wp-block-query-pagination-previous:first-child,
body.home.blog .wp-block-query-pagination.is-content-justification-space-between > .wp-block-query-pagination-next:last-of-type {
    margin-inline: 0;
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-next,
body.home.blog .wp-block-query-pagination .wp-block-query-pagination-previous {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 0;
    line-height: 1;
    text-decoration: none !important;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-next-arrow,
body.home.blog .wp-block-query-pagination .wp-block-query-pagination-previous-arrow {
    display: none;
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-previous::before,
body.home.blog .wp-block-query-pagination .wp-block-query-pagination-next::after {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1;
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-previous::before {
    content: "\2190";
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-next::after {
    content: "\2192";
}

body.home.blog .wp-block-query-pagination .wp-block-query-pagination-next:hover,
body.home.blog .wp-block-query-pagination .wp-block-query-pagination-previous:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.26);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}
