/* ==========================================================================
   Informatika UPGRIS — Footer, Mitra marquee & floating widgets
   Prefix `ft-` agar tidak bentrok dengan style lama.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Mitra Kerjasama & Kolaborasi (marquee)
   -------------------------------------------------------------------------- */
.ft-mitra {
    position: relative;
    padding-block: clamp(40px, 6vw, 64px);
    background: var(--ui-dark-2, #0f172a);
    border-top: 1px solid var(--ui-dark-line, rgba(255,255,255,.1));
    font-family: var(--ui-font-body);
    overflow: hidden;
}
.ft-mitra__head {
    text-align: center;
    margin-bottom: clamp(24px, 4vw, 36px);
}
.ft-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ui-primary-400, #60a5fa);
}
.ft-eyebrow::before,
.ft-eyebrow::after {
    content: '';
    width: 28px;
    height: 1px;
    background: currentColor;
    opacity: .5;
}
.ft-mitra__title {
    margin: 10px 0 0;
    font-family: var(--ui-font-head);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 800;
    color: #fff;
}

.ft-marquee {
    --ft-gap: clamp(14px, 2.5vw, 24px);
    position: relative;
    overflow: hidden;
    /* fade di kedua sisi tanpa overlay tambahan */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.ft-marquee__track {
    display: flex;
    width: max-content;
    padding-block: 8px; /* ruang untuk efek hover */
    animation: ft-marquee var(--ft-duration, 30s) linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}
.ft-marquee:hover .ft-marquee__track,
.ft-marquee:focus-within .ft-marquee__track,
.ft-marquee.is-paused .ft-marquee__track {
    animation-play-state: paused;
}
@keyframes ft-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(calc(var(--ft-shift, 50%) * -1), 0, 0); }
}
.ft-marquee__group {
    display: flex;
    flex-shrink: 0;
    gap: var(--ft-gap);
    padding: 0 var(--ft-gap) 0 0; /* jarak antar grup = jarak antar item */
    margin: 0;
    list-style: none;
}
.ft-mitra-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(132px, 18vw, 176px);
    height: clamp(68px, 9vw, 84px);
    padding: 12px 18px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--ui-radius, 16px);
    cursor: pointer;
    opacity: .82;
    transition: opacity .25s var(--ui-ease), transform .25s var(--ui-ease), box-shadow .25s var(--ui-ease);
    font: inherit;
}
.ft-mitra-item:hover,
.ft-mitra-item:focus-visible {
    opacity: 1;
    transform: translateY(-4px);
    box-shadow: 0 14px 30px -12px rgba(59,130,246,.55);
    outline: none;
}
.ft-mitra-item:focus-visible { box-shadow: 0 0 0 3px var(--ui-primary-400, #60a5fa); }
.ft-mitra-item img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

@media (prefers-reduced-motion: reduce) {
    .ft-marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
    .ft-marquee__track { animation: none; margin-inline: auto; }
    .ft-marquee__group[aria-hidden="true"] { display: none; }
}

/* Modal mitra */
.ft-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(5, 8, 20, .78);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility 0s linear .2s;
}
.ft-modal.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .2s ease;
}
.ft-modal__box {
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    background: var(--ui-surface, #fff);
    border-radius: var(--ui-radius-lg, 24px);
    box-shadow: 0 30px 80px rgba(0,0,0,.45);
    transform: translateY(12px) scale(.97);
    transition: transform .25s var(--ui-ease);
    font-family: var(--ui-font-body);
}
.ft-modal.is-open .ft-modal__box { transform: none; }
.ft-modal__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 32px;
    background: var(--ui-bg, #f8fafc);
    border-bottom: 1px solid var(--ui-line, #e2e8f0);
}
.ft-modal__logo img { max-width: min(260px, 100%); max-height: 100px; object-fit: contain; }
.ft-modal__body { padding: 22px 24px 24px; }
.ft-modal__label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ui-primary, #2563eb);
}
.ft-modal__name {
    margin: 6px 0 20px;
    font-family: var(--ui-font-head);
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--ui-ink, #0f172a);
}
.ft-modal__actions { display: flex; gap: 10px; }
.ft-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: var(--ui-radius-sm, 10px);
    font: 600 .875rem/1 var(--ui-font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, filter .2s, color .2s;
}
.ft-btn--ghost { background: var(--ui-line-soft, #f1f5f9); border: 1px solid var(--ui-line, #e2e8f0); color: var(--ui-body, #334155); }
.ft-btn--ghost:hover { background: var(--ui-line, #e2e8f0); }
.ft-btn--primary { flex: 2; background: var(--ui-gradient); border: 0; color: #fff; }
.ft-btn--primary:hover { filter: brightness(1.1); color: #fff; }
.ft-btn[hidden] { display: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.ft {
    position: relative;
    overflow: hidden;
    background: var(--ui-dark, #0b1220);
    color: var(--ui-dark-muted, rgba(255,255,255,.62));
    font-family: var(--ui-font-body);
    font-size: .9rem;
    line-height: 1.6;
}
.ft::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(59,130,246,.12), transparent 70%),
        radial-gradient(500px 280px at 100% 100%, rgba(14,165,233,.08), transparent 70%);
    pointer-events: none;
}
.ft a { color: inherit; text-decoration: none; }
.ft__inner {
    position: relative;
    width: 100%;
    max-width: var(--ui-container, 1240px);
    margin-inline: auto;
    padding-inline: var(--ui-gutter, 24px);
}
.ft__main { padding-block: clamp(44px, 7vw, 72px) clamp(32px, 5vw, 48px); }

.ft__grid {
    display: grid;
    gap: clamp(28px, 4vw, 48px);
    grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
    grid-template-areas: "brand links contact map";
}
.ft__brand   { grid-area: brand; min-width: 0; }
.ft__links   { grid-area: links; min-width: 0; }
.ft__contact { grid-area: contact; min-width: 0; }
.ft__map     { grid-area: map; min-width: 0; }

@media (max-width: 1100px) {
    .ft__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "brand brand"
            "links contact"
            "map   map";
    }
}
@media (max-width: 600px) {
    .ft__grid {
        grid-template-columns: 1fr;
        grid-template-areas: "brand" "links" "contact" "map";
    }
}

/* Brand */
.ft__logo { display: block; height: clamp(48px, 6vw, 60px); width: auto; max-width: 100%; object-fit: contain; }
.ft__desc { margin: 18px 0 22px; max-width: 46ch; }
.ft__socials { display: flex; flex-wrap: wrap; gap: 10px; }
.ft-social {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--ui-dark-line, rgba(255,255,255,.1));
    color: rgba(255,255,255,.75);
    font-size: 1rem;
    transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.ft-social:hover,
.ft-social:focus-visible {
    background: var(--ui-primary, #2563eb);
    border-color: var(--ui-primary, #2563eb);
    color: #fff;
    transform: translateY(-3px);
}
.ft__partners {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--ui-dark-line, rgba(255,255,255,.1));
}
.ft__partners img {
    height: 42px;
    width: auto;
    opacity: .7;
    filter: grayscale(1);
    transition: opacity .25s, filter .25s;
}
.ft__partners img:hover { opacity: 1; filter: none; }

/* Heading kolom */
.ft__title {
    margin: 0 0 18px;
    font-family: var(--ui-font-head);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ft__title::before {
    content: '';
    width: 18px;
    height: 3px;
    border-radius: 3px;
    background: var(--ui-gradient);
}

/* Daftar tautan */
.ft__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ft__list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    transition: color .2s, transform .2s;
}
.ft__list a i { font-size: .65rem; color: var(--ui-primary-400, #60a5fa); transition: transform .2s; }
.ft__list a:hover { color: #fff; }
.ft__list a:hover i { transform: translateX(3px); }
@media (min-width: 420px) and (max-width: 600px) {
    .ft__links .ft__list { grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

/* Kontak */
.ft__contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ft__contact-list li { display: flex; align-items: flex-start; gap: 12px; }
.ft__contact-list a:hover { color: #fff; }
.ft__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(59,130,246,.14);
    border: 1px solid rgba(59,130,246,.25);
    color: var(--ui-primary-400, #60a5fa);
    font-size: .85rem;
}
.ft__contact-list span,
.ft__contact-list a { padding-top: 6px; overflow-wrap: anywhere; }

/* Peta */
.ft__map-frame {
    position: relative;
    overflow: hidden;
    border-radius: var(--ui-radius, 16px);
    border: 1px solid var(--ui-dark-line, rgba(255,255,255,.1));
    aspect-ratio: 4 / 3;
    background: rgba(255,255,255,.04);
}
@media (max-width: 1100px) { .ft__map-frame { aspect-ratio: 16 / 7; } }
@media (max-width: 600px)  { .ft__map-frame { aspect-ratio: 4 / 3; } }
.ft__map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ft__map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ui-primary-400, #60a5fa) !important;
}
.ft__map-link:hover { color: #fff !important; }

/* Bottom bar */
.ft__bottom { position: relative; border-top: 1px solid var(--ui-dark-line, rgba(255,255,255,.1)); }
.ft__bottom .ft__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    padding-block: 20px;
    font-size: .8rem;
}
.ft__bottom p { margin: 0; }
.ft__bottom strong { color: rgba(255,255,255,.85); font-weight: 600; }
.ft__bottom a { color: var(--ui-primary-400, #60a5fa); font-weight: 600; }
.ft__bottom a:hover { color: #fff; }
@media (max-width: 600px) {
    .ft__bottom .ft__inner { flex-direction: column; text-align: center; padding-bottom: 96px; /* jangan tertutup tombol melayang */ }
}

/* --------------------------------------------------------------------------
   Tombol melayang: back-to-top & WhatsApp
   -------------------------------------------------------------------------- */
:root { --ft-float-x: clamp(16px, 3vw, 28px); --ft-float-y: clamp(16px, 3vw, 28px); }

#back-to-top {
    position: fixed;
    right: calc(var(--ft-float-x) + 7px);
    bottom: calc(var(--ft-float-y) + 70px);
    z-index: 9998;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: var(--ui-gradient);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--ui-shadow-primary);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
}
#back-to-top.visible { opacity: 1; transform: none; pointer-events: auto; }
#back-to-top.visible:hover { transform: translateY(-3px); }

.wa-widget-container {
    position: fixed;
    right: var(--ft-float-x);
    bottom: var(--ft-float-y);
    z-index: 9999;
    font-family: var(--ui-font-body);
}
.wa-widget-btn {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 0;
    background: #25d366;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 10px 28px -6px rgba(37,211,102,.55);
    transition: transform .25s var(--ui-ease), box-shadow .25s;
}
.wa-widget-btn:hover { transform: scale(1.07); box-shadow: 0 14px 34px -6px rgba(37,211,102,.7); }
.wa-chat-box {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: min(330px, calc(100vw - 2 * var(--ft-float-x)));
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: var(--ui-radius, 16px);
    box-shadow: 0 20px 50px rgba(15,23,42,.25);
    transform-origin: bottom right;
    animation: ftWaPop .25s var(--ui-ease);
}
.wa-chat-box.show { display: flex; }
@keyframes ftWaPop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.wa-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #075e54;
    color: #fff;
}
.wa-profile { display: flex; align-items: center; gap: 12px; }
.wa-profile i { font-size: 28px; }
.wa-profile h4 { margin: 0; font-size: 15px; font-weight: 600; color: #fff; }
.wa-profile p { margin: 0; font-size: 12px; opacity: .8; }
.wa-chat-close { background: none; border: 0; color: #fff; font-size: 18px; cursor: pointer; opacity: .8; padding: 4px; }
.wa-chat-close:hover { opacity: 1; }
.wa-chat-body { height: 180px; padding: 18px 16px; overflow-y: auto; background: #e5ddd5; }
.wa-message {
    position: relative;
    max-width: 85%;
    padding: 10px 14px;
    background: #fff;
    border-radius: 0 10px 10px 10px;
    font-size: 13px;
    color: #303030;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.wa-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border-top: 8px solid #fff;
    border-left: 8px solid transparent;
}
.wa-chat-footer { display: flex; gap: 8px; padding: 12px; background: #f0f0f0; }
.wa-chat-input { flex: 1; min-width: 0; padding: 10px 14px; border: 0; border-radius: 24px; outline: none; font-size: 14px; }
.wa-chat-send {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #008f68;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
