/* ==========================================================================
   PIXLNEXS BLOG — SEASONAL CHRISTMAS / HOLIDAY THEME
   --------------------------------------------------------------------------
   Purely additive decorative layer. Nothing here edits the base layout.
   Toggle: holiday/holiday-theme.php  →  PN_HOLIDAY_THEME (true / false)
   Revert after Christmas = set it to false (assets are not even loaded).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Festive palette tokens & Holiday UI accents (matching staging.pixlnexs.com)
      Scoped 100% to body.pn-holiday — setting PN_HOLIDAY_THEME = false reverts
      every button, accent, and header surface back to normal UI automatically.
   -------------------------------------------------------------------------- */
body.pn-holiday {
    --pn-xmas-red: #E63946;
    --pn-xmas-red-bright: #F45B69;
    --pn-xmas-red-dark: #D62839;
    --pn-xmas-gold: #F0C75E;
}

/* Crisp warm-white header surface matching staging.pixlnexs.com (no top stripe) */
body.pn-holiday:not(.dark-theme) .navbar {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(20, 19, 16, 0.07);
}

/* Festive Red Navbar CTA Button (matches START PROJECT on staging.pixlnexs.com) */
html body.pn-holiday .navbar .nav-contact-btn,
html body.pn-holiday .navbar .nav-menu a.nav-contact-btn {
    background: linear-gradient(135deg, #EB3E4B 0%, #DF2D3B 100%) !important;
    background-color: #E63946 !important;
    border: 1px solid #E63946 !important;
    color: #FFFFFF !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.26) !important;
}

html body.pn-holiday .navbar .nav-contact-btn:hover,
html body.pn-holiday .navbar .nav-menu a.nav-contact-btn:hover {
    background: linear-gradient(135deg, #D62839 0%, #BA1E2D 100%) !important;
    background-color: #D62839 !important;
    border-color: #D62839 !important;
    color: #FFFFFF !important;
    box-shadow: 0 8px 22px rgba(214, 40, 57, 0.34) !important;
}

html body.pn-holiday .nav-menu a.active,
html body.pn-holiday .nav-menu a:not(.nav-contact-btn):hover,
html body.pn-holiday .dropdown-toggle:hover {
    color: #E63946 !important;
    background: rgba(230, 57, 70, 0.07);
}

html body.pn-holiday .nav-menu a i,
html body.pn-holiday .dropdown-toggle i,
html body.pn-holiday .pn-filter-title i {
    color: #E63946 !important;
}

html body.pn-holiday #pn-reading-progress {
    background: linear-gradient(90deg, #E63946 0%, #F0C75E 100%) !important;
}

/* Festive Red Primary Buttons & Active Pagination (matches staging.pixlnexs.com) */
html body.pn-holiday .pn-pill-btn.active,
html body.pn-holiday .pn-pill-btn.active:hover,
html body.pn-holiday .custom-pagination span.current,
html body.pn-holiday .page-numbers.current,
html body.pn-holiday .wp-block-query-pagination-numbers .page-numbers.current {
    background: #E63946 !important;
    border-color: #E63946 !important;
    color: #FFFFFF !important;
    border-radius: 3px !important;
}

html body.pn-holiday .pn-pill-btn:not(.active):hover {
    border-color: #E63946 !important;
    color: #E63946 !important;
}

html body.pn-holiday .footer-cta-main .footer-cta-button .wp-block-button__link,
html body.pn-holiday .footer-cta-main .footer-cta-button .wp-element-button,
html body.pn-holiday .sidebar-btn a,
html body.pn-holiday .sidebar-btn a.wp-block-button__link,
html body.pn-holiday .sidebar .wp-block-button__link,
html body.pn-holiday .wp-block-button:not(.is-style-outline) .wp-block-button__link,
html body.pn-holiday .form-submit.wp-block-button input[type="submit"],
html body.pn-holiday .wp-block-search__button {
    background: linear-gradient(135deg, #EB3E4B 0%, #DF2D3B 100%) !important;
    background-color: #E63946 !important;
    border-color: #E63946 !important;
    color: #FFFFFF !important;
    border-radius: 4px !important;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.24) !important;
}

html body.pn-holiday .footer-cta-main .footer-cta-button .wp-block-button__link:hover,
html body.pn-holiday .footer-cta-main .footer-cta-button .wp-element-button:hover,
html body.pn-holiday .sidebar-btn a:hover,
html body.pn-holiday .sidebar-btn a.wp-block-button__link:hover,
html body.pn-holiday .sidebar .wp-block-button__link:hover,
html body.pn-holiday .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
html body.pn-holiday .form-submit.wp-block-button input[type="submit"]:hover,
html body.pn-holiday .wp-block-search__button:hover {
    background: linear-gradient(135deg, #D62839 0%, #BA1E2D 100%) !important;
    background-color: #D62839 !important;
    border-color: #D62839 !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
}

/* Festive Crimson Card Category Tags & Read More Links */
html body.pn-holiday li.custom-post .post-meta.custom-style .post-category a,
html body.pn-holiday li.custom-post .post-meta.custom-style1 .post-category a,
html body.pn-holiday .wp-block-post .wp-block-post-terms a,
html body.pn-holiday .read-more-wrapper a,
html body.pn-holiday .custom-read-more,
html body.pn-holiday .custom-read-more .read-more-text,
html body.pn-holiday .custom-read-more::after,
html body.pn-holiday .wp-block-post-excerpt__more-link {
    color: #E63946 !important;
}

/* --------------------------------------------------------------------------
   1. Falling crystalline snowflakes (fixed, non-interactive)
   -------------------------------------------------------------------------- */
.pn-holiday-flurry {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 99990;
}

.pn-holiday-flake {
    position: absolute;
    top: -32px;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
    animation: pnHolidaySnowFall var(--dur, 13s) linear var(--delay, 0s) infinite;
}

.pn-holiday-flake-inner {
    display: block;
    width: 100%;
    height: 100%;
    will-change: transform;
    animation: pnHolidaySnowSway var(--sway-dur, 4.5s) ease-in-out var(--delay, 0s) infinite alternate;
}

.pn-holiday-flake svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: pnHolidaySnowSpin var(--spin-dur, 14s) linear infinite;
}

.pn-holiday-flake.is-frost {
    color: #C9A962;
    filter: drop-shadow(0 1px 2px rgba(156, 138, 98, 0.24));
}

.pn-holiday-flake.is-ice {
    color: #BEB5A8;
    filter: drop-shadow(0 1px 2px rgba(20, 19, 16, 0.14));
}

.pn-holiday-flake.is-rose {
    color: #EB7B84;
    filter: drop-shadow(0 1px 2px rgba(230, 57, 70, 0.18));
}

.pn-holiday-flake.is-soft {
    color: #D8C496;
    filter: drop-shadow(0 1px 1.5px rgba(156, 138, 98, 0.16));
}

@keyframes pnHolidaySnowFall {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    8% {
        opacity: var(--op, 0.72);
    }
    86% {
        opacity: var(--op, 0.65);
    }
    100% {
        transform: translate3d(var(--drift, 24px), 106vh, 0);
        opacity: 0;
    }
}

@keyframes pnHolidaySnowSway {
    0% {
        transform: translate3d(calc(var(--sway, 18px) * -1), 0, 0);
    }
    100% {
        transform: translate3d(var(--sway, 18px), 0, 0);
    }
}

@keyframes pnHolidaySnowSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   3. Santa cap placed on the blog logo
   -------------------------------------------------------------------------- */
body.pn-holiday .nav-brand {
    position: relative;
    overflow: visible;
}

.pn-holiday-cap {
    position: absolute;
    top: -15px;
    left: -11px;
    width: 34px;
    height: 28px;
    pointer-events: none;
    z-index: 10;
    transform: rotate(-34deg) translate(-12px, -10px) scale(0.2);
    opacity: 0;
    filter: drop-shadow(0 2px 5px rgba(185, 28, 40, 0.28));
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.pn-holiday-cap.is-placed {
    transform: rotate(-18deg) translate(0, 0) scale(1);
    opacity: 1;
}

.pn-holiday-cap svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.pn-holiday-sparkle {
    position: absolute;
    top: -18px;
    left: 16px;
    font-size: 14px;
    color: #C81E2B;
    text-shadow: 0 0 6px rgba(214, 185, 123, 0.85);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.3);
}

.pn-holiday-sparkle.is-burst {
    animation: pnHolidayCapSparkle 0.9s ease-out forwards;
}

@keyframes pnHolidayCapSparkle {
    0%   { opacity: 0; transform: scale(0.3) rotate(0deg); }
    40%  { opacity: 1; transform: scale(1.35) rotate(25deg); }
    100% { opacity: 0; transform: scale(0.7) translateY(-8px) rotate(55deg); }
}

/* --------------------------------------------------------------------------
   4. Left-gutter candy-cane rope + story-driven Santa
      Starts cleanly at the BOTTOM edge of .navbar (never crosses inside navbar),
      horizontally aligned right below the left edge of the PIXLNEXS logo.
   -------------------------------------------------------------------------- */
.pn-holiday-rope {
    position: fixed;
    top: 80px;
    left: 24px;
    width: 50px;
    height: 500px;
    z-index: 100001;
    pointer-events: none;
    user-select: none;
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.pn-holiday-rope.is-compact {
    display: none !important;
}

.pn-holiday-rope.is-scrolled-away {
    transform: translateY(-32px);
    opacity: 0;
    visibility: hidden;
}

.pn-holiday-rope-line {
    position: absolute;
    top: 0;
    bottom: 58px;
    left: 22px;
    width: 3.5px;
    border-radius: 0 0 999px 999px;
    background: repeating-linear-gradient(
        135deg,
        #F04754 0px,
        #F04754 4px,
        #FFFFFF 4px,
        #FFFFFF 6.5px,
        #F0C75E 6.5px,
        #F0C75E 10px
    );
    box-shadow: 1px 0 6px rgba(230, 57, 70, 0.22);
}

/* Small gold knot so the top end of the rope looks tied, not cut off */
.pn-holiday-rope-line::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 50%;
    width: 9px;
    height: 9px;
    margin-left: -4.5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFF4C9, #F0C75E 60%, #C99A2E);
    box-shadow: 0 1px 4px rgba(20, 19, 16, 0.25);
}

.pn-holiday-rope-line::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #FFB3BA, #F04754 58%, #D62839);
    border: 1px solid #F0C75E;
    box-shadow: 0 2px 7px rgba(230, 57, 70, 0.3);
}

.pn-holiday-santa {
    position: absolute;
    left: 2px;
    bottom: 52px;
    width: 48px;
    height: 54px;
    filter: drop-shadow(0 5px 8px rgba(20, 19, 16, 0.18));
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 4.8s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.pn-holiday-santa svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.pn-holiday-rope[data-phase="climbing-up"] .pn-holiday-santa {
    transform: translate3d(0, var(--climb-top-y, -420px), 0);
}

.pn-holiday-rope[data-phase="placing-cap"] .pn-holiday-santa {
    transition: transform 0.7s ease-in-out;
    transform: translate3d(10px, var(--climb-top-y, -420px), 0) rotate(7deg);
}

.pn-holiday-rope[data-phase="climbing-down"] .pn-holiday-santa {
    transition: transform 4.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate3d(0, 0, 0) rotate(0deg);
}

.pn-holiday-rope[data-phase="placing-gift"] .pn-holiday-santa {
    transition: transform 0.75s cubic-bezier(0.34, 1.3, 0.64, 1);
    transform: translate3d(2px, 52px, 0) rotate(6deg);
}

.pn-holiday-rope[data-phase="standing-happy"] .pn-holiday-santa {
    transition: transform 0.6s ease-out;
    transform: translate3d(-2px, 52px, 0) rotate(0deg);
}

/* Limb rhythm while climbing */
.pn-holiday-rope[data-phase="climbing-up"] .pn-holiday-arm-l,
.pn-holiday-rope[data-phase="climbing-down"] .pn-holiday-arm-l {
    transform-origin: 24px 30px;
    animation: pnHolidayLimbA 0.72s ease-in-out infinite;
}

.pn-holiday-rope[data-phase="climbing-up"] .pn-holiday-arm-r,
.pn-holiday-rope[data-phase="climbing-down"] .pn-holiday-arm-r {
    transform-origin: 32px 30px;
    animation: pnHolidayLimbB 0.72s ease-in-out infinite;
}

.pn-holiday-rope[data-phase="climbing-up"] .pn-holiday-leg-l,
.pn-holiday-rope[data-phase="climbing-down"] .pn-holiday-leg-l {
    transform-origin: 25px 52px;
    animation: pnHolidayLimbB 0.72s ease-in-out infinite;
}

.pn-holiday-rope[data-phase="climbing-up"] .pn-holiday-leg-r,
.pn-holiday-rope[data-phase="climbing-down"] .pn-holiday-leg-r {
    transform-origin: 31px 52px;
    animation: pnHolidayLimbA 0.72s ease-in-out infinite;
}

/* Mini cap held in Santa's hand while placing it */
.pn-holiday-held-cap {
    opacity: 0;
    transform: scale(0.4);
    transform-origin: 46px 24px;
    transition: opacity 0.25s ease, transform 0.35s ease;
}

.pn-holiday-rope[data-phase="placing-cap"] .pn-holiday-held-cap {
    opacity: 1;
    transform: scale(1) translate(4px, -4px);
}

/* Cheerful idle + wave once standing */
.pn-holiday-rope[data-phase="standing-happy"] .pn-holiday-santa-body {
    transform-origin: 28px 60px;
    animation: pnHolidayHappyIdle 2.2s ease-in-out infinite;
}

.pn-holiday-rope[data-phase="standing-happy"] .pn-holiday-arm-l {
    transform-origin: 20px 35px;
    animation: pnHolidayCheerWave 1.6s ease-in-out infinite;
}

/* Gift box placed on the ground beside Santa */
.pn-holiday-gift {
    position: absolute;
    bottom: 4px;
    left: 22px;
    width: 24px;
    height: 24px;
    opacity: 0;
    transform: translate(-10px, -14px) scale(0.35);
    filter: drop-shadow(0 4px 6px rgba(20, 19, 16, 0.16));
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.pn-holiday-gift.is-placed {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

.pn-holiday-gift svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.pn-holiday-gift-sparkle {
    transform-origin: 18px 6px;
    animation: pnHolidayStarPulse 2.4s ease-in-out infinite;
}

@keyframes pnHolidayLimbA {
    0%, 100% { transform: translateY(-2.8px) rotate(-9deg); }
    50%      { transform: translateY(2.8px) rotate(9deg); }
}

@keyframes pnHolidayLimbB {
    0%, 100% { transform: translateY(2.8px) rotate(9deg); }
    50%      { transform: translateY(-2.8px) rotate(-9deg); }
}

@keyframes pnHolidayHappyIdle {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-3px) rotate(1.5deg); }
}

@keyframes pnHolidayCheerWave {
    0%, 100% { transform: rotate(0deg); }
    35%      { transform: rotate(-28deg) translateY(-4px); }
    65%      { transform: rotate(6deg); }
}

@keyframes pnHolidayStarPulse {
    0%, 100% { opacity: 0.45; transform: scale(0.84) rotate(0deg); }
    50%      { opacity: 1; transform: scale(1.22) rotate(18deg); }
}

/* --------------------------------------------------------------------------
   5. Bottom-right "SCENE 25 · Rendering Holiday Magic" 3D Pass Card
      Exact mirror of staging.pixlnexs.com bottom-right studio badge
   -------------------------------------------------------------------------- */
.pn-holiday-pass {
    position: fixed;
    bottom: 20px;
    right: 24px;
    z-index: 99992;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px 12px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(230, 57, 70, 0.18);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(20, 19, 16, 0.09);
    font-family: 'Jost', sans-serif;
    user-select: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

body.dark-theme .pn-holiday-pass {
    background: rgba(24, 22, 19, 0.95);
    border-color: rgba(240, 199, 94, 0.22);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.pn-holiday-pass-tree {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.pn-holiday-pass-tree svg {
    width: 52px;
    height: 52px;
    display: block;
    overflow: visible;
}

.pn-holiday-tree-spin {
    transform-origin: 26px 26px;
    animation: pnHolidayTreeFloat 3.6s ease-in-out infinite;
}

@keyframes pnHolidayTreeFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-2.5px); }
}

.pn-holiday-pass-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 158px;
}

.pn-holiday-pass-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pn-holiday-pass-scene {
    color: #E63946;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pn-holiday-pass-scene::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #E63946;
    box-shadow: 0 0 6px rgba(230, 57, 70, 0.7);
}

.pn-holiday-pass-fps {
    color: #8A857B;
    font-weight: 500;
}

.pn-holiday-pass-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14px;
    line-height: 1.2;
    color: #141310;
    white-space: nowrap;
}

