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

.acgf-footer {
    width: 100%;
    background: #f5f8ff;
    color: #4b5563;
    padding: 40px 40px 20px;
    overflow: hidden;
}

.acgf-inner {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
}

/*
 * Reference full-bleed mode should be able to leave a real outer gutter like
 * the approved mockup. This selector is deliberately more specific than the
 * late About Doctor polish rule so the Elementor control remains authoritative.
 */
.elementor-widget-aliclick_global_footer.acgf-reference-full-bleed-yes .acgf-footer {
    width: calc(100vw - (2 * var(--acgf-reference-edge-gap, 30px))) !important;
    max-width: calc(100vw - (2 * var(--acgf-reference-edge-gap, 30px))) !important;
    margin-inline: calc(50% - 50vw + var(--acgf-reference-edge-gap, 30px)) !important;
}

/*
 * Some themes/Elementor containers leave a tiny trailing block gap after the
 * final widget. Pull only the footer widget through that gap when the dedicated
 * switch is enabled; the amount remains responsive/editable in Elementor.
 */
.elementor-widget-aliclick_global_footer.acgf-reference-flush-bottom-yes {
    margin-bottom: calc(-1 * var(--acgf-reference-bottom-pull, 8px)) !important;
}

.elementor-widget-aliclick_global_footer.acgf-reference-flush-bottom-yes .acgf-footer {
    margin-bottom: 0 !important;
}

.acgf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(180px, .75fr);
    gap: 44px;
    align-items: start;
}

.acgf-footer[dir="rtl"] .acgf-grid,
.acgf-footer[dir="rtl"] .acgf-bottom {
    direction: rtl;
}

.acgf-footer[dir="ltr"] .acgf-grid,
.acgf-footer[dir="ltr"] .acgf-bottom {
    direction: ltr;
}

.acgf-column {
    min-width: 0;
}

.acgf-brand-name,
.acgf-heading {
    margin: 0;
    color: #1f2937;
    font-weight: 800;
    line-height: 1.45;
}

.acgf-brand-name {
    margin-top: 14px;
    font-size: 24px;
}

.acgf-heading {
    margin-bottom: 20px;
    font-size: 18px;
}

.acgf-specialty {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.8;
}

.acgf-description {
    max-width: 390px;
    margin: 14px 0 0;
    line-height: 1.9;
}

.acgf-muted,
.acgf-post-date,
.acgf-bottom {
    color: #7c8798;
}

.acgf-logo img {
    display: block;
    width: 130px;
    max-width: 100%;
    height: auto;
}

.acgf-contact-list,
.acgf-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acgf-contact-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.acgf-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.75;
}

.acgf-contact-list a,
.acgf-contact-list span {
    color: inherit;
    text-decoration: none;
}

.acgf-contact-list a:hover,
.acgf-contact-list a:focus-visible {
    color: #1769e0;
}

.acgf-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    height: 26px;
    color: #1769e0;
}

.acgf-contact-icon i,
.acgf-contact-icon svg {
    width: 16px;
    height: 16px;
}

/*
 * Social icons are driven exclusively by Elementor's social repeater.
 * There is no synthetic fixed row: deleting, clearing or reordering an item in
 * the widget directly controls what is visible in the footer and in which order.
 */
.acgf-social {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    min-height: 0;
}

.acgf-social > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
    color: #1769e0;
    line-height: 1;
    text-decoration: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 180ms ease, opacity 180ms ease;
}

.acgf-social > a:not(:has(i, svg)) {
    display: none;
}

.acgf-social > a:hover {
    transform: translateY(-1px);
}

.acgf-social > a i,
.acgf-social > a svg {
    display: block;
    width: 1em;
    height: 1em;
    flex: 0 0 1em;
}

/*
 * Render supplied brand artwork on the anchor itself, not on Elementor's
 * internal <i>/<svg>. Elementor can change the internal markup/class used for
 * individual brands (YouTube was the production case), while aria-label and
 * the configured URL remain stable repeater data.
 */
.acgf-social > a[aria-label*="telegram" i],
.acgf-social > a[href*="t.me/" i],
.acgf-social > a[href*="telegram.me/" i] {
    background-image: url("../images/social/telegram.png");
}

.acgf-social > a[aria-label*="youtube" i],
.acgf-social > a[href*="youtube.com" i],
.acgf-social > a[href*="youtu.be" i] {
    background-image: url("../images/social/youtube.png");
}

.acgf-social > a[aria-label*="facebook" i],
.acgf-social > a[href*="facebook.com" i] {
    background-image: url("../images/social/facebook.png");
}

.acgf-social > a[aria-label*="instagram" i],
.acgf-social > a[href*="instagram.com" i] {
    background-image: url("../images/social/instagram.png");
}

.acgf-social > a[aria-label*="linkedin" i],
.acgf-social > a[href*="linkedin.com" i] {
    background-image: url("../images/social/linkedin.png");
}

