/* =========================================================
   CREDMEN — SHARED HEADER & FOOTER
   One set of chrome for every page, replacing the ten
   per-page copies that had drifted apart.
========================================================= */

.cm-shell {
    width: min(92%, 1320px);
    margin-inline: auto;
}

/* ---------------- HEADER ---------------- */
.cm-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--cm-line, #E1E9F3);
}

.cm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 92px;
}

.cm-logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.cm-logo-img {
    width: 230px;
    height: auto;
    display: block;
}

.cm-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.cm-nav a {
    position: relative;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    color: var(--cm-text, #16324F);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.005em;
    text-decoration: none;
    transition: color .25s ease;
}

.cm-nav a:not(.cm-cta)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: var(--cm-blue, #1565E8);
    transition: right .28s cubic-bezier(.2, .8, .2, 1);
}

.cm-nav a:not(.cm-cta):hover,
.cm-nav a.is-current {
    color: var(--cm-blue, #1565E8);
}

.cm-nav a:not(.cm-cta):hover::after,
.cm-nav a.is-current::after {
    right: 0;
}

.cm-cta {
    background: var(--cm-navy-deep, #021F41);
    color: #fff !important;
    padding: 13px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(2, 31, 65, .18);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1),
                box-shadow .25s cubic-bezier(.2, .8, .2, 1),
                background-color .25s ease;
}

.cm-cta:hover {
    background: var(--cm-blue, #1565E8);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(21, 101, 232, .28);
}

/* ---------------- SERVICES DROPDOWN ---------------- */

.cm-has-sub {
    position: relative;
    display: inline-flex;
}

.cm-sub-parent {
    gap: 7px;
}

.cm-sub-caret {
    width: 11px;
    height: 11px;
    margin-top: 1px;
    transition: transform .25s ease;
}

.cm-has-sub:hover .cm-sub-caret,
.cm-has-sub:focus-within .cm-sub-caret {
    transform: rotate(180deg);
}

/* The padding-top bridges the hover gap between link and panel. */
.cm-sub {
    position: absolute;
    top: 100%;
    left: -18px;
    padding-top: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .22s ease, transform .22s ease;
    z-index: 60;
}

.cm-has-sub:hover .cm-sub,
.cm-has-sub:focus-within .cm-sub {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.cm-sub-panel {
    min-width: 232px;
    background: #fff;
    border: 1px solid var(--cm-line, #E1E9F3);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 22px 45px rgba(2, 31, 65, .14);
}

.cm-sub-panel a {
    display: flex;
    width: 100%;
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 14.5px;
    white-space: nowrap;
}

.cm-sub-panel a::after {
    display: none;
}

.cm-sub-panel a:hover {
    background: #F2F6FC;
    color: var(--cm-blue, #1565E8);
}

.cm-burger {
    display: none;
    width: 46px;
    height: 46px;
    padding: 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.cm-burger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--cm-navy-deep, #021F41);
    transition: transform .3s ease, opacity .2s ease;
}

.cm-burger span + span {
    margin-top: 5px;
}

.cm-burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.cm-burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.cm-burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------------- FOOTER ---------------- */
.cm-footer {
    background: var(--cm-navy-deep, #021F41);
    color: #C4D4E8;
    padding: 64px 0 28px;
    font-size: 14.5px;
}

.cm-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    gap: 40px 48px;
    align-items: start;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.cm-footer-brand p {
    max-width: 34ch;
    color: #A9BFD9;
}

.cm-footer h2 {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.cm-footer p {
    line-height: 1.9;
}

.cm-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-footer li {
    margin-bottom: 11px;
}

.cm-footer a {
    color: #C4D4E8;
    text-decoration: none;
    transition: color .25s ease;
}

.cm-footer a:hover {
    color: #fff;
}

.cm-footer-logo {
    width: 248px;
    height: auto;
    background: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    display: block;
}

.cm-footer-address {
    margin-bottom: 14px;
    color: #A9BFD9;
}

.cm-footer-touch {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-footer-touch li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 13px;
    color: #A9BFD9;
    line-height: 1.75;
}

.cm-footer-touch svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 5px;
    color: var(--cm-blue-bright, #3D85FF);
}

.cm-footer-touch a {
    display: inline-block;
    font-weight: 600;
    color: #fff;
}

.cm-footer-touch a:hover {
    color: var(--cm-blue-bright, #3D85FF);
}

.cm-footer li a {
    display: inline-block;
}

.cm-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    padding-top: 26px;
    font-size: 13.5px;
    color: #8FA6C4;
}

.cm-footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.cm-footer-bottom a {
    color: #8FA6C4;
}

.cm-footer-bottom a:hover {
    color: #fff;
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 1000px) {

    .cm-burger {
        display: block;
    }

    .cm-logo-img {
        width: 188px;
    }

    .cm-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 0 16px;
        background: #fff;
        border-bottom: 1px solid var(--cm-line, #E1E9F3);
        box-shadow: 0 22px 40px rgba(2, 31, 65, .10);
    }

    .cm-nav.is-open {
        display: flex;
    }

    .cm-nav a {
        padding: 13px 6%;
    }

    .cm-nav a:not(.cm-cta)::after {
        display: none;
    }

    /* Submenu is always expanded inside the mobile panel. */
    .cm-has-sub {
        display: block;
    }

    .cm-sub-parent {
        width: 100%;
    }

    .cm-sub-caret {
        display: none;
    }

    .cm-sub {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        padding-top: 0;
    }

    .cm-sub-panel {
        min-width: 0;
        background: transparent;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }

    .cm-sub-panel a {
        padding: 11px 6% 11px calc(6% + 20px);
        font-size: 14.5px;
        color: var(--cm-gray, #56667A);
    }

    .cm-cta {
        margin: 12px 6% 0;
        justify-content: center;
        text-align: center;
    }

    .cm-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 640px) {

    .cm-footer {
        padding-top: 56px;
    }

    .cm-footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .cm-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------- BACK TO TOP ---------------- */
.cm-top {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 9998;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--cm-navy-deep, #021F41);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    box-shadow: 0 12px 28px rgba(2, 31, 65, .28);
    transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .2, 1),
                visibility .3s ease, background-color .25s ease;
}

.cm-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cm-top:hover {
    background: var(--cm-blue, #1565E8);
    transform: translateY(-3px);
}

.cm-top svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 640px) {
    .cm-top {
        right: 16px;
        bottom: 16px;
    }
}

.cm-footer-address strong {
    display: block;
    color: #fff;
    font-weight: 700;
    margin-bottom: 6px;
}
