/* =========================================================
   Port Facilities carousel
   All slides share one grid cell, so the box is as tall as the
   tallest slide and never jumps when you change slide.
   ========================================================= */
.carousel { position: relative; isolation: isolate; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-lg); color: #fff; background: #020049; }
.carousel-viewport { display: grid; }
/* vertical scroll stays native, horizontal drags reach our swipe handler; wide tables still pan sideways */
.carousel { touch-action: pan-y; }
.carousel-body.has-table { touch-action: pan-x pan-y; }

.carousel-slide {
    grid-area: 1 / 1; display: grid; place-items: center; min-height: clamp(380px, 36vw, 480px);
    padding: clamp(56px, 8vw, 110px) clamp(56px, 9vw, 120px) clamp(64px, 8vw, 100px);
    text-align: center;
    /* same recipe as the original: image + navy colour blended with "overlay" */
    background-color: rgba(2, 0, 73, .73);
    background-image: var(--slide-bg);
    background-size: cover; background-position: center; background-blend-mode: overlay;
    opacity: 0; visibility: hidden; transform: scale(1.015);
    transition: opacity .7s var(--ease-io), transform 1.2s var(--ease-out), visibility 0s linear .7s;
}
.carousel-slide.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; z-index: 1; }

.carousel-content { width: min(950px, 100%); }
.carousel-content h3 { margin: 0 0 .5em; color: #fff; font-family: var(--font-display); font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.875rem); font-weight: 600; line-height: 1.1; letter-spacing: -.012em; text-wrap: balance; }
.carousel-body { font-size: var(--fs-md); line-height: 1.75; color: rgba(255, 255, 255, .95); }
.carousel-body p { margin: 0 auto 1em; max-width: 78ch; }
.carousel-body p:last-child { margin-bottom: 0; }

/* text staggers in on the active slide */
.carousel-slide.is-active .carousel-content > * { animation: car-in .8s var(--ease-out) both; }
.carousel-slide.is-active .carousel-content > :nth-child(2) { animation-delay: .12s; }
@keyframes car-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* bullet lists (Tuxpan) */
.carousel-body ul { display: inline-block; max-width: 78ch; margin: 0 auto; padding: 0; text-align: left; list-style: none; }
.carousel-body li { position: relative; padding: 0 0 .65em 1.6em; }
.carousel-body li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
.carousel-body li h4 { margin: 0 0 .35em; color: #fff; font-family: var(--font-body); font-size: var(--fs-md); font-weight: 500; line-height: 1.6; letter-spacing: 0; }

/* data tables (Tuxpan, Cd Madero) */
.carousel-body.has-table { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.carousel-body table { width: 100%; margin: 0 auto; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.5; background: rgba(2, 0, 73, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.carousel-body td, .carousel-body th { padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .32); text-align: left; vertical-align: middle; }
.carousel-body td p { margin: 0; max-width: none; }
.carousel-body td h5 { margin: 0; color: #fff; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 650; line-height: 1.5; letter-spacing: 0; }
.carousel-body tr:first-child td:first-child { background: rgba(255, 255, 255, .1); }

/* arrows */
.carousel-arrow { position: absolute; z-index: 3; top: 50%; width: 48px; height: 48px; margin-top: -24px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .3s, background .25s, transform .35s var(--ease-out), border-color .25s; }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel:hover .carousel-arrow, .carousel:focus-within .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: #fff; color: var(--navy); border-color: #fff; }
.carousel-prev:hover { transform: translateX(-3px); }
.carousel-next:hover { transform: translateX(3px); }
.carousel-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* dots: the active one stretches into a pill */
.carousel-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 20px; display: flex; justify-content: center; gap: 8px; }
.carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .4s var(--ease-out), background .25s; position: relative; }
.carousel-dots button::after { content: ""; position: absolute; inset: -10px -4px; }
.carousel-dots button:hover { background: rgba(255, 255, 255, .85); }
.carousel-dots button[aria-current] { width: 26px; background: #fff; }

@media (hover: none) { .carousel-arrow { opacity: 1; width: 40px; height: 40px; margin-top: -20px; } .carousel-prev { left: 8px; } .carousel-next { right: 8px; } }

@media (max-width: 700px) {
    .carousel-slide { padding-inline: 56px; }
    .carousel-body table { font-size: .8125rem; min-width: 560px; }
    .carousel-body td { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .carousel-slide { transition: none; transform: none; }
    .carousel-slide.is-active .carousel-content > * { animation: none; }
}
