#footer {
    --hrmg-pf-orange: #ff6534;
    --hrmg-pf-ink: #131a22;
    --hrmg-pf-muted: rgba(255, 255, 255, 0.7);
    --hrmg-footer-rule: rgba(255, 255, 255, 0.12);
}

/* Turn The7's equal-width legacy widget columns into a purposeful editorial
   footer. Saved widgets and their content remain fully editable in WordPress. */
#footer > .wf-wrap {
    width: min(100%, 1500px);
    max-width: 1500px;
    box-sizing: border-box;
    padding-right: clamp(24px, 3.5vw, 58px);
    padding-left: clamp(24px, 3.5vw, 58px);
}

#footer .wf-container-footer {
    position: relative;
    padding-top: clamp(54px, 5vw, 76px);
    padding-bottom: clamp(42px, 4vw, 62px);
}

#footer .wf-container-footer::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6534 0 9%, rgba(255, 101, 52, 0.28) 24%, rgba(255, 255, 255, 0.08) 62%, transparent 100%);
    content: '';
}

#footer .wf-container-footer > .wf-container {
    display: grid;
    grid-template-columns: minmax(205px, 0.9fr) minmax(245px, 1fr) minmax(270px, 1.16fr) minmax(365px, 1.55fr);
    align-items: start;
    gap: clamp(30px, 3vw, 52px);
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    word-spacing: normal;
}

/* The7 uses generated table cells to clear its original inline-block footer
   columns. Generated content becomes a real grid item, so the otherwise
   invisible ::before cell was taking column one and pushing the featured
   project onto a second row. */
#footer .wf-container-footer > .wf-container::before,
#footer .wf-container-footer > .wf-container::after {
    display: none !important;
    content: none !important;
}

#footer .wf-container-footer > .wf-container > .widget {
    display: block;
    width: auto !important;
    min-width: 0;
    margin: 0;
    padding: 0;
}

#footer .wf-container-footer .widget-title {
    position: relative;
    margin: 0 0 22px;
    padding: 0 0 14px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 760;
    letter-spacing: 0.01em;
    line-height: 1.35;
    text-transform: none;
}

#footer .wf-container-footer .widget-title::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: var(--hrmg-pf-orange);
    content: '';
}

/* Agency introduction. The old floated logo made the copy wrap into a narrow
   sliver; a simple vertical lockup is calmer and easier to scan. */
#footer .wf-container-footer > .wf-container > .widget:first-child img {
    display: block;
    float: none !important;
    width: auto;
    max-width: 72px;
    height: auto;
    margin: 0 0 20px !important;
}

#footer .wf-container-footer > .wf-container > .widget:first-child p {
    max-width: 30ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    line-height: 1.72;
}

.hrmg-footer-agency__intro {
    max-width: 31ch !important;
}

.hrmg-footer-agency__milestone {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    max-width: 290px;
    margin-top: 22px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 101, 52, 0.38);
    border-radius: 12px;
    align-items: center;
    background: rgba(255, 101, 52, 0.08);
}

.hrmg-footer-agency__year {
    display: grid;
    min-width: 54px;
    min-height: 54px;
    border-radius: 10px;
    place-items: center;
    color: #fff;
    background: #ff6534;
    font-size: 14px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.hrmg-footer-agency__age {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.hrmg-footer-agency__age strong {
    color: rgba(255, 255, 255, 0.94);
    font-size: 14px;
    line-height: 1.25;
}

.hrmg-footer-agency__age small {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
    line-height: 1.35;
}

.hrmg-footer-portfolio {
    width: 100%;
}

.hrmg-footer-portfolio__card {
    overflow: hidden;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.hrmg-footer-portfolio__card:hover,
.hrmg-footer-portfolio__card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(255, 101, 52, 0.65);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.25);
}

.hrmg-footer-portfolio__card-link,
.hrmg-footer-portfolio__card-link:hover {
    display: grid;
    grid-template-columns: minmax(135px, 0.84fr) minmax(190px, 1.16fr);
    min-height: 246px;
    color: inherit;
    text-decoration: none;
}

.hrmg-footer-portfolio__card-link:focus-visible {
    outline: 3px solid rgba(255, 101, 52, 0.72);
    outline-offset: -3px;
}

.hrmg-footer-portfolio__visual {
    position: relative;
    overflow: hidden;
    min-height: 100%;
    background:
        radial-gradient(circle at 75% 25%, rgba(255, 101, 52, 0.38), transparent 35%),
        linear-gradient(135deg, #182332, #2b1c2c);
}

.hrmg-footer-portfolio__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease;
}

.hrmg-footer-portfolio__card:hover .hrmg-footer-portfolio__image,
.hrmg-footer-portfolio__card:focus-within .hrmg-footer-portfolio__image {
    transform: scale(1.025);
}

.hrmg-footer-portfolio__visual::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 48%;
    background: linear-gradient(transparent, rgba(13, 18, 24, 0.78));
    content: '';
    pointer-events: none;
}

