/* ==========================================================================
   AC BTT do Fojo — ajustes ao template "Cycling" para a integração em Umbraco
   (carregado depois de style.css)
   ========================================================================== */

/* --- Fundos: o template usa imagens via.placeholder.com; ficam com uma cor neutra até haver imagem --- */
.cy_tour_wrapper,
.cy_achieve_wrapper,
.cy_result_wrapper,
.cy_price_wrapper,
.cy_sponsors_wrapper,
.cy_bread_wrapper {
    background-color: #2f3942;
    background-image: none;
    background-position: center center;
    background-size: cover;
}

/* Imagem de fundo escolhida nas definições do bloco (variável --acb-bg aplicada no wrapper) */
.acb-bloco[style*="--acb-bg"] > div {
    background-image: var(--acb-bg);
}

/* --- Espaçamentos configuráveis por bloco --- */
.acb-pt-0 > div { padding-top: 0 !important; }
.acb-pb-0 > div { padding-bottom: 0 !important; }
.acb-pt-sm > div { padding-top: 40px !important; }
.acb-pb-sm > div { padding-bottom: 40px !important; }
.acb-pt-lg > div { padding-top: 140px !important; }
.acb-pb-lg > div { padding-bottom: 140px !important; }

/* --- Próximo passeio / Patrocinadores sozinhos (sem o efeito de duas metades) --- */
.cy_sponsors_wrapper.acb-sponsors-solo:before,
.cy_sponsors_wrapper.acb-sponsors-solo:after { display: none; }
.cy_sponsors_wrapper.acb-sponsors-solo { text-align: center; }

/* --- Texto rico --- */
.acb-rte img { max-width: 100%; height: auto; }
.acb-rte p { margin-bottom: 15px; }
.acb-texto .acb-rte { line-height: 1.7; }

/* --- Citação --- */
.acb-citacao { padding: 40px 0; }
.acb-citacao blockquote footer { margin-top: 10px; font-style: normal; font-weight: 600; }

/* --- Listagens --- */
.acb-feed-botao { margin-top: 20px; }
.acb-filtro { margin-bottom: 30px; }

