/******************************* Blog Article Layout *******************************/

.blog-article {
    padding: 0 1.5rem 4rem;
    background-color: var(--white);
}

.blog-container {
    max-width: 50rem;
    margin: 0 auto;
    position: relative;
}

/* Breadcrumb */
.blog-breadcrumb {
    padding: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.blog-breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--cta-color);
}

.blog-breadcrumb span {
    margin: 0 0.4rem;
    color: #ccc;
}

/* Article Header */
.article-header {
    margin-bottom: 2.5rem;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #212121;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.article-meta .separator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
}

/* Share Row (mobile/tablet) */
.share-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.share-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #E9E9E9;
    color: #6d6d6d;
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.share-row a:hover {
    border-color: #313131;
    text-decoration: none;
}

.share-row svg {
    width: 16px;
    height: 16px;
}

/* Featured Image */
.featured-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

/******************************* Article Content *******************************/

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212121;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    color: #212121;
    margin: 2rem 0 0.75rem;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 2;
    color: #313131;
    margin-bottom: 1.25rem;
}

.article-content a {
    color: #FF642D;
    text-decoration: none;
}

.article-content a:hover {
    text-decoration: underline;
}

.article-content strong {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

/******************************* Testimonial Quote *******************************/

.article-quote {
    border-left: 3px solid var(--cta-color);
    background: #F9F9F9;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1.75rem 2rem;
    margin: 2.5rem 0;
}

.article-quote p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #8D3777;
    font-style: italic;
    margin: 0 0 1rem;
}

.article-quote cite {
    font-size: 0.9rem;
    font-style: normal;
    color: var(--secondary-color);
    display: block;
}

.article-quote cite strong {
    color: var(--primary-color);
}

/******************************* CTA Inline Card *******************************/

.cta-inline-card {
    background: #212121;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cta-inline-card p {
    font-size: 1.1rem;
      line-height: 1.5;
      color: #fff;
      margin: 0;
      font-weight: bold;
}

.cta-inline-card a {
    color: var(--cta-color);
    font-weight: var(--font-medium);
    text-decoration: none;
}

.cta-inline-card a:hover {
    text-decoration: underline;
}