body.dark-theme .pn-holiday-pass-title {
    color: #F7F5F0;
}

.pn-holiday-pass-title em {
    font-style: italic;
    color: #E63946;
}

.pn-holiday-pass-bar {
    position: relative;
    height: 3px;
    width: 100%;
    border-radius: 99px;
    background: rgba(20, 19, 16, 0.08);
    overflow: visible;
    margin: 3px 0 2px;
}

body.dark-theme .pn-holiday-pass-bar {
    background: rgba(247, 245, 240, 0.14);
}

.pn-holiday-pass-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 58%;
    border-radius: 99px;
    background: linear-gradient(90deg, #E63946 0%, #F0C75E 100%);
    animation: pnHolidayTimeline 6s ease-in-out infinite alternate;
}

.pn-holiday-pass-head {
    position: absolute;
    right: -2px;
    top: -3px;
    width: 3px;
    height: 9px;
    border-radius: 2px;
    background: #E63946;
}

@keyframes pnHolidayTimeline {
    0%   { width: 32%; }
    100% { width: 78%; }
}

.pn-holiday-pass-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 8.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8A857B;
}

.pn-holiday-pass-auto {
    all: unset;
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 99px;
    border: 1px solid rgba(230, 57, 70, 0.25);
    color: #E63946;
    font-size: 8.5px;
    font-weight: 500;
    letter-spacing: 0.1em;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pn-holiday-pass-auto:hover {
    background: #E63946;
    color: #FFFFFF;
}

.pn-holiday-pass.is-scrolled-away {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    visibility: hidden;
}

/* --------------------------------------------------------------------------
   6. Desktop Responsive Matrix (1025px – 2560px+):
      Guarantee clean 56px left gutter on 1200px / 1280px / 1366px / 1440px
      desktop laptops so Santa & rope NEVER hide and NEVER overlap cards.
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1456px) {
    html body.pn-holiday .pn-navbar-container,
    html body.pn-holiday main {
        padding-left: 56px !important;
    }
}

/* Prevent bottom-right Scene 25 card from overlapping Single Post sticky sidebar on short laptop screens */
@media (max-height: 780px) and (max-width: 1750px) {
    body.single .pn-holiday-pass {
        display: none;
    }
}

@media (max-width: 1024px) {
    .pn-holiday-rope,
    .pn-holiday-pass {
        display: none;
    }

    .pn-holiday-cap {
        opacity: 1;
        transform: rotate(-18deg) scale(1);
        top: -12px;
        left: -8px;
        width: 28px;
        height: 23px;
    }
}

/* --------------------------------------------------------------------------
   6. Respect reduced-motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .pn-holiday-flurry {
        display: none;
    }

    .pn-holiday-cap {
        opacity: 1;
        transform: rotate(-18deg) scale(1);
        transition: none;
    }

    .pn-holiday-gift {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .pn-holiday-santa,
    .pn-holiday-arm-l,
    .pn-holiday-arm-r,
    .pn-holiday-leg-l,
    .pn-holiday-leg-r,
    .pn-holiday-santa-body,
    .pn-holiday-gift-sparkle {
        animation: none;
        transition: none;
    }
}
