/* ========================================
   CIPD Assessment - Blog Styles
   ======================================== */

/* ---- Blog Archive Page ---- */
.blog-hero {
    padding: 80px 8% 60px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
}

.blog-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
}

.blog-archive-section {
    padding: 20px 8% 80px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 30px;
}

.blog-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.25);
}

.blog-card-thumb {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
}

.post-featured-image,
.post-image {
    margin: 28px 0;
}

.post-featured-image img,
.post-image img {
    width: 100%;
    max-width: 100%;
    max-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px;
}

.blog-card-thumb-placeholder {
    width: 100%;
    height: 210px;
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-thumb-placeholder i {
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    background: rgba(0,229,255,0.15);
    color: #00e5ff;
    border: 1px solid rgba(0,229,255,0.3);
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 18px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 18px;
}

.blog-card-meta i {
    margin-right: 5px;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #00e5ff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s;
}

.blog-card:hover .blog-card-link {
    gap: 13px;
}

/* ---- Single Blog Post ---- */
.blog-post-wrap {
    padding: 40px 8% 80px;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* Reset the global hero main{} rule so blog content renders as a normal block column */
.blog-post-wrap main,
.blog-main {
    display: block;
    padding: 0;
    gap: 0;
    min-width: 0;
}

/* Breadcrumb */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.blog-breadcrumb a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-breadcrumb a:hover {
    color: #00e5ff;
}

.blog-breadcrumb .sep {
    color: rgba(255,255,255,0.3);
}

.blog-breadcrumb .current {
    color: rgba(255,255,255,0.85);
}

/* Post header */
.post-category-badge {
    display: inline-block;
    background: rgba(0,229,255,0.15);
    color: #00e5ff;
    border: 1px solid rgba(0,229,255,0.3);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 16px;
}

.post-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 18px;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta i {
    color: #00e5ff;
}

/* Quick answer box */
.quick-answer-box {
    background: rgba(0,229,255,0.07);
    border: 1px solid rgba(0,229,255,0.25);
    border-left: 4px solid #00e5ff;
    border-radius: 12px;
    padding: 20px 22px;
    margin-bottom: 32px;
}

.quick-answer-box .qa-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #00e5ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-answer-box p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin: 0;
}

/* Post content typography */
.post-content {
    color: rgba(255,255,255,0.87);
    font-size: 1rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,229,255,0.25);
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-top: 28px;
    margin-bottom: 12px;
}

.post-content p {
    margin-bottom: 16px;
}

.post-content ul,
.post-content ol {
    padding-left: 22px;
    margin-bottom: 20px;
}

.post-content li {
    margin-bottom: 8px;
    color: rgba(255,255,255,0.82);
}

.post-content strong {
    color: #fff;
    font-weight: 600;
}

.post-content a {
    color: #00e5ff;
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content em {
    color: rgba(255,255,255,0.75);
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 28px;
    font-size: 0.92rem;
    border-radius: 10px;
    overflow: hidden;
}

.post-content table thead th,
.post-content table tr:first-child td {
    background: rgba(0,229,255,0.15);
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid rgba(0,229,255,0.3);
}

.post-content table td {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.82);
}

.post-content table tr:hover td {
    background: rgba(255,255,255,0.04);
}

/* CTA box inside content */
.post-cta-box {
    background: linear-gradient(135deg, rgba(106, 27, 154, 0.6) 0%, rgba(74, 20, 140, 0.6) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 28px 30px;
    margin: 36px 0;
    text-align: center;
}

.post-cta-box h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.post-cta-box p {
    color: rgba(255,255,255,0.75);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.post-cta-box .cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.post-cta-box .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #00e5ff, #0091ea);
    color: #1a0035;
    padding: 11px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-cta-box .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,229,255,0.4);
}

.post-cta-box .cta-btn.secondary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.post-cta-box .cta-btn.secondary:hover {
    border-color: #00e5ff;
    color: #00e5ff;
    box-shadow: none;
}

/* FAQ */
.faq-section {
    margin-top: 44px;
}

.faq-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,229,255,0.25);
}

.faq-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #fff;
    font-size: 0.97rem;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(255,255,255,0.05);
}

.faq-question i {
    color: #00e5ff;
    font-size: 0.85rem;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 20px 18px;
    color: rgba(255,255,255,0.78);
    font-size: 0.93rem;
    line-height: 1.7;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 14px;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ---- Sidebar ---- */
.blog-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 22px 20px;
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,229,255,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-widget-title i {
    color: #00e5ff;
}

/* TOC sidebar widget */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc-list li {
    counter-increment: toc-counter;
    margin-bottom: 0;
}

.toc-list li a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.45;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}

.toc-list li:last-child a {
    border-bottom: none;
}

.toc-list li a::before {
    content: counter(toc-counter);
    min-width: 22px;
    height: 22px;
    background: rgba(0,229,255,0.15);
    color: #00e5ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.toc-list li a:hover {
    color: #00e5ff;
}

.toc-list li a.active {
    color: #00e5ff;
}

/* Recent posts widget */
.recent-post-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    align-items: flex-start;
    transition: opacity 0.2s;
}

.recent-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-post-item:hover {
    opacity: 0.85;
}

.recent-post-thumb {
    width: 60px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #6a1b9a 0%, #4a148c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recent-post-thumb i {
    color: rgba(255,255,255,0.3);
    font-size: 1.2rem;
}

.recent-post-info {
    flex: 1;
}

.recent-post-title {
    font-size: 0.83rem;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 4px;
}

.recent-post-date {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
}

/* Categories widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}

.category-list li:last-child a {
    border-bottom: none;
}

.category-list li a:hover {
    color: #00e5ff;
}

.category-list li a .cat-count {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1px 10px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, rgba(0,229,255,0.12) 0%, rgba(106,27,154,0.4) 100%);
    border: 1px solid rgba(0,229,255,0.25);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
}

.sidebar-cta h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.sidebar-cta p {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
    line-height: 1.5;
}

.sidebar-cta .cta-btn {
    display: block;
    background: linear-gradient(135deg, #00e5ff, #0091ea);
    color: #1a0035;
    padding: 11px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
}

.sidebar-cta .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,229,255,0.4);
}

.sidebar-cta .whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25D366;
    color: #fff;
    padding: 10px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.sidebar-cta .whatsapp-btn:hover {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-post-wrap {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .blog-archive-section,
    .blog-post-wrap {
        padding-left: 5%;
        padding-right: 5%;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .post-content h2 {
        font-size: 1.3rem;
    }
}
