/* 
  MitKar PageSpeed Optimized UI 
  Fixes for CLS (1.9+) and TBT (750ms)
*/

.new-post-container {
    background: radial-gradient(circle at center, #0a1f1a 0%, #050505 100%) !important;
    color: #ffffff !important;
    min-height: 100vh;
    font-family: 'Inter', 'Outfit', sans-serif !important;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    /* Prevent layout shift */
    display: block;
}

/* --- Reveal on Scroll (CLS Friendly) --- */
.reveal-scroll {
    opacity: 0;
    /* Use translate3d for GPU acceleration - doesn't trigger layout shift in modern browsers */
    transform: translate3d(0, 30px, 0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.reveal-scroll.in-view {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

/* IMPORTANT: Disable animation for the FIRST section to fix LCP and CLS */
.no-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* --- Hero Section Fix --- */
.priv-hero {
    padding: 120px 20px 40px !important;
    content-visibility: auto;
}

.priv-hero-card {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(10, 26, 22, 0.7) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 136, 0.2) !important;
    border-radius: 28px !important;
    padding: 70px 30px 40px !important;
}

/* --- Content Wrapper Stability --- */
.priv-wrap {
    max-width: 1228px;
    margin: 0 auto;
    padding: 20px 20px 100px;
}

.priv-sec {
    margin-bottom: 40px;
    background: rgba(10, 26, 22, 0.4) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.1) !important;
    border-radius: 24px !important;
    padding: 50px !important;
    min-height: 200px;
    /* Reserve space */
    contain: content;
}

/* Rest of the styles kept for UI consistency but optimized */
.priv-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 136, 0.1) !important;
    border: 1px solid rgba(0, 255, 136, 0.3) !important;
    color: #00ff88 !important;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 3px;
    padding: 8px 24px;
    border-radius: 40px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.priv-hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    color: #fff !important;
}

.priv-hero h1 em {
    color: #00ff88 !important;
    font-style: normal !important;
}

.priv-hero p.sub {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 1.15rem !important;
    max-width: 750px;
    margin: 0 auto 30px !important;
}

/* Grid and Table remains identical but inside stable containers */
.enc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.enc-card {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 30px !important;
}

.enc-table-wrap {
    overflow-x: auto;
    margin-top: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.enc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

.enc-table th {
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    padding: 15px;
    text-align: left;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

.enc-table td {
    padding: 15px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Premium Content Components --- */
.priv-lead-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    border-left: 4px solid #00ff88;
    padding-left: 20px;
    margin: 30px 0;
}

.priv-callout {
    background: rgba(41, 151, 255, 0.08) !important;
    border: 1px solid rgba(41, 151, 255, 0.2) !important;
    border-left: 4px solid #2997ff !important;
    border-radius: 12px;
    padding: 18px 24px;
    margin: 25px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    font-size: 0.95rem;
}

.priv-callout i {
    color: #2997ff;
    font-size: 1.2rem;
}

.priv-callout a {
    color: #2997ff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px dashed rgba(41, 151, 255, 0.5);
    transition: all 0.2s;
}

.priv-callout a:hover {
    color: #fff;
    border-bottom-style: solid;
}

/* --- Premium Typography (H1-H4) --- */
.article-body h1 {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    color: #ffffff;
    margin: 40px 0 20px;
    line-height: 1.2;
}

.article-body h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    color: #ffffff;
    margin: 35px 0 15px;
    line-height: 1.3;
}

.article-body h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    color: #ffffff;
    margin: 30px 0 12px;
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ff88;
    /* H4 as a subtle highlight accent */
    margin: 25px 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-body p {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

/* --- Premium Feature Grid (3-Column) --- */
.priv-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.priv-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important;
    /* Sharp corners as requested */
    padding: 24px;
    transition: all 0.3s ease;
}

.priv-feature-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateY(-5px);
}

.priv-feature-card i {
    font-size: 1.8rem;
    color: #00ff88;
    margin-bottom: 15px;
    display: block;
}

.priv-feature-card h4 {
    color: #fff;
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    text-transform: none;
    /* Reset uppercase from global H4 */
    letter-spacing: normal;
}

.priv-feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* --- Mobile Responsiveness for Content --- */
@media (max-width: 768px) {
    .priv-lead-text {
        font-size: 0.95rem;
        line-height: 1.7;
        padding-left: 15px;
        margin: 20px 0;
    }

    .priv-callout {
        padding: 15px;
        font-size: 0.85rem;
        gap: 12px;
        border-radius: 10px;
    }

    .priv-callout i {
        font-size: 1.1rem;
    }

    .priv-feature-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    .priv-feature-card {
        padding: 20px;
    }
}

