/* ==========================================================================
   Hero carousel
   Replaces Slider Revolution 5.4.6.3, which shipped pointing at the theme
   author's localhost and a GSAP build with no TweenMax, and never rendered.
   No library dependency: CSS crossfade driven by js/hero.js.
   ========================================================================== */

.tdg-hero {
    position: relative;
    width: 100%;
    height: 82vh;
    min-height: 420px;
    max-height: 790px;
    overflow: hidden;
    background-color: #1c1c1c;
}

/* --- Slides ------------------------------------------------------------- */

.tdg-hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}

.tdg-hero__slide.is-active {
    opacity: 1;
}

/* Darkens the photo so white text stays legible. The old slider images had
   this burned into the file; these project photos do not. */
.tdg-hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.42) 45%,
        rgba(0, 0, 0, 0.62) 100%
    );
}

/* --- Caption ------------------------------------------------------------ */

.tdg-hero__caption {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    color: #fff;
}

.tdg-hero__eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    font-family: Raleway, sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 14px;
    color: #fff;
}

/* The white rules either side of the eyebrow, as the old slider had. */
.tdg-hero__eyebrow::before,
.tdg-hero__eyebrow::after {
    content: "";
    display: block;
    width: 70px;
    height: 2px;
    background: #fff;
    flex: none;
}

.tdg-hero__title {
    font-family: Raleway, sans-serif;
    font-size: 58px;
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 18px;
    color: #fff;
}

.tdg-hero__text {
    font-family: "Open Sans", sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    margin: 0 0 30px;
    max-width: 620px;
    color: #fff;
}

.tdg-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

/* Slide text crossfades with its image. */
.tdg-hero__caption > .tdg-hero__content {
    display: none;
}

.tdg-hero__caption > .tdg-hero__content.is-active {
    display: block;
    animation: tdgHeroIn 0.9s ease-out both;
}

@keyframes tdgHeroIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Arrows ------------------------------------------------------------- */

.tdg-hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: #222;
    font-size: 22px;
    line-height: 52px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease;
}

.tdg-hero__arrow:hover,
.tdg-hero__arrow:focus-visible {
    background: #fff;
    outline: none;
}

.tdg-hero__arrow--prev { left: 20px; }
.tdg-hero__arrow--next { right: 20px; }

/* --- Dots --------------------------------------------------------------- */

.tdg-hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    z-index: 3;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tdg-hero__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.25s ease;
}

.tdg-hero__dot.is-active,
.tdg-hero__dot:hover {
    background: #fff;
}

.tdg-hero__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 991px) {
    .tdg-hero { height: 70vh; }
    .tdg-hero__title { font-size: 42px; }
    .tdg-hero__eyebrow { font-size: 18px; }
    .tdg-hero__eyebrow::before,
    .tdg-hero__eyebrow::after { width: 42px; }
}

@media (max-width: 575px) {
    .tdg-hero { height: 62vh; min-height: 380px; }
    .tdg-hero__title { font-size: 30px; }
    .tdg-hero__text { font-size: 15px; }
    .tdg-hero__eyebrow { font-size: 15px; gap: 12px; }
    .tdg-hero__eyebrow::before,
    .tdg-hero__eyebrow::after { width: 26px; }
    .tdg-hero__arrow { width: 42px; height: 42px; line-height: 42px; font-size: 18px; }
    .tdg-hero__arrow--prev { left: 8px; }
    .tdg-hero__arrow--next { right: 8px; }
}

/* Respect a reader's reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
    .tdg-hero__slide { transition: none; }
    .tdg-hero__caption > .tdg-hero__content.is-active { animation: none; }
}
