/*==============================================
   KIMST site footer
   Self-contained (kh-footer prefix) - replaces the legacy
   .footer-area rules in style.css.
===============================================*/

.kh-footer {
    --kh-green: #108543;
    --kh-red: #d02010;
    --kh-f-tint: #ffd9d2;   /* light pink: labels, link accents, focus ring on the red footer */
    --kh-ease: cubic-bezier(.22, 1, .36, 1);

    position: relative;
    overflow: hidden;
    padding-top: 34px;
    color: rgba(255, 255, 255, .92);
    font-family: var(--kh-font-body);
    font-size: 14px;
    line-height: 1.55;
    background:
        radial-gradient(760px 420px at 0% 0%, rgba(255, 140, 118, .3), transparent 62%),
        radial-gradient(620px 380px at 100% 100%, rgba(90, 6, 2, .5), transparent 62%),
        linear-gradient(180deg, #b51a0c 0%, #8f1409 100%);
}

.kh-footer *,
.kh-footer *::before,
.kh-footer *::after {
    box-sizing: border-box;
}

/* Brand-coloured line along the top edge */
.kh-footer__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #108543 0%, #2bb86b 50%, #108543 100%);
}

/* Dotted texture + a large ring, same visual language as the hero */
.kh-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .1) 1.5px, transparent 1.6px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 55%);
    mask-image: linear-gradient(100deg, #000 0%, transparent 55%);
    pointer-events: none;
}

.kh-footer::after {
    content: "";
    position: absolute;
    right: -220px;
    bottom: -260px;
    width: 560px;
    height: 560px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(255, 255, 255, .015), 0 0 0 120px rgba(255, 255, 255, .01);
    pointer-events: none;
}

.kh-footer .container {
    position: relative;
    z-index: 1;
}

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

.kh-footer :focus-visible {
    outline: 2px solid var(--kh-f-tint);
    outline-offset: 3px;
}

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

/* Three columns: brand | Quick Links | Contact */
.kh-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr) minmax(0, 1.3fr);
    gap: 56px;
    padding-bottom: 24px;
}

/*---------- Brand ----------*/

.kh-footer__logo {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .3);
}

.kh-footer__logo img {
    display: block;
    width: auto;
    height: 38px;
}

.kh-footer p.kh-footer__about {
    max-width: 380px;
    margin: 12px 0 14px;
    color: rgba(255, 255, 255, .9);
    font-size: 13.5px;
    line-height: 1.6;
}

.kh-footer__social {
    display: flex;
    gap: 9px;
}

.kh-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.kh-footer__social a:hover {
    border-color: #fff;
    background: #fff;
    color: var(--kh-red);
    transform: translateY(-3px);
}

/*---------- Link columns ----------*/

.kh-footer h3.kh-footer__title {
    position: relative;
    margin: 0 0 13px;
    padding-bottom: 9px;
    color: #fff;
    font-family: var(--kh-font-ui);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}

.kh-footer__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #fff, var(--kh-f-tint));
}

.kh-footer__links li {
    margin: 0 0 5px;
    break-inside: avoid;
}

/* the wider body font would otherwise wrap "Chairman Message" inside its half-width column */
@media (min-width: 1200px) {
    .kh-footer__links a {
        white-space: nowrap;
    }
}

.kh-footer__links a {
    position: relative;
    display: inline-block;
    color: rgba(255, 255, 255, .92);
    transition: color .2s ease, padding-left .25s var(--kh-ease);
}

.kh-footer__links a::before {
    content: "\f105";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--kh-f-tint);
    font-family: FontAwesome;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .2s ease, transform .25s var(--kh-ease);
}

.kh-footer__links a:hover {
    padding-left: 16px;
    color: #fff;
}

.kh-footer__links a:hover::before {
    opacity: 1;
    transform: none;
}

/*---------- Contact ----------*/

.kh-footer__info li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.kh-footer__info li + li {
    margin-top: 9px;
}

.kh-footer__icon {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .17);
    color: #fff;
    font-size: 18px;
}

.kh-footer__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: rgba(255, 255, 255, .92);
    line-height: 1.45;
}

.kh-footer__text small {
    margin-bottom: 1px;
    color: var(--kh-f-tint);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1.3;
    text-transform: uppercase;
}

.kh-footer__text b {
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
}

.kh-footer__text > a {
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transition: color .2s ease;
}

.kh-footer__text > a:hover {
    color: var(--kh-f-tint);
}

.kh-footer a.kh-footer__directions {
    align-self: flex-start;
    margin-top: 2px;
    color: var(--kh-f-tint);
    font-size: 13.5px;
    font-weight: 700;
    transition: color .2s ease;
}

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

.kh-footer__directions i {
    margin-left: 6px;
    transition: transform .25s var(--kh-ease);
}

.kh-footer__directions:hover i {
    transform: translateX(4px);
}

/*---------- Bottom bar ----------*/

.kh-footer__bottom {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, .2);
    background: rgba(60, 4, 0, .38);
}

.kh-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.kh-footer__bottom p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
}

.kh-footer__copy a,
.kh-footer__credit a {
    color: #fff;
    transition: color .2s ease;
}

.kh-footer__copy a:hover,
.kh-footer__credit a:hover {
    color: var(--kh-f-tint);
}

.kh-footer__credit {
    margin-left: auto;
}

.kh-footer__top {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
    color: var(--kh-red);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .25s var(--kh-ease);
}

.kh-footer__top:hover {
    background: var(--kh-f-tint);
    transform: translateY(-4px);
}

/*---------- Responsive ----------*/

/* Tablet: brand on its own row, then Quick Links | Contact side by side */
@media (max-width: 991.98px) {
    .kh-footer {
        padding-top: 30px;
    }

    .kh-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 40px;
        padding-bottom: 20px;
    }

    .kh-footer__brand {
        grid-column: 1 / -1;
    }

    .kh-footer p.kh-footer__about {
        max-width: 520px;
    }
}

/* Phones: brand, Quick Links, Contact stacked */
@media (max-width: 767.98px) {
    .kh-footer {
        padding-top: 26px;
    }

    .kh-footer__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding-bottom: 18px;
    }

    .kh-footer p.kh-footer__about {
        max-width: none;
    }

    .kh-footer h3.kh-footer__title {
        margin-bottom: 14px;
    }

    .kh-footer__links li {
        margin-bottom: 6px;
    }

    .kh-footer p.kh-footer__about {
        margin: 14px 0 16px;
        font-size: 14px;
    }

    .kh-footer__info li + li {
        margin-top: 12px;
    }

    .kh-footer__bottom-inner {
        flex-wrap: wrap;
    }

    .kh-footer__credit {
        order: 3;
        flex: 1 1 100%;
        margin-left: 0;
    }

    .kh-footer__copy {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (max-width: 359.98px) {
    .kh-footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-footer a,
    .kh-footer__links a::before,
    .kh-footer__social a,
    .kh-footer__directions i,
    .kh-footer__top {
        transition: none;
    }

    .kh-footer__social a:hover,
    .kh-footer__top:hover {
        transform: none;
    }
}
