/* =========================================================
   Juventude Vidigalense
   POF: Active Christmas
   ========================================================= */

.ac-page {
    /* Cores do clube e do site; o laranja do projeto fica só no cartaz. */
    --ac-red: #e4002b;
    --ac-red-dark: #bb0023;
    --ac-cream: #ffffff;
    --ac-ink: #161616;
    --ac-muted: #686868;
    --ac-line: #e6e6e6;
    --ac-surface: #f5f5f5;

    background: #fff;
    color: var(--ac-ink);
}

.ac-page *,
.ac-page *::before,
.ac-page *::after {
    box-sizing: border-box;
}


/* Shared */

.ac-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: var(--ac-red);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ac-eyebrow--light {
    color: rgba(255, 255, 255, .75);
}

.ac-section {
    padding: 64px 0;
}

.ac-section--surface {
    background: var(--ac-surface);
}

.ac-heading {
    max-width: 720px;
    margin-bottom: 30px;
}

.ac-heading h2,
.ac-intro h2 {
    margin: 0 0 10px;
    color: var(--ac-ink);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.5px;
}

.ac-heading p {
    margin: 0;
    color: var(--ac-muted);
    font-size: 15px;
    line-height: 1.65;
}

.ac-small {
    margin: 22px 0 0;
    color: var(--ac-muted);
    font-size: 13px;
    line-height: 1.6;
}

.ac-center {
    margin-top: 26px;
    text-align: center;
}

.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.ac-btn:hover,
.ac-btn:focus {
    text-decoration: none;
}

.ac-btn--primary {
    background: var(--ac-red);
    color: #fff;
}

.ac-btn--primary:hover,
.ac-btn--primary:focus {
    background: var(--ac-red-dark);
    color: #fff;
}

.ac-btn--light {
    background: var(--ac-cream);
    color: var(--ac-red-dark);
}

.ac-btn--light:hover,
.ac-btn--light:focus {
    background: #fff;
    color: var(--ac-red-dark);
}

.ac-btn--ghost {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
}

.ac-btn--ghost:hover,
.ac-btn--ghost:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}


/* Hero */

.ac-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    padding: 76px 0 96px;
    background: #b3200f url(../../images/hero/active-christmas-banner-desktop.webp) center bottom / cover no-repeat;
    color: #fff;
}

/* Sombra vermelha à esquerda, para o texto se ler sobre a ilustração */
.ac-hero::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(90, 6, 6, .78), rgba(120, 10, 10, .45) 45%, rgba(0, 0, 0, 0) 72%);
    content: "";
}


/* Pista: linhas vermelhas que se desenham ao abrir a página */
.ac-track {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    pointer-events: none;
}

.ac-track path {
    fill: none;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.ac-track__lane {
    stroke: var(--ac-red);
    stroke-width: 3;
    stroke-dasharray: 1800;
    stroke-dashoffset: 1800;
}

.ac-track__line {
    stroke: rgba(255, 255, 255, .14);
    stroke-width: 1;
    stroke-dasharray: 14 18;
    opacity: 0;
}

.ac-hero.is-ready .ac-track__lane {
    animation: ac-draw 1.6s cubic-bezier(.65, 0, .35, 1) forwards;
}

.ac-hero.is-ready .ac-track__lane:nth-child(2) { animation-delay: .12s; }
.ac-hero.is-ready .ac-track__lane:nth-child(3) { animation-delay: .24s; }

.ac-hero.is-ready .ac-track__line {
    animation: ac-fade 1s ease 1.2s forwards;
}

@keyframes ac-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes ac-fade {
    to { opacity: 1; }
}

/* Neve só no topo */
.ac-snow {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.ac-snow span {
    position: absolute;
    top: -12px;
    border-radius: 50%;
    background: #fff;
    animation: ac-fall linear infinite;
}

@keyframes ac-fall {
    0%   { transform: translate3d(0, 0, 0); }
    50%  { transform: translate3d(18px, 300px, 0); }
    100% { transform: translate3d(-6px, 640px, 0); }
}

.ac-hero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 56px;
}

.ac-hero__content {
    flex: 0 1 500px;
    min-width: 0;
}

.ac-hero h1 {
    margin: 0 0 16px;
    color: #fff;
    font-size: 68px;
    font-weight: 800;
    line-height: .95;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.ac-hero__lead {
    max-width: 500px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .82);
    font-size: 18px;
    line-height: 1.55;
}

.ac-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.ac-hero__chips li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.ac-hero__chips li {
    background: rgba(90, 6, 6, .35);
}

.ac-hero__chips li > :first-child {
    color: #fff;
}

.ac-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ac-hero .ac-btn--light {
    background: #fff;
    color: var(--ac-red-dark);
}

.ac-hero .ac-btn--light:hover,
.ac-hero .ac-btn--light:focus {
    background: var(--ac-ink);
    color: #fff;
}

.ac-hero__note {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}

.ac-hero__poster {
    flex: 0 0 320px;
}

.ac-hero__poster img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
    transform: rotate(3deg);
}

