/* 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;
    overflow-x: hidden;

    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:
        1px 1px 0 var(--laranja-vintage),
        2px 2px 0 var(--laranja-vintage),
        3px 3px 0 var(--laranja-vintage),
        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: relative;
    overflow: visible;
}

/* 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;
}

.inscricoes-body h3 {
    color: var(--laranja-vintage);
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 2px dashed var(--laranja-vintage);
    padding-bottom: 5px;
}

/* 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;
}

/* Cartões de tipo de inscrição */
.tipo-inscricao {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.tipo-option {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.tipo-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tipo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    border: 2px solid var(--cinza);
    border-radius: 10px;
    background: white;
    transition: all 0.2s;
    height: 100%;
}

.tipo-option input[type="radio"]:checked + .tipo-card {
    border-color: var(--laranja-vintage);
    background: var(--creme);
    box-shadow: 0 0 0 3px rgba(192, 88, 50, 0.2);
}

.tipo-option:hover .tipo-card {
    border-color: var(--laranja-vintage);
}

.tipo-card strong {
    font-size: 1rem;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.tipo-preco {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--laranja-vintage);
    font-family: 'Oswald', sans-serif;
    margin: 4px 0;
}

.tipo-card small {
    font-size: 0.78rem;
    color: var(--cinza);
    line-height: 1.3;
}

@media (max-width: 380px) {
    .tipo-inscricao {
        flex-direction: column;
    }
}

/* Toggle do acompanhante */
.acompanhante-toggle {
    margin: 25px 0 0;
    padding: 12px 15px;
    border: 2px dashed var(--laranja-vintage);
    border-radius: 8px;
    background: rgba(192, 88, 50, 0.05);
}

.acompanhante-check {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Oswald', sans-serif;
    user-select: none;
}

.acompanhante-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--laranja-vintage);
    flex-shrink: 0;
    margin: 0;
}

.acompanhante-check span {
    flex: 1;
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--preto);
}

.acompanhante-check strong {
    color: var(--laranja-vintage);
}

.acompanhante-fields {
    display: none;
}

.campos-almoco {
    display: none;
}

.form-label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    color: var(--preto);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#matricula {
    text-transform: uppercase;
}


/* 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;
}

/* ============ GALERIA TABS E CARROSSEL ============ */

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.gallery-tab {
    background: transparent;
    color: var(--preto);
    border: 2px solid var(--preto);
    padding: 10px 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-tab.active {
    background: var(--laranja-vintage);
    color: white;
    border-color: var(--laranja-vintage);
}

.gallery-tab:hover:not(.active) {
    background: var(--preto);
    color: white;
}

.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
}

.carousel-track {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    border: 4px solid var(--laranja);
}

.carousel-track img {
    width: 100%;
    display: none;
    cursor: pointer;
    transition: opacity 0.3s;
}

.carousel-track img.active {
    display: block;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: var(--preto);
    cursor: pointer;
    z-index: 10;
    user-select: none;
    padding: 10px;
    transition: color 0.3s;
    background: rgba(242, 232, 210, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--cinza);
    cursor: pointer;
    transition: background 0.3s;
    border: none;
}

.carousel-dot.active {
    background: var(--laranja-vintage);
}

/* ============ CARTAZES ============ */

.cartazes-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.cartazes-track {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    border: 4px solid var(--laranja);
    background: var(--creme);
    min-height: 50px;
}

.cartazes-track img {
    width: 100%;
    height: auto;
    display: none;
    transition: opacity 0.3s;
}

.cartazes-track img.active {
    display: block;
}

.cartazes-empty {
    margin-top: 30px;
}

/* ============ CONTACTOS ============ */

#contactos a {
    color: var(--preto);
    text-decoration: none;
}

#contactos a[href^="mailto:"] {
    color: #1a73e8;
    text-decoration: underline;
}

/* ============ 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-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin: 50px auto 0;
    min-height: 200px;
}

.patrocinadores-track {
    width: 100%;
    overflow: hidden;
    text-align: center;
    padding: 20px 0;
}

.patrocinadores-track img {
    max-width: 220px;
    max-height: 160px;
    width: auto;
    height: auto;
    margin: 0 auto;
    display: none;
    opacity: 0.85;
    transition: opacity 0.3s;
}

.patrocinadores-track img.active {
    display: inline-block;
}

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

.patrocinadores-carousel .carousel-prev {
    left: 0;
}

.patrocinadores-carousel .carousel-next {
    right: 0;
}

/* ============ RESPONSIVO ============ */
@media (max-width: 960px) {
    html {
        scroll-padding-top: 70px;
    }

    header {
        justify-content: flex-end;
        height: 70px;
    }

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

    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: 80px;
        height: 80px;
        left: 15px;
        top: 5px;
    }

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

    .hero {
        margin-top: 70px;
        height: auto;
        min-height: calc(100vh - 70px);
        background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
            url('../images/background.jpg') center/cover scroll;
    }

    section {
        padding: 40px 5%;
        margin: 20px 4%;
        border-radius: 10px;
    }

    #inscricoes {
        margin: 20px 4%;
    }

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

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

    /* Mota em Mobile: a sair do card pelo canto inferior direito */
    .form-image {
        display: block;
        position: absolute;
        bottom: -20px;
        right: -20px;
        width: 180px;
        z-index: 1;
    }

    .pagamento {
        margin: 20px 0 0 0;
        max-width: 100%;
        text-align: left;
        padding-right: 150px;
    }

    #inscricoes {
        margin-bottom: 20px;
    }

    /* 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-carousel {
        max-width: 320px;
        min-height: 180px;
    }

    .patrocinadores-track img {
        max-width: 180px;
        max-height: 140px;
    }
}

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

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

    h2 {
        font-size: 2.2rem;
    }
}

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

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }

    h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 30px 4%;
        margin: 15px 3%;
    }

    #inscricoes {
        margin: 15px 3%;
    }

    .inscricoes-header {
        padding: 15px 20px;
    }

    .inscricoes-body {
        padding: 25px 20px;
    }

    .form-image {
        width: 140px;
    }

    .pagamento {
        padding-right: 115px;
    }

    .btn {
        padding: 14px 30px;
        font-size: 1.2rem;
    }

    .card {
        padding: 20px;
    }

    .card h3 {
        font-size: 1.8rem;
    }
}