/* =====================================================
   PORTFOLIX — Supplemental / Component CSS
   (appended via wp_enqueue_style or @import)
   ===================================================== */

/* =====================================================
   PAGE HERO
   ===================================================== */
.px-page-hero {
    background: linear-gradient(135deg, #0A0A0A 0%, #1A1A2E 100%);
    padding: 4rem 0 3rem;
    color: #fff;
}

.px-page-hero--sm { padding: 2.5rem 0 2rem; }
.px-page-hero--dark { background: #0A0A0A; }

.px-page-hero-inner { max-width: 800px; }

.px-page-hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #fff;
    margin: 0.75rem 0 0;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.px-page-hero-title em { color: #E94560; font-style: italic; }

.px-page-hero-desc {
    color: rgba(255,255,255,0.65);
    font-size: 1.1rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* =====================================================
   BREADCRUMBS
   ===================================================== */
.px-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.75rem;
}

.px-breadcrumbs a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.px-breadcrumbs a:hover { color: #E94560; }
.px-breadcrumbs span[aria-current] { color: rgba(255,255,255,0.85); }

/* =====================================================
   LAYOUT HELPERS
   ===================================================== */
.px-page-wrap { padding-top: 3rem; padding-bottom: 4rem; }

.px-layout-sidebar-right,
.px-layout-sidebar-left {
    display: grid;
    gap: 3rem;
    align-items: start;
}

.px-layout-sidebar-right { grid-template-columns: 1fr 300px; }
.px-layout-sidebar-left  { grid-template-columns: 300px 1fr; }
.px-layout-full          { max-width: 900px; margin: 0 auto; }

@media (max-width: 992px) {
    .px-layout-sidebar-right,
    .px-layout-sidebar-left {
        grid-template-columns: 1fr;
    }
    .px-layout-sidebar-left .px-sidebar { order: -1; }
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.px-single-post {}

.px-post-header { margin-bottom: 2rem; }

.px-post-meta-top {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.px-cat-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(233, 69, 96, 0.08);
    color: #E94560;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.2s;
}

.px-cat-pill:hover { background: rgba(233, 69, 96, 0.16); color: #E94560; }
.px-cat-pill--light {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
.px-cat-pill--light:hover { background: #E94560; color: #fff; border-color: #E94560; }

.px-post-single-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.px-post-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #E5E5E5;
}

.px-post-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.px-author-avatar-lg {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.px-author-name {
    display: block;
    font-weight: 700;
    font-size: 0.9375rem;
    color: #0A0A0A;
}

.px-post-date {
    font-size: 0.8125rem;
    color: #777;
}

.px-post-featured-img {
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
}

.px-hero-img { width: 100%; height: auto; display: block; }

.px-img-caption {
    font-size: 0.8125rem;
    color: #777;
    text-align: center;
    margin-top: 0.75rem;
    font-style: italic;
}

/* Post Content */
.px-post-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333;
}

.px-post-content h2, .px-post-content h3, .px-post-content h4 { margin-top: 2rem; }

.px-post-content img { border-radius: 8px; margin: 1.5rem auto; }

.px-post-content blockquote {
    border-left: 4px solid #E94560;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(233, 69, 96, 0.04);
    border-radius: 0 8px 8px 0;
    font-size: 1.125rem;
    font-style: italic;
}

.px-post-content pre {
    background: #0A0A0A;
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}

.px-post-content a { color: #E94560; text-decoration: underline; text-underline-offset: 3px; }
.px-post-content a:hover { text-decoration: none; }

.px-post-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.px-post-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.px-post-content li { margin-bottom: 0.5rem; }

/* Post Footer */
.px-post-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E5E5;
}

.px-post-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #F5F5F7;
    color: #555;
    font-size: 0.8125rem;
    border-radius: 4px;
    margin: 2px;
    transition: all 0.2s;
}

.px-post-tags a:hover { background: #E94560; color: #fff; }

/* Social Share */
.px-social-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.px-share-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #777;
    margin-right: 0.25rem;
}

.px-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F5F5F7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.px-share-btn:hover, .px-share-facebook:hover { background: #1877F2; color: #fff; }
.px-share-twitter:hover  { background: #1DA1F2; color: #fff; }
.px-share-linkedin:hover { background: #0A66C2; color: #fff; }
.px-share-pinterest:hover{ background: #E60023; color: #fff; }

/* Author Box */
.px-author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #F5F5F7;
    border-radius: 16px;
    margin: 2.5rem 0;
    align-items: flex-start;
}

.px-author-box-avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    border: 3px solid #E94560;
}

.px-author-box-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.px-author-box-bio  { font-size: 0.9375rem; color: #555; margin-bottom: 1rem; line-height: 1.6; }

/* Post Navigation */
.px-post-nav { margin: 3rem 0; }

.px-post-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.px-post-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    background: #F5F5F7;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.px-post-nav-link:hover {
    border-color: #E94560;
    background: rgba(233, 69, 96, 0.04);
    transform: translateY(-2px);
}

.px-post-nav-next { text-align: right; }

.px-nav-direction {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E94560;
}

.px-post-nav-next .px-nav-direction { justify-content: flex-end; }

.px-nav-post-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0A0A0A;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Related Posts */
.px-related-posts { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #E5E5E5; }
.px-related-title { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* =====================================================
   PORTFOLIO SINGLE
   ===================================================== */
.px-project-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #0A0A0A;
    padding-bottom: 3rem;
}

.px-project-hero-img {
    position: absolute;
    inset: 0;
}

.px-project-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.px-project-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,10,10,0.92) 0%, rgba(10,10,10,0.3) 60%, transparent 100%);
}

.px-project-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    max-width: 900px;
}

.px-project-cats { margin-bottom: 1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.px-project-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 4rem);
    margin: 0;
}

.px-project-wrap { padding-top: 3rem; padding-bottom: 4rem; }

.px-project-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .px-project-layout { grid-template-columns: 1fr; }
    .px-project-sidebar { order: -1; }
}

/* Info Card */
.px-project-info-card {
    background: #F5F5F7;
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid #E5E5E5;
    position: sticky;
    top: calc(var(--px-header-height, 80px) + 1.5rem);
}

.px-project-info-heading {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #E94560;
    border-bottom: 2px solid #E5E5E5;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.px-project-info-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #E5E5E5;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.px-project-info-row:last-child { border: none; }

.px-info-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #777;
}

.px-info-value { font-size: 0.9375rem; font-weight: 600; color: #0A0A0A; }
.px-info-value a { color: #E94560; }

.px-info-skills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem; }

.px-skill-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(233, 69, 96, 0.08);
    color: #E94560;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.px-project-share {
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Gallery */
.px-gallery-masonry {
    columns: 2;
    column-gap: 1rem;
    margin-top: 1.5rem;
}

.px-gallery-item {
    display: block;
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
}

.px-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.px-gallery-item:hover img { transform: scale(1.04); }

/* Project Nav */
.px-project-nav { background: #F5F5F7; padding: 2rem 0; }

.px-project-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.px-project-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.px-project-nav-link:hover { border-color: #E94560; transform: translateY(-2px); }
.px-project-nav-link div { display: flex; flex-direction: column; gap: 0.2rem; }
.px-project-nav-link div span { font-size: 0.75rem; color: #777; text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; }
.px-project-nav-link div strong { font-size: 0.9375rem; color: #0A0A0A; }

.px-project-nav-next { flex-direction: row-reverse; text-align: right; }
.px-project-nav-next div { align-items: flex-end; }

/* =====================================================
   SERVICES GRID
   ===================================================== */
.px-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    overflow: hidden;
}

.px-service-card {
    padding: 2.5rem 2rem;
    background: rgba(255,255,255,0.03);
    transition: background 0.3s;
    border-radius: 0;
}

.px-service-card:hover { background: rgba(255,255,255,0.07); }

.px-service-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    color: #E94560;
}

.px-service-title {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
}

.px-service-desc { font-size: 0.9375rem; color: rgba(255,255,255,0.6); line-height: 1.6; margin: 0; }

@media (max-width: 900px) { .px-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .px-services-grid { grid-template-columns: 1fr; } }

/* =====================================================
   TESTIMONIALS GRID
   ===================================================== */
.px-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 900px) { .px-testimonials-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .px-testimonials-grid { grid-template-columns: 1fr; } }

/* =====================================================
   BLOG GRID VARIANTS
   ===================================================== */
.px-blog-grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .px-blog-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .px-blog-grid--3 { grid-template-columns: 1fr; } }

/* =====================================================
   PRELOADER
   ===================================================== */
.px-preloader {
    position: fixed;
    inset: 0;
    background: #0A0A0A;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.px-preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.px-preloader-inner { text-align: center; }

.px-preloader-logo { margin-bottom: 2rem; }

.px-preloader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    overflow: hidden;
}

.px-preloader-fill {
    height: 100%;
    background: linear-gradient(90deg, #E94560, #F5A623);
    border-radius: 100px;
    animation: preload 1.8s ease-in-out forwards;
}

@keyframes preload {
    0%   { width: 0%; }
    60%  { width: 80%; }
    100% { width: 100%; }
}

/* =====================================================
   404 PAGE
   ===================================================== */
.px-404-number {
    font-family: 'Playfair Display', serif;
    font-size: clamp(6rem, 18vw, 14rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #E94560, #F5A623);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: block;
}

.px-404-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

/* =====================================================
   MOBILE NAV OVERLAY
   ===================================================== */
.px-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.px-mobile-overlay.is-visible { opacity: 1; visibility: visible; }

@media (max-width: 992px) {
    .px-nav--mobile-open {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        background: #fff;
        z-index: 1000;
        padding: 5rem 1.5rem 2rem;
        overflow-y: auto;
        box-shadow: 8px 0 32px rgba(0,0,0,0.15);
    }

    .px-nav--mobile-open .px-nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .px-nav--mobile-open .px-nav-item { width: 100%; }

    .px-nav--mobile-open .px-nav-link {
        border-radius: 8px;
        padding: 0.75rem 1rem;
        width: 100%;
        justify-content: space-between;
    }

    .px-nav--mobile-open .px-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #F5F5F7;
        border-radius: 8px;
        margin-top: 0.25rem;
        display: none;
    }

    .px-nav--mobile-open .px-nav-item.is-open > .px-dropdown { display: block; }

    .px-header-cta { display: none; }
}

/* =====================================================
   ARCHIVE PAGINATION
   ===================================================== */
.px-archive-pagination { display: flex; justify-content: center; margin-top: 3rem; }

.px-load-more-btn {
    position: relative;
    overflow: hidden;
}

.px-load-more-btn.is-loading { pointer-events: none; opacity: 0.7; }

.px-load-more-btn.is-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmer 1s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* =====================================================
   PORTFOLIO FILTER BAR
   ===================================================== */
.px-portfolio-filter-bar {
    background: #F5F5F7;
    padding: 1.25rem 0;
    border-bottom: 1px solid #E5E5E5;
    position: sticky;
    top: var(--px-header-height, 80px);
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(245, 245, 247, 0.92);
}

.px-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 5px;
    background: currentColor;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 100px;
    opacity: 0.6;
    margin-left: 4px;
    transition: opacity 0.2s;
}

.px-filter-btn.is-active .px-filter-count,
.px-filter-btn:hover .px-filter-count { opacity: 1; }

/* =====================================================
   SEARCH RESULTS
   ===================================================== */
.px-search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.px-search-result-item:hover { background: rgba(255,255,255,0.08); color: #fff; }

.px-search-result-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.px-search-result-item strong { display: block; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.px-search-result-item span  { font-size: 0.8125rem; opacity: 0.6; }

.px-search-no-results { color: rgba(255,255,255,0.5); text-align: center; padding: 1.5rem; }

.px-search-hint { color: rgba(255,255,255,0.4); font-size: 0.875rem; margin-bottom: 1rem; }

.px-search-form-wrap {
    max-width: 600px;
    margin-bottom: 2.5rem;
}
