.animated-underline {
    position: relative;
    display: inline-block;
    text-decoration: none;
    border-bottom: 1px solid rgb(212, 212, 212); /* neutral-300 */
    cursor: pointer;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: rgb(10, 10, 10); /* neutral-950 */
    transition: width 0.3s ease-in-out;
}

.animated-underline:hover::after {
    width: 100%;
}

.menu-item.active {
    background-color: #EEEEEE;
    font-weight: 500;
}

/* Image block with semi-transparent background image */
.image-bg {
    position: relative;
    border-radius: 32px;
    padding: 24px;
    overflow: hidden;
}

.image-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    border-radius: 32px;
    z-index: 0;
}

.image-bg.bg-pink::before {
    background-image: url('images/color4bg_pink.avif');
}

.image-bg.bg-blue::before {
    background-image: url('images/color4bg_2026-02-06 (1).png');
}

.image-bg > * {
    position: relative;
    z-index: 1;
}

/* Responsive image max-height with dvh and vh fallback */
.img-max-h {
    max-height: 80vh;
    max-height: 80dvh;
}

@media (min-width: 768px) {
    .img-max-h {
        max-height: 70vh;
        max-height: 70dvh;
    }
}

/* Hide scrollbar but keep scrolling functionality */
.hide-scrollbar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Image Comparison Slider */
img-comparison-slider {
    --divider-width: 2px;
    --divider-color: #0a0a0a;
    --handle-opacity: 1;
    --handle-opacity-active: 1;
}

img-comparison-slider::part(handle) {
    background: #0a0a0a;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

img-comparison-slider::part(arrow) {
    color: #ffffff;
}

/* Page load and content fade-in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered child animation */
.stagger-fade-in > * {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Staggered delays for each child element */
.stagger-fade-in > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-fade-in > *:nth-child(2) { animation-delay: 0.12s; }
.stagger-fade-in > *:nth-child(3) { animation-delay: 0.19s; }
.stagger-fade-in > *:nth-child(4) { animation-delay: 0.26s; }
.stagger-fade-in > *:nth-child(5) { animation-delay: 0.33s; }
.stagger-fade-in > *:nth-child(6) { animation-delay: 0.40s; }
.stagger-fade-in > *:nth-child(7) { animation-delay: 0.47s; }
.stagger-fade-in > *:nth-child(8) { animation-delay: 0.54s; }
.stagger-fade-in > *:nth-child(9) { animation-delay: 0.61s; }
.stagger-fade-in > *:nth-child(10) { animation-delay: 0.68s; }
.stagger-fade-in > *:nth-child(11) { animation-delay: 0.75s; }
.stagger-fade-in > *:nth-child(12) { animation-delay: 0.82s; }
.stagger-fade-in > *:nth-child(13) { animation-delay: 0.89s; }
.stagger-fade-in > *:nth-child(14) { animation-delay: 0.96s; }
.stagger-fade-in > *:nth-child(15) { animation-delay: 1.03s; }
.stagger-fade-in > *:nth-child(n+16) { animation-delay: 1.1s; }

/* Scroll-triggered reveal animation */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger for multiple reveal elements */
.reveal-on-scroll.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.reveal-delay-2 { transition-delay: 0.2s; }

/* Mobile Menu Styles */
@media (max-width: 767px) {
    #sidebar.mobile-open {
        display: flex;
        animation: slideIn 0.3s ease-out forwards;
    }
    
    #sidebar.mobile-closing {
        animation: slideOut 0.3s ease-out forwards;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Menu backdrop overlay */
.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 35;
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.menu-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Hamburger button animation */
#hamburger-btn .hamburger-line {
    transition: all 0.3s ease-out;
    transform-origin: center;
}

#hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

#hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Dot drop animation */
@keyframes dotDrop {
    0% {
        opacity: 0;
        transform: translateY(-40px) scale(0.5);
    }
    60% {
        opacity: 1;
        transform: translateY(4px) scale(1.1);
    }
    80% {
        transform: translateY(-2px) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dot-drop {
    opacity: 0;
}

.revealed .dot-drop {
    animation: dotDrop 0.5s ease-out forwards;
}

.revealed .dot-drop:nth-child(1) { animation-delay: 0.3s; }
.revealed .dot-drop:nth-child(2) { animation-delay: 0.6s; }
.revealed .dot-drop:nth-child(3) { animation-delay: 0.9s; }
.revealed .dot-drop:nth-child(4) { animation-delay: 1.2s; }
.revealed .dot-drop:nth-child(5) { animation-delay: 1.5s; }

/* Timeline illustration */
.timeline-illustration {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 0;
    background: repeating-linear-gradient(
        to right,
        transparent,
        transparent calc(16.66% - 1px),
        #f0f0f0 calc(16.66% - 1px),
        #f0f0f0 16.66%
    );
    border-radius: 8px;
}

.timeline-row {
    display: flex;
    align-items: center;
    height: 28px;
}

.timeline-bar {
    height: 100%;
    background: #fae2ef;
    border-radius: 4px;
    font-size: 9px;
    padding: 0px 8px;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .timeline-bar {
        font-size: 12px;
    }
}