/* Hide Elementor's glyph only for brands that are replaced by supplied PNGs. */
.acgf-social > a[aria-label*="telegram" i] > i,
.acgf-social > a[aria-label*="telegram" i] > svg,
.acgf-social > a[href*="t.me/" i] > i,
.acgf-social > a[href*="t.me/" i] > svg,
.acgf-social > a[href*="telegram.me/" i] > i,
.acgf-social > a[href*="telegram.me/" i] > svg,
.acgf-social > a[aria-label*="youtube" i] > i,
.acgf-social > a[aria-label*="youtube" i] > svg,
.acgf-social > a[href*="youtube.com" i] > i,
.acgf-social > a[href*="youtube.com" i] > svg,
.acgf-social > a[href*="youtu.be" i] > i,
.acgf-social > a[href*="youtu.be" i] > svg,
.acgf-social > a[aria-label*="facebook" i] > i,
.acgf-social > a[aria-label*="facebook" i] > svg,
.acgf-social > a[href*="facebook.com" i] > i,
.acgf-social > a[href*="facebook.com" i] > svg,
.acgf-social > a[aria-label*="instagram" i] > i,
.acgf-social > a[aria-label*="instagram" i] > svg,
.acgf-social > a[href*="instagram.com" i] > i,
.acgf-social > a[href*="instagram.com" i] > svg,
.acgf-social > a[aria-label*="linkedin" i] > i,
.acgf-social > a[aria-label*="linkedin" i] > svg,
.acgf-social > a[href*="linkedin.com" i] > i,
.acgf-social > a[href*="linkedin.com" i] > svg {
    visibility: hidden;
}

.acgf-social a:focus-visible,
.acgf-post-title:focus-visible,
.acgf-links a:focus-visible,
.acgf-credit a:focus-visible,
.acgf-contact-list a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.acgf-posts {
    display: grid;
    gap: 0;
}

.acgf-post {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 13px;
    align-items: center;
    padding: 0 0 14px;
}

.acgf-post + .acgf-post {
    padding-top: 14px;
    border-top: 1px solid #dce6f5;
}

.acgf-post:last-child {
    padding-bottom: 0;
}

.acgf-post-thumb {
    display: block;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 12px;
    background: #e8eef8;
}

.acgf-post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.acgf-post:hover .acgf-post-thumb img {
    transform: scale(1.04);
}

.acgf-post-body {
    min-width: 0;
}

.acgf-post-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #263348;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.65;
}

.acgf-post-title:hover,
.acgf-post-title:focus-visible {
    color: #1769e0;
}

.acgf-post-date {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.6;
}

.acgf-links-list {
    display: grid;
    gap: 3px;
}

.acgf-links li {
    margin: 0;
}

.acgf-links a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 0;
    color: inherit;
    text-decoration: none;
    line-height: 1.75;
    transition: color 180ms ease, transform 180ms ease;
}

.acgf-links a::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-top: 2px solid #1769e0;
    border-right: 2px solid #1769e0;
    transform: rotate(-135deg);
    opacity: .85;
}

.acgf-footer[dir="ltr"] .acgf-links a::before {
    transform: rotate(45deg);
}

.acgf-links a:hover,
.acgf-links a:focus-visible {
    color: #1769e0;
}

.acgf-footer[dir="rtl"] .acgf-links a:hover,
.acgf-footer[dir="rtl"] .acgf-links a:focus-visible {
    transform: translateX(-2px);
}

.acgf-footer[dir="ltr"] .acgf-links a:hover,
.acgf-footer[dir="ltr"] .acgf-links a:focus-visible {
    transform: translateX(2px);
}

.acgf-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px 30px;
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid #dce6f5;
    font-size: 12px;
    line-height: 1.8;
}

.acgf-credit {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.acgf-credit a {
    color: #1769e0;
    text-decoration: none;
    font-weight: 700;
}

.acgf-editor-notice {
    padding: 12px 14px;
    border: 1px dashed #b9c8dc;
    border-radius: 10px;
    background: rgba(255, 255, 255, .7);
    color: #68758a;
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .acgf-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 34px;
    }

    .acgf-brand-column {
        grid-column: 1 / -1;
    }

    .acgf-description {
        max-width: 680px;
    }
}

@media (max-width: 767px) {
    .acgf-footer {
        padding: 32px 22px 18px;
        border-radius: 20px 20px 0 0;
    }

    .acgf-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
    }

    .acgf-brand-column {
        grid-column: auto;
    }

    .acgf-heading {
        margin-bottom: 15px;
    }

    .acgf-post {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 11px;
    }

    .acgf-post-thumb {
        width: 56px;
        height: 56px;
        border-radius: 10px;
    }

    .acgf-bottom {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 28px;
        padding-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acgf-footer *,
    .acgf-footer *::before,
    .acgf-footer *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
