/* ==========================================================================
   Animation Package: kenburns-canvas
   Self-contained styles (zero page-ID coupling)
   ========================================================================== */

.anim-kenburns {
    position: relative;
    width: 100%;
    min-height: 78vh;
    height: clamp(540px, 86vh, 880px);
    overflow: hidden;
    background-color: #0f1f14;
    color: #ffffff;
}

.anim-kenburns__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.anim-kenburns__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5.5rem 1.25rem 5rem;
}

.anim-kenburns__captions {
    position: relative;
    width: 100%;
    max-width: 920px;
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anim-kenburns__caption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-kenburns__caption.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.anim-kenburns__title {
    font-size: clamp(1.9rem, 4.2vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
    margin-bottom: 1rem;
}

.anim-kenburns__subtitle {
    display: inline-block;
    background: rgba(0, 127, 0, 0.72);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 500;
    line-height: 1.5;
    padding: 0.65rem 1.4rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    white-space: pre-line;
}

.anim-kenburns__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1.75rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 1rem;
}

.anim-kenburns__arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(15, 31, 20, 0.45);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.anim-kenburns__arrow:hover,
.anim-kenburns__arrow:focus-visible {
    background: #007f00;
    border-color: #ffffff;
    transform: scale(1.06);
}

.anim-kenburns__dots {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.anim-kenburns__dots .kb-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.anim-kenburns__dots .kb-dot.is-active {
    width: 28px;
    background: #ffeb3b;
    border-color: #ffeb3b;
}

.anim-kenburns__progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
}

.anim-kenburns__progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4cb034, #ffeb3b);
}

@media (prefers-reduced-motion: reduce) {
    .anim-kenburns__caption {
        transition: opacity 0.2s ease;
        transform: none;
    }
}
