/* Learning Centre Article Template — Phase 1 Staging
 * Non-destructive CSS for the LC article template only.
 * Loaded only on pages with the "Learning Centre Article" page template or posts
 * explicitly opted in through lc_article_template_enabled + learning-centre category.
 */

/* Article wrapper: readable content width, centered, mobile-safe. */
.lc-article-wrapper {
    padding: 0 16px;
}

.lc-article-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 0 48px;
}

/* Breadcrumbs */
.lc-breadcrumbs {
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.lc-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.lc-breadcrumbs li {
    display: inline;
    margin: 0;
}

.lc-breadcrumbs li::after {
    content: " ›";
    margin: 0 6px;
    color: #999;
}

.lc-breadcrumbs li:last-child::after {
    content: "";
    margin: 0;
}

.lc-breadcrumbs a {
    color: #004275;
    text-decoration: none;
}

.lc-breadcrumbs a:hover {
    text-decoration: underline;
}

.lc-breadcrumb-current {
    color: #333;
    font-weight: 600;
}

/* Article label (Written Article / Video / FAQ) */
.lc-article-label {
    display: inline-block;
    background: #e8f0f8;
    color: #004275;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
}

/* Visible H1 */
.lc-article-title {
    font-size: 32px;
    line-height: 1.25;
    color: #004275;
    margin: 0 0 16px;
    font-weight: 700;
}

/* Meta row */
.lc-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 24px;
    font-size: 14px;
}

.lc-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lc-meta-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #888;
    font-weight: 600;
}

.lc-meta-value {
    color: #333;
}

.lc-meta-value a {
    color: #004275;
    text-decoration: none;
}

.lc-meta-value a:hover {
    text-decoration: underline;
}

.lc-meta-pending,
.lc-author-title-placeholder,
.lc-reviewer-placeholder {
    font-size: 12px;
    color: #666;
    font-style: italic;
    display: block;
}

/* Key takeaway */
.lc-key-takeaway {
    background: #f6f6f6;
    border-left: 4px solid #004275;
    padding: 16px 20px;
    margin: 0 0 24px;
    border-radius: 0 4px 4px 0;
}

.lc-key-takeaway-title {
    font-size: 16px;
    margin: 0 0 8px;
    color: #004275;
}

.lc-key-takeaway p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}

/* Article content: controlled image/video sizing */
.lc-article-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.lc-article-content h2 {
    font-size: 24px;
    line-height: 1.3;
    color: #004275;
    margin: 32px 0 12px;
}

.lc-article-content h3 {
    font-size: 20px;
    line-height: 1.3;
    color: #004275;
    margin: 28px 0 10px;
}

.lc-article-content p {
    margin: 0 0 16px;
}

.lc-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.lc-article-content video,
.lc-article-content iframe {
    max-width: 100%;
    border-radius: 4px;
}

.lc-article-content iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    min-height: 200px;
}

.lc-article-content blockquote {
    border-left: 4px solid #004275;
    padding: 8px 20px;
    margin: 16px 0;
    background: #f9f9f9;
    color: #555;
}

.lc-article-content ul,
.lc-article-content ol {
    padding-left: 24px;
    margin: 0 0 16px;
}

.lc-article-content li {
    margin-bottom: 6px;
}

/* Disclaimer */
.lc-disclaimer {
    margin: 32px 0;
    padding: 16px 20px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #5d4037;
}

.lc-disclaimer strong {
    color: #e65100;
}

/* CTA */
.lc-cta {
    margin: 32px 0;
}

.lc-cta-inner {
    background: #004275;
    color: #fff;
    padding: 24px 32px;
    border-radius: 6px;
    text-align: center;
}

.lc-cta-text {
    font-size: 16px;
    margin: 0 0 16px;
    line-height: 1.6;
}

.lc-cta-button {
    display: inline-block;
    background: #fff;
    color: #004275;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.lc-cta-button:hover {
    background: #e8f0f8;
    color: #002d4f;
    text-decoration: none;
}