/* Entrada: texto e cartaz aparecem depois de a pista começar */
.ac-hero__content > *,
.ac-hero__poster {
    opacity: 0;
}

.ac-hero.is-ready .ac-hero__content > * {
    animation: ac-rise .7s cubic-bezier(.2, .7, .2, 1) forwards;
}

.ac-hero.is-ready .ac-hero__content > :nth-child(1) { animation-delay: .35s; }
.ac-hero.is-ready .ac-hero__content > :nth-child(2) { animation-delay: .45s; }
.ac-hero.is-ready .ac-hero__content > :nth-child(3) { animation-delay: .6s; }
.ac-hero.is-ready .ac-hero__content > :nth-child(4) { animation-delay: .7s; }
.ac-hero.is-ready .ac-hero__content > :nth-child(n+5) { animation-delay: .8s; }

.ac-hero.is-ready .ac-hero__poster {
    animation: ac-drop 1s cubic-bezier(.2, .8, .2, 1.15) .55s forwards;
}

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

@keyframes ac-drop {
    from { opacity: 0; transform: translateY(-40px) rotate(-6deg); }
    to   { opacity: 1; transform: none; }
}


/* Intro */

.ac-intro {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.ac-intro__text {
    flex: 1 1 auto;
}

.ac-intro__text p {
    margin: 0 0 14px;
    color: #3d3d3d;
    font-size: 15px;
    line-height: 1.7;
}

.ac-facts {
    flex: 0 0 340px;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-facts li {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 12px;
    padding: 16px;
    border: 1px solid var(--ac-line);
    border-radius: 12px;
    background: #fff;
}

.ac-facts__icon {
    grid-row: span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fdecef;
    color: var(--ac-red);
    font-size: 16px;
}

.ac-facts strong {
    font-size: 15px;
}

.ac-facts span {
    color: var(--ac-muted);
    font-size: 13px;
    line-height: 1.45;
}


/* Preços */

.ac-prices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ac-price {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 24px;
    border: 1px solid var(--ac-line);
    border-radius: 14px;
    background: #fff;
}

.ac-price--featured {
    border-color: var(--ac-red);
    box-shadow: 0 10px 28px rgba(228, 0, 43, .12);
}

.ac-price__badge {
    position: absolute;
    top: -11px;
    left: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--ac-red);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.ac-price__label {
    font-size: 17px;
    font-weight: 800;
}

.ac-price__dates {
    color: var(--ac-muted);
    font-size: 13px;
}

.ac-price__value {
    margin-top: 10px;
    color: var(--ac-red);
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.ac-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: ac-step;
}

.ac-steps li {
    position: relative;
    padding: 0 0 0 46px;
    counter-increment: ac-step;
}

.ac-steps li::before {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ac-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    content: counter(ac-step);
}

.ac-steps strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.ac-steps span {
    color: var(--ac-muted);
    font-size: 13px;
    line-height: 1.55;
}


/* Programa */

.ac-week + .ac-week {
    margin-top: 36px;
}

.ac-week__title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 800;
}

.ac-week__title span {
    margin-left: 8px;
    color: var(--ac-muted);
    font-size: 15px;
    font-weight: 600;
}

/* Horário comum a todos os dias: linha do tempo (informação, não botões) */
.ac-daily {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}

.ac-daily .ac-daily__label {
    grid-column: 1 / -1;
    padding: 0 0 14px;
    border: 0;
    color: var(--ac-red);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ac-daily .ac-daily__label::before {
    display: none;
}

.ac-daily li {
    position: relative;
    padding: 18px 12px 0 0;
    border-top: 2px solid var(--ac-line);
    color: var(--ac-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.ac-daily li::before {
    position: absolute;
    top: -6px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ac-red);
    content: "";
}

.ac-daily li strong {
    display: block;
    margin-bottom: 2px;
    color: var(--ac-ink);
    font-size: 17px;
    font-weight: 800;
}

/* Cartões por dia */
.ac-days {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-day {
    overflow: hidden;
    border: 1px solid var(--ac-line);
    border-radius: 14px;
    background: #fff;
    transition: transform .25s ease, box-shadow .25s ease, opacity .5s ease;
}

.ac-day:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(22, 22, 22, .08);
}

.ac-day.is-waiting {
    opacity: 0;
    transform: translateY(18px);
}

.ac-day.is-waiting.is-in {
    opacity: 1;
    transform: none;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .6s ease;
}

.ac-day__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--ac-red);
    color: #fff;
}

.ac-day__num {
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
}

.ac-day__name {
    font-size: 13px;
    line-height: 1.3;
    opacity: .9;
}

.ac-day__name strong {
    display: block;
    font-size: 15px;
    opacity: 1;
}

.ac-day__list {
    margin: 0;
    padding: 6px 18px 10px;
    list-style: none;
}

.ac-day__list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--ac-line);
}

