:root {
    --primary-color: #1B4965;
    --secondary-color: #336683;
    --accent-color: #1B4965;
    --text-light: #ffffff;
    --text-dark: #1B4965;
    --background-color: #f4f6f9;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: Helvetica, sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar Section */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 4rem;
    /* Navbar mais compacta */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.98);
    padding: 0.4rem 4rem;
    /* Ainda mais pequena no scroll */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.logo img {
    height: 55px;
    /* Logo mais pequeno */
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
    transition: height 0.4s ease;
}

.navbar.scrolled .logo img {
    height: 45px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    /* Letras mais pequenas */
    font-weight: 400;
    /* Sem bold */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    /* Mais elegante */
    transition: all 0.3s ease;
    text-shadow: 1px 1px 3px rgba(#1b4965, 0.6);
    position: relative;
}

.navbar.scrolled .nav-links a {
    color: var(--primary-color);
    /* Azul escuro da marca */
    text-shadow: none;
}

.navbar.scrolled .hamburger span {
    background-color: var(--primary-color);
}

/* Traço que aparece no hover */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffc300;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffc300;
}

.nav-links a.active::after {
    width: 100%;
}

/* Reveal Animation - Smoother & Snappier */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hero-image-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    overflow: hidden;

}

.hero-image {
    width: 100%;
    height: 120%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9);
    opacity: 0.8;

}

.hero-overlay {
    position: absolute;
    top: 40%;
    /* Subido de 40% para 35% para reduzir o espaço no topo */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--text-light);
    z-index: 2;
    width: 90%;
}

.hero-overlay h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    /* Responsivo ao ecrã */
    font-weight: 700;
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: fadeInDown 1s ease forwards 0.5s;
}

.hero-overlay p {
    font-size: clamp(1.5rem, 5vw, 3rem);
    /* Responsivo ao ecrã */
    /* Tamanho duplicado conforme pedido */
    font-weight: bold;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 1s;
}

/* Scroll Down Button */
.scroll-down-btn {
    position: absolute;
    bottom: 260px;
    /* Movido mais para cima, acompanhando o texto */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-decoration: none;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

.mouse {
    width: 32px;
    height: 52px;
    border: 2px solid #ffc300;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    /* Brilho amarelo */
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffc300;
    border-radius: 2px;
    animation: mouseScroll 1.5s infinite;
}


@keyframes mouseScroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 24px;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wave Animations */
.waves {
    position: relative;
    width: 100%;
    height: 150px;
    /* Aumentado para ondas mais altas */
    margin-bottom: -7px;
    /* Prevent gaps */
    min-height: 150px;
    max-height: 250px;
}

.parallax>use {
    animation: move-forever 30s cubic-bezier(.55, .5, .45, .5) infinite;
}

.parallax>use:nth-child(1) {
    animation-delay: -2s;
    animation-duration: 18s;
}

.parallax>use:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 25s;
    animation-direction: reverse;
}

.parallax>use:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 35s;
}

.parallax>use:nth-child(4) {
    animation-delay: -5s;
    animation-duration: 45s;
    animation-direction: reverse;
}

.parallax>use:nth-child(5) {
    animation-delay: -6s;
    animation-duration: 55s;
}

@keyframes move-forever {
    0% {
        transform: translate3d(85px, 0, 0);
    }

    100% {
        transform: translate3d(-90px, 0, 0);
    }
}

/* Wave Divider (Bottom of Hero) */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: translateY(1px);
    /* Prevent a small gap */
    z-index: 3;
}

/* Content Area */
.content {
    min-height: 50vh;
    background-color: var(--background-color);
}

.about {
    padding: 6rem 2rem;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
    max-width: 450px;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1.5;
    text-align: left;
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Activities Section Styles */
.activities-section {
    padding: 5rem 2rem;
    background-color: var(--background-color);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.section-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    text-transform: uppercase;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #ffc300;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.activity-card {
    background-color: #ffffff;
    padding: 1.5rem 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

@media (max-width: 1200px) {
    .activities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .activities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem 0.8rem;
    }
}

.activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(27, 73, 101, 0.1);
    border-color: var(--secondary-color);
}

.activity-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(27, 73, 101, 0.05);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    transition: all 0.4s ease;
}

.activity-card:hover .activity-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

.activity-icon svg {
    width: 28px;
    height: 28px;
}

.activity-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.activity-card p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Contact CTA Styles */
.contact-cta {
    margin-top: 4rem;
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    color: #ffffff;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(27, 73, 101, 0.1);
}

