/* Pillar Page Styles */

/* Hero Section */
.pillar-hero {
    position: relative;
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.pillar-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(60, 173, 212, 0.8) 100%);
}

.pillar-hero .container {
    position: relative;
    z-index: 2;
}

.pillar-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.pillar-hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Per-page control: add hero_title_nowrap: true in frontmatter to prevent wrapping */
@media (min-width: 992px) {
    .pillar-hero-title-nowrap {
        white-space: nowrap;
    }
}

.pillar-hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.6;
}

.pillar-hero .btn {
    margin-bottom: 20px;
}

.pillar-hero-trust {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

/* Trust Bar */
.pillar-trust-bar {
    background: #1E3A5F;
    padding: 16px 0;
    text-align: center;
}

.pillar-trust-bar p {
    color: #fff;
    margin: 0;
    font-size: 1rem;
    font-style: italic;
}

/* Main Content Layout */
.pillar-main {
    padding: 60px 0 80px;
    background: #f8f9fa;
}

.pillar-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    align-items: stretch;
}

/* Table of Contents Sidebar */
.pillar-toc {
    position: relative;
}

.pillar-toc-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.pillar-toc h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1E3A5F;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3CADD4;
}

.pillar-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pillar-toc-nav a {
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
    padding: 6px 0;
    border-left: 2px solid transparent;
    padding-left: 12px;
    margin-left: -12px;
    transition: all 0.2s ease;
}

.pillar-toc-nav a:hover {
    color: #3CADD4;
    border-left-color: #3CADD4;
}

.pillar-toc-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.pillar-toc-cta .btn {
    width: 100%;
    text-align: center;
}

/* Main Content Area */
.pillar-content {
    background: #fff;
    border-radius: 12px;
    padding: 48px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* TL;DR Box */
.pillar-tldr {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #3CADD4;
    border-radius: 0 10px 10px 0;
    padding: 24px 28px;
    margin-bottom: 40px;
}

.pillar-tldr-label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0369a1;
    margin-bottom: 10px;
}

.pillar-tldr p {
    color: #1e293b;
    line-height: 1.7;
    margin: 0;
    font-size: 1.05rem;
}

/* Content Headings */
.pillar-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E3A5F;
    margin: 48px 0 20px;
    padding-top: 20px;
}

.pillar-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

.pillar-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #1E3A5F;
    margin: 32px 0 16px;
}

.pillar-content p {
    line-height: 1.7;
    color: #333;
    margin-bottom: 16px;
}

.pillar-content ul, .pillar-content ol {
    margin: 16px 0 24px 24px;
}

.pillar-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Content Images */
.pillar-content img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 32px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.pillar-content .pillar-image-float-right {
    float: right;
    max-width: 45%;
    margin: 0 0 24px 32px;
}

.pillar-content .pillar-image-float-left {
    float: left;
    max-width: 45%;
    margin: 0 32px 24px 0;
}

@media (max-width: 768px) {
    .pillar-content .pillar-image-float-right,
    .pillar-content .pillar-image-float-left {
        float: none;
        max-width: 100%;
        margin: 24px 0;
    }
}

/* Comparison Tables */
.pillar-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0 32px;
    font-size: 0.95rem;
}

.pillar-content th {
    background: #1E3A5F;
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
}

.pillar-content td {
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.pillar-content tr:nth-child(even) td {
    background: #f8f9fa;
}

/* Callout Boxes */
.pillar-callout {
    background: #fff8e6;
    border-left: 4px solid #f0ad4e;
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.pillar-callout-title {
    font-weight: 700;
    color: #1E3A5F;
    margin-bottom: 8px;
}

.pillar-callout p {
    margin: 0;
    color: #555;
}

.pillar-callout.warning {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.pillar-callout.tip {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

/* Example Disclaimers */
.example-disclaimer {
    font-size: 0.8rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 12px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Soft CTA Boxes */
.pillar-soft-cta {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.pillar-soft-cta p {
    font-size: 1.1rem;
    color: #1E3A5F;
    margin-bottom: 20px;
}

/* FAQ Accordion */
.pillar-faq {
    margin: 40px 0;
}

.pillar-faq-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.pillar-faq-question {
    width: 100%;
    background: #f8f9fa;
    border: none;
    padding: 18px 24px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1E3A5F;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.pillar-faq-question:hover {
    background: #e9ecef;
}

.pillar-faq-question::after {
    content: "+";
    font-size: 1.5rem;
    font-weight: 300;
    color: #3CADD4;
    transition: transform 0.2s ease;
}

.pillar-faq-item.active .pillar-faq-question::after {
    transform: rotate(45deg);
}

.pillar-faq-answer {
    display: none;
    padding: 20px 24px;
    background: #fff;
    line-height: 1.7;
    color: #555;
}

.pillar-faq-item.active .pillar-faq-answer {
    display: block;
}

/* Testimonials Section */
.pillar-testimonials {
    background: #1E3A5F;
    padding: 60px 0;
}

.pillar-testimonials h2 {
    color: #fff;
    text-align: center;
    margin-bottom: 40px;
}

.pillar-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.pillar-testimonial {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 28px;
}

.pillar-testimonial-quote {
    color: #fff;
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 16px;
}

.pillar-testimonial-author {
    color: #3CADD4;
    font-weight: 600;
    margin: 0;
}

/* Final CTA Section */
.pillar-final-cta {
    background: linear-gradient(135deg, #3CADD4 0%, #2E9BBF 100%);
    padding: 80px 0;
    text-align: center;
}

.pillar-final-cta h2 {
    color: #fff;
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.pillar-final-cta > .container > p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 32px;
}

.pillar-final-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 24px;
}

.pillar-final-cta-buttons .btn {
    border: 2px solid #fff;
}

.pillar-final-cta-buttons .btn-turquoise {
    background: #fff;
    color: #3CADD4;
}

.pillar-final-cta-buttons .btn-turquoise:hover {
    background: transparent;
    color: #fff;
}

.btn-outline-white {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline-white:hover {
    background: #fff;
    color: #3CADD4;
}

.pillar-final-cta-reassurance {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .pillar-final-cta-reassurance {
        white-space: normal;
    }
}

/* Related Articles */
.pillar-related {
    padding: 60px 0;
    background: #f8f9fa;
}

.pillar-related h2 {
    text-align: center;
    color: #1E3A5F;
    margin-bottom: 40px;
}

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

.pillar-related-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.pillar-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pillar-related-card h3 {
    color: #1E3A5F;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.pillar-related-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .pillar-layout {
        grid-template-columns: 1fr;
    }

    .pillar-toc {
        display: none;
    }

    .pillar-testimonials-grid {
        grid-template-columns: 1fr;
    }

    .pillar-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .pillar-hero {
        padding: 60px 0;
        min-height: 300px;
    }

    .pillar-hero-title {
        font-size: 2rem;
    }

    .pillar-hero-subtitle {
        font-size: 1.1rem;
    }

    .pillar-content {
        padding: 28px;
    }

    .pillar-content h2 {
        font-size: 1.5rem;
    }

    .pillar-final-cta {
        padding: 50px 0;
    }

    .pillar-final-cta h2 {
        font-size: 1.75rem;
    }

    .pillar-final-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .pillar-final-cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

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

    .pillar-content table {
        font-size: 0.85rem;
    }

    .pillar-content th,
    .pillar-content td {
        padding: 10px 12px;
    }
}