/* --- Inline Recent Posts Component --- */
.priv-inline-posts {
    margin: 35px 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 !important; /* Sharp corners */
}

.priv-inline-posts h5 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #00ff88;
    margin: 0 0 20px 0;
    letter-spacing: 2px;
    font-weight: 800;
}

.priv-inline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.priv-inline-item {
    display: flex;
    gap: 15px;
    align-items: center;
    text-decoration: none;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.priv-inline-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.priv-inline-item img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 4px;
}

.priv-inline-item span {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .priv-inline-grid {
        grid-template-columns: 1fr;
    }
}

.mk-btn-premium {
    background: #00ff88 !important;
    color: #000 !important;
    padding: 16px 36px !important;
    border-radius: 40px !important;
    font-weight: 900 !important;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0, 255, 136, 0.3);
    border: none !important;
}

/* --- Hero Card Meta Elements (Absolute positioning to top) --- */
.priv-card-cat {
    position: absolute;
    top: 20px;
    left: 30px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    color: #00ff88;
    padding: 5px 15px;
    border-radius: 0px !important;
    /* Sharp corners as requested */
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px !important;
    /* Fixed min-height */
    width: auto;
    max-width: 180px;
    /* Prevent it from being too wide */
}

.priv-card-stats-right {
    position: absolute;
    top: 20px;
    right: 30px;
    display: flex;
    gap: 8px;
}

.priv-stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 0px !important;
    /* Sharp corners */
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: row;
    /* Horizontal to fit 30px height */
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 60px;
    min-height: 30px !important;
}

.priv-stat-pill i {
    font-size: 1.1rem;
}

.priv-stat-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

.priv-stat-pill.liked i {
    color: #ff4757;
}

/* Hero Footer Layout */
.priv-hero-footer {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: 50px;
}

.priv-hero-info {
    flex: 1;
    margin-bottom: auto;
    /* Push content to middle/top */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.priv-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.priv-hero-dl-meta {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media (max-width: 768px) {
    .priv-hero {
        padding-top: 100px !important;
        /* Extra padding to fix header overlap on mobile */
        padding-bottom: 30px !important;
    }

    .priv-hero-card {
        padding: 50px 15px 30px !important;
        /* Smaller padding for mobile */
        border-radius: 20px !important;
    }

    .priv-sec {
        padding: 30px 20px !important;
    }

    /* Top Absolute Elements - Mobile Fix */
    .priv-card-cat {
        top: 15px;
        left: 15px;
        padding: 4px 10px;
        font-size: 0.6rem;
        min-height: 30px !important;
        border-radius: 0px !important;
    }

    .priv-card-stats-right {
        top: 15px;
        right: 15px;
        gap: 5px;
    }

    .priv-stat-pill {
        padding: 4px 10px;
        border-radius: 0px !important;
        font-size: 0.65rem;
        min-width: 42px;
        min-height: 30px !important;
    }

    .priv-stat-pill i {
        font-size: 0.95rem;
    }

    /* Title and Description - Mobile Constraint */
    .priv-hero h1 {
        font-size: 1.7rem !important;
        margin-top: 5px !important;
        margin-bottom: 12px !important;
        line-height: 1.2 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .priv-hero p.sub {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }

    .priv-updated {
        font-size: 0.75rem !important;
    }
}

/* --- Premium Version & Feature Cards (Animation Cards) --- */
.priv-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.priv-anim-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.priv-anim-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.priv-anim-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(0, 230, 118, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 230, 118, 0.1);
}

.priv-anim-card:hover::before {
    opacity: 1;
}

.priv-card-tag {
    position: absolute;
    top: 0;
    right: 0;
    background: #00ff88;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 0 24px 0 24px;
    text-transform: uppercase;
}

.priv-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    margin-bottom: 16px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.priv-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
    margin-top: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.priv-card-desc {
    font-size: 0.85rem;
    color: #9aa0a6;
    line-height: 1.5;
    margin: 0;
}

.priv-card-stats {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.75rem;
    color: #00ff88;
    font-weight: 600;
}

/* Feature List Inside Card */
.priv-feat-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.priv-feat-list li {
    font-size: 0.8rem;
    color: #9aa0a6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.priv-feat-list li i {
    color: #00ff88;
    font-size: 0.7rem;
}