/* ══════════════════════════════════════════════════════
   BLOG ARTICLE STYLES - imprumutacum.ro
   Enhanced blog-specific styles for all /blog/ pages
   Emerald + Coral Glassmorphism Theme
   ══════════════════════════════════════════════════════ */

/* ══════════ ARTICLE HERO ══════════ */
.article-hero {
    background: linear-gradient(135deg, #064E3B 0%, #065F46 40%, #047857 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255,255,255,.4) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.04;
    pointer-events: none;
}

.article-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 40px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    pointer-events: none;
}

.article-hero h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 14px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    line-height: 1.25;
    text-shadow: 0 2px 12px rgba(0,0,0,.1);
}

/* ══════════ ARTICLE META ══════════ */
.article-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    font-size: .88rem;
    opacity: .85;
    margin-top: 14px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.article-meta span:nth-child(1)::before {
    content: '\1F4C5';
    font-size: .8rem;
}

.article-meta span:nth-child(2)::before {
    content: '\23F1';
    font-size: .8rem;
}

.article-meta span:nth-child(3)::before {
    content: '\270D';
    font-size: .8rem;
}

/* ══════════ BLOG BREADCRUMB (inside hero) ══════════ */
.article-hero .breadcrumb {
    padding: 18px 0 0;
    font-size: .88rem;
    color: rgba(255,255,255,.6);
    background: transparent;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.article-hero .breadcrumb a {
    color: #6EE7B7;
    text-decoration: none;
    transition: color .3s ease;
}

.article-hero .breadcrumb a:hover {
    color: #fff;
    text-decoration: underline;
}

.article-hero .breadcrumb a:first-child::before {
    content: '\1F3E0';
    margin-right: 4px;
    font-size: .78rem;
}

/* ══════════ ARTICLE LAYOUT ══════════ */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 48px 0 64px;
    align-items: start;
}

.article-layout > * {
    min-width: 0;
}

/* ══════════ ARTICLE BODY (blog-specific overrides) ══════════ */
.article-layout .article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #475569;
}

.article-layout .article-body h2 {
    font-size: 1.55rem;
    color: #1E293B;
    margin: 40px 0 16px;
    padding-top: 12px;
    border-left: 4px solid var(--primary, #047857);
    padding-left: 16px;
    line-height: 1.3;
}

.article-layout .article-body h3 {
    font-size: 1.2rem;
    color: #065F46;
    margin: 28px 0 12px;
    background: #ecfdf5;
    padding: 10px 16px;
    border-radius: 10px;
}

.article-layout .article-body p {
    margin-bottom: 16px;
    color: #475569;
}

.article-layout .article-body ul,
.article-layout .article-body ol {
    margin: 0 0 18px 0;
    padding-left: 0;
}

.article-layout .article-body ul {
    list-style: none;
}

.article-layout .article-body ul li {
    margin-bottom: 8px;
    padding: 6px 0 6px 28px;
    position: relative;
    color: #475569;
}

.article-layout .article-body ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary, #047857);
    opacity: 0.6;
}

.article-layout .article-body ol {
    list-style: none;
    counter-reset: blog-ol;
}

.article-layout .article-body ol li {
    margin-bottom: 8px;
    padding-left: 36px;
    position: relative;
    counter-increment: blog-ol;
    color: #475569;
}

.article-layout .article-body ol li::before {
    content: counter(blog-ol);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #047857, #065F46);
    color: #fff;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(4,120,87,.2);
}

.article-layout .article-body strong {
    color: #1E293B;
}

.article-layout .article-body a {
    color: var(--primary, #047857);
    text-decoration: underline;
    text-decoration-color: rgba(4,120,87,.3);
    text-underline-offset: 3px;
    transition: text-decoration-color .3s ease, color .3s ease;
}

.article-layout .article-body a:hover {
    text-decoration-color: var(--primary, #047857);
    color: #065F46;
}

/* ══════════ AUTHOR BOX ══════════ */
.author-box {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 28px;
    margin-top: 40px;
    display: flex;
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(255,255,255,.4);
    box-shadow: 0 8px 32px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
}

.author-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #047857, #F97316, #047857);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #047857, #065F46);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(4,120,87,.25);
}

.author-info h4 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #1E293B;
}

.author-info p {
    margin: 0;
    font-size: .88rem;
    color: #64748B;
    line-height: 1.6;
}

