/* ===== CityBox global footer v7 dev-link-accent =====
   v2: direct product links in footer navigation, compact mobile locations,
   left-aligned mobile brand, and universal "Доступ для клиентов" wording.
   v3: mobile brand note max-width increased to 240px.
   v4: mobile brand note is kept on one line; max-width alone was only a cap,
   not a guarantee against wrapping inside the flex brand block.
   v5: added a subtle developer / promotion credit link in the footer bottom row;
   desktop uses three balanced zones, tablet/mobile stack naturally without overflow.
   v6: bottom row order is copyright → company registration → developer credit
   on desktop and mobile, so the developer credit is visually separated from
   the legal company details.
   v7: developer credit link is slightly more prominent by default; desktop hover
   and keyboard focus use the orange accent, while touch active keeps the same
   accent instead of being reset by the generic mobile hover guard.
   Scope: global footer only. No product page or warm-storage rules here.
*/

.cb-footer {
    background: #454545;
    color: #ffffff;
    font-family: var(--cb-font-heading, var(--ts-font-heading, "Roboto Slab", Georgia, serif));
    overflow: hidden;
}

.cb-footer,
.cb-footer * {
    box-sizing: border-box;
}

.cb-footer a {
    color: inherit;
    text-decoration: none;
}

.cb-footer__container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 54px 0 54px;
}

.cb-footer__top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.cb-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.cb-footer__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
}

.cb-footer__logo img {
    display: block;
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cb-footer__brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cb-footer__brand-name {
    color: #ffffff;
    font-family: inherit;
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 800;
    line-height: 1;
}

.cb-footer__brand-note {
    max-width: 220px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    line-height: 1.35;
}

.cb-footer__grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.15fr) minmax(180px, 0.7fr) minmax(280px, 1fr);
    gap: 56px;
    padding: 36px 0 34px;
}

