/* --------------------------------------------------------------------------
   NEXORA WEB STUDIOS - BLOG DESIGN SYSTEM & MONETIZATION STYLESHEET
   -------------------------------------------------------------------------- */

:root {
    --bg-base: #070709;
    --bg-darker: #040405;
    --bg-card: rgba(13, 13, 20, 0.7);
    --bg-card-hover: rgba(22, 22, 34, 0.9);
    --glass-bg: rgba(10, 10, 16, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(168, 85, 247, 0.5);
    
    --primary: #a855f7;
    --primary-rgb: 168, 85, 247;
    --secondary: #06b6d4;
    --secondary-rgb: 6, 182, 212;
    --accent: #ec4899;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --gradient-primary: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    
    --font-title: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Syne', sans-serif;
    
    --glow-primary: 0 0 30px rgba(168, 85, 247, 0.25);
    --glow-secondary: 0 0 30px rgba(6, 182, 212, 0.25);
    --card-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

/* Base Adjustments */
body.blog-page {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Atmosphere Blobs */
.blog-ambient {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.blog-ambient-1 {
    top: -150px;
    left: -100px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}
.blog-ambient-2 {
    top: 40%;
    right: -150px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
}

/* Sticky Reading Progress Bar */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-primary);
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Main Container */
.blog-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

/* Blog Navigation */
.blog-header {
    position: sticky;
    top: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    z-index: 99;
}
.blog-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}
.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}
.blog-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.blog-nav-link:hover, .blog-nav-link.active {
    color: #ffffff;
}

.auth-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #d8b4fe;
    padding: 0.45rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.auth-btn-pill:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

/* --------------------------------------------------------------------------
   MONETIZATION AD CONTAINERS (Google AdSense / Affiliate)
   -------------------------------------------------------------------------- */
.ad-slot-wrapper {
    margin: 2rem 0;
    width: 100%;
}
.ad-box {
    background: rgba(15, 15, 24, 0.55);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
    position: relative;
    text-align: center;
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.ad-box:hover {
    border-color: rgba(168, 85, 247, 0.3);
}
.ad-tag-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* Billboard Header Ad */
.ad-billboard {
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* In-Article Ad Container */
.ad-container-in-article {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2.5rem 0;
    text-align: left;
}
.ad-container-in-article .ad-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #c084fc;
    letter-spacing: 0.06em;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.ad-container-in-article .ad-text {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
}
.ad-container-in-article a {
    color: #38bdf8;
    text-decoration: underline;
    font-weight: 600;
}

/* Affiliate Sponsor Recommendation Card */
.affiliate-promo-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 2.5rem 0;
    box-shadow: var(--card-shadow);
}
.affiliate-info h4 {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: #ffffff;
    margin-bottom: 0.35rem;
}
.affiliate-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.affiliate-btn {
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.affiliate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.btn-login {
    background: var(--gradient-primary) !important;
    color: #ffffff !important;
    border: 1px solid rgba(236, 72, 153, 0.35) !important;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-login:hover {
    background: linear-gradient(135deg, #9333ea 0%, #db2777 100%) !important;
    border-color: rgba(236, 72, 153, 0.7) !important;
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.55), var(--glow-primary) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   BLOG HERO & CONTROLS
   -------------------------------------------------------------------------- */
.blog-hero {
    padding: 4rem 0 2.5rem;
    text-align: center;
}
.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #c084fc;
    margin-bottom: 1.25rem;
}
.blog-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}
.blog-hero-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.blog-hero-desc {
    max-width: 680px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Search & Filter Bar */
.blog-search-container {
    max-width: 640px;
    margin: 0 auto 2rem;
    position: relative;
}
.blog-search-input {
    width: 100%;
    background: rgba(15, 15, 24, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    padding: 0.95rem 1.5rem 0.95rem 3rem;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.25s ease;
}
.blog-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}
.search-icon {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Category Filter Chips */
.blog-categories {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 3rem;
}
.category-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.45rem 1.15rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.category-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.category-chip.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* --------------------------------------------------------------------------
   FEATURED ARTICLE CARD
   -------------------------------------------------------------------------- */
.featured-card-wrapper {
    margin-bottom: 3.5rem;
}
.featured-card {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.featured-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), var(--glow-primary);
}
.featured-thumb {
    position: relative;
    height: 100%;
    min-height: 340px;
    overflow: hidden;
}
.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-card:hover .featured-thumb img {
    transform: scale(1.04);
}
.featured-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.card-category-badge {
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border: 1px solid rgba(168, 85, 247, 0.3);
    margin-bottom: 1rem;
}
.featured-title {
    font-family: var(--font-title);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
    margin-bottom: 1rem;
}
.featured-excerpt {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}
.author-meta {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: auto;
}
.author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(168, 85, 247, 0.4);
}
.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}
.post-sub-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   BLOG POSTS GRID
   -------------------------------------------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(168, 85, 247, 0.35);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(168, 85, 247, 0.15);
}
.post-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}
.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.post-card:hover .post-thumb img {
    transform: scale(1.05);
}
.post-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.post-card-title {
    font-family: var(--font-title);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    margin: 0.75rem 0 0.65rem;
}
.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   LEAD GENERATION & ESTIMATOR BANNER
   -------------------------------------------------------------------------- */
