/* Decorated Link Style */
.link-decorated {
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.link-decorated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.link-decorated:hover::before,
.link-decorated.active::before {
    opacity: 1;
}

.link-decorated:hover::after,
.link-decorated.active::after {
    transform: scaleX(0.98);
}

/* Static Modifier for Decorated Link */
.link-decorated--static::before {
    opacity: 1;
    transition: none;
}

.link-decorated--static::after {
    transform: scaleX(1);
    height: 1px;
    transition: none;
}

/* We don't want hover effects on the static version */
.link-decorated--static:hover::before {
    opacity: 1;
}
.link-decorated--static:hover::after {
    transform: scaleX(1);
}

/* Unified Animated Link Style */
.animated-link {
    text-decoration: none !important;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    transition: color 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.animated-link:hover,
.animated-link.active {
    color: var(--secondary-color);
}

.animated-link:hover::before,
.animated-link.active::before {
    opacity: 1;
    transform: translateX(0);
}

.animated-link:hover::after,
.animated-link.active::after {
    transform: scaleX(1);
}

/* Header specific overrides to keep text white */
.main-header .animated-link {
    color: #fff !important;
}
.main-header .animated-link:hover,
.main-header .animated-link.active {
    color: rgba(255, 255, 255, 0.8) !important;
}
/* End of Unified Animated Link Style */ 