/* ===========================
   NEXT-GEN LOGIC LEAP BLOG (V3)
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
    --bg-deep: #050505;
    --card-bg: rgba(255, 255, 255, 0.02);
    --neon-cyan: #00E5FF;
    --neon-indigo: #6366F1;
    --glass-border: rgba(255, 255, 255, 0.08);
}

body.blog-body {
    background-color: var(--bg-deep);
    font-family: 'Space Grotesk', sans-serif;
    color: #fff;
    overflow-x: hidden;
}

/* Fix global opacity issue on Blog Headings */
.blog-body h1,
.blog-body h2,
.blog-body h3,
.blog-body h4 {
    opacity: 1 !important;
    transform: none !important;
}

/* --- Navigation Fix --- */
.header {
    background-color: rgba(9, 19, 56, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- New Hero (Asymmetric) --- */
.blog-hero-v3 {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 120px 40px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.08) 0%, rgba(99, 102, 241, 0.05) 50%, var(--bg-deep) 100%);
    border-bottom: 1px solid var(--glass-border);
}

.hero-v3-title-wrap {
    max-width: 900px;
    z-index: 5;
    margin-bottom: 60px;
}

.hero-v3-huge-text {
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-v3-image-frame {
    position: relative;
    width: 100%;
    max-width: 1100px;
    height: 450px;
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
    transform: none;
    top: 0;
}

.hero-v3-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Filter & Category --- */
.category-filter-v3 {
    margin-bottom: 80px;
    display: flex;
    gap: 10px;
}

.filter-chip {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.5);
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s ease;
}

.filter-chip.active,
.filter-chip:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* --- Floating Post Grid --- */
.posts-grid-v3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    padding-bottom: 120px;
}

.v3-card {
    background: rgba(20, 29, 66, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    transition: transform 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.v3-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 229, 255, 0.4);
}

.v3-img-box {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 1px solid var(--glass-border);
}

.v3-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.v3-card:hover .v3-img-box img {
    transform: scale(1.05);
}

.v3-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.35;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #fff;
    text-align: left;
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: color 0.3s;
}

.v3-card:hover .v3-title {
    color: var(--neon-cyan);
}

.v3-excerpt {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-size: 1rem;
    flex-grow: 1;
    margin-top: 15px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===========================
   POST VIEW V3 (REVERSED PARALLAX)
   =========================== */

.post-v3-header {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.05) 0%, var(--bg-deep) 100%);
    padding: 0 40px;
}

.post-v3-main-frame {
    position: relative;
    z-index: 100;
    margin-top: 0;
    width: 100%;
}

.post-v3-hero-img {
    width: 100%;
    max-width: 1100px;
    height: 500px;
    object-fit: cover;
    border-radius: 32px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.post-v3-content-wrap {
    background: var(--bg-deep);
    padding: 120px 0;
    position: relative;
    z-index: 10;
    /* CONTENT SLIDES BEHIND */
}

.post-v3-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.post-v3-body p {
    margin-bottom: 40px;
}

/* Media Queries for Grid Layout */
@media (max-width: 1024px) {
    .posts-grid-v3 {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px 80px;
    }
}

@media (max-width: 768px) {
    .posts-grid-v3 {
        grid-template-columns: 1fr;
    }

    .v3-card {
        padding: 20px;
    }

    .v3-img-box {
        aspect-ratio: 16 / 9;
    }
}

/* ===========================
   ADMIN DASHBOARD V3
   =========================== */
.admin-container {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 40px;
}

.admin-form-group {
    margin-bottom: 30px;
}

.admin-form-group label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.admin-input,
.admin-textarea,
.admin-select {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 18px 20px;
    border-radius: 16px;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
    outline: none;
    border-color: var(--neon-cyan);
    background: rgba(0, 229, 255, 0.05);
}

.btn-submit {
    width: 100%;
    background: #fff;
    color: #000;
    border: none;
    padding: 20px;
    border-radius: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    background: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
}

/* ===========================
   BLOG HERO V4 (Side-by-Side Professional)
   =========================== */
.blog-hero-v4 {
    min-height: 45vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 140px 20px 40px;
    background: radial-gradient(circle at top, rgba(0, 229, 255, 0.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.hero-v4-content {
    max-width: 1200px;
    margin: 0 auto;
    z-index: 5;
}

.hero-v4-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 40px;
    color: #fff;
}

.hero-v4-title span {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-v4-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 60px;
}

/* ===========================
   POST V4 (Inspired by PostLanding)
   =========================== */
.post-v4-grid {
    display: grid;
    grid-template-columns: 2fr 8fr 2fr;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 40px;
}

.post-v4-sidebar {
    position: sticky;
    top: 120px;
    height: max-content;
}

.post-v4-main {
    background: rgba(20, 29, 66, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 60px 80px;
}

.post-v4-hero-banner {
    width: 100%;
    height: 60vh;
    position: relative;
    overflow: hidden;
}

.post-v4-hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-v4-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-deep) 0%, transparent 60%);
}

.post-v4-hero-content {
    position: absolute;
    bottom: 50px;
    left: 10%;
    right: 10%;
    z-index: 10;
}

.post-v4-body {
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
}

.post-v4-body p {
    margin-bottom: 1.6em; /* Natural paragraph spacing */
}

/* Hide empty paragraphs caused by hitting Enter twice in the editor */
.post-v4-body p:empty,
.post-v4-body p:has(br:only-child) {
    display: none;
}

.post-v4-body h2,
.post-v4-body h3 {
    color: #fff;
    margin: 40px 0 20px;
    font-weight: 700;
}

/* Inline typography for links and bold text */
.post-v4-body a,
.post-v4-body b,
.post-v4-body strong {
    color: var(--neon-cyan);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.post-v4-body a:hover {
    color: var(--neon-indigo);
    text-decoration: underline;
}

@media (max-width: 1024px) {
    .post-v4-grid {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }

    .post-v4-sidebar {
        display: none;
    }

    .post-v4-main {
        padding: 40px 20px;
    }
}