/*
 * Homepage featured services (template-parts/featured-services.php): one card per Servicios
 * record. Sizes, radii and timings follow the public M07 component (docs/ANIMATION_INVENTORY.md);
 * colours match the public component exactly, including its low-contrast greys.
 * Each card, dot and progress segment carries --eiatec-carousel-color (text and panel) and
 * --eiatec-carousel-bright (graphics) from the template's seven-colour cycle.
 */
.eiatec-featured-services .eiatec-featured-carousel { width: min(1060px, 100%); max-width: 100%; margin-top: 23px; }
.eiatec-carousel { display: grid; gap: 23px; color: #1a2e24; font-family: inherit; }

.eiatec-carousel-stage { position: relative; overflow: hidden; border-radius: 26px; box-shadow: 0 22px 65px rgba(44, 105, 87, .2); }
.eiatec-carousel-cards { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; }
.eiatec-carousel.is-enhanced .eiatec-carousel-cards { overflow: visible; transition: transform .55s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.eiatec-carousel-card { display: grid; grid-template-columns: 1fr 1fr; flex: 0 0 100%; min-width: 100%; min-height: 524px; margin: 0; scroll-snap-align: start; }
/* The outgoing card stays painted while the track slides, then leaves the accessibility tree. */
.eiatec-carousel.is-enhanced .eiatec-carousel-card[aria-hidden="true"] { visibility: hidden; transition: visibility 0s .55s; }

.eiatec-carousel-panel { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: clamp(32px, 5vw, 52px) clamp(28px, 4.5vw, 48px); overflow: hidden; background: var(--eiatec-carousel-color, #3b7d31); color: #fff; }
.eiatec-carousel-panel::before, .eiatec-carousel-panel::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; background: rgba(255, 255, 255, .09); pointer-events: none; }
.eiatec-carousel-panel::before { width: 300px; height: 300px; top: -90px; right: -70px; }
.eiatec-carousel-panel::after { width: 190px; height: 190px; bottom: -55px; left: -35px; }
.eiatec-carousel-icon { display: grid; flex: none; place-items: center; width: clamp(62px, 8vw, 80px); height: clamp(62px, 8vw, 80px); overflow: hidden; border: 2px solid rgba(255, 255, 255, .38); border-radius: 20px; background: rgba(255, 255, 255, .18); color: #fff; }
.eiatec-carousel-icon img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.eiatec-carousel.is-enhanced .eiatec-carousel-icon { animation: eiatec-carousel-pop .5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes eiatec-carousel-pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
.eiatec-carousel-name { margin: 0; color: #fff; font-family: inherit; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.2; text-wrap: pretty; }
.eiatec-carousel-name a { color: inherit; text-decoration: none; }
.eiatec-carousel-name a:hover, .eiatec-carousel-name a:focus-visible { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.eiatec-carousel-name a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.eiatec-carousel-summary { margin: 0; color: rgba(255, 255, 255, .82); font-size: clamp(.8rem, 1.2vw, .9rem); line-height: 1.75; text-wrap: pretty; }

.eiatec-carousel-detail { display: flex; flex-direction: column; justify-content: center; gap: 18px; min-width: 0; padding: clamp(28px, 4vw, 44px) clamp(24px, 3.5vw, 40px); background: #fff; }
.eiatec-carousel-counter { display: flex; align-items: baseline; gap: 4px; margin: 0; line-height: normal; }
.eiatec-carousel-current { color: var(--eiatec-carousel-color, #3b7d31); font-size: clamp(1.8rem, 3vw, 2.2rem); font-weight: 800; line-height: 1; }
.eiatec-carousel-separator { margin: 0 2px; color: #bbb; font-size: 1rem; }
.eiatec-carousel-total { color: #bbb; font-size: .95rem; font-weight: 700; }
.eiatec-carousel-heading { display: flex; flex-direction: column; gap: 4px; }
.eiatec-carousel-kicker { margin: 0; color: #aaa; line-height: normal; font-size: clamp(.6rem, .9vw, .7rem); font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; }
.eiatec-carousel-video-title { margin: 0; color: #1a2e24; font-size: clamp(.95rem, 1.8vw, 1.2rem); font-weight: 800; line-height: 1.3; text-wrap: pretty; }
.eiatec-carousel-tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 12px; border-radius: 20px; background: color-mix(in srgb, var(--eiatec-carousel-color, #3b7d31) 10%, transparent); color: var(--eiatec-carousel-color, #3b7d31); font-size: clamp(.62rem, .9vw, .7rem); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.eiatec-carousel-tag svg { flex: none; }
.eiatec-carousel-video { position: relative; display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #0f2219; }
.eiatec-carousel-play { display: grid; place-items: center; width: clamp(52px, 7vw, 64px); height: clamp(52px, 7vw, 64px); padding-left: 4px; border: 2.5px solid color-mix(in srgb, var(--eiatec-carousel-bright, #62b455) 33%, transparent); border-radius: 50%; background: color-mix(in srgb, var(--eiatec-carousel-bright, #62b455) 13%, transparent); color: var(--eiatec-carousel-bright, #62b455); }
.eiatec-carousel-soon { color: rgba(255, 255, 255, .5); font-size: clamp(.65rem, 1vw, .75rem); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

/* Controls are rendered by the server and revealed by featured-services.js. */
.eiatec-carousel-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.eiatec-carousel-controls[hidden], .eiatec-carousel-progress[hidden] { display: none; }
.eiatec-carousel .eiatec-carousel-arrow { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 2px solid #d8e8df; border-radius: 50%; background: #fff; color: #6a9a7a; cursor: pointer; font: inherit; line-height: 1; transition: all .25s; }
.eiatec-carousel .eiatec-carousel-arrow:hover, .eiatec-carousel .eiatec-carousel-arrow:focus { border-color: #2c6957; background: #fff; color: #2c6957; }
.eiatec-carousel .eiatec-carousel-arrow:hover { transform: scale(1.08); }
.eiatec-carousel .eiatec-carousel-arrow:active { transform: scale(.94); }
.eiatec-carousel .eiatec-carousel-arrow svg { display: block; }
.eiatec-carousel .eiatec-carousel-pause .eiatec-carousel-play-icon, .eiatec-carousel .eiatec-carousel-pause.is-paused .eiatec-carousel-pause-icon { display: none; }
.eiatec-carousel .eiatec-carousel-pause.is-paused .eiatec-carousel-play-icon { display: block; }
/*
 * m-35: each dot is a transparent 24 × 24 px target (28 px wide while current) with the public dot drawn in its
 * centre at the public size and colours (9 px, a 28 px pill in the service colour when current), so the dots sit
 * 24 px apart instead of 16 px. The negative margin keeps the controls row as tall as before.
 */
.eiatec-carousel-dots { display: flex; align-items: center; gap: 0; margin: -7.5px 0; }
.eiatec-carousel .eiatec-carousel-dot {
	position: relative; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 12px;
	background: none; cursor: pointer; transition: width .38s cubic-bezier(.4, 0, .2, 1);
}
.eiatec-carousel .eiatec-carousel-dot::before { content: ""; width: 9px; height: 9px; border-radius: 5px; background: #ccd8d2; transition: all .38s cubic-bezier(.4, 0, .2, 1); }
.eiatec-carousel .eiatec-carousel-dot:hover, .eiatec-carousel .eiatec-carousel-dot:focus { background: none; }
.eiatec-carousel .eiatec-carousel-dot:hover::before, .eiatec-carousel .eiatec-carousel-dot:focus::before { background: #a9c0b4; }
.eiatec-carousel .eiatec-carousel-dot[aria-current="true"] { width: 28px; }
.eiatec-carousel .eiatec-carousel-dot[aria-current="true"]::before { width: 28px; background: var(--eiatec-carousel-bright, #62b455); }
.eiatec-carousel-controls button:focus-visible { outline: 2px solid #2c6957; outline-offset: 3px; }

.eiatec-carousel-progress { display: flex; gap: 8px; }
.eiatec-carousel-progress span { flex: 1; height: 3.5px; overflow: hidden; border-radius: 3px; background: #dde9e3; }
.eiatec-carousel-progress i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--eiatec-carousel-bright, #62b455); transition: width .4s ease; }
.eiatec-carousel-progress .is-done i { width: 100%; }
.eiatec-carousel-progress .is-active i { width: 100%; transition: width 6s linear; }

@media (max-width: 720px) {
	.eiatec-carousel-card { grid-template-columns: 1fr; min-height: auto; }
	.eiatec-carousel-detail { order: -1; gap: 12px; padding: 24px 20px; }
	.eiatec-carousel-panel { gap: 12px; padding: 28px 22px; }
	.eiatec-carousel-current { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.eiatec-carousel.is-enhanced .eiatec-carousel-cards, .eiatec-carousel.is-enhanced .eiatec-carousel-card[aria-hidden="true"],
	.eiatec-carousel .eiatec-carousel-arrow, .eiatec-carousel .eiatec-carousel-dot, .eiatec-carousel .eiatec-carousel-dot::before, .eiatec-carousel-progress i,
	.eiatec-carousel-progress .is-active i { transition: none; }
	.eiatec-carousel.is-enhanced .eiatec-carousel-icon { animation: none; }
}
