/* Epilda Blog Styles - Unified Design System */
/* Color Scheme Inherited from index.php */

:root {
    --gold: #d4af37;
    --gold-light: #ecc94b;
    --gold-dim: #b8943a;
    --gold-glow: rgba(212,175,55,.35);
    --gold-faint: rgba(212,175,55,.07);
    --bk: #050608;
    --bk-card: #0e1012;
    --bk-card2: #141618;
    --border: rgba(212,175,55,.13);
    --border-hover: rgba(212,175,55,.3);
    --txt: #f0ebe3;
    --txt-mid: #b8b3aa;
    --txt-muted: #7a756e;
}

/* Base Styles */
body {
    font-family: 'Raleway', sans-serif;
    background: var(--bk);
    color: var(--txt);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 999;
    pointer-events: none;
    opacity: 0.11;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Navigation */
nav#mainNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 22px 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(5,6,8,.95) 0%, transparent 100%);
    transition: background 0.4s;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1.5px solid var(--gold);
    background: linear-gradient(135deg, rgba(212,175,55,.15), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-mark i {
    color: var(--gold);
    font-size: 17px;
}

.nav-logo-text {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--gold);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-links a {
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 11.5px;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-auth {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-login, .nav-register {
    font-size: 11.5px;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--txt-mid);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-login:hover, .nav-register:hover {
    color: var(--gold);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(212,175,55,.1);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.nav-logout {
    color: var(--txt-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-logout:hover {
    color: var(--gold);
}

/* Hero Section for Blog */
.hero-blog {
    margin-top: 120px;
    padding: 60px 0;
    background: linear-gradient(135deg, rgba(5,6,8,.9) 0%, rgba(212,175,55,.05) 100%);
    border-bottom: 1px solid var(--border);
}

.hero-blog h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 3px 40px rgba(0,0,0,.55);
}

.hero-blog p {
    font-size: 15.5px;
    line-height: 1.9;
    color: rgba(240,235,227,.82);
    margin-bottom: 32px;
    max-width: 600px;
}

/* Search Section */
.search-section {
    padding: 40px 0;
    background: var(--bk-card);
    border-bottom: 1px solid var(--border);
}

.search-form {
    max-width: 600px;
}

.search-form input {
    background: var(--bk-card2);
    border: 1px solid var(--border);
    color: var(--txt);
    padding: 14px 20px;
    border-radius: 13px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-form input::placeholder {
    color: var(--txt-muted);
}

.search-form input:focus {
    outline: none;
    border-color: rgba(212,175,55,.4);
    box-shadow: 0 0 0 3px rgba(212,175,55,.1);
    background: var(--bk-card2);
}

.search-form button {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    border: none;
    color: var(--bk);
    padding: 14px 20px;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.25s, box-shadow 0.3s;
    box-shadow: 0 4px 26px var(--gold-glow);
}

.search-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 36px var(--gold-glow);
}

/* Category Filter - Grid Card Style */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    justify-items: center;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 12px;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 15px;
    background: rgba(14, 16, 18, 0.92);
    border: 2px solid var(--border);
    text-decoration: none;
    color: var(--txt);
    transition: all 0.3s ease;
    cursor: pointer;
    gap: 8px;
    text-align: center;
    min-width: 120px;
    font-weight: 500;
}

.category-card i {
    font-size: 32px;
    transition: transform 0.3s ease;
}

.category-card small {
    font-size: 11px;
    color: var(--txt-muted);
    margin-top: 4px;
}

.category-card:hover,
.category-card.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px var(--gold-glow);
}

.category-card:hover i,
.category-card.active i {
    transform: scale(1.15);
}

/* Legacy Category Filter (fallback) */
.category-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-btn {
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--bk-card2);
    border: 1px solid var(--border);
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--bk);
    border-color: var(--gold);
    box-shadow: 0 4px 20px var(--gold-glow);
}

/* Featured Post */
.featured-post {
    margin-bottom: 48px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0,0,0,.45);
    background: rgba(14,16,18,.92);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.featured-image {
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(5,6,8,.95));
    padding: 48px;
    color: var(--txt);
}

.featured-overlay h2 {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.featured-overlay a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.featured-overlay a:hover {
    color: var(--gold);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--bk);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 32px var(--gold-glow);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

/* Blog Card */
.blog-card {
    background: rgba(14,16,18,.92);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212,175,55,.3);
    box-shadow: 0 20px 50px rgba(212,175,55,.15);
}

.blog-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.blog-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(5,6,8,.3));
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-title {
    margin-bottom: 12px;
}

