/* Reset e estilos base aprimorados - versão com mais cor */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9eef5 100%);
    color: #1e293b;
    line-height: 1.6;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* Container centralizado com leve ajuste */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Tipografia mais refinada */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #0d2d6c;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0d2d6c, #3b82f6, #60a5fa);
    border-radius: 2px;
}

/* Header mais sofisticado com fundo sólido */
header {
    background: #0a1f44;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #2d4279;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo {
    width: 65px;
    height: auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    background: white;
    border-radius: 12px;
    padding: 4px;
}

.logo:hover {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.4));
}

/* Navegação com efeitos modernos */
nav {
    display: flex;
    gap: 0.5rem;
}

nav a {
    padding: 0.6rem 1.2rem;
    margin-left: 0.5rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    border-radius: 40px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #60a5fa;
    transition: width 0.3s ease;
    border-radius: 1px;
}

nav a:hover::after {
    width: 70%;
}

/* Hero section com gradiente escuro e texto branco visível */
.hero {
    background: linear-gradient(145deg, #0a1f44 0%, #0d2d6c 50%, #1e3a8a 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, rgba(10, 31, 68, 0.3), transparent);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    color: white;
}

.subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    color: rgb(10, 31, 77);
}

.description {
    max-width: 650px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    background: rgba(255, 255, 255);
    padding: 1rem 2rem;
    border-radius: 60px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #0d2d6c;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Botões mais refinados */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: white;
    color: #0d2d6c;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: transparent;
    color: #0d2d6c;
    border-color: white;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    border: 2px solid rgba(255, 255, 255, 0.9);
    color: #0d2d6c;
    background: rgba(255, 255, 255);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: transparent;
    color: #0d2d6c;
    border-color: white;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

/* Secções gerais com fundo suave */
section {
    padding: 100px 0;
}

section:nth-child(even) {
    background: linear-gradient(135deg, #ffffff 0%, #f0f4fa 100%);
}

section:nth-child(odd) {
    background: linear-gradient(135deg, #e9eef5 0%, #dce3ec 100%);
}

.section-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.25rem;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 32px;
    box-shadow: 0 20px 40px -12px rgba(13, 45, 108, 0.2);
    border: 1px solid rgba(13, 45, 108, 0.1);
}

/* Grid de projetos - cards elegantes com fundo */
.projetos-grid {
    display: grid;
    gap: 30px;
    justify-content: center;
}

.project-card {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 35px -10px rgba(13, 45, 108, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(13, 45, 108, 0.08);
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-bottom: 3px solid #0d2d6c;
}

.project-card:hover img {
    transform: scale(1.03);
}

.project-card h3 {
    font-size: 1.5rem;
    padding: 1.8rem 1.5rem 0.5rem;
    color: #0d2d6c;
}

.project-card p {
    padding: 0 1.5rem 1rem;
    color: #475569;
    font-size: 1rem;
}

.project-card a {
    padding: 0 1.5rem 2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0d2d6c;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.3s ease;
    margin-top: auto;
}

.project-card a i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    color: #3b82f6;
}

.project-card:hover a {
    gap: 12px;
}

.project-card:hover a i {
    transform: translateX(4px);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 45px -10px rgba(13, 45, 108, 0.3);
}

/* Equipa - cards com fundo gradiente */
.team-grid {
    display: grid;
    gap: 35px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.member {
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f0f4fa);
    padding: 32px 20px 28px;
    border-radius: 28px;
    box-shadow: 0 15px 30px -8px rgba(13, 45, 108, 0.15);
    transition: all 0.4s ease;
    border: 1px solid rgba(13, 45, 108, 0.08);
    position: relative;
    overflow: hidden;
}

.member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #0d2d6c, #3b82f6, #60a5fa);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.member:hover::before {
    transform: scaleX(1);
}

.member img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 1.2rem;
    object-fit: cover;
    object-position: center 5%;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 25px -5px rgba(13, 45, 108, 0.3);
    transition: all 0.4s ease;
}

.member:hover img {
    transform: scale(1.05);
    box-shadow: 0 20px 30px -8px rgba(13, 45, 108, 0.4);
    border-color: #0d2d6c;
}

.member h3 {
    font-size: 1.4rem;
    margin-bottom: 0.2rem;
    color: #0f172a;
}

.member p {
    color: #1e4b9c;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1rem;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    display: inline-block;
}

.social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e6edf7, #d0dbea);
    color: #0d2d6c;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social a:hover {
    background: linear-gradient(145deg, #0d2d6c, #1e4b9c);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(13, 45, 108, 0.3);
}

.member:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 40px -14px rgba(13, 45, 108, 0.25);
}

/* Contactos - cards com fundo sólido */
.contact-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    background: linear-gradient(145deg, #1e3a8a, #0d2d6c);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 24px;
    text-decoration: none;
    color: white;
    box-shadow: 0 15px 25px -8px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.contact-card i {
    font-size: 2.8rem;
    color: white;
    transition: transform 0.3s ease;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.contact-card p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 40px -12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(145deg, #2563eb, #1e4b9c);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-card:hover i {
    transform: scale(1.1);
}

/* Badge base */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Estilo para ex-membro */
.badge.ex-membro {
    background: #6b7280;  /* cinza */
    color: white;
}



/* Se quiseres no canto */
/*.badge.canto {
    position: absolute;
    top: 10px;
    right: 10px;
    margin: 0;
}*/

/* Para o card ter posição relativa (necessário se usares canto) */
/*.member {
    position: relative;
}
*/
/* Footer elegante */
footer {
    background: #0a1f44;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    padding: 2.5rem;
    margin-top: 40px;
    border-top: 1px solid #2d4279;
    font-size: 1rem;
    letter-spacing: 0.3px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

/* Animações Scroll Reveal refinadas */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsividade aprimorada */
@media (min-width: 640px) {
    .projetos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projetos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero h1 {
        font-size: 4.2rem;
    }
}

@media (max-width: 836px) {
    h2 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .description {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .team-grid {
        gap: 25px;
    }
    
    .member {
        padding: 25px 15px 20px;
        text-align: center;
        display: block;
    }
    
    .member img {
        width: 110px;
        height: 110px;
        display: block;
        margin-left: auto;       /* centraliza */
        margin-right: auto;
        float: none;             /* remove qualquer float */
        clear: both;   
    }
    
    
    
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Efeitos de hover adicionais */
.project-card,
.member,
.contact-card {
    cursor: default;
}

/* Melhorias na acessibilidade visual */
::selection {
    background: rgba(13, 45, 108, 0.2);
    color: #0d2d6c;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #e9eef5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0d2d6c, #1e4b9c);
    border-radius: 6px;
    border: 3px solid #e9eef5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1e4b9c, #2563eb);
}
