/*
Theme Name: QCL Theme
Theme URI: https://quantumconnectlabs.com
Description: Custom theme for Quantum Connect Labs. Header and footer are hardcoded PHP — completely update-proof against WordPress and Elementor updates.
Author: Quantum Connect Labs
Version: 1.1.0
Text Domain: qcl-theme
*/

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── HEADER ─────────────────────────────────────────────────── */
#qcl-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #FFFFFF;
    border-bottom: 1px solid #E8EEF2;
    box-shadow: 0 2px 14px rgba(43, 54, 66, 0.08);
    transition: transform 0.3s ease;
    will-change: transform;
}

#qcl-header.qcl-hidden {
    transform: translateY(-100%);
}

.qcl-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 36px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qcl-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.qcl-logo img {
    height: 300px;
    width: 300px;
    object-fit: contain;
    border-radius: 20px;
}

.qcl-logo-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.qcl-logo-name .accent { color: #20C5D8; }
.qcl-logo-name .rest   { color: #2B3642; }

/* ── NAV ────────────────────────────────────────────────────── */
#qcl-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: flex-end;
}

.qcl-nav-link {
    text-decoration: none;
    color: #4A5568;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 13px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.qcl-nav-link:hover  { color: #20C5D8; background: rgba(32, 197, 216, 0.07); }
.qcl-nav-link.active { color: #20C5D8; font-weight: 600; }

.qcl-nav-cta {
    text-decoration: none;
    background: #20C5D8;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 8px;
    margin-left: 10px;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.qcl-nav-cta:hover { background: #17b0c2; transform: translateY(-1px); color: #fff; }

/* ── MOBILE ─────────────────────────────────────────────────── */
.qcl-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid #D9E2EA;
    border-radius: 7px;
    padding: 8px 13px;
    cursor: pointer;
    font-size: 18px;
    color: #2B3642;
    line-height: 1;
}

@media (max-width: 960px) {
    .qcl-mobile-toggle { display: block; }

    #qcl-nav {
        display: none;
        position: absolute;
        top: 340px;
        left: 0;
        right: 0;
        background: #FFFFFF;
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 28px 28px;
        border-bottom: 1px solid #E8EEF2;
        box-shadow: 0 12px 32px rgba(43, 54, 66, 0.12);
        gap: 2px;
    }

    #qcl-nav.open { display: flex; }
    .qcl-nav-link { width: 100%; padding: 13px 14px; font-size: 16px; }
    .qcl-nav-cta  { width: 100%; margin-left: 0; margin-top: 8px; text-align: center; padding: 14px 22px; }
}

/* ── CONTENT ────────────────────────────────────────────────── */
#qcl-content { min-height: 60vh; }

/* Fix Elementor stretched sections */
.elementor-section.elementor-section-stretched {
    left: 0 !important;
    width: 100% !important;
}

/* ── POLICY PAGE TYPOGRAPHY ─────────────────────────────────── */
/* Applies to all non-Elementor page content (legal pages, etc.) */
.entry-content,
.wp-block-group,
.wp-block-post-content,
.elementor-widget-text-editor .elementor-widget-container {
    font-size: 16px;
    line-height: 1.8;
    color: #3D4A58;
    max-width: 820px;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

.entry-content h1,
.elementor-widget-text-editor h1 {
    font-size: 30px;
    font-weight: 800;
    color: #2B3642;
    margin: 40px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E8EEF2;
}

.entry-content h2,
.elementor-widget-text-editor h2 {
    font-size: 22px;
    font-weight: 700;
    color: #2B3642;
    margin: 36px 0 12px;
}

.entry-content h3,
.elementor-widget-text-editor h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2B3642;
    margin: 28px 0 10px;
}

.entry-content h4,
.elementor-widget-text-editor h4 {
    font-size: 15px;
    font-weight: 700;
    color: #2B3642;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 24px 0 8px;
}

.entry-content p,
.elementor-widget-text-editor p {
    margin-bottom: 16px;
    color: #4A5568;
}

.entry-content strong,
.elementor-widget-text-editor strong { color: #2B3642; }

.entry-content ul,
.entry-content ol,
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol {
    padding-left: 24px;
    margin: 12px 0 20px;
}

.entry-content ul li,
.entry-content ol li,
.elementor-widget-text-editor ul li,
.elementor-widget-text-editor ol li {
    margin-bottom: 8px;
    color: #4A5568;
    line-height: 1.75;
}

.entry-content a,
.elementor-widget-text-editor a {
    color: #20C5D8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.entry-content a:hover,
.elementor-widget-text-editor a:hover { color: #17a8ba; }

/* Effective date callout on policy pages */
.entry-content > p:first-child,
.elementor-widget-text-editor > div > p:first-child {
    background: #F0FAFC;
    border-left: 4px solid #20C5D8;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #3D4A58;
    margin-bottom: 32px;
}

/* Hide the ugly inline "All Policies" nav bar injected at bottom of legal pages */
.elementor-widget-text-editor a[href*="our-policies"]:first-child,
p:has(a[href*="our-policies"]) {
    display: none !important;
}

/* ── RESOURCES PAGE ACCORDION ───────────────────────────────── */
/* Injected via plugin HTML — scoped styles also inline in plugin */
.qcl-acc-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qcl-acc-item {
    background: #FFFFFF;
    border: 1px solid #D9E2EA;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.qcl-acc-item:hover { box-shadow: 0 4px 16px rgba(43,54,66,0.09); }
.qcl-acc-item.qcl-open { border-color: #20C5D8; box-shadow: 0 4px 20px rgba(32,197,216,0.12); }

.qcl-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #2B3642;
    user-select: none;
    gap: 16px;
    line-height: 1.4;
}

.qcl-acc-item.qcl-open .qcl-acc-header { color: #20C5D8; }

.qcl-acc-chevron {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    color: #8899AA;
}

.qcl-acc-item.qcl-open .qcl-acc-chevron { transform: rotate(180deg); color: #20C5D8; }

.qcl-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.2s;
    padding: 0 24px;
    font-size: 15px;
    line-height: 1.75;
    color: #5B6B7A;
    border-top: 0 solid #E8EEF2;
}

.qcl-acc-item.qcl-open .qcl-acc-body {
    max-height: 800px;
    padding: 16px 24px 22px;
    border-top-width: 1px;
}

/* Industry guide accordion variant */
.qcl-ind-item { border-left: 4px solid #20C5D8; }
.qcl-ind-item .qcl-acc-header { font-size: 17px; }
.qcl-ind-body { font-size: 15px; }
.qcl-ind-body h4 {
    color: #2B3642;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 8px;
}
.qcl-ind-body ul { padding-left: 20px; margin: 0 0 12px; }
.qcl-ind-body ul li { margin-bottom: 6px; color: #5B6B7A; }
.qcl-ind-body p { margin-bottom: 12px; color: #5B6B7A; line-height: 1.75; }

.agent-pill {
    display: inline-block;
    background: rgba(32,197,216,0.1);
    color: #0B8FA0;
    border-radius: 20px;
    padding: 4px 13px;
    font-size: 13px;
    font-weight: 600;
    margin: 3px 4px 3px 0;
    white-space: nowrap;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
#qcl-footer {
    background: #1A2535;
    color: #8899AA;
    font-size: 14px;
    line-height: 1.6;
}

.qcl-footer-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 36px 48px;
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 48px;
}

.qcl-footer-brand .qcl-logo { margin-bottom: 18px; }
.qcl-footer-brand .qcl-logo-name .rest { color: #FFFFFF; }
.qcl-footer-brand .qcl-logo img { height: 52px; width: 52px; }

.qcl-footer-tagline {
    color: #8899AA;
    font-size: 14px;
    line-height: 1.75;
    max-width: 300px;
}

.qcl-footer-col h4 {
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.qcl-footer-col a {
    display: block;
    color: #8899AA;
    text-decoration: none;
    padding: 4px 0;
    font-size: 14px;
    transition: color 0.15s;
}

.qcl-footer-col a:hover { color: #20C5D8; }

.qcl-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 36px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #4A5C6A;
}

.qcl-footer-bottom a { color: #4A5C6A; text-decoration: none; }
.qcl-footer-bottom a:hover { color: #20C5D8; }

@media (max-width: 960px) {
    .qcl-footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
    .qcl-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
    .qcl-footer-top { grid-template-columns: 1fr; padding: 48px 24px 32px; }
    .qcl-header-inner { padding: 0 20px; height: 220px; }
    .qcl-logo img { height: 180px; width: 180px; }
    .qcl-footer-bottom { flex-direction: column; text-align: center; padding: 16px 24px; }
}
