/* Queensbury Financial Advisers Ltd - Custom Overrides */

/* ---------- Text Logo ---------- */
.qf-text-logo {
    display: inline-block;
    line-height: 1;
    padding: 12px 0;
    text-decoration: none;
    font-family: "PT Serif", Georgia, serif;
}
.qf-text-logo .qf-mark {
    display: inline-block;
    width: 52px;
    height: 52px;
    line-height: 50px;
    text-align: center;
    border: 2px solid #b89b5e;
    color: #b89b5e;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-right: 12px;
    vertical-align: middle;
    background: #ffffff;
}
.qf-text-logo .qf-name {
    display: inline-block;
    vertical-align: middle;
    color: #223555;
}
.qf-text-logo .qf-name .qf-line-1 {
    display: block;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #223555;
}
.qf-text-logo .qf-name .qf-line-2 {
    display: block;
    font-size: 11px;
    letter-spacing: 4px;
    color: #b89b5e;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Footer (dark) variant of text logo */
.qf-text-logo.qf-on-dark .qf-mark {
    background: transparent;
}
.qf-text-logo.qf-on-dark .qf-name .qf-line-1 {
    color: #ffffff;
}

/* ---------- Certificate of Incorporation ---------- */
.qf-certificate-wrapper {
    background: #f5f1e8;
    padding: 60px 30px;
}
.qf-certificate {
    max-width: 820px;
    margin: 0 auto;
    background: #fffdf7;
    padding: 60px 70px;
    border: 1px solid #d8c89a;
    box-shadow: 0 0 0 6px #fffdf7, 0 0 0 8px #b89b5e, 0 10px 40px rgba(0,0,0,0.12);
    position: relative;
    font-family: "PT Serif", Georgia, serif;
    color: #2b2b2b;
}
.qf-certificate::before,
.qf-certificate::after {
    content: "";
    position: absolute;
    left: 30px;
    right: 30px;
    height: 2px;
    background: #b89b5e;
}
.qf-certificate::before { top: 20px; }
.qf-certificate::after { bottom: 20px; }

.qf-certificate .qf-cert-header {
    text-align: center;
    border-bottom: 1px solid #d8c89a;
    padding-bottom: 24px;
    margin-bottom: 28px;
}
.qf-certificate .qf-cert-crown {
    font-size: 38px;
    color: #b89b5e;
    margin-bottom: 14px;
    line-height: 1;
}
.qf-certificate .qf-cert-issuer {
    font-size: 11px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #6b6b6b;
    margin-bottom: 10px;
}
.qf-certificate h2.qf-cert-title {
    font-size: 28px;
    color: #223555;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 6px 0 6px;
    font-weight: 700;
    line-height: 1.3;
}
.qf-certificate .qf-cert-subtitle {
    font-style: italic;
    color: #555;
    margin-bottom: 4px;
}
.qf-certificate .qf-cert-number {
    margin-top: 14px;
    font-size: 13px;
    color: #444;
}
.qf-certificate .qf-cert-number strong {
    color: #223555;
    letter-spacing: 2px;
}

.qf-certificate .qf-cert-body {
    text-align: center;
    font-size: 15px;
    line-height: 1.9;
    color: #333;
}
.qf-certificate .qf-cert-body .qf-company-name {
    display: block;
    margin: 18px 0;
    font-size: 22px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #223555;
    font-weight: 700;
}

.qf-certificate .qf-cert-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #d8c89a;
    text-align: center;
    color: #444;
}
.qf-certificate .qf-cert-place {
    font-style: italic;
    margin-bottom: 18px;
}
.qf-certificate .qf-cert-seal {
    display: inline-block;
    width: 110px;
    height: 110px;
    line-height: 1.1;
    border: 3px double #b89b5e;
    border-radius: 50%;
    color: #b89b5e;
    text-align: center;
    padding-top: 30px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    transform: rotate(-12deg);
    margin: 18px 0 6px;
}
.qf-certificate .qf-cert-seal small {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ---------- Director / Company facts card ---------- */
.qf-facts-card {
    background: #ffffff;
    border: 1px solid #e6e6e6;
    border-top: 4px solid #b89b5e;
    padding: 30px 32px;
    margin-bottom: 30px;
}
.qf-facts-card h3 {
    font-size: 18px;
    color: #223555;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.qf-facts-card .qf-fact-row {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px dashed #e6e6e6;
    font-size: 14px;
    line-height: 1.5;
}
.qf-facts-card .qf-fact-row:last-child { border-bottom: none; }
.qf-facts-card .qf-fact-label {
    flex: 0 0 200px;
    color: #777;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    padding-top: 2px;
}
.qf-facts-card .qf-fact-value {
    flex: 1;
    color: #223555;
    font-weight: 600;
}

/* ---------- Regulatory / Disclaimer banner ---------- */
.qf-disclaimer {
    background: #f7f4ec;
    border-left: 4px solid #b89b5e;
    padding: 18px 22px;
    margin: 30px 0;
    font-size: 13px;
    line-height: 1.7;
    color: #4a4a4a;
}
.qf-disclaimer strong { color: #223555; }

/* ---------- Hero (replaces revolution slider) ---------- */
.qf-hero {
    position: relative;
    background: linear-gradient(135deg, #1a2a44 0%, #223555 50%, #2c4172 100%);
    color: #ffffff;
    padding: 140px 0 120px;
    text-align: center;
    overflow: hidden;
}
.qf-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(184,155,94,0.18), transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(184,155,94,0.12), transparent 45%);
    pointer-events: none;
}
.qf-hero .qf-hero-inner {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.qf-hero .qf-eyebrow {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #b89b5e;
    padding: 6px 18px;
    border: 1px solid rgba(184,155,94,0.6);
    margin-bottom: 26px;
}
.qf-hero h1 {
    font-family: "PT Serif", Georgia, serif;
    font-size: 48px;
    line-height: 1.2;
    margin: 0 0 24px;
    color: #ffffff;
    font-weight: 700;
}
.qf-hero h1 span { color: #b89b5e; }
.qf-hero p.qf-lead {
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    max-width: 720px;
    margin: 0 auto 36px;
}
.qf-hero .qf-meta {
    margin-top: 38px;
    padding-top: 26px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    letter-spacing: 1px;
}
.qf-hero .qf-meta span { color: #b89b5e; }

/* ---------- Section helpers ---------- */
.qf-section { padding: 80px 0; }
.qf-section-alt { background: #f7f5f0; }
.qf-section .qf-section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 50px;
}
.qf-section .qf-section-head .qf-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 5px;
    color: #b89b5e;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.qf-section .qf-section-head h2 {
    font-family: "PT Serif", Georgia, serif;
    font-size: 36px;
    color: #223555;
    margin: 0 0 16px;
    line-height: 1.3;
}
.qf-section .qf-section-head p {
    color: #6b6b6b;
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Topic / journal cards ---------- */
.qf-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.qf-topic-card {
    background: #ffffff;
    border: 1px solid #ececec;
    padding: 32px 28px;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.qf-topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(34,53,85,0.08);
    border-color: #b89b5e;
}
.qf-topic-card .qf-topic-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    background: #f7f4ec;
    color: #b89b5e;
    font-size: 22px;
    margin-bottom: 20px;
}
.qf-topic-card h3 {
    font-size: 18px;
    color: #223555;
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.qf-topic-card p {
    font-size: 14px;
    line-height: 1.7;
    color: #6b6b6b;
    margin: 0;
}

/* (Responsive overrides moved to bottom of file so they win over later non-media rules) */

/* ---------- Contact strip ---------- */
.qf-contact-strip {
    background: #223555;
    color: #ffffff;
    padding: 50px 0;
    text-align: center;
}
.qf-contact-strip h3 {
    font-family: "PT Serif", Georgia, serif;
    color: #ffffff;
    font-size: 26px;
    margin: 0 0 10px;
}
.qf-contact-strip p {
    color: rgba(255,255,255,0.75);
    margin: 0 0 24px;
}
.qf-contact-strip .qf-contact-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    font-size: 14px;
}
.qf-contact-strip .qf-contact-row a {
    color: #b89b5e;
    text-decoration: none;
}
.qf-contact-strip .qf-contact-row a:hover { color: #ffffff; }
.qf-contact-strip .qf-contact-row .fa { margin-right: 8px; color: #b89b5e; }

/* ---------- Minor template-content tweaks ---------- */
.top-bar .top-left .text a { color: #ffffff; text-decoration: underline; }
.top-bar .top-left .text a:hover { color: #223555; }
.main-header .top-right .lang-box,
.main-header .top-right .search-box { display: none; } /* hide unused features */
.scroll-to-top { background: #b89b5e; }
.scroll-to-top:hover { background: #223555; }

/* =====================================================================
   RESPONSIVE OVERRIDES — kept at very end of file so they always win
   ===================================================================== */

/* Word-wrap safety for long company name / emails */
h1, h2, h3, p, a, span, li, td, th { overflow-wrap: break-word; word-wrap: break-word; }

/* qf-mobile-br: mobile-only line break inside the hero h1 */
.qf-mobile-br { display: none; }
@media (max-width: 767px) {
    .qf-mobile-br { display: inline; }
    .qf-hero h1 { line-height: 1.2; }
}

/* Prevent any rogue element from causing horizontal scroll */
html, body { overflow-x: hidden; max-width: 100%; }
.page-outer-container, .page-wrapper { overflow-x: hidden; max-width: 100%; }

/* ===== Tablet & below: rebuild the broken hamburger as a stacked nav ===== */
@media (max-width: 1023px) {
    .main-header .main-menu { display: block !important; float: none !important; width: 100%; padding: 0 !important; }
    .main-header .nav-toggler,
    .main-header .navbar-header { display: none !important; }

    .main-header .lower-section .outer-box {
        padding: 10px 8px !important;
        height: auto !important;
        text-align: center;
        background: #223555 !important;
    }
    .main-header .lower-section .navbar-collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
        overflow: visible !important;
        padding: 0 !important;
        border-top: 0 !important;
        box-shadow: none !important;
    }
    .main-header .main-menu .navigation {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px 4px;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none;
    }
    .main-header .main-menu .navigation > li {
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .main-header .main-menu .navigation > li > a {
        padding: 6px 10px !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #ffffff !important;
        font-weight: 600;
    }
    .main-header .main-menu .navigation > li.current > a,
    .main-header .main-menu .navigation > li > a:hover {
        color: #b89b5e !important;
    }
    .main-header .link-box {
        position: static !important;
        display: block !important;
        right: auto !important;
        left: auto !important;
        top: auto !important;
        margin: 8px auto 2px !important;
        text-align: center !important;
    }
    .main-header .link-box .theme-btn {
        display: inline-block !important;
        padding: 7px 16px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }
}

/* ===== Tablet ===== */
@media (max-width: 991px) {
    img, iframe { max-width: 100%; height: auto; }
    .auto-container { padding-left: 15px !important; padding-right: 15px !important; }

    .qf-topic-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .qf-hero { padding: 100px 0 90px; }
    .qf-hero h1 { font-size: 36px; }
    .qf-section { padding: 60px 0; }
    .qf-section .qf-section-head h2 { font-size: 30px; }
    .qf-certificate { padding: 48px 36px; }
    .qf-certificate h2.qf-cert-title { font-size: 22px; letter-spacing: 3px; }
    .qf-facts-card .qf-fact-label { flex: 0 0 100%; margin-bottom: 4px; padding-top: 0; }
    .qf-facts-card .qf-fact-value { flex: 0 0 100%; }

    /* Middle bar: stack logo + address columns vertically */
    .main-header .middle-bar { padding: 14px 0 10px; }
    .main-header .middle-bar > .auto-container > .clearfix {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .main-header .middle-bar .logo-column {
        position: static !important;
        width: auto !important;
        margin: 0 0 6px !important;
        padding: 0 !important;
        text-align: center !important;
        order: 1;
    }
    .main-header .middle-bar .logo-column .qf-text-logo { display: inline-block; }
    .main-header .middle-bar .info-column {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 10px !important;
        text-align: center !important;
        float: none !important;
        order: 2;
    }
    .main-header .middle-bar .info-column p { margin: 0; font-size: 12px; line-height: 1.5; }
    .main-header .middle-bar .info-column h3 {
        font-size: 14px;
        margin: 2px 0 0;
        word-break: break-word;
        line-height: 1.3;
    }
}

/* ===== Phones ===== */
@media (max-width: 767px) {
    .qf-topic-grid { grid-template-columns: 1fr; }
    .qf-hero { padding: 70px 0 60px; }
    .qf-hero h1 { font-size: 28px; line-height: 1.25; word-break: break-word; }
    .qf-hero p.qf-lead { font-size: 15px; }
    .qf-hero .qf-eyebrow { font-size: 10px; letter-spacing: 3px; padding: 5px 12px; }
    .qf-hero .qf-meta { font-size: 11px; line-height: 1.9; letter-spacing: 0; padding-top: 18px; margin-top: 28px; }
    .qf-hero a.theme-btn { display: inline-block; margin: 6px 4px; padding: 10px 18px; font-size: 13px; }

    .qf-section .qf-section-head h2 { font-size: 24px; line-height: 1.3; }
    .qf-section .qf-section-head .qf-tag { font-size: 10px; letter-spacing: 3px; }
    .qf-section { padding: 44px 0; }

    .qf-certificate-wrapper { padding: 32px 14px; }
    .qf-certificate {
        padding: 32px 18px;
        box-shadow: 0 0 0 4px #fffdf7, 0 0 0 6px #b89b5e, 0 6px 20px rgba(0,0,0,0.12);
    }
    .qf-certificate::before, .qf-certificate::after { left: 14px; right: 14px; }
    .qf-certificate h2.qf-cert-title { font-size: 16px; letter-spacing: 2px; }
    .qf-certificate .qf-cert-body { font-size: 14px; line-height: 1.85; }
    .qf-certificate .qf-cert-body .qf-company-name {
        font-size: 14px;
        letter-spacing: 0.5px;
        word-break: break-word;
        padding: 0 4px;
    }
    .qf-certificate .qf-cert-issuer { font-size: 9px; letter-spacing: 3px; }
    .qf-certificate .qf-cert-seal { width: 88px; height: 88px; padding-top: 22px; font-size: 10px; }

    .qf-text-logo { padding: 6px 0; }
    .qf-text-logo .qf-mark { width: 40px; height: 40px; line-height: 36px; font-size: 19px; margin-right: 10px; }
    .qf-text-logo .qf-name .qf-line-1 { font-size: 16px; letter-spacing: 1px; }
    .qf-text-logo .qf-name .qf-line-2 { font-size: 9px; letter-spacing: 2px; }

    /* contact strip — must use !important to beat earlier non-media .qf-contact-strip rule */
    .qf-contact-strip { padding: 34px 12px !important; }
    .qf-contact-strip h3 { font-size: 22px !important; }
    .qf-contact-strip p { font-size: 13px; }
    .qf-contact-strip .qf-contact-row {
        flex-direction: column !important;
        gap: 12px !important;
        font-size: 13px !important;
    }
    .qf-contact-strip .qf-contact-row span,
    .qf-contact-strip .qf-contact-row a { word-break: break-word; }

    .qf-disclaimer { font-size: 12px; padding: 14px 16px; line-height: 1.6; }
    .top-bar .top-left .text { font-size: 11px; line-height: 1.5; padding: 6px 8px; }
    .qf-facts-card { padding: 20px 18px; }
    .qf-facts-card h3 { font-size: 15px; }
    .qf-topic-card { padding: 22px 20px; }

    .page-title h1 { font-size: 22px !important; line-height: 1.3 !important; }
    section.page-title { padding: 100px 0 60px !important; }

    .main-footer .footer-upper .footer-widget { margin-bottom: 28px; }
    .main-footer .footer-widget h3 { font-size: 16px; }
    .main-footer .footer-bottom .copyright-text { text-align: center; margin-bottom: 8px; }
    .main-footer .footer-bottom .footer-nav ul { text-align: center; padding-left: 0; }
    .main-footer .footer-bottom .footer-nav ul.pull-right { float: none !important; }

    /* Map shorter on phones */
    section iframe { min-height: 260px !important; }
}

/* ===== Small phones ===== */
@media (max-width: 480px) {
    .qf-hero h1 { font-size: 24px; }
    .qf-hero p.qf-lead { font-size: 14px; line-height: 1.65; }
    .qf-hero .qf-meta { font-size: 10px; line-height: 2; }
    .qf-section .qf-section-head h2 { font-size: 21px; }
    .qf-certificate h2.qf-cert-title { font-size: 14px; letter-spacing: 1.5px; }
    .qf-certificate .qf-cert-body .qf-company-name { font-size: 14px; letter-spacing: 1px; }
    .qf-text-logo .qf-name .qf-line-1 { font-size: 15px; }
    .qf-text-logo .qf-name .qf-line-2 { font-size: 8px; letter-spacing: 1.5px; }
    .top-bar .top-left .text { font-size: 10px; padding: 5px 6px; }
    .main-header .main-menu .navigation > li > a { padding: 5px 8px !important; font-size: 11px !important; letter-spacing: 0.5px; }
}
