/* Learning Centre Hub & Landing Phase 1 Style Bridge
 *
 * Non-destructive, narrow CSS that targets the Learning Centre landing
 * page, topic hub pages, and explicitly opted-in posts. Applied via the
 * `lc-hub-page` and `lc-phase1-staging` body classes added by the
 * 002-lc-hub-style.php MU plugin. No Avada, Elementor, or vendor core
 * file is modified.
 *
 * Goals:
 *   - Stop the main content from falling back to the browser-default
 *     serif (Times New Roman) seen on raw .post-content blocks.
 *   - Stop the default blue underlined link style inside LC content.
 *   - Card-ify the raw wp-block-group / wp-block-column blocks that
 *     currently render as borderless text.
 *   - Apply the Avada navy/blue palette used by the existing LC article
 *     template so the whole Phase 1 LC surface is visually coherent.
 *   - Render the Phase 1 staging banner and intro header prominently,
 *     but with neutral review-safe copy.
 *   - Stay mobile-safe (breakpoints at 768px and 480px).
 */

/* ----------------------------------------------------------------------
 * 0. Page-level content containment
 * ----------------------------------------------------------------------
 * Avada leaves these WordPress block pages at full viewport width in the
 * local clone, so the LC content read as flush-left / uncontained. Keep the
 * fix narrow to LC Phase 1 surfaces by targeting the body class from the MU
 * plugin, then centre the real content column and provide responsive side
 * padding before individual cards/groups style themselves.
 *
 * The LC pages are simple block pages rather than Elementor-built sections;
 * in this clone they can miss the theme/page-builder body reset that normal
 * pages receive. Reset only the LC body margin so the header/footer/page
 * background spans the viewport like the rest of the site, then keep the
 * content containment inside the page.
 */

body.lc-hub-page {
    margin: 0;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

body.lc-hub-page #content {
    box-sizing: border-box;
    float: none;
    width: min(100%, 1180px);
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(20px, 4vw, 48px);
    padding-right: clamp(20px, 4vw, 48px);
}

body.lc-hub-page .post-content {
    box-sizing: border-box;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

body.lc-hub-page .lc-article-wrapper {
    box-sizing: border-box;
    width: 100%;
}

/* ----------------------------------------------------------------------
 * 1. Base typography and link reset for ALL LC hub/landing surfaces
 * ---------------------------------------------------------------------- */

.lc-hub-page .post-content,
.lc-hub-page .lc-article-wrapper,
.lc-hub-page .lc-article-container,
.lc-hub-page .lc-article-content {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    color: #333;
    font-size: 16px;
    line-height: 1.7;
}

.lc-hub-page .post-content p {
    margin: 0 0 16px;
}

.lc-hub-page .post-content strong {
    color: #002d4f;
}

/* Link reset: kill browser default blue + underline, use LC navy. */
.lc-hub-page .post-content a,
.lc-hub-page .lc-article-content a {
    color: #004275;
    text-decoration: none;
    font-weight: 600;
}

.lc-hub-page .post-content a:hover,
.lc-hub-page .lc-article-content a:hover {
    color: #002d4f;
    text-decoration: underline;
}

/* Headings: navy + tighter scale that matches the existing LC article CSS. */
.lc-hub-page .post-content h1,
.lc-hub-page .post-content h2,
.lc-hub-page .post-content h3,
.lc-hub-page .post-content h4,
.lc-hub-page .post-content h5,
.lc-hub-page .post-content h6 {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    color: #004275;
    line-height: 1.3;
    margin: 28px 0 12px;
    font-weight: 700;
    letter-spacing: 0;
}

.lc-hub-page .post-content h1 { font-size: 30px; }
.lc-hub-page .post-content h2 { font-size: 24px; }
.lc-hub-page .post-content h3 { font-size: 20px; }
.lc-hub-page .post-content h4 { font-size: 17px; }
.lc-hub-page .post-content h5 { font-size: 15px; }
.lc-hub-page .post-content h6 { font-size: 14px; }

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

.lc-hub-page .post-content li {
    margin-bottom: 6px;
}

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

/* Article template wrapper base font — fix the inherited serif. */
.lc-hub-page .lc-article-wrapper {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

/* ----------------------------------------------------------------------
 * 2. Phase 1 staging banner and intro header (landing + hub pages)
 * ---------------------------------------------------------------------- */

.lc-hub-page .lc-hub-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #5d4037;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.5;
}

.lc-hub-page .lc-hub-banner-tag {
    background: #e65100;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.lc-hub-page .lc-hub-banner-text {
    flex: 1;
}

.lc-hub-page .lc-hub-intro {
    margin: 0 0 28px;
    padding: 0 0 20px;
    border-bottom: 2px solid #e0e0e0;
}

.lc-hub-page .lc-hub-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #004275;
    margin: 0 0 8px;
}

.lc-hub-page .lc-hub-title {
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 32px;
    line-height: 1.2;
    color: #004275;
    margin: 0 0 12px;
    font-weight: 700;
}

.lc-hub-page .lc-hub-summary {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0;
    max-width: 720px;
}

/* ----------------------------------------------------------------------
 * 3. Card-ify raw wp-block-group / wp-block-column blocks
 *    (used on the landing "Topic hubs" section and the hub "sample
 *    article" 3-column row).
 * ---------------------------------------------------------------------- */

