/* style.css - CÓDIGO FINAL E FUNCIONAL (CAMPOS DE FORMULÁRIO ESTREITOS) */

:root {
    --creme: #F2E8D2;
    --laranja: #FF5733;
    /* AZUL MARINHO ESCURO */
    --preto: #1B2936;
    /* AZUL ACINZENTADO */
    --cinza: #4C5A69;
    --laranja-vintage: #C05832;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 100px;
    scroll-behavior: smooth;
}

body {
    background: var(--creme);
    padding-top: 0;

    font-family: 'Oswald', 'Arial', sans-serif;
    color: var(--preto);
    line-height: 1.6;
}

/* ============ NAV BAR E LOGÓTIPO OVERFLOW ============ */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--creme);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    z-index: 1000;
    border-bottom: 5px solid var(--laranja-vintage);
}

.logo-nav {
    position: absolute;
    top: 0px;
    left: 5%;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    overflow: hidden;
    display: block;

    border: 5px solid var(--laranja-vintage);
    background: var(--creme);
    box-shadow: none;
    z-index: 1001;
}

.logo-nav img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.logo-nav::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: var(--creme);
    z-index: 1000;
}


nav {
    display: flex;
    gap: 30px;
    margin-left: 160px;
    margin-top: 10px;
    align-items: center;
}

nav a {
    color: var(--preto);
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--laranja-vintage);
    border-bottom: 2px solid var(--laranja-vintage);
}

.menu-mobile {
    display: none;
    font-size: 2.5rem;
    color: var(--preto);
    cursor: pointer;
}

/* ============ HERO SECTION ============ */