/* Pending / non-clickable CTA button — Phase 0 placeholder state */
.lc-cta-button-pending {
    display: inline-block;
    background: rgba(255, 255, 255, 0.4);
    color: rgba(0, 66, 117, 0.5);
    font-size: 16px;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 4px;
    border: 1px dashed rgba(0, 66, 117, 0.35);
    cursor: not-allowed;
    text-decoration: none;
    pointer-events: none;
    user-select: none;
}

/* Related articles / conditions */
.lc-related-articles,
.lc-related-conditions {
    margin: 32px 0;
}

.lc-related-title {
    font-size: 20px;
    color: #004275;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

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

.lc-related-card {
    background: #f6f6f6;
    border-radius: 4px;
    padding: 0;
    transition: background 0.2s;
}

.lc-related-card:hover {
    background: #e8f0f8;
}

.lc-related-card-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    text-decoration: none;
}

.lc-related-note {
    margin: -4px 0 12px;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.lc-related-card-placeholder {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border: 1px dashed #b9c7d6;
    background: #f9fbfd;
}

.lc-related-card-placeholder:hover {
    background: #f9fbfd;
}

.lc-related-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #004275;
    line-height: 1.4;
}

.lc-related-card-date {
    font-size: 12px;
    color: #888;
}

/* ------------------------------------------------------------------
 * Media Placeholders — realistic video and image footprint
 * Phase 1 staging: visually reserves a realistic embed/image area
 * without implying final approved assets.
 * ------------------------------------------------------------------ */

/* Responsive 16:9 video placeholder with play-button affordance */
.lc-media-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.lc-media-placeholder-video {
    background: linear-gradient(135deg, #1a3a5c 0%, #0d2137 100%);
}

/* Centered play-button circle */
.lc-media-placeholder-video::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    z-index: 1;
}

.lc-media-placeholder-video::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(50% + 6px);
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.7);
    z-index: 2;
}

/* Subtle diagonal pattern overlay for professional texture */
.lc-media-placeholder-video .lc-media-pattern {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 30px,
        rgba(255, 255, 255, 0.02) 30px,
        rgba(255, 255, 255, 0.02) 60px
    );
    z-index: 0;
}

/* Placeholder label — visible below the play button */
.lc-media-placeholder-label {
    position: relative;
    z-index: 3;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    margin-top: 88px;
    line-height: 1.4;
}

.lc-media-placeholder-label .lc-media-placeholder-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Aspect-ratio badge (top-right corner) */
.lc-media-placeholder-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 3px;
}

/* Image placeholder — article hero / inline image area */
.lc-media-placeholder-image {
    background: linear-gradient(135deg, #e8eef4 0%, #d0dae8 100%);
    border: 1px solid #c5d2e0;
    aspect-ratio: 3 / 2;
    min-height: 200px;
}

.lc-media-placeholder-image::before,
.lc-media-placeholder-image::after {
    display: none;
}

/* Image placeholder icon (mountain/landscape CSS shape) */
.lc-media-placeholder-image .lc-media-image-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 36px;
    margin-bottom: 12px;
}

.lc-media-placeholder-image .lc-media-image-icon::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 24px;
    background: #a0b3c8;
    clip-path: polygon(0 100%, 0 50%, 30% 20%, 55% 50%, 80% 10%, 100% 40%, 100% 100%);
    border-radius: 2px;
}

.lc-media-placeholder-image .lc-media-image-icon::after {
    content: "";
    position: absolute;
    top: 0;
    right: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b8c8da;
}

.lc-media-placeholder-image .lc-media-placeholder-label {
    color: #5a6c80;
    background: transparent;
    margin-top: 0;
    padding: 0 20px;
}

.lc-media-placeholder-image .lc-media-placeholder-label .lc-media-placeholder-sub {
    color: #7a8a9e;
}

.lc-media-placeholder-image .lc-media-placeholder-badge {
    background: rgba(80, 100, 130, 0.15);
    color: #5a6c80;
}