.hrmg-footer-portfolio__tag {
    position: absolute;
    z-index: 1;
    top: 14px;
    left: 14px;
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--hrmg-pf-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    line-height: 1;
    text-transform: uppercase;
}

.hrmg-footer-portfolio__content {
    display: flex;
    min-width: 0;
    padding: 18px;
    flex-direction: column;
    justify-content: center;
}

.hrmg-footer-portfolio__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--hrmg-pf-orange);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1.35;
    text-transform: uppercase;
}

.hrmg-footer-portfolio__content h4 {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(17px, 1.35vw, 21px);
    line-height: 1.2;
}

.hrmg-footer-portfolio__content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 15px;
    color: var(--hrmg-pf-muted);
    font-size: 13px;
    line-height: 1.52;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hrmg-footer-portfolio__cta,
.hrmg-footer-portfolio__all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
}

.hrmg-footer-portfolio__cta > span,
.hrmg-footer-portfolio__all > span:last-child {
    color: var(--hrmg-pf-orange);
    font-size: 17px;
    transition: transform 160ms ease;
}

.hrmg-footer-portfolio__card:hover .hrmg-footer-portfolio__cta > span,
.hrmg-footer-portfolio__card:focus-within .hrmg-footer-portfolio__cta > span,
.hrmg-footer-portfolio__all:hover > span:last-child,
.hrmg-footer-portfolio__all:focus-visible > span:last-child {
    transform: translateX(3px);
}

.hrmg-footer-portfolio__all,
.hrmg-footer-portfolio__all:hover {
    margin-top: 16px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.hrmg-footer-portfolio__all:hover,
.hrmg-footer-portfolio__all:focus-visible {
    color: #fff;
}

.hrmg-footer-portfolio__empty {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--hrmg-pf-muted);
}

.hrmg-footer-portfolio__empty p {
    margin: 0;
}

/* The legacy The7 contact widget stores its fields as plain content. The PHP
   filter upgrades the phone and adds this project-assistant action without
   replacing the widget's editable copy or social links. */
.hrmg-footer-contact__phone,
.hrmg-footer-contact__phone:hover,
.hrmg-footer-contact__phone:focus-visible {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

#footer .widget-info {
    margin: 0 0 19px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    line-height: 1.62;
}

#footer .contact-info {
    margin: 0;
    padding: 0;
}

#footer .contact-info > li {
    margin: 0 0 13px;
    padding: 0 0 13px;
    border-bottom: 1px solid var(--hrmg-footer-rule);
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.5;
}

#footer .contact-info > li .color-primary {
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