.cb-footer__title {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.cb-footer__title-mobile {
    display: none;
}

.cb-footer__locations {
    display: grid;
    gap: 15px;
}

.cb-footer__location {
    display: grid;
    gap: 4px;
}

.cb-footer__location strong {
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.cb-footer__location span {
    color: rgba(255, 255, 255, 0.70);
    font-size: 14px;
    line-height: 1.5;
}

.cb-footer__location-extra {
    display: block;
}

.cb-footer .cb-footer__nav {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
}

.cb-footer .cb-footer__nav .footer-menu,
.cb-footer .cb-footer__nav .footer-menu ul,
.cb-footer .cb-footer__nav > ul {
    display: grid !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 10px;
}

.cb-footer__nav li {
    margin: 0;
    padding: 0;
}

.cb-footer__nav a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
    line-height: 1.45;
    transition: color 0.18s ease;
}

.cb-footer__nav a:hover,
.cb-footer__nav a:focus-visible {
    color: var(--cb-orange, var(--ts-orange, #ff7816));
}

.cb-footer__list {
    display: grid;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cb-footer__list li {
    display: grid;
    gap: 4px;
}

.cb-footer__list span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
}

.cb-footer__list strong,
.cb-footer__list a {
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}

.cb-footer__list a:hover,
.cb-footer__list a:focus-visible {
    color: var(--cb-orange, var(--ts-orange, #ff7816));
}

.cb-footer__service {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cb-footer__payments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    min-width: 0;
}

.cb-footer__payments span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
}

.cb-footer__payments img {
    display: block;
    width: auto !important;
    max-width: 128px;
    height: 24px !important;
    object-fit: contain;
}

.cb-footer__rating {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
}

.cb-footer__bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding-top: 18px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 13px;
    line-height: 1.45;
}

.cb-footer__bottom > span:first-child {
    justify-self: start;
    min-width: 0;
}

.cb-footer__registration {
    justify-self: center;
    min-width: 0;
    max-width: 520px;
    text-align: center;
}

.cb-footer__dev {
    justify-self: end;
    min-width: 0;
    color: rgba(255, 255, 255, 0.54);
    text-align: right;
    white-space: nowrap;
}

.cb-footer__dev a {
    color: rgba(255, 255, 255, 0.80);
    font-weight: 800;
    transition: color 0.18s ease;
}

.cb-footer__dev a:hover,
.cb-footer__dev a:active,
.cb-footer__dev a:focus-visible {
    color: var(--cb-orange, var(--ts-orange, #ff7816));
}

.cb-footer a:focus-visible,
.cb-footer iframe:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 120, 22, 0.24);
}

.cb-footer,
.cb-footer p,
.cb-footer li,
.cb-footer a,
.cb-footer span,
.cb-footer strong,
.cb-footer input,
.cb-footer select,
.cb-footer textarea,
.cb-footer button {
    font-family: var(--cb-font-text, var(--ts-font-text, "Roboto", Arial, sans-serif));
}

.cb-footer .cb-footer__brand-name {
    font-family: var(--cb-font-heading, var(--ts-font-heading, "Roboto Slab", Georgia, serif));
    font-weight: 800;
}

.cb-footer .cb-footer__title {
    font-family: var(--cb-font-text, var(--ts-font-text, "Roboto", Arial, sans-serif));
    font-weight: 700;
}

.cb-footer .cb-footer__grid,
.cb-footer .cb-footer__grid .cb-footer__title,
.cb-footer .cb-footer__grid strong,
.cb-footer .cb-footer__grid span,
.cb-footer .cb-footer__grid a {
    font-family: var(--cb-font-text, var(--ts-font-text, "Roboto", Arial, sans-serif));
}

.cb-footer .cb-footer__grid .cb-footer__title {
    font-weight: 700;
    letter-spacing: 0;
}

@media (max-width: 1024px) {
    .cb-footer__container {
        width: min(100% - 32px, 920px);
        padding-top: 44px;
    }

    .cb-footer__grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 30px 40px;
    }

    .cb-footer__col--contact {
        grid-column: 1 / -1;
    }

    .cb-footer__service {
        align-items: flex-start;
        flex-direction: column;
    }

    .cb-footer__bottom {
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
        gap: 7px;
        text-align: left;
    }

    .cb-footer__bottom > span:first-child,
    .cb-footer__registration,
    .cb-footer__dev {
        justify-self: start;
        max-width: none;
        text-align: left;
    }

    .cb-footer__dev {
        white-space: normal;
    }
}

@media (max-width: 767px) {
    .cb-footer {
        font-family: var(--cb-font-text, var(--ts-font-text, "Roboto", Arial, sans-serif));
    }

    .cb-footer__container {
        width: min(100% - 28px, 430px);
        padding: 30px 0 22px;
    }

    /* v2: mobile footer starts like a service block, not like a centered splash screen. */
    .cb-footer__top {
        justify-content: flex-start;
        padding-bottom: 24px;
        text-align: left;
    }

    .cb-footer__brand {
        justify-content: flex-start;
        gap: 12px;
    }

    .cb-footer__brand-text {
        align-items: flex-start;
        text-align: left;
    }

    .cb-footer__logo,
    .cb-footer__logo img {
        width: 48px;
        height: 48px;
    }

    .cb-footer__brand-name {
        font-family: var(--cb-font-heading, var(--ts-font-heading, "Roboto Slab", Georgia, serif));
        font-size: 30px;
        line-height: 1.05;
    }

    /* v4: keep the short brand descriptor on one line on mobile.
       max-width only limits the element; nowrap prevents Safari from wrapping it
       inside the flex brand block when the text column is shrink-calculated. */
    .cb-footer__brand-note {
        display: block;
        max-width: 240px;
        font-size: 14px;
        line-height: 1.35;
        color: rgba(255, 255, 255, 0.72);
        white-space: nowrap;
    }

    .cb-footer__grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        padding: 26px 0 24px;
    }

    .cb-footer__col,
    .cb-footer__nav,
    .cb-footer__col--contact {
        grid-column: auto !important;
        width: 100%;
        min-width: 0;
        display: block !important;
    }

    .cb-footer__title,
    .cb-footer__nav .cb-footer__title {
        display: block;
        margin: 0 0 12px;
        font-family: var(--cb-font-text, var(--ts-font-text, "Roboto", Arial, sans-serif));
        color: #ffffff;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
        text-transform: uppercase;
    }

    .cb-footer__title-desktop {
        display: none;
    }

    .cb-footer__title-mobile {
        display: inline;
    }

    .cb-footer__locations {
        gap: 0;
    }

    .cb-footer__location {
        gap: 4px;
    }

    .cb-footer__locations .cb-footer__location {
        padding: 0 0 13px;
    }

    .cb-footer__locations .cb-footer__location + .cb-footer__location {
        padding-top: 13px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .cb-footer__locations .cb-footer__location:last-child {
        padding-bottom: 0;
    }

    .cb-footer__location strong {
        font-size: 15px;
        font-weight: 800;
        line-height: 1.35;
    }

    .cb-footer__location span {
        font-size: 14px;
        line-height: 1.48;
        color: rgba(255, 255, 255, 0.68);
    }

    /* v2: keep locations on mobile, but remove secondary landmarks to avoid a footer "SEO sheet". */
    .cb-footer__location-extra {
        display: none;
    }

    .cb-footer__nav {
        width: 100%;
    }

    .cb-footer .cb-footer__nav .footer-menu {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
    }

    /* v2: one-column footer navigation scans better with long product names. */
    .cb-footer .cb-footer__nav .footer-menu > ul,
    .cb-footer .cb-footer__nav > ul {
        display: grid !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0;
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 0 !important;
        padding: 0 !important;
    }

    .cb-footer .cb-footer__nav .footer-menu > ul > li,
    .cb-footer .cb-footer__nav > ul > li {
        min-width: 0;
        margin: 0;
        padding: 0;
    }

    .cb-footer .cb-footer__nav .footer-menu > ul > li > a,
    .cb-footer .cb-footer__nav > ul > li > a {
        display: block;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.35;
    }

    .cb-footer__list {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px 20px;
    }

    .cb-footer__list li,
    .cb-footer__list li:first-child,
    .cb-footer__list li:last-child {
        grid-column: auto;
        min-width: 0;
        gap: 4px;
    }

    .cb-footer__list span {
        font-size: 12px;
        font-weight: 800;
        line-height: 1.25;
    }

    .cb-footer__list strong,
    .cb-footer__list a {
        font-size: 14px;
        font-weight: 700;
        line-height: 1.45;
    }

    .cb-footer__service {
        display: grid;
        gap: 14px;
        padding: 16px 0;
    }

    .cb-footer__payments {
        flex-wrap: wrap;
        gap: 7px 12px;
        overflow: visible;
        width: 100%;
        min-width: 0;
    }

    .cb-footer__payments span {
        flex: 0 1 auto;
        height: 30px;
    }

    .cb-footer__payments img {
        max-width: 118px;
        height: 21px !important;
        opacity: 1;
    }

    .cb-footer__rating {
        max-width: 150px;
    }

    .cb-footer__bottom {
        display: grid;
        gap: 7px;
        padding-top: 16px;
        text-align: left;
    }

    .cb-footer__registration {
        max-width: none;
        text-align: left;
    }

    .cb-footer__dev {
        margin-bottom: 0;
        font-size: 13px;
    }
}

@media (hover: none), (pointer: coarse) {
    .cb-footer__nav a:hover,
    .cb-footer__nav a:active {
        color: rgba(255, 255, 255, 0.74);
    }

    .cb-footer__list a:hover,
    .cb-footer__list a:active {
        color: rgba(255, 255, 255, 0.88);
    }

    .cb-footer__dev a:hover {
        color: rgba(255, 255, 255, 0.80);
    }

    .cb-footer__dev a:active,
    .cb-footer__dev a:focus-visible {
        color: var(--cb-orange, var(--ts-orange, #ff7816));
    }
}