/* Transcript placeholder section */
.lc-transcript-placeholder {
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 0 0 24px;
}

.lc-transcript-placeholder h2 {
    margin: 0 0 8px;
}

.lc-transcript-placeholder p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* FAQ image placeholder — wider, shorter for FAQ-style layouts */
.lc-media-placeholder-faq {
    aspect-ratio: 21 / 9;
    min-height: 160px;
}

/* ------------------------------------------------------------------
 * Handbook navigation (32C)
 * Progress label, chapter context, previous/next, view-all link.
 * ------------------------------------------------------------------ */
.lc-handbook-nav {
    margin: 32px 0;
    padding: 20px 24px;
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.lc-handbook-chapter-context {
    font-size: 13px;
    color: #666;
    margin: 0 0 4px;
    font-weight: 600;
}

.lc-handbook-progress {
    font-size: 14px;
    color: #004275;
    margin: 0 0 16px;
    font-weight: 700;
}

.lc-handbook-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lc-handbook-prev,
.lc-handbook-next {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #d0dae8;
    transition: background 0.2s, border-color 0.2s;
    min-width: 0;
    flex: 1 1 200px;
}

.lc-handbook-prev:hover,
.lc-handbook-next:hover {
    background: #e8f0f8;
    border-color: #004275;
    text-decoration: none;
}

.lc-handbook-next {
    text-align: right;
}

.lc-handbook-nav-dir {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    font-weight: 600;
}

.lc-handbook-nav-title {
    font-size: 14px;
    color: #004275;
    font-weight: 600;
    line-height: 1.4;
}

.lc-handbook-nav-placeholder {
    color: #999;
    font-style: italic;
    background: #f9f9f9;
    cursor: default;
}

.lc-handbook-nav-placeholder .lc-handbook-nav-dir {
    color: #aaa;
}

.lc-handbook-view-all {
    margin: 16px 0 0;
    text-align: center;
}

.lc-handbook-view-all a {
    color: #004275;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.lc-handbook-view-all a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .lc-article-container {
        padding: 16px 0 32px;
    }

    .lc-article-title {
        font-size: 24px;
    }

    .lc-article-meta {
        flex-direction: column;
        gap: 10px;
    }

    .lc-article-content h2 {
        font-size: 20px;
    }

    .lc-article-content h3 {
        font-size: 18px;
    }

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

    .lc-cta-inner {
        padding: 20px;
    }

    .lc-cta-button {
        width: 100%;
        box-sizing: border-box;
    }

    .lc-breadcrumbs ol {
        flex-wrap: wrap;
    }

    .lc-media-placeholder {
        min-height: 200px;
    }

    .lc-media-placeholder-video::before {
        width: 48px;
        height: 48px;
    }

    .lc-media-placeholder-video::after {
        border-width: 10px 0 10px 16px;
        left: calc(50% + 4px);
    }

    .lc-media-placeholder-label {
        margin-top: 72px;
        font-size: 12px;
    }

    .lc-media-placeholder-image {
        min-height: 160px;
    }

    .lc-handbook-nav-links {
        flex-direction: column;
    }

    .lc-handbook-prev,
    .lc-handbook-next {
        flex: 0 0 auto;
        min-height: 44px;
    }

    .lc-handbook-next {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .lc-article-title {
        font-size: 20px;
    }

    .lc-article-content {
        font-size: 15px;
    }

    .lc-media-placeholder {
        min-height: 170px;
    }

    .lc-media-placeholder-label {
        font-size: 11px;
        margin-top: 64px;
    }

    .lc-media-placeholder-video::before {
        width: 40px;
        height: 40px;
    }

    .lc-media-placeholder-video::after {
        border-width: 8px 0 8px 13px;
    }

    /* Existing Elementor footer legal links can be 10px wider than the
     * mobile viewport. Keep the correction scoped to pages using this LC
     * article stylesheet so the review pages do not side-scroll. */
    .elementor-icon-list-items.elementor-inline-items {
        box-sizing: border-box;
        max-width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}