.lead-gen-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(6, 182, 212, 0.12) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    margin: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}
.lead-gen-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.85rem;
}
.lead-gen-desc {
    max-width: 620px;
    margin: 0 auto 1.75rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   SINGLE POST READER VIEW (blog-post.html)
   -------------------------------------------------------------------------- */
.article-header {
    padding: 3.5rem 0 2rem;
    max-width: 860px;
    margin: 0 auto;
}
.article-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.article-breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
}
.article-breadcrumbs a:hover {
    color: var(--primary);
}
.article-title {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    margin-bottom: 1.5rem;
}
.article-hero-cover {
    width: 100%;
    max-height: 480px;
    border-radius: 18px;
    object-fit: cover;
    margin: 2rem 0;
    border: 1px solid var(--glass-border);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1180px;
    margin: 0 auto 5rem;
}
.article-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: #cbd5e1;
}
.article-content h2 {
    font-family: var(--font-title);
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin: 2.5rem 0 1rem;
    scroll-margin-top: 100px;
}
.article-content h3 {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 600;
    color: #f1f5f9;
    margin: 1.75rem 0 0.75rem;
}
.article-content p {
    margin-bottom: 1.5rem;
}
.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}
.article-content li {
    margin-bottom: 0.5rem;
}
.article-content pre {
    background: #0d0d15;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.article-content code {
    background: rgba(255, 255, 255, 0.08);
    color: #f472b6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}
.article-content blockquote {
    border-left: 3px solid var(--primary);
    padding: 0.85rem 1.25rem;
    background: rgba(168, 85, 247, 0.08);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #e2e8f0;
}
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}
.article-content th, .article-content td {
    padding: 0.85rem 1rem;
    border: 1px solid var(--glass-border);
    text-align: left;
}
.article-content th {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-weight: 600;
}

/* Sticky Sidebar Widget */
.article-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.5rem;
}

/* --------------------------------------------------------------------------
   AUTHOR / ADMIN PORTAL STYLES (blog-admin.html)
   -------------------------------------------------------------------------- */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
}
.admin-form-group {
    margin-bottom: 1.25rem;
}
.admin-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 0.4rem;
}
.admin-input, .admin-select, .admin-textarea {
    width: 100%;
    background: rgba(10, 10, 16, 0.85);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.25);
}
.editor-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.editor-preview-box {
    background: rgba(7, 7, 12, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-y: auto;
    max-height: 500px;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-thumb {
        min-height: 240px;
    }
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
    }
    .editor-split-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .blog-hero-title {
        font-size: 2rem;
    }
    .article-title {
        font-size: 1.85rem;
    }
    .affiliate-promo-card {
        flex-direction: column;
        text-align: center;
    }
}
