.social {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 1rem;
    list-style: none;
    margin-bottom: 2rem;
    padding-left: 0;
    margin-top: 2.5rem;
}

.social.vertical {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social li {
    position: relative;
    width: 4.5rem;
    height: 4.5rem;
}

.social li::after {
    position: absolute;
    content: attr(data-tooltip);
    inset: -45% auto auto 50%;
    z-index: 10;
    translate: -50%;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: #fff;
    background: var(--bg, #070707);
    border-radius: 0.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: inset 0.4s cubic-bezier(0.47, 2, 0.41, 1.5),
        visibility 0.3s ease-in-out, opacity 0.2s ease-in-out;
}

.social li:has(a:hover, a:focus-visible)::after {
    opacity: 1;
    visibility: visible;
    inset-block-start: -60%;
}

.social a {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1;
    font-size: 1.75rem;
    color: #070707;
    border: 1px solid;
    border-radius: 100%;
    text-decoration: none;
    outline: none;
    overflow: hidden;
    transition: color 0.3s ease-in-out;
    background: #fff;
}

.social a > i {
    position: relative;
    z-index: 1;
}

.social a::after {
    position: absolute;
    content: "";
    inset: 100% 0 0;
    background: var(--bg, #070707);
    pointer-events: none;
    transition: inset 0.3s ease-in-out;
}

.social a:hover,
.social a:focus-visible {
    color: #fff;
}

.social a:hover::after,
.social a:focus-visible::after {
    inset-block-start: 0;
}

/* Spacing khusus untuk YouTube agar tooltip tidak menutupi WhatsApp */
.social li[data-tooltip="YouTube"] {
    margin-top: 2rem;
}
