/* ============================================================
   Page title bar — animated design LAPTOP / DESKTOP ONLY (1024px+)
   Mobile & tablet: hidden (use app-top-bar / main header instead)
   ============================================================ */

.thm-breadcrumb {
    display: none !important;
}

/* ---- Mobile & tablet: no upgraded page header ---- */
@media (max-width: 1023px) {
    .page-header.is-modernized,
    .page-header.page-title-bar-section,
    .page-title-bar-block {
        display: none !important;
    }

    body.app-mode .page-header.is-modernized,
    body.app-mode .page-header.is-modernized:not(.page-header--has-app-bar) {
        display: none !important;
    }

    body.app-mode .page-wrapper:has(.page-header.is-modernized) {
        padding-top: 0 !important;
    }
}

body.profile-unified .page-header {
    display: none !important;
}

/* ============================================================
   LAPTOP / DESKTOP ONLY (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {

@keyframes ptb-enter {
    from {
        opacity: 0;
        transform: translateY(-14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ptb-title-slide {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes ptb-shimmer {
    0% { transform: translateX(-120%) skewX(-12deg); }
    100% { transform: translateX(220%) skewX(-12deg); }
}

@keyframes ptb-wave-drift {
    0%, 100% { transform: translateX(0); opacity: 0.35; }
    50% { transform: translateX(8px); opacity: 0.55; }
}

@keyframes ptb-deco-float {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-5px) rotate(6deg); }
}

@keyframes ptb-ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.15; }
}

.page-header.is-modernized,
.page-header.page-title-bar-section {
    position: relative;
    display: block !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
    min-height: 0 !important;
    background: transparent !important;
    overflow: visible !important;
    z-index: 2;
}

.page-header.is-modernized .page-header-bg,
.page-header.is-modernized .page-header-bg::before,
.page-header.page-title-bar-section .page-header-bg,
.page-header.page-title-bar-section .page-header-bg::before {
    display: none !important;
}

.page-header.is-modernized .container,
.page-header.page-title-bar-section .container {
    padding-top: 16px;
    padding-bottom: 0;
    max-width: 1200px;
}

.page-title-bar-block {
    display: block;
    padding: 16px 0 0;
    background: transparent;
}

.page-title-bar-block .container {
    max-width: 1200px;
}

.page-title-bar,
.page-header__inner .page-title-bar,
.page-header__inner.page-title-bar--animated {
    --ptb-accent: #4caf50;
    --ptb-accent2: #2e7d32;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px 20px 16px 16px !important;
    margin: 0 !important;
    text-align: left !important;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: none !important;
    border-radius: 20px !important;
    background: linear-gradient(125deg, var(--ptb-accent2) 0%, var(--ptb-accent) 42%, #a5d6a7 100%) !important;
    box-shadow:
        0 4px 20px rgba(46, 125, 50, 0.28),
        0 1px 0 rgba(255, 255, 255, 0.25) inset !important;
    animation: ptb-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    isolation: isolate;
}

.page-title-bar__shimmer {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
}

.page-title-bar__shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 45%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: ptb-shimmer 3.2s ease-in-out infinite;
}

.page-title-bar__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 28px;
    z-index: 0;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath fill='rgba(255,255,255,0.12)' d='M0 24 Q300 0 600 24 T1200 24 V48 H0 Z'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
    animation: ptb-wave-drift 4s ease-in-out infinite;
}

.page-title-bar__back {
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ptb-accent2);
    text-decoration: none;
    flex-shrink: 0;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}

.page-title-bar__back:hover {
    transform: translateX(-3px) scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    background: #fff;
    color: var(--ptb-accent2);
}

.page-title-bar__title-wrap {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.page-title-bar__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #fff !important;
    text-transform: none !important;
    letter-spacing: -0.02em !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.15);
    animation: ptb-title-slide 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.page-title-bar__subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.page-title-bar__deco {
    position: relative;
    z-index: 2;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ptb-deco-float 3.5s ease-in-out infinite;
}

.page-title-bar__deco-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    animation: ptb-ring-pulse 2.5s ease-in-out infinite;
}

.page-title-bar__deco i {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Desktop: always show modernized header (app-top-bar is mobile-only on most pages) */
body.app-mode .page-header.page-header--has-app-bar {
    display: none !important;
}

} /* end min-width 1024px */

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
    .page-title-bar,
    .page-title-bar__title,
    .page-title-bar__deco,
    .page-title-bar__shimmer::after,
    .page-title-bar__wave {
        animation: none !important;
    }

    .page-title-bar__back:hover {
        transform: none;
    }
}
