/* ====================================================
   FOOTER (RATA KIRI UNTUK SEMUA HALAMAN)
   ==================================================== */
#footer,
.footer-section {
    background-color: #f9f9f9;
    color: #4b5563;
    padding: 80px 0 0;
    border-top: 1px solid #e5e7eb;
}

/* Accent line top */
.footer-accent {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #D81251, #b3124a);
    border-radius: 4px;
    margin-bottom: 2rem;
}

/* ---------- Grid Layout ---------- */
.footer {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 4.5rem);
    width: 100%;
    max-width: var(--site-max-width, 1520px);
    margin: 0 auto;
    padding: clamp(50px, 6vw, 85px) var(--site-gutter, clamp(1.25rem, 3.5vw, 4rem)) 0;
    text-align: left;
    box-sizing: border-box;
}

/* ---------- Brand Block ---------- */
.footer-brand {
    padding-right: 1.5rem;
    text-align: left;
}

.footer-brand img {
    height: 48px;
    width: auto;
    aspect-ratio: 1 / 1;
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-right: auto;
    display: block;
}

.footer-brand h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem;
    letter-spacing: 0.01em;
    text-align: left;
}

.footer-brand p {
    font-size: 0.98rem;
    line-height: 1.8;
    color: #374151;
    margin: 0 0 0.6rem;
    text-align: left;
}

.footer-brand p:not(:first-of-type) {
    font-weight: 500;
    color: #1f2937;
}

/* ---------- Menu / Layanan / Sosmed Blocks ---------- */
.footer-menu,
.footer-layanan,
.footer-sosmed {
    text-align: left;
}

.footer-menu h2,
.footer-menu h3,
.footer-layanan h2,
.footer-layanan h3,
.footer-sosmed h2,
.footer-sosmed h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    padding-bottom: 0.75rem;
    text-align: left;
}

.footer-menu h2::after,
.footer-menu h3::after,
.footer-layanan h2::after,
.footer-layanan h3::after,
.footer-sosmed h2::after,
.footer-sosmed h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: linear-gradient(90deg, #D81251, transparent);
    border-radius: 2px;
}

.footer-menu ul,
.footer-layanan ul,
.footer-sosmed ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: flex-start;
    text-align: left;
}

.footer-link {
    color: #374151;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    text-align: left;
}

.footer-link:hover {
    color: #b70e43;
    transform: translateX(4px);
}

/* ---------- Social Media Icons ---------- */
.footer-social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #374151;
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.footer-social-icon:hover,
.footer-social-icon:focus-visible {
    background-color: #D81251;
    color: #ffffff;
    border-color: #D81251;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: none;
}

.footer-social-icon:active {
    transform: translateY(-1px) scale(0.96);
}

/* ---------- Active Footer Link ---------- */
.footer-link.active {
    color: #b70e43 !important;
    font-weight: 700;
}

/* ---------- Bottom Bar (Copyright di dalam footer) ---------- */
.footer-bottom {
    grid-column: 1 / -1;
    width: 100%;
    max-width: var(--site-max-width, 1520px);
    margin: 3.5rem auto 0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 1.75rem var(--site-gutter, clamp(1.25rem, 3.5vw, 4rem)) 1.5rem;
    border-top: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.footer-bottom p {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0;
    letter-spacing: 0.02em;
    text-align: left;
    width: 100%;
}

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
    .footer {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 50px var(--site-gutter, clamp(1.25rem, 3.5vw, 4rem)) 0;
        text-align: left;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: left;
    }

    .footer-brand img {
        margin-left: 0;
        margin-right: auto;
    }

    .footer-menu h2::after,
    .footer-layanan h2::after,
    .footer-sosmed h2::after {
        left: 0;
        transform: none;
    }

    .footer-menu,
    .footer-layanan,
    .footer-sosmed {
        text-align: left;
    }

    .footer-menu ul,
    .footer-layanan ul,
    .footer-sosmed ul {
        align-items: flex-start;
        text-align: left;
    }

    .footer-bottom {
        justify-content: flex-start;
        text-align: left;
        padding: 1.25rem var(--site-gutter, clamp(1.25rem, 3.5vw, 4rem)) 1rem;
    }

    .footer-bottom p {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .footer {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 40px var(--site-gutter, clamp(1.25rem, 3.5vw, 4rem)) 0;
        text-align: left;
    }

    .footer-brand,
    .footer-menu,
    .footer-layanan,
    .footer-sosmed {
        text-align: left;
    }

    .footer-bottom {
        text-align: left;
        justify-content: flex-start;
    }

    .footer-bottom p {
        text-align: left;
    }
}

/* ====================================================
   FLOATING WHATSAPP BUTTON WIDGET
   ==================================================== */
.wa-floating-btn {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    background-color: #ffffff;
    color: #25D366;
    border: 1.5px solid rgba(37, 211, 102, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(37, 211, 102, 0.25);
    z-index: 999;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    animation: waPulse 2.5s infinite;
}

.wa-floating-btn:hover,
.wa-floating-btn:focus-visible {
    transform: scale(1.12);
    background-color: #ffffff;
    color: #20ba5a;
    border-color: #25D366;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15);
    outline: none;
}

.wa-floating-btn:active {
    transform: scale(0.96);
}

.wa-floating-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.wa-floating-btn:hover svg {
    transform: rotate(8deg);
}

/* Tooltip on hover */
.wa-tooltip {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background-color: #1f2937;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wa-tooltip::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px 0 5px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1f2937;
}

.wa-floating-btn:hover .wa-tooltip,
.wa-floating-btn:focus-visible .wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@keyframes waPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5), 0 4px 18px rgba(0, 0, 0, 0.12);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 4px 18px rgba(0, 0, 0, 0.12);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 4px 18px rgba(0, 0, 0, 0.12);
    }
}

@media (max-width: 768px) {
    .wa-floating-btn {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }
    .wa-floating-btn svg {
        width: 28px;
        height: 28px;
    }
    .wa-tooltip {
        display: none;
    }
}