/* ══════════ SIDEBAR CTA BOX ══════════ */
.sidebar-cta-box {
    background: linear-gradient(135deg, #047857 0%, #065F46 50%, #064E3B 100%);
    color: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    position: sticky;
    top: 100px;
    box-shadow: 0 12px 40px rgba(4,120,87,.2);
    border: 1px solid rgba(255,255,255,.1);
    overflow: hidden;
}

.sidebar-cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 60%);
    pointer-events: none;
}

.sidebar-cta-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 50%;
    transform: translate(30%, 30%);
    pointer-events: none;
}

.sidebar-cta-box h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.sidebar-cta-box p {
    font-size: .92rem;
    opacity: .9;
    margin-bottom: 20px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.sidebar-cta-box .btn-cta-white {
    display: inline-block;
    background: #fff;
    color: #047857;
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: transform .2s ease, box-shadow .3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.sidebar-cta-box .btn-cta-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

/* ══════════ RELATED POSTS ══════════ */
.related-posts {
    padding: 48px 0 64px;
    background: #F0FDF4;
}

.related-posts h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 1.6rem;
    color: #1E293B;
    font-weight: 900;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ══════════ RELATED CARD ══════════ */
.related-card {
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 20px;
    padding: 0;
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .3s ease, box-shadow .3s ease;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,.04);
}

.related-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #047857, #F97316);
    transition: height .3s ease;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(4,120,87,.1);
}

.related-card:hover::before {
    height: 5px;
}

.related-card h3 {
    font-size: 1rem;
    margin: 0 0 8px;
    padding: 20px 22px 0;
}

.related-card h3 a {
    color: #1E293B;
    text-decoration: none;
    transition: color .3s ease;
}

.related-card h3 a:hover {
    color: var(--primary, #047857);
}

.related-card p {
    font-size: .88rem;
    color: #64748B;
    line-height: 1.6;
    padding: 0 22px 22px;
    margin: 0;
}

/* ══════════ READING PROGRESS ══════════ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--primary, #047857), var(--accent, #F97316));
    z-index: 1100;
    transition: width .1s linear;
}

/* ══════════ TABLE OF CONTENTS ══════════ */
.toc-box {
    background: rgba(255,255,255,.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(4,120,87,.15);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.toc-box h3 {
    font-size: .95rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 10px;
}

.toc-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-box ul li {
    padding: 0;
}

.toc-box ul li::before {
    display: none;
}

.toc-box ul li a {
    display: block;
    padding: 6px 0 6px 16px;
    font-size: .88rem;
    color: #475569;
    font-weight: 600;
    border-left: 2px solid #e2e8f0;
    transition: all .2s;
    text-decoration: none;
}

.toc-box ul li a:hover {
    color: #047857;
    border-left-color: #047857;
    padding-left: 20px;
}

/* ══════════ BLOG RESPONSIVE ══════════ */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-cta-box {
        position: relative;
        top: auto;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Simplify glass for mobile */
    .related-card,
    .author-box {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #fff;
    }

    .article-meta span {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (max-width: 600px) {
    .article-hero {
        padding: 44px 0 40px;
    }

    .article-hero h1 {
        font-size: 1.3rem;
        line-height: 1.3;
    }

    .article-hero .breadcrumb {
        font-size: .75rem;
    }

    .article-meta {
        gap: 6px;
        font-size: .75rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .article-meta span {
        padding: 3px 8px;
        font-size: .72rem;
    }

    .article-body p {
        font-size: .88rem;
    }

    .article-body h2 {
        font-size: 1.2rem;
    }

    .article-body h3 {
        font-size: 1rem;
    }

    .article-body ul li,
    .article-body ol li {
        font-size: .85rem;
    }

    .toc-box {
        padding: 16px 18px;
    }

    .toc-box h3 {
        font-size: .88rem;
    }

    .toc-box ul li a {
        font-size: .8rem;
        padding: 5px 0 5px 12px;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }

    .sidebar-cta-box {
        padding: 22px 18px;
    }

    .sidebar-cta-box h3 {
        font-size: 1rem;
    }

    .related-posts {
        padding: 32px 0 40px;
    }

    .related-posts h2 {
        font-size: 1.2rem;
    }

    .related-card h3 {
        padding: 14px 16px 0;
        font-size: .9rem;
    }

    .related-card p {
        padding: 0 16px 16px;
        font-size: .8rem;
    }
}