.blog-title a {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    line-height: 1.4;
    font-family: 'Cinzel', serif;
    transition: color 0.3s;
}

.blog-title a:hover {
    color: var(--gold);
}

.blog-excerpt {
    color: var(--txt-mid);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: auto;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--txt-muted);
    font-size: 12px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
}

.author-name {
    font-size: 12px;
    color: var(--txt-mid);
}

.blog-date {
    font-size: 11px;
    color: var(--txt-muted);
}

.blog-views {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--txt-muted);
    font-size: 12px;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 48px 0;
    flex-wrap: wrap;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--bk-card2);
    border: 1px solid var(--border);
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-wrapper a:hover {
    background: rgba(212,175,55,.1);
    border-color: rgba(212,175,55,.3);
    color: var(--gold);
}

.pagination-wrapper span.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--bk);
    border-color: var(--gold);
}

/* Sidebar */
.sidebar {
    margin-top: 48px;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    height: fit-content;
}

.sidebar-widget {
    background: rgba(14,16,18,.92);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    position: relative;
    top: auto;
}

.sidebar-widget h3 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget h3 i {
    color: var(--gold);
    font-size: 14px;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-widget a:hover {
    color: var(--gold);
}

/* Footer */
.footer-section {
    background: var(--bk-card);
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 52px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    grid-column: span 1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 16px;
}

.footer-logo i {
    font-size: 24px;
}

.footer-brand p {
    color: var(--txt-mid);
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bk-card2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.social-icon:hover {
    background: rgba(212,175,55,.1);
    border-color: rgba(212,175,55,.3);
    color: var(--gold);
}

.footer-column h4 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--gold);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright p {
    color: var(--txt-muted);
    font-size: 12px;
    margin: 0;
}

.footer-links-bottom {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}

.footer-links-bottom a {
    color: var(--txt-mid);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links-bottom a:hover {
    color: var(--gold);
}

.footer-links-bottom span {
    color: var(--txt-muted);
}

/* Responsive */
@media (max-width: 768px) {
    nav#mainNav {
        padding: 16px 24px;
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 20px;
        font-size: 10px;
    }

    .hero-blog {
        margin-top: 100px;
        padding: 40px 0;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-image {
        height: 300px;
    }

    .featured-overlay {
        padding: 32px;
    }

    .featured-overlay h2 {
        font-size: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}
/* ========================================
   STICKY SIDEBAR ON SCROLL
   ======================================== */
.sidebar-widget {
    background: rgba(14, 16, 18, .92);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.sidebar-widget h3 {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child {
    border-bottom: none;
}

.sidebar-widget a {
    color: var(--txt-mid);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.sidebar-widget a:hover {
    color: var(--gold);
}

/* HTML Content Display */
.blog-body {
    word-break: break-word;
    overflow-wrap: break-word;
}

.blog-body p {
    margin-bottom: 16px;
    line-height: 1.8;
}

.blog-body h1,
.blog-body h2,
.blog-body h3,
.blog-body h4,
.blog-body h5,
.blog-body h6 {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    margin-top: 24px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.blog-body h1 { font-size: 32px; }
.blog-body h2 { font-size: 28px; }
.blog-body h3 { font-size: 24px; }
.blog-body h4 { font-size: 20px; }
.blog-body h5 { font-size: 18px; }
.blog-body h6 { font-size: 16px; }

.blog-body ul,
.blog-body ol {
    margin-bottom: 16px;
    margin-left: 20px;
}

.blog-body ul li,
.blog-body ol li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.blog-body blockquote {
    border-left: 4px solid var(--gold);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--txt-mid);
    font-style: italic;
}

.blog-body a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.blog-body a:hover {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
}

.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.blog-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.blog-body table th,
.blog-body table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.blog-body table th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold);
    font-weight: 600;
}

.blog-body code {
    background: rgba(212, 175, 55, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--gold-light);
}

.blog-body pre {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 20px 0;
}

.blog-body pre code {
    background: none;
    padding: 0;
    color: var(--txt-mid);
    display: block;
}

/* Related Articles Grid - Two Per Row Max */
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* FA Icon Placeholders */
.fa-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    opacity: 0.5;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    background: transparent;
    padding: 16px 0;
    margin-top: 120px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .breadcrumb-nav {
        margin-top: 96px;
    }
}

.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
}

.breadcrumb-list li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--txt-muted);
}

.breadcrumb-list a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-list a:hover {
    color: var(--gold-light);
}

.breadcrumb-list span {
    color: var(--txt-mid);
}