/* ==========================
   RESET & VARIÁVEIS
========================== */
:root {
    --accent: rgb(223, 93, 46);
    --accent-cta: rgb(255, 96, 38);
    --white: #ffffff;
    --dark: #333333;
    --header-height: 60px;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Prevenção global de overflow */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ==========================
   ELEMENTOS GERAIS
========================== */
img, .responsive-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.btn, button {
    background-color: var(--accent-cta);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn--invert {
    background-color: var(--white);
    color: #000;
}

.btn:hover {
    background-color: var(--dark);
}

/* ==========================
   HEADER
========================== */
header {
    width: 100vw;
    padding: 60px 1%;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-x: hidden;
}

header.rodaremY {
    background-color: var(--accent);
    padding: 20px 1%;
    transition: 3s;
}

header.rodaremY a {
    color: var(--white);
    transition: 3s;
}

.conteinerCabecalho {
    max-width: 1300px;
    margin: auto;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#ImagemLogo {
    max-width: 60px;
    min-width: 20px;
    max-height: 60px;
    min-width: 20px;
    cursor: pointer;
}

/* ==========================
   MENU DE NAVEGAÇÃO
========================== */
.conteinerCabecalho ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.conteinerCabecalho ul li {
    margin: auto 20px;
}

.conteinerCabecalho ul li a {
    text-decoration: none;
    color: var(--white);
    font-size: 18px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* ==========================
   MENU BURGER (mobile)
========================== */
.burger {
    display: none;
    z-index: 1001;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all .3s;
}
.toggle .line1 { transform: rotate(-45deg) translate(-5px,6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px,-6px); }

.nav-wrapper {
    overflow-x: hidden;
}

/* ==========================
   BANNER
========================== */
.banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding: clamp(2rem, 6vw, 6rem) 4%;
    min-height: clamp(30vh, 45vh, 60vh);
    background-image: url(imagens/IMGbacground.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    overflow: hidden;
}

.banner h1 {
    color: var(--white);
    text-align: left;
    padding: 0;
    font-size: clamp(1.6rem, 4.5vw, 3.5rem);
    line-height: 1.05;
    text-shadow: 2px 2px 4px #000;
}

.banner h1 samp {
    color: orangered;
}

.banner h2 {
    color: var(--white);
    text-align: left;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-top: 0.6rem;
    text-shadow: 2px 2px 4px #000;
}

/* ==========================
   CONTEINERES GERAIS
========================== */
.ConteinerProdutos,
.ConteinerModalidades,
.ConteinerNoticia,
.ConteinerRodape {
    max-width: 1300px;
    margin: auto;
    display: flex;
    gap: 20px;
    padding: 15px;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    box-sizing: border-box;
}

/* ==========================
   PRODUTOS
========================== */
.ConteinerProdutos div {
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 8px;
    width: calc(25% - 16px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex: 1 1 calc(22% - 16px);
    min-width: 200px;
}

.ConteinerProdutos div img {
    object-fit: cover;
    border-radius: 10px;
}

.ConteinerProdutos button {
    margin-top: 10px;
}

/* ==========================
   MODALIDADES
========================== */
.ConteinerModalidades div {
    border: 2px solid var(--accent);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    width: calc(33.33% - 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 calc(33% - 16px);
}

.ConteinerModalidades div img {
    width: 90%;
    border-radius: 10px;
    transition: transform .3s;
}

.ConteinerModalidades div img:hover {
    transform: scale(1.05);
}

/* ==========================
   NOTÍCIAS
========================== */
.ConteinerNoticia {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    padding: 15px;
    box-sizing: border-box;
}

.ConteinerNoticia .divisao-noticia {
    padding: 15px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.ConteinerNoticia .divisao-noticia:first-child {
    flex: 0 0 100%;
    max-width: 100%;
    border: 2px solid var(--accent);
    border-radius: 10px;
    margin-bottom: 20px;
}

.ConteinerNoticia .divisao-noticia:last-child {
    flex: 0 0 100%;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

/* Notícias secundárias */
.noticiasNaoImportantes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 10px;
    border-radius: 10px;
    flex: 1 1 calc(50% - 10px);
    border: 2px solid var(--accent);
    background: #fff;
    color: #000;
    overflow: hidden;
    box-sizing: border-box;
    word-wrap: break-word;
    position: relative;
}

.noticiasNaoImportantes img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
}

.noticiasNaoImportantes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================
   RODAPÉ
========================== */
.rodape {
    background-color: var(--accent);
    color: var(--white);
}

.ConteinerRodape {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.rodape .conteinerSobreNos,
.rodape .conteinerContactos,
.rodape .conteinerOutros {
    flex: 1 1 200px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.conteinerContactos ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
}

.conteinerOutros ul {
    list-style: none;
    padding: 0;
}

.conteinerContactos p a,
.conteinerContactos ul li a,
.conteinerOutros ul li a {
    color: var(--white);
    text-decoration: none;
}

/* ==========================
   RESPONSIVIDADE
========================== */
@media (max-width: 900px) {
    .ConteinerProdutos div { flex: 1 1 calc(45% - 16px); }
}

@media (max-width: 768px) {
    .burger { display: block; }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0,0,0,.9);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform .3s;
        z-index: 999;
    }

    .nav-wrapper.nav-active { transform: translateX(0); }

    .conteinerCabecalho ul {
        flex-direction: column;
        gap: 30px;
        padding: 0;
    }

    .conteinerCabecalho ul li a {
        color: var(--white);
        font-size: 24px;
    }

    .banner { padding-top: calc(var(--header-height) + 20px); }
}

@media (max-width: 700px) {
    .banner {
        align-items: center;
        text-align: center;
        padding: clamp(1rem, 6vw, 2.2rem) 4%;
        min-height: 40vh;
        background-size: 140% auto;
        background-position: center top;
    }

    .banner h1 { font-size: clamp(1.6rem, 6vw, 2rem); }
    .banner h2 { font-size: clamp(1rem, 3.5vw, 1.1rem); }

    .ConteinerNoticia {
        flex-direction: column;
        padding: 10px;
    }

    /* Manter estilos da primeira notícia no smartphone */
    .ConteinerNoticia .divisao-noticia:first-child {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin-bottom: 20px;
        border: 2px solid var(--accent);
        border-radius: 10px;
        padding: 15px;
    }
    .ConteinerNoticia .divisao-noticia:first-child ul{
        list-style-type: none;
        margin: 0;
        padding: 0;
    }

    .ConteinerNoticia .divisao-noticia {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        margin-bottom: 20px;
    }

    .ConteinerNoticia .divisao-noticia:last-child {
        flex: 0 0 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .noticiasNaoImportantes {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .ConteinerProdutos div,
    .ConteinerModalidades div {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .noticiasNaoImportantes {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .ConteinerNoticia { padding: 10px; }
    .divisao-noticia { padding: 10px; }
    #IntroArea { font-size: 28px; }
}

@media (min-width: 901px) {
    /* forçar layout em linha no desktop (evita quebra por wrap) */
    .ConteinerNoticia {
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    /* garantir 100% para notícia importante */
    .ConteinerNoticia > .divisao-noticia:first-child {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .ConteinerNoticia > .divisao-noticia:last-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* remover estilos de lista dentro das notícias */
    .ConteinerNoticia .divisao-noticia ul,
    .ConteinerNoticia .divisao-noticia li {
        list-style-type: none;
        margin: 0;
        padding: 0;
    }
}

/* ==========================
   OUTROS AJUSTES
========================== */
#IntroArea {
    font-size: 32px;
    margin-bottom: 20px;
    text-align: center;
}
.CursorImagem {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 50px 0;
}

/* Apenas ícones pequenos */
.CursorImagem img {
    width: 100px;
    height: 100px;
    padding: 5px 0;
    margin: 10px 0;
    border-radius: 20px;
}