/* ==========================================================================
   Category Pillar Page V2 — Stylesheet
   Boudoir Inspiration
   ========================================================================== */

/* --- Hero / Header Section --- */
.pillar-hero {
    background: #0a0a0a;
    padding: 4rem 0 2rem;
    text-align: center;
    border-bottom: 1px solid #222;
}

.pillar-hero .breadcrumbs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1.5rem;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.pillar-hero .breadcrumbs li {
    display: inline;
}

.pillar-hero .breadcrumbs li + li::before {
    content: '/';
    margin: 0 0.5rem;
    color: #555;
}

.pillar-hero .breadcrumbs a {
    color: #ccc;
    text-decoration: none;
}

.pillar-hero .breadcrumbs a:hover {
    color: #fff;
}

.pillar-hero .breadcrumbs .current {
    color: #e91e63; /* Boudoir brand accent */
}

.pillar-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.pillar-hero .intro-text {
    font-size: 1.15rem;
    color: #aaa;
    max-width: 720px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}

.pillar-hero .category-meta {
    font-size: 0.9rem;
    color: #666;
}

.pillar-hero .category-meta span {
    margin: 0 0.75rem;
}

@media (max-width: 768px) {
    .pillar-hero {
        padding: 2.5rem 1rem 1.5rem;
    }
    .pillar-hero h1 {
        font-size: 1.75rem;
    }
    .pillar-hero .intro-text {
        font-size: 1rem;
    }
}

/* --- Intro Text Collapse Toggle --- */
.intro-text-wrapper { position: relative; }

.intro-text-wrapper .intro-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.intro-text-wrapper .intro-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.intro-text-toggle {
    display: block;
    background: none;
    border: none;
    color: #b8860b;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 0 0;
    margin: 0 auto;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.intro-text-toggle:hover { color: #d4a017; }

@media (max-width: 768px) {
    .intro-text-toggle { font-size: 0.8rem; }
}

/* --- Table of Contents (Sticky Sidebar) --- */
.pillar-toc {
    position: sticky;
    top: calc(80px + 1rem);
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.col-xl-4 .pillar-toc:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 0;
}

.pillar-toc h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 0.75rem;
}

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

.pillar-toc ul li {
    margin-bottom: 0.4rem;
}

.pillar-toc ul li a {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: all 0.2s ease;
}

.pillar-toc ul li a:hover,
.pillar-toc ul li a.active {
    color: #e91e63;
    border-left-color: #e91e63;
}

.pillar-toc ul li ul {
    padding-left: 1rem;
}


/* Override flex-grid image cropping inside pillar-toc sidebar */
.pillar-toc .flex-grid img {
    position: static;
    object-fit: contain;
    height: auto;
    width: 100%;
    border-radius: 8px;
}
.pillar-toc .grid-item a {
    display: block;
    line-height: 0;
}
@media (max-width: 1199px) {
    .pillar-toc {
        position: static;
        margin-bottom: 2rem;
    }
}

/* --- Featured Posts Section --- */
.pillar-featured {
    padding: 3rem 0;
}

.pillar-featured h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.pillar-featured .featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.pillar-featured .featured-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    display: block;
}

.pillar-featured .featured-card:hover {
    transform: translateY(-4px);
    border-color: #e91e63;
}

.pillar-featured .featured-card .card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1a1a1a;
}

.pillar-featured .featured-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pillar-featured .featured-card .card-body {
    padding: 1rem;
}

.pillar-featured .featured-card .card-body h3 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.35rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pillar-featured .featured-card .card-body .card-date {
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 1199px) {
    .pillar-featured .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .pillar-featured .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Content Before / After (Rich Text from DB) --- */
.pillar-content {
    color: #ccc;
    font-size: 1.05rem;
    line-height: 1.8;
    padding: 2rem 0;
}

.pillar-content h2 {
    font-size: 1.75rem;
    color: #fff;
    margin: 2.5rem 0 1rem;
    font-weight: 600;
}

.pillar-content h3 {
    font-size: 1.35rem;
    color: #eee;
    margin: 2rem 0 0.75rem;
    font-weight: 500;
}

.pillar-content p {
    margin-bottom: 1.25rem;
}

.pillar-content a {
    color: #e91e63;
    text-decoration: none;
}

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

.pillar-content ul,
.pillar-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.pillar-content ul li,
.pillar-content ol li {
    margin-bottom: 0.5rem;
}

.pillar-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.pillar-content blockquote {
    border-left: 3px solid #e91e63;
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin: 1.5rem 0;
    color: #999;
    font-style: italic;
}

/* --- Post Grid Section --- */
.pillar-posts {
    padding: 2rem 0 3rem;
}

.pillar-posts h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.pillar-posts .post-count {
    font-size: 0.9rem;
    color: #666;
    margin-left: 1rem;
    font-weight: 400;
}

/* --- Subcategory / Topic Navigation Cards --- */
.pillar-subcategories {
    padding: 2rem 0;
}

.pillar-subcategories h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.pillar-subcategories .subcat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.pillar-subcategories .subcat-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.25rem;
    text-decoration: none;
    color: #ccc;
    transition: border-color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pillar-subcategories .subcat-card:hover {
    border-color: #e91e63;
    background: #1a1a1a;
    text-decoration: none;
    color: #fff;
}

.pillar-subcategories .subcat-card .subcat-icon {
    font-size: 1.25rem;
    color: #e91e63;
}

.pillar-subcategories .subcat-card .subcat-label {
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- FAQ Accordion --- */
.pillar-faq {
    padding: 3rem 0;
    border-top: 1px solid #222;
}

.pillar-faq h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.faq-accordion {
    max-width: 800px;
}

.faq-item {
    border: 1px solid #222;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: #111;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #e91e63;
}

.faq-question .faq-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    color: #666;
}

.faq-item.open .faq-question .faq-icon {
    transform: rotate(45deg);
    color: #e91e63;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer-inner {
    padding: 0 1.25rem 1.25rem;
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* --- Related Categories Section --- */
.pillar-related {
    padding: 3rem 0;
}

.pillar-related h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.pillar-related .related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.pillar-related .related-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pillar-related .related-card:hover {
    border-color: #e91e63;
    transform: translateY(-2px);
    text-decoration: none;
}

.pillar-related .related-card h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.pillar-related .related-card p {
    font-size: 0.9rem;
    color: #777;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- CTA Section --- */
.pillar-cta {
    padding: 3rem 0;
    text-align: center;
}

.pillar-cta .cta-box {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #222;
    border-radius: 12px;
    padding: 3rem 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.pillar-cta .cta-box h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.pillar-cta .cta-box p {
    color: #aaa;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.pillar-cta .cta-box .cta-button {
    display: inline-block;
    background: #e91e63;
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.pillar-cta .cta-box .cta-button:hover {
    background: #c2185b;
    text-decoration: none;
}

/* --- Pagination --- */
.pillar-pagination {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0 1rem;
}

.pillar-pagination a,
.pillar-pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pillar-pagination a:hover {
    border-color: #e91e63;
    background: #1a1a1a;
    text-decoration: none;
}

.pillar-pagination .current {
    background: #e91e63;
    border-color: #e91e63;
    color: #fff;
}

/* --- General Section Containers --- */
.pillar-section {
    padding: 3rem 0;
}

.pillar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Sidebar Wrapper (sticky container for both asides) --- */
.pillar-sidebar {
    position: sticky;
    top: calc(80px + 1rem);
}

.pillar-sidebar .pillar-toc {
    position: static;
}