.contact-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.contact-cta p {
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #ffc300;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 10px rgba(255, 195, 0, 0.2);
}

.cta-button:hover {
    transform: scale(1.15);
    background-color: #e5af00;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .contact-cta {
        padding: 2.5rem 1rem;
        margin-top: 2rem;
        border-radius: 15px;
    }

    .contact-cta h2 {
        font-size: 1.5rem;
    }

    .contact-cta p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 0.85rem;
    }
}

/* Split Screen Slider Section */
.split-slider-section {
    position: relative;
    background-color: #000;
}

.split-slider-container {
    position: relative;
    height: 300vh;
    /* 3 slides */
}

.split-slider-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    overflow: hidden;
    contain: paint;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    perspective: 1000px;
    /* Melhora a renderização 3D */
}

.split-side {
    flex: 1;
    height: 300vh;
    /* total height */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout paint;
    /* Restringe o impacto do layout e pintura */
    transition: transform 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.split-left {
    display: flex;
    flex-direction: column;

    /* Isola o contexto de renderização */
}

.split-right {
    display: flex;
    flex-direction: column;
    isolation: isolate;
    /* Isola completamente a renderização do lado direito */
}

.slide-content {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10%;
    color: #ffffff;
    text-align: left;
    contain: layout;
    /* Isola o conteúdo do slide */
    backface-visibility: hidden;
}

.slide-info {
    background: rgba(255, 255, 255, 0.12);
    /* Removido o backdrop-filter blur redundante para otimizar performance de scroll */
    padding: 3.5rem;
    border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 650px;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.5s ease;
    will-change: transform;
}

.slide-info:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

.slide-info span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.slide-info h2 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-weight: 700;
}

.slide-info p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    opacity: 0.8;
}

.slide-info p.slide-site {
    margin-top: -1.2rem;
    margin-bottom: 2.2rem;
    opacity: 1;
}

.slide-info a:not(.slide-link),
.slide-site-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    position: relative;
    transition: color 0.3s ease;
    word-break: break-word;
}

.slide-info a:not(.slide-link)::after,
.slide-site-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -3px;
    left: 0;
    background-color: #ffc300;
    transition: width 0.3s ease;
}

.slide-info a:not(.slide-link):hover,
.slide-site-link:hover {
    color: #ffc300;
}

.slide-info a:not(.slide-link):hover::after,
.slide-site-link:hover::after {
    width: 100%;
}

.slide-link {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.slide-link:hover {
    background-color: #ffc300;
    color: var(--primary-color);
}

.slide-image {
    height: 100vh;
    width: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: strict;
    /* Otimização máxima para camadas estáticas */
}

/* Split Navigation Dots */
.split-nav {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
}

.split-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.split-dot.active {
    background-color: #ffc300;
    border-color: #ffc300;
    transform: scale(1.5);
    box-shadow: 0 0 15px rgba(255, 195, 0, 0.6);
}

/* Mobile adjustments for split slider */
@media (max-width: 992px) {
    .split-nav {
        display: none;
    }

    .split-slider-sticky {
        flex-direction: column;
    }

    .split-side {
        height: 300vh;
    }

    .slide-content,
    .slide-image {
        height: 50vh;
    }

    .slide-content {
        padding: 2rem;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .slide-info h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .slide-info p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
}

/* Team Section Styles */
.team-section {
    padding: 8rem 2rem;
    background-color: #ffffff;
}

.team-organ-group {
    max-width: 1200px;
    margin: 0 auto 4.5rem auto;
}

.team-organ-group:last-child {
    margin-bottom: 0;
}

.organ-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.organ-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    position: relative;
}

.organ-title::after {
    content: '';
    display: block;
    width: 35px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    margin-top: 4px;
}

.organ-divider {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(27, 73, 101, 0.25), transparent);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 240px));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.team-card {
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    cursor: pointer;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
}

.team-card:hover {
    transform: translateY(-15px);
    z-index: 2;
}

.team-card:hover .member-photo {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    border-color: rgba(27, 73, 101, 0.2);
}

.team-card.zoomed {
    transform: scale(1.3);
    z-index: 100;
}

.team-card.zoomed:hover {
    transform: scale(1.3);
    /* Impede o translateY de interferir no zoom */
}

