/* Divider Container */
.animated-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0; /* Add vertical spacing */
    text-align: center;
    opacity: 0; /* Initially hidden for animation */
    transform: translateY(20px); /* Slide up */
    transition: opacity 1.2s ease, transform 1.2s ease; /* Smooth animation */
}

/* Make it visible when scrolled */
.animated-divider.visible {
    opacity: 1;
    transform: translateY(0); /* Reset to its original position */
}

/* Horizontal Lines */
.animated-divider .line {
    flex: 1; /* Stretchable lines */
    height: 2px; /* Slightly thicker line */
    background: linear-gradient(to right, #ddd, #ddd); /* Neutral color line */
    margin: 0 15px; /* Space between line and text */
    position: relative;
    overflow: hidden;
}

/* Line animation */
.animated-divider .line::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #588157, #94c947); /* Animated gradient */
    transition: width 1.5s ease; /* Smooth gradient reveal */
}

/* Reveal the line animation on scroll */
.animated-divider.visible .line::before {
    width: 100%; /* Fully fill the line */
}

/* Divider Text */
.animated-divider .text {
    font-size: 14px; /* Text size */
    font-weight: 500; /* Medium weight */
    color: #888; /* Neutral text color */
    text-transform: uppercase; /* Optional: Clean uppercase */
    letter-spacing: 0.5px; /* Slight spacing for better readability */
    position: relative;
}

/* Text animation: subtle fade */
.animated-divider .text::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #588157;
    transform: scaleX(0); /* Start hidden */
    transform-origin: center;
    transition: transform 1s ease; /* Smooth scaling */
}

.animated-divider.visible .text::before {
    transform: scaleX(1); /* Fully reveal underline */
}