.cta-inline-card .cta-button {
    position: relative;
    display: inline-block;
    background: linear-gradient(100deg,#3b82f6,#7a5cff 30%,#ff4fa3 65%,#ff8a6a);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transform-style: preserve-3d;
    transition: transform 0.15s;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.cta-inline-card .cta-button:hover {
    text-decoration: none;
}

.cta-inline-card .cta-button:active {
    background: var(--cta-hover);
    transform: translate(0, 0.25em);
}

.cta-inline-card .cta-button:active::before {
    transform: translate3d(0, 0, -1em);
}

/******************************* Section Images *******************************/

.section-image {
    width: 100%;
    margin: 1.5rem 0 2rem;
    border-radius: var(--radius-sm);
    border: 1px solid #EDEDED;
    overflow: hidden;
}

.section-image img {
    width: 100%;
    height: auto;
    display: block;
}

.section-image figcaption {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-align: center;
    padding: 0.6rem 1rem;
    background: #FAFAFA;
    border-top: 1px solid #EDEDED;
}

/******************************* Pros / Cons *******************************/

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.pros-list,
.cons-list {
    background: var(--white);
    border: 1px solid #E9E9E9;
    border-radius: var(--radius-sm);
    padding: 1.75rem;
}

.pros-list h3,
.cons-list h3 {
    font-size: 1.15rem;
    font-weight: var(--font-semibold);
    color: var(--primary-color);
    margin: 0 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pros-list h3::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #22C55E;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.cons-list h3::before {
    content: "";
    display: inline-block;
    width: 22px;
    height: 22px;
    background: #EF4444;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.pros-cons-item {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #313131;
}

.pros-cons-item:last-child {
    margin-bottom: 0;
}

.pros-list .pros-cons-item::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322C55E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.cons-list .pros-cons-item::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/******************************* In-Article Newsletter (Circle style) *******************************/

.article-newsletter {
    background: #F5F5F5;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    margin: 3rem 0;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.article-newsletter-text {
    flex: 1;
}

.article-newsletter-text h3 {
    font-size: 1.25rem;
    font-weight: var(--font-semibold);
    color: var(--primary-color);
    line-height: 1.4;
    margin: 0;
}

.article-newsletter-form {
    flex: 1;
    display: flex;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-xlg);
    padding: 0.4rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-newsletter-form input {
    flex: 1;
    padding: 0.7rem 1.25rem;
    border: none;
    font-size: 0.95rem;
    color: var(--primary-color);
    background: transparent;
    border-radius: var(--radius-xlg);
}

.article-newsletter-form input::placeholder {
    color: #ACACAC;
}

.article-newsletter-form input:focus {
    outline: none;
}

.article-newsletter-form .nl-btn {
    background: var(--cta-color);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-xlg);
    font-size: 0.95rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.article-newsletter-form .nl-btn:hover {
    background: var(--cta-hover);
}

/******************************* Friendly Closing *******************************/

.article-closing {
    padding: 2rem 0;
    margin: 2rem 0;
    border-top: 1px solid #E9E9E9;
}

.article-closing p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.article-closing a {
    color: var(--cta-color);
    text-decoration: none;
}

.article-closing a:hover {
    text-decoration: underline;
}

/******************************* Related Blog Post Cards *******************************/

.related-posts {
    margin: 3rem 0;
}

.related-posts h2 {
    font-size: 1.4rem;
    font-weight: var(--font-semibold);
    color: #212121;
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.related-post-card {
    border: 1px solid #E9E9E9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
    display: block;
}

.related-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.related-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.rpc-body {
    padding: 1rem 1.25rem;
}

.rpc-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.rpc-meta .cat {
    color: var(--cta-color);
    font-weight: var(--font-medium);
}

.rpc-body h3 {
    font-size: 1rem;
    font-weight: var(--font-semibold);
    color: var(--primary-color);
    line-height: 1.4;
    margin: 0;
}

/******************************* Table of Contents - Mobile *******************************/

.toc-mobile {
    background: #F9FAFB;
    border: 1px solid #ECECEC;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.toc-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: var(--font-medium);
    color: var(--primary-color);
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.toc-toggle svg {
    transition: transform 0.2s ease;
}

.toc-toggle.active svg {
    transform: rotate(180deg);
}

.toc-list {
    list-style: none;
    padding: 0 1.25rem 1rem;
    display: none;
}

.toc-list.active {
    display: block;
}

.toc-list li {
    padding: 0.4rem 0;
}

.toc-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.toc-list a:hover {
    color: var(--cta-color);
}

/******************************* Desktop Sidebar TOC + Social *******************************/

.toc-sidebar,
.social-sidebar {
    display: none;
}

@media (min-width: 1200px) {
    .toc-mobile {
        display: none;
    }

    .blog-layout {
        display: flex;
        justify-content: center;
        gap: 0;
        max-width: 80rem;
        margin: 0 auto;
    }

    .blog-layout .blog-container {
        flex: 0 1 50rem;
        min-width: 0;
    }

    .social-sidebar {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 4rem;
        flex-shrink: 0;
        position: sticky;
        top: 8rem;
        align-self: flex-start;
        align-items: center;
        z-index: 10;
    }

    .social-sidebar a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        border: 1px solid #E9E9E9;
        text-decoration: none;
        background: var(--white);
    }

    .social-sidebar a.share-x { color: #313131; }
    .social-sidebar a.share-facebook { color: #1877F2; }
    .social-sidebar a.share-linkedin { color: #0A66C2; }
    .social-sidebar a.share-pinterest { color: #E60023; }

    .social-sidebar svg {
        width: 18px;
        height: 18px;
    }

    .toc-sidebar {
        display: block;
        width: 15rem;
        flex-shrink: 0;
        position: sticky;
        top: 8rem;
        align-self: flex-start;
        z-index: 10;
        padding-left: 1rem;
    }

    .toc-sidebar h4 {
        font-size: 1.4rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
        font-weight: var(--font-semibold);
    }

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

    .toc-sidebar li {
        padding: 0.5rem 0;
        border-top: 1px solid #EDEDED;
    }

    .toc-sidebar a {
        color: var(--secondary-color);
        text-decoration: none;
        font-size: 0.92rem;
        line-height: 1.5;
        display: block;
    }

    .toc-sidebar a:hover {
        color: var(--primary-color);
    }

    .toc-sidebar a.active {
        color: var(--primary-color);
        font-weight: var(--font-semibold);
    }
    
    .share-row {
        display: none;
    }
}

/******************************* Blog FAQ Accordion *******************************/

.blog-faqs {
    margin: 2.5rem 0;
}

.blog-faqs .faq-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.blog-faqs .faq-item {
    border-bottom: 1px solid #E9E9E9;
    background: transparent;
    border-radius: 0;
}

.blog-faqs .faq-item:first-child {
    border-top: 1px solid #E9E9E9;
}

.blog-faqs .faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.05rem;
    font-weight: var(--font-semibold);
    color: var(--primary-color);
    cursor: pointer;
}

.blog-faqs .faq-question:hover {
    color: var(--primary-color);
}

.blog-faqs .expand-icon {
    flex-shrink: 0;
    margin-left: 1rem;
    font-size: 1.25rem;
    font-weight: var(--font-regular);
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.blog-faqs .faq-question[aria-expanded="true"] .expand-icon {
    transform: rotate(45deg);
}

.blog-faqs .faq-answer {
    padding: 0 0 1.25rem;
    color: #313131;
    line-height: 1.8;
    font-size: 1rem;
}

.blog-faqs .faq-answer[hidden] {
    display: none;
}

.blog-faqs .faq-answer p {
    margin: 0;
}

/******************************* Full-width Bottom Sections *******************************/

.blog-bottom-full {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/******************************* Responsive *******************************/

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-content h2 {
        font-size: 1.4rem;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .article-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 2rem 1.25rem;
    }

    .article-newsletter-form {
        flex-direction: column;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .article-newsletter-form input {
        border-radius: var(--radius-sm);
    }

    .article-newsletter-form .nl-btn {
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-inline-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.5rem;
    }
    .article-content p {
      font-size: 1rem;
      line-height: 1.7;
    }
}

/******************************* Blog Index Page *******************************/

.blog-index-hero {
    text-align: center;
    padding: 4rem 1.5rem 2rem;
    background: var(--white);
}

.blog-index-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #212121;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.blog-index-hero p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    line-height: 1.6;
    max-width: 32rem;
    margin: 0 auto;
}

/* Category Filter Pills */
.blog-filters {
    background: var(--white);
    padding: 0 1.5rem 1.5rem;
}

.blog-filters-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-xlg);
    border: 1px solid #E0E0E0;
    background: var(--white);
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.filter-pill:hover {
    border-color: #313131;
    color: #313131;
}

.filter-pill.active {
    background: #212121;
    color: var(--white);
    border-color: #212121;
}

/* Newsletter section on blog index */
.blog-index-newsletter {
    background: var(--white);
    padding: 1rem 1.5rem 2rem;
}

.blog-index-newsletter-container {
    max-width: 72rem;
    margin: 0 auto;
}

/* Blog Posts Grid */
.blog-posts {
    background: var(--white);
    padding: 1rem 1.5rem 4rem;
}

.blog-posts-container {
    max-width: 72rem;
    margin: 0 auto;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* Blog Post Card */
.blog-post-card {
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    text-decoration: none;
}

.blog-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover img {
    transform: scale(1.05);
}

.bpc-body {
    padding: 1.25rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bpc-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.bpc-meta .cat {
    color: var(--cta-color);
    font-weight: var(--font-medium);
}

.bpc-body h2 {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
    line-height: 1.45;
    margin: 0 0 0.6rem;
}

/******************************* Blog Index Responsive *******************************/

@media (max-width: 900px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-index-hero {
        padding: 3rem 1.5rem 1.5rem;
    }

    .blog-index-hero h1 {
        font-size: 2.5rem;
    }

    .blog-index-hero p {
        font-size: 1rem;
    }

    .blog-index-newsletter .article-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 2rem 1.25rem;
    }

    .blog-index-newsletter .article-newsletter-form {
        flex-direction: column;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .blog-index-newsletter .article-newsletter-form input {
        border-radius: var(--radius-sm);
    }

    .blog-index-newsletter .article-newsletter-form .nl-btn {
        border-radius: var(--radius-sm);
        width: 100%;
    }
}

@media (max-width: 600px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-post-card img {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .blog-index-hero h1 {
        font-size: 2rem;
    }

    .filter-pill {
        padding: 0.5rem 1rem;
        font-size: 0.92rem;
    }
    
    .bpc-meta {
        gap: 0.4rem;
        font-size: 0.9rem;
    }
    
    .bpc-body h2 {
        font-size: 1.3rem;
    }
}