/* --- Filtro de categorias na listagem do blog --- */
.acb-categorias { margin-bottom: 40px; }
.acb-categorias ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.acb-categorias a {
    display: inline-block; padding: 0 22px; height: 38px; line-height: 36px;
    border: 1px solid #ff712a; border-radius: 20px; color: #2f3942; font-size: 14px;
    text-transform: capitalize; transition: all .3s ease-in-out;
}
.acb-categorias a:hover, .acb-categorias a:focus { background: #ff712a; color: #fff; }
.acb-categorias a.active { background: #ff712a; color: #fff; }
@media (max-width: 767px) {
    .acb-categorias ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
    .acb-categorias a { white-space: nowrap; }
}

/* --- Detalhe do evento: botões e capitalização --- */
.cy_event_det_box p { text-transform: none; }
.acb-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.acb-acoes .cy_button, .acb-acoes .cy_button:focus { color: #fff; }
.acb-acoes .cy_button:hover { color: #ff712a; }
.acb-acoes .cy_button i { margin-right: 6px; }

/* --- Resultados no detalhe do evento --- */
.acb-resultados { margin-top: 40px; }
.acb-resultados table { width: 100%; }

/* --- Mapas (iframe do Google Maps) --- */
.acb-mapa iframe,
.mp iframe { width: 100%; min-height: 400px; border: 0; }

/* --- Formulário de contacto --- */
.acb-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.acb-form-contacto .response { margin-bottom: 15px; }
.acb-form-contacto .response .acb-ok { color: #2e7d32; }
.acb-form-contacto .response .acb-erro { color: #c62828; }
.acb-form-contacto .form-control.error { border-color: #c62828; }

/* --- Banner de consentimento de cookies --- */
.acb-cookies {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #2f3942;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.acb-cookies[hidden] { display: none; }
.acb-cookies p { color: #fff; margin-bottom: 12px; }
.acb-cookies__acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.acb-cookies__recusar { background: transparent; border: 1px solid #fff; }

/* ==========================================================================
   Voltar ao topo — tamanho máximo da imagem por breakpoint
   ========================================================================== */
.cy_go_to .cy_go_top img {
    width: 100%;
    max-width: 150px;
    height: auto;
}
@media (max-width: 767px) {
    .cy_go_to .cy_go_top img { max-width: 75px; }
}

/* ==========================================================================
   Bloco Imagem e texto — em ecrãs < 992px a imagem deixa de "subir" sobre a secção anterior
   ========================================================================== */
@media (max-width: 991px) {
    .cy_about_wrapper .cy_about_img,
    .cy_about_wrapper.cy_about_page .cy_about_img { margin-top: 0; }
    .cy_about_wrapper .cy_about_img img { width: 100%; }
    .cy_about_wrapper .cy_about_data { padding-top: 40px; }
}

/* ==========================================================================
   Bloco Equipa — 2 cartões por linha e texto mais pequeno em mobile
   ========================================================================== */
@media (max-width: 767px) {
    .cy_team_wrapper .cy_team_box { margin-bottom: 20px; }
    .cy_team_wrapper .cy_team_text { padding: 20px 8px 6px; }
    .cy_team_wrapper .cy_team_text h2 { font-size: 14px; line-height: 1.3; }
    .cy_team_wrapper .cy_team_text p { font-size: 12px; margin-bottom: 0; }
}

/* ==========================================================================
   Bloco Galeria — em mobile só a primeira imagem, com botão para o lightbox
   ========================================================================== */
.acb-gal-cta { display: none; }
@media (max-width: 767px) {
    .acb-galeria .acb-gal-extra { display: none; }
    .acb-galeria .acb-gal-primeira { flex: 0 0 100%; max-width: 100%; }
    .acb-galeria .acb-gal-primeira .cy_gal_img img { width: 100%; }
    .acb-galeria .acb-gal-cta {
        display: inline-block;
        position: absolute;
        left: 50%;
        bottom: 20px;
        transform: translateX(-50%);
        z-index: 3;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Álbuns
   ========================================================================== */
.acb-album__info { margin-bottom: 30px; }
.acb-album__meta { margin-bottom: 15px; }
.acb-album__meta li { display: inline-block; margin-right: 20px; }
.acb-album__acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 10px; }
.acb-album__acoes .cy_button { margin: 0; }
.acb-album__foto .cy_gal_img { margin-bottom: 30px; }
.acb-botao-secundario { background: transparent; border: 1px solid currentColor; color: inherit; }
@media (max-width: 991px) {
    .acb-album__acoes { justify-content: center; margin-top: 30px; }
}
@media (max-width: 767px) {
    .acb-album__foto { padding-left: 5px; padding-right: 5px; }
    .acb-album__foto .cy_gal_img { margin-bottom: 10px; }
}

/* --- Mobile/tablet: CTAs centrados (cartões de eventos, artigos e álbuns; bloco Sobre/Imagem e texto) --- */
@media (max-width: 991px) {
    .cy_about_data a.cy_button,
    .cy_event_data a.cy_button,
    .cy_blog_data a.cy_button {
        display: block;
        width: -moz-fit-content;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }
    .acb-feed-botao { text-align: center; }
}

/* --- Logótipo mais pequeno em telemóveis --- */
@media (max-width: 480px) {
    .cy_logo_box {
        width: 50%;
        padding: 0 10px;
    }
}

/* --- Evento: vídeo, classificações, fotos externas, outras edições --- */
.acb-video { position: relative; width: 100%; padding-top: 56.25%; margin-top: 30px; background: #000; }
.acb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.acb-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.acb-links .cy_button { color: #ff712a; }
.acb-links .cy_button:hover { color: #ff712a; }
.acb-lista-links { list-style: none; margin: 0; padding: 0; }
.acb-lista-links li { padding: 8px 0; border-bottom: 1px solid #eee; color: #666; }
.acb-lista-links li:last-child { border-bottom: 0; }
.acb-lista-links a { color: #2f3942; }
.acb-lista-links a:hover { color: #ff712a; }
.acb-lista-links .fa { color: #ff712a; margin-right: 6px; }
.acb-edicoes__ano { display: inline-block; min-width: 48px; font-weight: 600; color: #ff712a; }
@media (max-width: 991px) {
    .acb-links { justify-content: center; }
}

/* --- Bloco Vídeo --- */
.acb-bloco-video .acb-video { margin-top: 0; }
.acb-video__legenda { margin-top: 12px; text-align: center; color: #666; font-size: 14px; }

/* --- Equipa: membro sem foto --- */
.acb-team-semfoto {
    position: relative; width: 100%; padding-top: 139.6%; /* 377/270 */
    background: linear-gradient(160deg, #2f3942 0%, #1b2127 100%);
}
.acb-team-semfoto span {
    position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%);
    width: 96px; height: 96px; line-height: 96px; border-radius: 50%;
    background: rgba(255, 113, 42, 0.15); border: 2px solid #ff712a;
    color: #ff712a; font-size: 34px; font-weight: 600; text-align: center; letter-spacing: 1px;
}
@media (max-width: 767px) {
    .acb-team-semfoto span { width: 64px; height: 64px; line-height: 64px; font-size: 22px; }
}

/* --- Patrocinador sem logótipo (nome em texto) --- */
.acb-patrocinador-texto {
    display: flex; align-items: center; justify-content: center; text-align: center;
    min-height: 90px; padding: 10px 14px; border: 1px solid #e3e3e3; border-radius: 6px;
    background: #fff; color: #2f3942; font-size: 14px; font-weight: 600; line-height: 1.3;
}
a:hover .acb-patrocinador-texto { border-color: #ff712a; color: #ff712a; }

/* --- Detalhe do álbum: separar a informação (data, fotos) do texto --- */
.acb-album ul.cy_blog_info.acb-album__meta {
    margin: 0 0 20px;
    padding: 0 0 15px;
    border-bottom: 1px solid #ececec;
}
.acb-album ul.cy_blog_info.acb-album__meta li { margin-right: 25px; }
.acb-album__meta .fa { color: #ff712a; margin-right: 6px; }
.acb-album__info p { line-height: 1.75; }

/* --- Patrocinadores: logótipos centrados na vertical, todos na mesma "caixa" --- */
.cy_sponsor_slider .owl-stage { display: flex; align-items: center; }
.cy_sponsor_slider .owl-item { display: flex; align-items: center; justify-content: center; }
.cy_sponsor_slider .item {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 120px; padding: 0 10px;
}
.cy_sponsor_slider .owl-item .item img,
.cy_sponsor_slider .item img {
    width: auto !important; max-width: 100%; max-height: 100px; height: auto;
    object-fit: contain; margin: 0 auto;
}
.cy_sponsor_slider .item a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
@media (max-width: 767px) {
    .cy_sponsor_slider .item { height: 100px; }
    .cy_sponsor_slider .item img { max-height: 80px; }
}

/* --- Hero: botão com tamanho fixo (fora da escala do Revolution) --- */
.rev_slider .acb-hero-botao .cy_button {
    display: inline-block; height: 48px; line-height: 48px !important;
    padding: 0 40px !important; font-size: 15px !important; white-space: nowrap;
}
@media (max-width: 767px) {
    .rev_slider .acb-hero-botao .cy_button { height: 44px; line-height: 44px !important; padding: 0 28px !important; font-size: 14px !important; }
    .rev_slider .acb-hero-subtitulo { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
}

/* ==========================================================================
   Acessibilidade — contraste (WCAG AA, mínimo 4,5:1)
   Texto branco sobre o laranja da marca (#ff712a) só dá 2,75:1. Nos botões e nas
   etiquetas de data usa-se um laranja mais escuro (#cc4a12, 4,6:1); o laranja da
   marca mantém-se nos elementos decorativos (linhas, ícones, títulos grandes).
   ========================================================================== */
.cy_button { background-color: #cc4a12; }
.cy_button:before { border-bottom-color: #cc4a12; border-left-color: #cc4a12; }
.cy_button:after { border-top-color: #cc4a12; border-right-color: #cc4a12; }
.cy_button:hover,
.acb-acoes .cy_button:hover,
.acb-links .cy_button,
.acb-links .cy_button:hover,
.cy_tour_data .cy_button { color: #cc4a12; }
.cy_event_date,
.cy_races_img_overlay h4 { background-color: #cc4a12; }
.cy_button.acb-botao-secundario { background-color: transparent; }

/* ==========================================================================
   Rodapé — barra inferior: copyright + links legais (Website Settings › Links legais)
   Desktop: copyright à esquerda, links à direita. Mobile: empilhados e centrados.
   ========================================================================== */
.acb-rodape-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.acb-links-legais { display: flex; flex-wrap: wrap; justify-content: center; }
.acb-links-legais a { color: #9faebc; }
.acb-links-legais a + a:before { content: "·"; margin: 0 10px; color: #9faebc; }
.acb-links-legais a:hover, .acb-links-legais a:focus { color: #ff712a; }
@media (max-width: 767px) {
    .acb-rodape-barra { flex-direction: column; justify-content: center; }
}
.acb-cookies__link { color: #fff; text-decoration: underline; margin-left: 4px; }
.acb-cookies__link:hover, .acb-cookies__link:focus { color: #fff; text-decoration: none; }

/* Rodapé — logótipo mais contido (antes ocupava a largura toda da coluna). */
.cy_footer_about > img { max-width: 180px; }
@media (max-width: 767px) {
    .cy_footer_about > img { max-width: 150px; }
}