.lc-hub-page .post-content .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 0 0 24px;
    padding: 0;
    flex-wrap: wrap;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column {
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin: 0;
    transition: background 0.2s, border-color 0.2s;
    min-width: 0;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column:hover {
    background: #e8f0f8;
    border-color: #b9c7d6;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column h3,
.lc-hub-page .post-content .wp-block-columns .wp-block-column h4 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #004275;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column p:last-child {
    margin-bottom: 0;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column a {
    color: #004275;
    text-decoration: none;
    font-weight: 700;
}

.lc-hub-page .post-content .wp-block-columns .wp-block-column a:hover {
    text-decoration: underline;
}

/* Standalone wp-block-group boxes (e.g. the landing "Topic hubs" wrapper) */
.lc-hub-page .post-content .wp-block-group {
    background: #f6f6f6;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin: 0 0 16px;
}

.lc-hub-page .post-content .wp-block-group .wp-block-group__inner-container {
    margin: 0;
}

/* Ordered S1 Handbook list: one clear, tap-safe card per approved section. */
.lc-hub-page .post-content .lc-handbook-section-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 24px 0;
    padding: 0;
    list-style: none;
    counter-reset: lc-handbook-section;
}

.lc-hub-page .post-content .lc-handbook-section-item {
    counter-increment: lc-handbook-section;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 18px 20px;
    background: #f6f6f6;
    border: 1px solid #d7e0e8;
    border-left: 4px solid #004275;
    border-radius: 6px;
}

.lc-hub-page .post-content .lc-handbook-section-item a {
    font-size: 16px;
    line-height: 1.4;
}

.lc-hub-page .post-content .lc-handbook-section-item span {
    color: #5d6770;
    font-size: 13px;
    line-height: 1.4;
}

/* Topic Hubs keep the approved Handbook list first and reserve a distinct,
 * truthful video area for explicitly supplied YouTube records. */
.lc-hub-page .post-content .lc-hub-handbook,
.lc-hub-page .post-content .lc-hub-videos {
    margin: 0 0 36px;
}

.lc-hub-page .post-content .lc-hub-videos {
    padding-top: 28px;
    border-top: 2px solid #d7e0e8;
}

.lc-hub-page .post-content .lc-hub-videos-empty {
    margin: 16px 0 0;
    padding: 18px 20px;
    color: #46535e;
    background: #f6f8fa;
    border: 1px solid #d7e0e8;
    border-left: 4px solid #004275;
    border-radius: 6px;
}

.lc-hub-page .post-content .lc-hub-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.lc-hub-page .post-content .lc-hub-video-card {
    min-width: 0;
    padding: 18px;
    background: #f6f8fa;
    border: 1px solid #d7e0e8;
    border-radius: 6px;
}

.lc-hub-page .post-content .lc-hub-video-card h3 {
    margin-top: 16px;
}

.lc-hub-page .post-content .lc-hub-video-embed {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0d2137;
    border-radius: 4px;
}

.lc-hub-page .post-content .lc-hub-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ----------------------------------------------------------------------
 * 4. Avatar / metadata reset for the rich-snippet-hidden spans that
 *    WordPress emits at the top of every page. We keep them in the DOM
 *    for SEO but they should never display as visible text.
 * ---------------------------------------------------------------------- */

.lc-hub-page .rich-snippet-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ------------------------------------------------------------------
 * Media placeholders on hub cards (shared with lc-article CSS)
 * ------------------------------------------------------------------ */
.lc-hub-page .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 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.lc-hub-page .lc-media-placeholder-video::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    z-index: 1;
}

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

.lc-hub-page .lc-media-placeholder .lc-media-placeholder-label {
    position: relative;
    z-index: 3;
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    margin-top: 52px;
    line-height: 1.3;
}

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

.lc-hub-page .lc-media-placeholder .lc-media-placeholder-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
}

.lc-hub-page .lc-media-placeholder-image {
    background: linear-gradient(135deg, #e8eef4 0%, #d0dae8 100%);
    border: 1px solid #c5d2e0;
    aspect-ratio: 3 / 2;
}

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

.lc-hub-page .lc-media-placeholder-image .lc-media-image-icon {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 24px;
    margin-bottom: 8px;
}

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

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

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

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

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

.lc-hub-page .lc-media-placeholder-faq {
    aspect-ratio: 21 / 9;
}

/* ------------------------------------------------------------------
 * 5. Mobile responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 768px) {
    .lc-hub-page .lc-hub-title {
        font-size: 26px;
    }

    .lc-hub-page .lc-hub-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .lc-hub-page .post-content .wp-block-columns {
        grid-template-columns: 1fr;
    }

    .lc-hub-page .post-content .lc-handbook-section-list {
        grid-template-columns: 1fr;
    }

    .lc-hub-page .post-content .lc-hub-video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lc-hub-page .lc-hub-title {
        font-size: 22px;
    }

    .lc-hub-page .post-content,
    .lc-hub-page .lc-article-content {
        font-size: 15px;
    }

    /* Existing Elementor footer legal links are 10px wider than the
     * mobile viewport on LC pages. Keep this narrow to Phase 1 LC pages
     * so the client-review surfaces do not have horizontal scroll. */
    body.lc-hub-page .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;
    }
}