.hero {
    margin-top: 100px;
    height: calc(100vh - 100px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;

    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../images/background.jpg') center/cover fixed;
}

/* TÍTULO H1: Branco e grande */
.hero h1 {
    font-size: 5.5rem;
    color: white;
    text-shadow: 4px 4px 0 var(--laranja-vintage);
    margin-bottom: 5px;
    font-family: 'Oswald', sans-serif;
    line-height: 1;
}

/* SUBTÍTULO P: Branco, uppercase */
.hero p {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 50px;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============ BOTÃO E ÍCONE ============ */

.btn {
    background: var(--laranja);
    color: white;
    padding: 18px 50px;
    font-size: 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 8px 0 #c43e00;
    transition: all 0.2s;
    font-family: 'Oswald', sans-serif;
    display: flex;
    align-items: center;
}

.btn:hover {
    transform: translateY(4px);
    box-shadow: 0 4px 0 #c43e00;
}

.btn-icon {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 15px;
    background-color: white;
    border-radius: 50%;
    background-image: url('../images/icon-mota-pequena.png');
    background-size: 80%;
    background-position: center;
    background-repeat: no-repeat;
}

/* ============ SECÇÕES GERAIS E PROGRAMA ============ */

section {
    padding: 80px 10%;
    background: var(--creme);
    color: var(--preto);

    margin: 40px auto;
    max-width: 1200px;
    border-radius: 15px;

    border: 3px solid var(--laranja-vintage);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

h2 {
    font-size: 3rem;
    color: var(--preto);
    text-align: center;

    margin-bottom: 40px;
    text-shadow: none;
    font-family: 'Oswald', sans-serif;

    border-bottom: 3px dashed var(--laranja-vintage);
    padding-bottom: 15px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Estilo do Card do Programa (TEXTO ESCURO, TEMA POP-OUT VINTAGE) */
.card {
    background: var(--creme);
    color: var(--preto);

    padding: 30px;
    border-radius: 0px;
    /* Bordas retas retro */
    text-align: center;
    border: 2px solid var(--preto);

    /* Sombra dura vintage (laranja esticado para baixo/direita) */
    box-shadow: 8px 8px 0 var(--laranja-vintage);

    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Arial', sans-serif;
}

.card:hover {
    transform: translate(-4px, -4px);
    /* Sobe ao passar o rato */
    box-shadow: 12px 12px 0 var(--laranja-vintage);
    /* Aumenta a sombra */
}

.card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    color: var(--laranja);
    margin-bottom: 10px;

    /* Sublinhado retro */
    position: relative;
    display: inline-block;
    padding-bottom: 5px;
    text-shadow: none;
}

.card h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--preto);
}

.card p {
    font-size: 1.1rem;
}

/* ============ GALERIA ============ */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.gallery img {
    width: 100%;
    border-radius: 10px;
    border: 4px solid var(--laranja);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery img:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ============ LIGHTBOX ============ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 87, 51, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

.lightbox-close:hover {
    color: var(--laranja);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: white;
    cursor: pointer;
    z-index: 10001;
    user-select: none;
    padding: 15px;
    transition: color 0.3s;
}

.lightbox-arrow:hover {
    color: var(--laranja);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* ============ INSCRIÇÕES (ESTILO RETRO BLOCOS COM MOTA A SAIR) ============ */

.texto-centro {
    text-align: center;
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Secção Exterior (Container da Mota) */
#inscricoes {
    background: transparent;
    border: none;
    padding: 0;

    max-width: 1200px;
    margin: 40px auto;

    position: relative;
    overflow: visible;
}

/* Bloco superior (Preço e Info) - Laranja Vintage */
.inscricoes-header {
    background: var(--laranja-vintage);
    color: white;
    padding: 20px 40px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

/* Bloco principal (Formulário) - Creme com borda vintage */
.inscricoes-body {
    background: var(--creme);
    color: var(--preto);
    padding: 40px;
    border: 3px solid var(--laranja-vintage);
    border-top: none;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);

    position: static;
}

/* Estilo do Título H2 dentro do Bloco Creme */
.inscricoes-body h2 {
    color: var(--preto);
    text-shadow: none;
    text-align: left;
    margin-bottom: 20px;
    border-bottom: 3px dashed var(--laranja-vintage);
    padding-bottom: 10px;
}

/* Container principal do formulário (apenas inputs e pagamento) */
.formulario {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;

    display: block;
}

/* NOVO: Limita a largura do formulário e centraliza-o */
.inscricoes-body form {
    max-width: 450px;
    margin: 0 auto;
}


/* Linha horizontal para Nome e Telemóvel */
.form-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* Ajusta os inputs dentro da row para terem metade da largura */
.form-row input {
    width: 50%;
    margin: 10px 0;
}


/* Mota flutuante no canto, relativa à secção */
.form-image {
    position: absolute;
    bottom: -120px;
    right: -130px;
    z-index: 1;
    width: 500px;
    height: auto;
}

.form-image img {
    max-width: 100%;
    height: auto;
}


/* Inputs e Botão (AJUSTE DE TAMANHO) */
.formulario input,
.formulario select {
    /* Reduz o padding vertical */
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid var(--cinza);
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
    color: var(--preto);
    width: 100%;
    /* Mantido em 100% para ocupar a largura definida pelo `<form>` */
}

.formulario .btn {
    /* O botão herda a largura limitada do `<form>` */
    width: 100%;
    padding: 12px 30px;
    font-size: 1.3rem;
    margin-top: 20px;
    box-shadow: 0 6px 0 #c43e00;
    justify-content: center;
}

.formulario .btn:hover {
    transform: translateY(2px);
    box-shadow: 0 4px 0 #c43e00;
}

.pagamento {
    /* Garante que o pagamento usa a largura máxima do bloco creme */
    max-width: 450px;
    margin: 30px auto 0 auto;
    font-size: 0.9rem;
    color: var(--preto);
    z-index: 2;
    position: relative;
}

/* ============ FOOTER ============ */

footer {
    text-align: center;
    padding: 40px;
    background: var(--cinza);
    color: var(--creme);
}

/* ============ PATROCINADORES ============ */

.patrocinadores-sec h2 {
    color: var(--preto);
    text-shadow: none;
    border-bottom: 2px dashed var(--laranja-vintage);
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.patrocinadores-sec .texto-centro {
    color: var(--preto);
}


.patrocinadores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 50px;
}

.patrocinadores-grid img {
    max-width: 180px;
    height: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.patrocinadores-grid img:hover {
    opacity: 1;
}

/* ============ RESPONSIVO ============ */
@media (max-width: 960px) {
    header {
        justify-content: flex-end;
        height: 70px;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: var(--creme);
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        display: flex;
    }

    nav.active a {
        text-align: center;
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid var(--laranja-vintage);
    }

    nav.active a:last-child {
        border-bottom: none;
    }

    .menu-mobile {
        display: block;
    }

    .logo-nav {
        width: 100px;
        height: 100px;
        left: 20px;
        top: 10px;
    }

    .logo-nav::after {
        bottom: -5px;
        height: 5px;
    }


    .hero {
        margin-top: 100px;
        height: auto;
        min-height: calc(100vh - 100px);
    }

    section {
        padding: 50px 5%;
    }

    #inscricoes {
        margin: 40px 5%;
    }

    /* Regras específicas para Mobile (quebram o layout lateral em colunas) */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row input {
        width: 100%;
    }

    /* Regra para que a mota desapareça em Mobile */
    .form-image {
        display: none;
    }

    /* Regra para que o formulário e pagamento ocupem a largura total do bloco creme em mobile */
    .inscricoes-body form,
    .pagamento {
        max-width: 100%;
    }

    .patrocinadores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .hero p {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 2.2rem;
    }
}