@keyframes agro-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@keyframes agro-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes agro-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200, 220, 152, .45); }
    70% { box-shadow: 0 0 0 10px rgba(200, 220, 152, 0); }
}

@keyframes agro-indicator {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.dashboard-heading,
.summary-card,
.dashboard-card,
.crop-card,
.crop-catalog-banner,
.agro-content .card {
    animation: agro-rise .55s ease backwards;
}

.summary-card:nth-child(2) { animation-delay: .08s; }
.summary-card:nth-child(3) { animation-delay: .16s; }
.summary-card:nth-child(4) { animation-delay: .24s; }
.dashboard-grid .dashboard-card { animation-delay: .12s; }
.dashboard-grid .assistant-card { animation-delay: .2s; }
.status-card { animation-delay: .18s; }

.summary-card,
.crop-card,
.quick-actions a,
.agro-menu a,
.btn {
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease, color .22s ease;
}

.summary-card:hover,
.crop-card:hover,
.quick-actions a:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(22, 77, 54, .1);
}

.assistant-star {
    animation: agro-pulse 2.8s ease-out infinite;
}

.agro-dot {
    animation: agro-pulse 2.4s ease-out infinite;
}

.agro-slider {
    margin: 0 0 22px;
}

.agro-slider .carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(16, 62, 44, .16);
}

.agro-slide {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr);
    min-height: 292px;
    padding: 34px 78px 58px;
    position: relative;
}

.agro-slide::before {
    background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .16), transparent 42%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.agro-slide-fincas { background: linear-gradient(125deg, #123c2b 0%, #1f6a45 55%, #8fb56a 140%); }
.agro-slide-cultivos { background: linear-gradient(125deg, #3b1d16 0%, #9a3412 48%, #d97706 130%); }
.agro-slide-parcelas { background: linear-gradient(125deg, #102e32 0%, #0f5f63 52%, #5eead4 145%); }
.agro-slide-sanidad { background: linear-gradient(125deg, #1c2430 0%, #1e4d3a 46%, #65a30d 140%); }

.agro-slide-copy,
.agro-slide-art {
    position: relative;
    z-index: 1;
}

.agro-slide-kicker {
    color: rgba(255, 255, 255, .78);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.agro-slide h2 {
    color: #fff;
    font-size: 30px;
    font-weight: 750;
    line-height: 1.15;
    margin: 0 0 10px;
    max-width: 16ch;
}

.agro-slide-copy p:last-of-type {
    color: rgba(255, 255, 255, .84);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 18px;
    max-width: 46ch;
}

.agro-slide-cta {
    align-items: center;
    background: #e8efd7;
    border-radius: 10px;
    color: #174d36;
    display: inline-flex;
    font-size: 14px;
    font-weight: 750;
    gap: 8px;
    padding: 11px 16px;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease;
}

.agro-slide-cta:hover {
    background: #fff;
    color: #174d36;
    transform: translateY(-2px);
}

.carousel-item.active .agro-slide-copy > * {
    animation: agro-rise .55s ease backwards;
}

.carousel-item.active .agro-slide-copy > *:nth-child(2) { animation-delay: .08s; }
.carousel-item.active .agro-slide-copy > *:nth-child(3) { animation-delay: .16s; }
.carousel-item.active .agro-slide-copy > *:nth-child(4) { animation-delay: .24s; }

.agro-slide-art {
    display: flex;
    justify-content: flex-end;
    min-height: 168px;
}

.agro-slide-art img {
    border: 3px solid rgba(255, 255, 255, .38);
    border-radius: 18px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
    height: 118px;
    object-fit: cover;
    width: 176px;
}

.agro-slide-art img:first-child {
    animation: agro-float 4.6s ease-in-out infinite;
    margin-top: 28px;
}

.agro-slide-art img:last-child {
    animation: agro-float 5.4s ease-in-out infinite reverse;
    margin-left: -36px;
}

.agro-slider .carousel-control-prev,
.agro-slider .carousel-control-next {
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    bottom: auto;
    height: 42px;
    opacity: 1;
    top: 46%;
    transform: translateY(-50%);
    width: 42px;
    backdrop-filter: blur(8px);
}

.agro-slider .carousel-control-prev { left: 16px; }
.agro-slider .carousel-control-next { right: 16px; }

.agro-slider .carousel-control-prev:hover,
.agro-slider .carousel-control-next:hover {
    background: rgba(255, 255, 255, .3);
}

.agro-slider .carousel-indicators {
    justify-content: flex-start;
    left: 78px;
    margin: 0;
    right: auto;
    bottom: 20px;
}

.agro-slider .carousel-indicators [data-bs-target] {
    background: rgba(255, 255, 255, .38);
    border: 0;
    border-radius: 99px;
    height: 5px;
    margin: 0 4px;
    opacity: 1;
    width: 22px;
}

.agro-slider .carousel-indicators .active {
    background: rgba(255, 255, 255, .35);
    overflow: hidden;
    position: relative;
    width: 46px;
}

.agro-slider .carousel-indicators .active::after {
    animation: agro-indicator 5.6s linear forwards;
    background: #fff;
    content: "";
    inset: 0;
    position: absolute;
    transform-origin: left center;
}

@media (max-width: 900px) {
    .agro-slide {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 24px 62px 64px;
    }

    .agro-slide h2 {
        font-size: 24px;
        max-width: none;
    }

    .agro-slide-art { display: none; }

    .agro-slider .carousel-indicators { left: 62px; }
}

@media (max-width: 760px) {
    .agro-slider .carousel-control-prev,
    .agro-slider .carousel-control-next { display: none; }

    .agro-slide { padding: 22px 20px 58px; }

    .agro-slider .carousel-indicators { left: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-heading,
    .summary-card,
    .dashboard-card,
    .crop-card,
    .crop-catalog-banner,
    .agro-content .card,
    .assistant-star,
    .agro-dot,
    .agro-slide-art img,
    .carousel-item.active .agro-slide-copy > *,
    .agro-slider .carousel-indicators .active::after {
        animation: none;
    }

    .summary-card:hover,
    .crop-card:hover,
    .quick-actions a:hover,
    .agro-slide-cta:hover {
        transform: none;
    }
}
