:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333333;
    --accent-color: #4F8A34;
    --accent-dark: #2F5C1F;
    --accent-light: #E3F0D9;
    --bg-color: #ffffff;
    --bg-light: #F6F9F3;
    --text-color: #555555;
    --border-color: #e5e5e5;
    --font-main: 'Inter', sans-serif;
    --container-width: 1200px;
}

/* --- RESET & GLOBAIS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    color: var(--primary-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- BOTÕES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    opacity: 0.9;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    height: fit-content;
}

.btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

.btn-outline:hover {
    background: var(--bg-light);
}

.subtitle {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* --- HEADER & NAVEGAÇÃO --- */
.header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary-color);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- MENU TRANSPARENTE (CLASSE .home-page) --- */
body.home-page .header {
    position: absolute;
    width: 100%;
    background-color: transparent;
    border-bottom: none;
    top: 0;
}

body.home-page .logo {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.home-page .nav-link {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding: 8px 16px; 
    border-radius: 8px;
    transition: all 0.3s ease;
}

body.home-page .nav-link:hover,
body.home-page .nav-link.active {
    color: #000000;
    background-color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
    font-weight: 600;
}

/* --- HERO SECTION PADRÃO (Sem imagem) --- */
.hero {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 30px;
    max-width: 450px;
}

/* --- HERO COM SLIDESHOW (SUBSTITUI O ANTIGO HERO-BG) --- */

/* Contentor Principal */
.hero-bg-slideshow {
    position: relative;
    padding-top: 160px;
    padding-bottom: 100px;
    margin-top: 0;
    overflow: hidden;
    color: #ffffff;
    background-color: #000; /* Fundo base */
}

/* Aplicada apenas na página inicial (ver index.html) -- as outras 18 páginas
   que também usam .hero-bg-slideshow como banner NÃO levam esta classe extra,
   por isso mantêm o retângulo normal. */
.hero-bg-slideshow.hero-mountain-edge {
    clip-path: polygon(0 0, 100% 0, 100% 92%, 70% 100%, 50% 92%, 30% 100%, 0 92%);
}

@media (max-width: 768px) {
    .hero-bg-slideshow.hero-mountain-edge {
        clip-path: polygon(0 0, 100% 0, 100% 96%, 70% 100%, 50% 96%, 30% 100%, 0 96%);
    }
}

/* O recorte em zigue-zague deixa "ver" o fundo da página por trás dos
   entalhes -- sem isto, mostraria o branco padrão do body em vez de
   combinar com a secção seguinte. Só afeta páginas com .hero-mountain-edge
   (atualmente só a página inicial). */
body:has(.hero-mountain-edge) {
    background-color: var(--bg-light);
}

/* Contentor das Imagens */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Imagens Individuais */
.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    animation: fadeAnimation 15s infinite ease-in-out;
}

/* Configuração das 3 Imagens */
.slideshow-image:nth-child(1) {
    background-image: url('../images/capa-site1.jpg');
    animation-delay: 0s;
}

.slideshow-image:nth-child(2) {
    background-image: url('../images/capa-site2.jpg');
    animation-delay: 5s;
}

.slideshow-image:nth-child(3) {
    background-image: url('../images/capa-site3.jpg');
    animation-delay: 10s;
}

/* Animação Cross-fade */
@keyframes fadeAnimation {
    0% { opacity: 0; }
    10% { opacity: 1; }
    33.33% { opacity: 1; }
    43.33% { opacity: 0; }
    100% { opacity: 0; }
}

/* Filtro Escuro (Overlay) */
.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 60% escuro */
    z-index: 1;
}

/* Ajuste do Conteúdo sobre o Slideshow */
.hero-bg-slideshow .container {
    position: relative;
    z-index: 2;
}

.hero-bg-slideshow h1, 
.hero-bg-slideshow p, 
.hero-bg-slideshow .subtitle {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* --- BARRA DE PESQUISA (ARREDONDADA/PÍLULA) --- */
.hero-search-wrapper {
    position: relative;
    margin-top: 40px;
    margin-bottom: 20px;
    max-width: 600px;
}

.hero-search-input {
    width: 100%;
    padding: 16px 20px;
    padding-left: 50px;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 20px center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

.hero-search-input:focus {
    outline: none;
    transform: scale(1.02);
}

/* --- SECÇÕES GERAIS --- */
.features {
    padding: 80px 0;
    background-color: var(--bg-light);
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: var(--container-width);
    height: 1px;
    background-color: var(--accent-light);
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header h2 {
    font-size: 32px;
    margin-top: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    background: #fff;
    padding: 40px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-color);
    font-size: 15px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-dark);
}

.story-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.story-photo {
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: block;
}

.cta-section {
    padding: 100px 0;
    background-color: var(--bg-light);
    text-align: center;
}

.cta-container h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-container p {
    color: var(--text-color);
    margin-bottom: 30px;
    font-size: 18px;
}

/* --- EVENTOS --- */
.projects-section {
    padding-bottom: 80px;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-left: 20px;
}

/* Scroll Horizontal */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding-bottom: 30px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-left: 5px; 
    padding-right: 20px;
}