.ac-day__list li:last-child {
    border-bottom: 0;
}

.ac-day__list strong {
    display: block;
    font-size: 15px;
    line-height: 1.35;
}

.ac-day__time {
    display: block;
    margin-bottom: 2px;
    color: var(--ac-red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .3px;
}

.ac-day__place {
    display: block;
    margin-top: 3px;
    color: var(--ac-muted);
    font-size: 12px;
    font-weight: 600;
}

.ac-btn--outline {
    border: 2px solid var(--ac-red);
    background: transparent;
    color: var(--ac-red);
}

.ac-btn--outline:hover,
.ac-btn--outline:focus {
    background: var(--ac-red);
    color: #fff;
}

.ac-btn:focus-visible {
    outline: 3px solid var(--ac-ink);
    outline-offset: 2px;
}

.ac-hero .ac-btn:focus-visible {
    outline-color: #fff;
}

#ac-programa .ac-center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}


/* O que levar */

.ac-bring {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-bring li {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.ac-bring i,
.ac-bring .svg-inline--fa {
    color: var(--ac-red);
    font-size: 22px;
}


/* Contactos */

.ac-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 36px 40px;
    border-radius: 16px;
    background: var(--ac-ink);
    color: #fff;
}

.ac-contact h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
}

.ac-contact p {
    margin: 0;
    color: rgba(255, 255, 255, .75);
}

.ac-contact__list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-contact__list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ac-contact__list i {
    width: 18px;
    margin-top: 3px;
    color: var(--ac-red);
}

.ac-contact__list a {
    color: #fff;
    font-weight: 700;
}

.ac-contact__list a:hover,
.ac-contact__list a:focus {
    color: var(--ac-cream);
}

.ac-contact__list small {
    display: block;
    color: rgba(255, 255, 255, .6);
    font-size: 11px;
}


/* Responsivo */

@media (max-width: 1199px) {

    /* Ecrãs mais estreitos: a ilustração encosta à esquerda (corta à direita) para a atleta não ficar debaixo do texto */
    .ac-hero {
        background-position: left bottom;
    }
}

@media (max-width: 991px) {

    .ac-hero__poster {
        flex-basis: 260px;
    }

    .ac-intro {
        flex-direction: column;
    }

    .ac-facts {
        flex-basis: auto;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .ac-bring {
        grid-template-columns: 1fr 1fr;
    }

    .ac-days {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {

    /* Topo: ilustração vertical e sombra por igual, para o texto se ler */
    .ac-hero {
        min-height: 0;
        background-image: url(../../images/hero/active-christmas-banner-mobile.webp);
        background-position: center top;
    }

    .ac-hero::before {
        background: linear-gradient(180deg, rgba(90, 6, 6, .72), rgba(90, 6, 6, .55));
    }

    .ac-track {
        height: 45%;
    }

    .ac-section {
        padding: 44px 0;
    }

    .ac-hero {
        padding: 44px 0;
    }

    .ac-hero__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }

    .ac-hero h1 {
        font-size: 40px;
    }

    .ac-hero__lead {
        font-size: 16px;
    }

    .ac-hero__actions .ac-btn {
        flex: 1 1 auto;
    }

    .ac-hero__poster {
        flex-basis: auto;
        max-width: 280px;
        margin: 0 auto;
    }

    .ac-heading h2,
    .ac-intro h2 {
        font-size: 27px;
    }

    .ac-facts,
    .ac-prices,
    .ac-steps,
    .ac-bring,
    .ac-days {
        grid-template-columns: 1fr;
    }

    /* Horário comum: linha do tempo na vertical */
    .ac-daily {
        grid-template-columns: 1fr;
    }

    .ac-daily li {
        padding: 0 0 14px 20px;
        border-top: 0;
        border-left: 2px solid var(--ac-line);
    }

    .ac-daily li:last-child {
        padding-bottom: 0;
    }

    .ac-daily li::before {
        top: 3px;
        left: -6px;
    }

    .ac-daily li strong {
        display: inline;
        margin-right: 6px;
        font-size: 15px;
    }

    .ac-daily .ac-daily__label {
        padding: 0 0 12px;
        border-left: 0;
    }

    .ac-contact {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 22px;
    }
}


/* Movimento reduzido: tudo visível, sem animações */
@media (prefers-reduced-motion: reduce) {

    .ac-snow {
        display: none;
    }

    .ac-track__lane {
        stroke-dashoffset: 0;
    }

    .ac-track__line,
    .ac-hero__content > *,
    .ac-hero__poster {
        opacity: 1;
    }

    .ac-hero.is-ready * {
        animation: none !important;
    }

    .ac-day,
    .ac-day:hover {
        transform: none;
        transition: none;
    }
}