#footer .contact-info > li:last-child {
    margin-top: 17px;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.hrmg-footer-contact__phone {
    text-decoration-line: underline;
    text-decoration-color: rgba(255, 101, 52, 0.58);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.hrmg-footer-contact__phone:hover,
.hrmg-footer-contact__phone:focus-visible {
    color: #ff8a65;
    text-decoration-color: currentColor;
}

.contact-info li:has(> .hrmg-footer-contact__chat) {
    margin-top: 5px;
}

.hrmg-footer-contact__chat,
.hrmg-footer-contact__chat:hover {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 13px;
    border: 1px solid rgba(255, 101, 52, 0.5);
    border-radius: 11px;
    background: rgba(255, 101, 52, 0.09);
    color: #fff;
    text-decoration: none;
    transition: transform 170ms ease, background-color 170ms ease, border-color 170ms ease;
}

.hrmg-footer-contact__chat:hover,
.hrmg-footer-contact__chat:focus-visible {
    transform: translateY(-2px);
    border-color: #ff6534;
    background: rgba(255, 101, 52, 0.17);
    color: #fff;
}

.hrmg-footer-contact__chat:focus-visible {
    outline: 2px solid #ff8a65;
    outline-offset: 3px;
}

.hrmg-footer-contact__chat-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #ff6534;
    color: #fff;
}

.hrmg-footer-contact__chat-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.hrmg-footer-contact__chat-copy strong {
    display: block;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
}

.hrmg-footer-contact__chat-copy small {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    line-height: 1.35;
}

.hrmg-footer-contact__chat-arrow {
    color: #ff8a65;
    font-size: 18px;
    transition: transform 170ms ease;
}

.hrmg-footer-contact__chat:hover .hrmg-footer-contact__chat-arrow,
.hrmg-footer-contact__chat:focus-visible .hrmg-footer-contact__chat-arrow {
    transform: translateX(3px);
}

#footer .contact-info + .soc-ico {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px solid var(--hrmg-footer-rule);
}

#footer .contact-info + .soc-ico a {
    margin: 0;
    transition: transform 160ms ease, opacity 160ms ease;
}

#footer .contact-info + .soc-ico a:hover,
#footer .contact-info + .soc-ico a:focus-visible {
    transform: translateY(-2px);
}

/* Recent posts become compact editorial rows rather than a loose list of
   circles, titles, and dates. */
#footer .recent-posts {
    margin: 0;
    padding: 0;
}

#footer .recent-posts > li,
#footer .recent-posts > li:not(:last-child) {
    margin: 0;
    padding: 0;
}

#footer .recent-posts > li + li {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--hrmg-footer-rule);
}

#footer .recent-posts article {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

#footer .recent-posts .mini-post-img,
#footer .recent-posts .alignleft,
#footer .recent-posts .post-rollover {
    width: 56px !important;
    height: 56px !important;
    margin: 0 !important;
    border-radius: 11px !important;
}

#footer .recent-posts .mini-post-img {
    overflow: hidden;
}

#footer .recent-posts .mini-post-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#footer .recent-posts .post-content {
    min-width: 0;
}

#footer .recent-posts .post-content > a {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 680;
    line-height: 1.35;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#footer .recent-posts .post-content > a:hover,
#footer .recent-posts .post-content > a:focus-visible {
    color: #fff;
}

#footer .recent-posts .post-content > br {
    display: none;
}

#footer .recent-posts .post-content > time {
    margin-top: 6px;
    color: rgba(255, 138, 101, 0.88);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

@media (max-width: 1240px) {
    #footer .wf-container-footer > .wf-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 42px clamp(34px, 5vw, 64px);
    }

    #footer .wf-container-footer > .wf-container > .widget:first-child p {
        max-width: 40ch;
    }

    .hrmg-footer-portfolio__card-link {
        grid-template-columns: minmax(175px, 0.82fr) minmax(210px, 1.18fr);
    }
}

@media (max-width: 700px) {
    #footer > .wf-wrap {
        padding-right: 22px;
        padding-left: 22px;
    }

    #footer .wf-container-footer > .wf-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    #footer .wf-container-footer .widget-title {
        margin-bottom: 19px;
    }

    .hrmg-footer-portfolio__card-link {
        display: block;
        min-height: 0;
    }

    .hrmg-footer-portfolio__visual {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hrmg-footer-portfolio__card,
    .hrmg-footer-portfolio__image,
    .hrmg-footer-portfolio__cta > span,
    .hrmg-footer-portfolio__all > span:last-child,
    .hrmg-footer-contact__chat,
    .hrmg-footer-contact__chat-arrow {
        transition: none;
    }
}