.horizontal-scroll .project-card {
    min-width: 350px;
    max-width: 350px;
    flex: 0 0 auto;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}
.horizontal-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Grelha Vertical (Ver Todos) */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 40px;
}

/* Cartão de Evento */
.project-card {
    display: block;
}

.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: var(--bg-light);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

.project-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--accent-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 100px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    transition: transform 0.5s ease;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}

.project-card:hover .image-placeholder {
    transform: scale(1.05);
}

.project-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.project-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.project-info p {
    color: var(--text-color);
    font-size: 16px;
}

/* --- DETALHE DE EVENTO --- */
.event-content {
    padding-bottom: 60px;
}

.event-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.event-sidebar {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 14px;
    height: fit-content;
}

.event-sidebar .btn {
    width: 100%;
    justify-content: center;
}

.sidebar-item {
    margin-bottom: 20px;
}

.sidebar-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 5px;
}

.sidebar-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
}

/* Estatísticas e Tabela */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 14px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.participants-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 80px;
}

.participants-table-wrapper {
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 14px;
}

.participants-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fff;
}

.participants-table th {
    background-color: var(--bg-light);
    text-align: left;
    padding: 15px 20px;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.participants-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.participants-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-socio { background-color: #e3f2fd; color: #1565c0; }
.badge-nao-socio { background-color: #f5f5f5; color: #666; }
.badge-pago { background-color: var(--accent-light); color: var(--accent-dark); }
.badge-pendente { background-color: #fff3e0; color: #ef6c00; }

/* --- FORMULÁRIOS & CONTACTOS --- */
.contact-section {
    padding-top: 80px; /* Espaço para não colar à imagem */
    padding-bottom: 100px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 14px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    color: var(--secondary-color);
    background-color: #fff;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-info-col {
    padding-top: 20px;
}

.info-card {
    margin-bottom: 40px;
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-card p {
    color: var(--text-color);
    font-size: 16px;
    margin-bottom: 5px;
}

/* --- FOOTER --- */
.footer {
    padding: 60px 0 20px;
    background-color: var(--primary-color);
    color: #fff;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.footer-col p {
    color: #999;
    font-size: 14px;
}

.footer-col a {
    display: block;
    color: #ccc;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-col a:hover {
    color: #fff;
}

.copyright {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    .hero-container, 
    .features-grid, 
    .footer-container, 
    .contact-wrapper,
    .event-details-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .horizontal-scroll .project-card {
        min-width: 280px;
        max-width: 280px;
    }

    .contact-form {
        padding: 20px;
    }
    
    .hero-search-wrapper {
        max-width: 100%;
    }

    /* Elementos ficavam com o mesmo tamanho/espaçamento do desktop em ecrãs
       pequenos, dando sensação de estar tudo "colado"/ampliado demais. */
    .hero-bg-slideshow {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .hero,
    .features,
    .story-section {
        padding: 40px 0;
    }

    .cta-section {
        padding: 50px 0;
    }

    .contact-section {
        padding-top: 40px;
        padding-bottom: 50px;
    }

    .dashboard-section {
        padding: 30px 0;
    }

    .event-content {
        padding-bottom: 30px;
    }

    .container {
        padding: 0 16px;
    }
}

/* --- ÁREA DE PERFIL (DASHBOARD) --- */
.dashboard-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* Coluna lateral + Conteúdo */
    gap: 40px;
}

/* Cartão Lateral (Foto e Menu) */
.profile-card {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 0;
    height: fit-content;
}

.profile-photo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-light);
}

.photo-upload-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--primary-color);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid #fff;
    transition: 0.3s;
}

.photo-upload-btn:hover {
    background-color: var(--accent-color);
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-type {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
    display: block;
}

/* Área de Conteúdo (Tabs/Sections) */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

.content-box {
    background: #fff;
    padding: 40px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.box-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.box-header h3 {
    font-size: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .profile-card {
        margin-bottom: 20px;
    }
}
/* --- NAVBAR MOBILE (HAMBURGUER) --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Cor das barras quando header não é transparente */
body:not(.home-page) .nav-toggle span {
    background-color: var(--primary-color);
}

/* Animação para X quando aberto */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    /* O <nav> original de desktop já não é reaproveitado em mobile.
       O menu mobile é um painel novo e independente (ver classes
       .mobile-nav-overlay / .mobile-nav-panel mais abaixo), construído
       em JS e anexado diretamente ao <body>, para nunca poder ficar
       "preso" atrás de outra camada da página. */
    .nav {
        display: none !important;
    }
}

/* --- PAINEL DO MENU MOBILE (independente do .header) --- */
.mobile-nav-overlay {
    position: fixed;
    top: var(--header-h, 72px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    position: fixed;
    top: var(--header-h, 72px);
    left: 0;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - var(--header-h, 72px));
    background-color: #fff;
    z-index: 9999;
    padding: 20px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-panel.open {
    transform: translateX(0);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
}

.mobile-nav-list li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-list a {
    display: block;
    width: 100%;
    padding: 18px 10px;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    color: var(--accent-color);
    font-weight: 700;
}

@media (min-width: 769px) {
    .mobile-nav-overlay,
    .mobile-nav-panel {
        display: none !important;
    }
}