.team-card.zoomed .member-photo {
    border-color: #ffffff;
    border-width: 3px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.member-photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin: 0 auto 1.5rem auto;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.member-info h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.member-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.signature {
    margin-top: 2.5rem;
}

.signature h3 {
    margin-bottom: 0.2rem;
    font-size: 1rem;
    color: var(--primary-color);
    text-align: left;
    font-weight: 600;

}

.signature p {
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-align: left;
    font-weight: normal;
}

/* Responsive adjustment for about section in mobile view */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }

    .about-text {
        text-align: center;
    }

    .about-text p {
        text-align: center;
    }

    .signature h3,
    .signature p {
        text-align: center;
    }
}

/* Contact Section Styles */
.contact-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--background-color);
    position: relative;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 4rem;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.contact-info,
.contact-socials,
.contact-legal {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-info > h3,
.contact-socials > h3,
.contact-legal > h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 24px;
    height: 24px;
}

.info-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.info-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.social-icons {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.social-link {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link svg {
    width: 24px;
    height: 24px;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    background-color: #ffc300;
    color: var(--primary-color);
    border-color: #ffc300;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legal-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.legal-link:hover {
    color: #ffffff;
}

.complaints-book {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.complaints-book img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.complaints-book:hover {
    transform: translateX(5px);
    color: #ffffff;
}

.contact-footer {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    color: rgba(27, 73, 101, 0.3);
    font-size: 0.75rem;
    text-align: center;
    letter-spacing: 0.5px;
    z-index: 10;
}

.wave-bottom-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    pointer-events: none;
    z-index: 1;
}

/* Hamburguer Menu CSS */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 100;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.toggle span:nth-child(2) {
    opacity: 0;
}

.hamburger.toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Media Queries */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .about-image {
        max-width: 350px;
        margin: 0 auto;
    }

    .about-text {
        text-align: center;
    }

    .about-text p {
        text-align: center;
    }

    .signature h3,
    .signature p {
        text-align: center;
    }

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

@media (max-width: 768px) {
    .navbar {
        padding: 0.8rem 2rem;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 70%;
        background-color: #fcfcfcf2;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 99;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        color: var(--primary-color);
        text-shadow: none;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    /* Split Slider Mobile */
    .split-slider-container {
        height: 300vh;
    }

    .split-slider-sticky {
        flex-direction: row !important;
        height: 100vh;
    }

    .split-side {
        width: 50vw !important;
        height: 300vh;
    }

    .slide-content,
    .slide-image {
        height: 100vh;
    }

    .slide-info {
        padding: 1.2rem;
        border-radius: 12px;
        max-width: 95%;
        margin: 0 auto;
    }

    .slide-info h2 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .slide-info p {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slide-info p.slide-site {
        display: block;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        overflow: visible;
        margin-top: 0.2rem;
        margin-bottom: 0.6rem;
    }

    .slide-site-link {
        font-size: 0.75rem;
    }

    .slide-link {
        padding: 0.5rem 1rem;
        font-size: 0.7rem;
    }

    /* Contactos Mobile (Manter o aspeto 3 colunas exatamente como no Desktop) */
    .contact-section {
        justify-content: center !important;
        padding: 3.5rem 1rem 2rem 1rem !important;
        min-height: auto;
    }

    .contact-container {
        display: grid;
        grid-template-columns: 1.35fr 0.9fr 0.75fr;
        padding: clamp(14px, 3.2vw, 24px) clamp(10px, 2.5vw, 18px);
        gap: clamp(8px, 2.2vw, 20px);
        border-radius: clamp(14px, 3.5vw, 20px);
        max-width: 100%;
        margin: 0 auto;
    }

    .contact-info,
    .contact-socials,
    .contact-legal {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: clamp(8px, 2vw, 16px);
    }

    .contact-info > h3,
    .contact-socials > h3,
    .contact-legal > h3 {
        font-size: clamp(10px, 2.5vw, 14px);
        font-weight: 700;
        color: #ffffff;
        margin: 0;
        line-height: 1.2;
    }

    .info-item {
        gap: clamp(6px, 1.8vw, 12px);
        align-items: flex-start;
    }

    .info-icon {
        width: clamp(26px, 6.5vw, 36px);
        height: clamp(26px, 6.5vw, 36px);
        border-radius: clamp(6px, 1.5vw, 10px);
        flex-shrink: 0;
    }

    .info-icon svg {
        width: clamp(13px, 3.2vw, 18px);
        height: clamp(13px, 3.2vw, 18px);
    }

    .info-text h3 {
        font-size: clamp(9px, 2.2vw, 12px);
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 0.15rem;
    }

    .info-text p,
    .info-text .slide-site-link {
        font-size: clamp(9px, 2.2vw, 12px);
        line-height: 1.25;
        color: rgba(255, 255, 255, 0.85);
    }

    .social-icons {
        gap: clamp(3px, 0.9vw, 8px);
        display: flex;
        flex-wrap: nowrap;
    }

    .social-link {
        width: clamp(24px, 6vw, 34px);
        height: clamp(24px, 6vw, 34px);
        flex-shrink: 0;
    }

    .social-link svg {
        width: clamp(11px, 2.8vw, 16px);
        height: clamp(11px, 2.8vw, 16px);
    }

    .legal-links {
        gap: clamp(8px, 2vw, 14px);
    }

    .legal-link {
        font-size: clamp(9px, 2.2vw, 12px);
    }

    .complaints-book img {
        height: clamp(20px, 5.5vw, 32px);
        width: auto;
    }

    .contact-footer {
        position: relative;
        bottom: auto;
        margin-top: 2rem;
        padding-bottom: 20px;
    }

    .contact-footer p {
        font-size: clamp(9px, 2vw, 11px);
    }

    .wave-bottom-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
    }

    .team-section,
    .activities-section {
        padding: 4rem 1.25rem;
    }

    .activities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem 0.8rem;
    }

    .activity-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .activity-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .activity-icon svg {
        width: 24px;
        height: 24px;
    }

    .activity-card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }

    .activity-card p {
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1rem;
        justify-items: center;
    }

    .team-card {
        max-width: 165px;
    }

    .team-organ-group {
        margin-bottom: 3rem;
    }

    .organ-title {
        font-size: 1.1rem;
    }

    .organ-header {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {

    .team-section,
    .activities-section {
        padding: 3.2rem 1rem;
    }

    .activities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0.65rem;
    }

    .activity-card {
        padding: 1.1rem 0.65rem;
        border-radius: 10px;
    }

    .activity-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 0.6rem;
    }

    .activity-icon svg {
        width: 20px;
        height: 20px;
    }

    .activity-card h3 {
        font-size: 0.9rem;
        line-height: 1.25;
        margin-bottom: 0.4rem;
    }

    .activity-card p {
        font-size: 0.73rem;
        line-height: 1.35;
    }

    .contact-cta {
        margin-top: 2rem;
        padding: 1.5rem 0.9rem;
        border-radius: 12px;
    }

    .contact-cta h2 {
        font-size: 1.15rem;
        margin-bottom: 0.3rem;
    }

    .contact-cta p {
        font-size: 0.78rem;
        margin-bottom: 1rem;
        line-height: 1.3;
    }

    .cta-button {
        padding: 0.65rem 1.4rem;
        font-size: 0.72rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.2rem 0.75rem;
    }

    .team-card {
        max-width: 155px;
    }

    .member-photo {
        margin-bottom: 0.6rem;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    }

    .member-info h3 {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0.2rem;
    }

    .member-info p {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .organ-title {
        font-size: 1.05rem;
    }

    .organ-header {
        margin-bottom: 1.2rem;
    }

    .team-organ-group {
        margin-bottom: 2.2rem;
    }
}

/* Project Modal & Carousel Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.4s ease;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 20px;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10;
    padding: 20px;
    user-select: none;
    transition: all 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    color: #ffc300;
}

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

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

@media (max-width: 1100px) {
    .carousel-prev {
        left: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .carousel-next {
        right: 10px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .modal-close {
        right: 10px;
        top: -40px;
    }
}

/* Team Card Hover Expansion - Dinâmica igual às atividades */
/* As regras principais estão agora na secção Team Section Styles */

/* Activity Card Zoom In-Place */
.activity-card {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    /* Importante para o zoom não ser cortado */
}

.activity-card.zoomed {
    transform: scale(1.6);
    z-index: 110;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 195, 0, 0.6);
}

.activity-card h3,
.activity-card>p,
.activity-icon {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.activity-card.zoomed .activity-icon {
    transform: translateY(-75px);
    /* Sobe mais para dar espaço ao novo parágrafo */
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.activity-card.zoomed h3,
.activity-card.zoomed p {
    transform: translateY(-35px);
    /* Acompanha a subida */
}

.full-description {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.4;
    text-align: center;
    margin-top: 0;
}

.activity-card.zoomed .full-description {
    max-height: 200px;
    opacity: 1;
    margin-top: -15px;
    /* Ajuste para preencher o espaço criado pela subida do outro texto */
}

@media (max-width: 768px) {
    .activity-card.zoomed {
        transform: scale(1.1);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}