/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(135deg, #0b3d91, #0a7d5e);
    min-height: 100vh;
    width: 100vw;
}

/* ===== FUNDO INSTITUCIONAL ROTATIVO ===== */
.bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateX(0.6%) scale(1.01);
    transition: opacity 1.6s cubic-bezier(0.4,0,0.2,1), transform 7s cubic-bezier(0.22,1,0.36,1);
}

.bg-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Imagem de fundo padrão (primeiro carregamento, antes do JS) */
.bg-slideshow > .bg-slide:first-child {
    background-image: url('XKLUZIVUS%20ANGOLA_16(1).jpg');
}

/* Sobreposição escura para legibilidade */
.bg-slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11,61,145,0.82), rgba(10,125,94,0.82));
    z-index: 1;
    transition: background 0.6s ease;
}

body.gallery-active .bg-slideshow::after {
    background: linear-gradient(135deg, rgba(11,61,145,0.42), rgba(10,125,94,0.36));
}

body.gallery-active .bg-slide {
    background-size: contain;
    background-position: center center;
    background-color: #02070c;
}

/* ===== CANVAS FUNDO ===== */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
}

/* ===== SLIDESHOW FULLSCREEN ===== */
.slideshow {
    position: relative;
    z-index: 3;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.99) translateY(6px);
    transition: opacity 0.9s cubic-bezier(0.4,0,0.2,1),
                visibility 0.9s ease,
                transform 1s cubic-bezier(0.22,1,0.36,1);
    overflow-y: auto;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* ===== LOGO NO NAV ===== */
.nav-logo {
    position: absolute;
    left: 150px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    height: 64px;
    width: 64px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,213,0.3);
    padding: 2px;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    flex-shrink: 0;
}

.nav-logo.visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}

.nav-logo:hover {
    border-color: #00ffd5;
    filter: drop-shadow(0 0 8px rgba(0,255,213,0.5));
}

/* ===== LINKS EXTERNOS NO NAV (SGA / RUPE) ===== */
.nav-external-links {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-ext-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 25px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    color: white;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.nav-ext-link:hover {
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #003;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(0,255,213,0.4);
    transform: translateY(-2px);
}

.nav-ext-link .material-icons {
    font-size: 18px;
}

/* ===== NAV FIXA ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 22px 20px;
    background: rgba(11, 61, 145, 0.7);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0,255,213,0.1);
    flex-wrap: wrap;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Auto-hide nav nas páginas secundárias */
body.page-secundaria nav:not(.curso-sidebar) {
    opacity: 0;
}

body.page-secundaria nav:not(.curso-sidebar) > * {
    pointer-events: none;
}

body.page-secundaria nav:not(.curso-sidebar):hover {
    opacity: 1;
}

body.page-secundaria nav:not(.curso-sidebar):hover > * {
    pointer-events: auto;
}

body.gallery-active nav {
    opacity: 0;
    pointer-events: auto;
    transform: none;
}

body.gallery-active nav > * {
    pointer-events: none;
}

body.gallery-active nav:hover {
    opacity: 1;
}

body.gallery-active nav:hover > * {
    pointer-events: auto;
}

/* Esconder controlos de slides quando se rola para o rodapé */
body.scrolled-to-footer nav button,
body.scrolled-to-footer nav .nav-logo {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9);
    max-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

body.scrolled-to-footer .slide-indicators,
body.scrolled-to-footer .slide-arrow,
body.scrolled-to-footer .timer-ring,
body.scrolled-to-footer .progress-bar {
    opacity: 0;
    pointer-events: none;
}

nav button,
nav .nav-logo {
    transition: all 0.4s ease, max-width 0.4s ease, padding 0.4s ease;
    max-width: 200px;
}

.slide-indicators,
.slide-arrow,
.timer-ring,
.progress-bar {
    transition: opacity 0.4s ease;
}

nav button,
.nav-footer-link {
    padding: 8px 18px;
    border-radius: 25px;
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    background: rgba(255,255,255,0.08);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82em;
    font-weight: 500;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    text-decoration: none;
}

nav button:hover,
nav button.nav-active,
.nav-footer-link:hover {
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #003;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(0,255,213,0.4);
    transform: translateY(-2px);
}

/* ===== BARRA DE PROGRESSO ===== */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #00ffd5, #00c9a7);
    z-index: 10;
    transition: width 0.3s linear;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px rgba(0,255,213,0.5);
}

/* ===== INDICADORES DE SLIDE ===== */
.slide-indicators {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slide-indicators .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.slide-indicators .dot.active {
    background: #00ffd5;
    box-shadow: 0 0 10px rgba(0,255,213,0.6);
    transform: scale(1.3);
}

.slide-indicators .dot:hover {
    background: rgba(0,255,213,0.5);
}

/* ===== SETAS DE NAVEGAÇÃO ===== */
.slide-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(5px);
    font-size: 0;
}

.slide-arrow:hover {
    background: rgba(0,255,213,0.2);
    border-color: rgba(0,255,213,0.4);
    box-shadow: 0 0 15px rgba(0,255,213,0.3);
}

.slide-arrow .material-icons {
    font-size: 24px;
}

.slide-arrow.left {
    left: 15px;
}

.slide-arrow.right {
    right: 45px;
}

/* ===== TIMER VISUAL ===== */
.timer-ring {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.timer-ring svg {
    transform: rotate(-90deg);
    width: 40px;
    height: 40px;
}

.timer-ring circle {
    fill: none;
    stroke-width: 3;
}

.timer-ring .track {
    stroke: rgba(255,255,255,0.1);
}

.timer-ring .fill {
    stroke: #00ffd5;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 0.3s linear;
}

.timer-ring .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #00ffd5;
}

/* ===== SLIDE 0: BEM-VINDO (HERO) ===== */
.hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 80px 20px 40px;
}

.hero img {
    height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 25px rgba(0,255,213,0.5));
    border-radius: 50%;
    border: 3px solid rgba(0,255,213,0.25);
    padding: 5px;
    background: rgba(255,255,255,0.05);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 25px rgba(0,255,213,0.5)); }
    50%      { filter: drop-shadow(0 0 40px rgba(0,255,213,0.8)); }
}

.hero h1 {
    margin: 0;
    font-size: 3em;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(0,255,213,0.3);
}

.hero .subtitle {
    margin: 10px 0 0;
    font-weight: 300;
    font-size: 1.2em;
    opacity: 0.85;
    letter-spacing: 2px;
}

.hero .badge {
    display: inline-block;
    margin-top: 15px;
    padding: 6px 20px;
    background: rgba(0,255,213,0.12);
    border: 1px solid rgba(0,255,213,0.3);
    border-radius: 25px;
    font-size: 0.8em;
    color: #00ffd5;
    letter-spacing: 1.5px;
}

.hero .scroll-hint {
    margin-top: 40px;
    font-size: 0.8em;
    opacity: 0.4;
    font-weight: 300;
    animation: bounce 2s infinite;
}

.scroll-hint .material-icons {
    font-size: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ===== SECTION STYLING INSIDE SLIDES ===== */
.section-title {
    text-align: center;
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 1.9em;
    margin: 0 0 5px;
    text-shadow: 0 0 15px rgba(0,255,213,0.2);
}

.section-title p {
    margin: 0;
    opacity: 0.7;
    font-weight: 300;
}

.section-title .line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00ffd5, transparent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ===== GRID ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-sobre-nos-extra {
    margin-top: 10px;
}

/* ===== CARD ===== */
.card {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 25px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.08);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 35px rgba(0,255,213,0.2);
    border-color: rgba(0,255,213,0.2);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.15em;
    color: #00ffd5;
}

.card p {
    margin: 0;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0.9;
}

.card .icon {
    font-size: 34px;
    color: #00ffd5;
    margin-bottom: 10px;
    text-shadow: 0 0 15px rgba(0,255,213,0.5);
}

/* CARD LIST */
.card ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

.card ul li {
    padding: 3px 0;
    font-weight: 300;
    opacity: 0.9;
    line-height: 1.5;
    font-size: 0.95em;
}

.card ul li::marker {
    color: #00ffd5;
}

/* ===== COUNTER ===== */
.counter-wrapper {
    text-align: center;
}

.counter {
    font-size: 42px;
    font-weight: 700;
    color: #00ffd5;
    text-shadow: 0 0 15px rgba(0,255,213,0.6);
}

.counter-label {
    font-size: 0.95em;
    opacity: 0.8;
    font-weight: 300;
    margin-top: 4px;
}

/* ===== TOTAL BADGE ===== */
.total-badge {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 24px;
    background: linear-gradient(135deg, rgba(0,255,213,0.2), rgba(0,255,213,0.05));
    border: 1px solid rgba(0,255,213,0.4);
    border-radius: 30px;
    font-size: 1.3em;
    color: #00ffd5;
    font-weight: 600;
    letter-spacing: 1px;
}

.total-badge-wrapper {
    text-align: center;
    margin-top: 6px;
}

/* ===== CHART ===== */
.chart-container {
    margin-top: 25px;
    background: rgba(255,255,255,0.04);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    width: 100%;
}

.chart-container h3 {
    text-align: center;
    color: #00ffd5;
    margin: 0 0 15px;
    font-size: 1.05em;
    font-weight: 500;
}

.bolsas-chart-canvas {
    max-width: 400px;
    margin: 0 auto;
}

/* ===== CONTACTO ===== */
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-weight: 300;
}

.contact-item .material-icons {
    color: #00ffd5;
    font-size: 22px;
}

.contact-link {
    color: #00ffd5;
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

/* ===== QR CODE ===== */
.qr-card {
    text-align: center;
}

.qr-card img {
    width: 160px;
    height: 160px;
    border-radius: 12px;
    border: 3px solid rgba(0,255,213,0.3);
    padding: 8px;
    background: white;
    transition: transform 0.3s ease;
}

.qr-card img:hover {
    transform: scale(1.05);
}

.qr-card p {
    margin-top: 10px;
    font-size: 0.85em;
    opacity: 0.7;
}

.qr-card a {
    color: #00ffd5;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.qr-card a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===== FOOTER DENTRO DO SLIDE ===== */
.slide-footer {
    text-align: center;
    padding: 15px;
    font-size: 0.75em;
    opacity: 0.4;
    font-weight: 300;
    margin-top: auto;
}

/* ===== DOUTORAMENTO DESCRIÇÃO ===== */
.doutoramento-desc {
    margin-top: 12px;
    font-size: 0.85em;
    opacity: 0.7;
}

/* ===== AJUSTES POR SLIDE ===== */

/* Sobre Nós */
.slide[data-index="2"] .slide-content {
    padding-top: 90px;
    padding-bottom: 15px;
}

.slide[data-index="2"] .section-title {
    margin-bottom: 18px;
}

/* Sobre Nós — conteúdo scrollável */
.sobre-nos-scroll {
    justify-content: flex-start;
    padding-bottom: 60px;
}

.sobre-nos-section {
    width: 100%;
    margin-top: 30px;
}

.sobre-nos-section .section-title {
    margin-bottom: 14px;
}

.sobre-nos-section .section-title h2 {
    font-size: 1.5em;
}

.sobre-nos-text-card {
    max-width: 900px;
    margin: 0 auto;
}

.sobre-nos-text-card p {
    text-align: justify;
    line-height: 1.8;
    margin-bottom: 12px;
}

.sobre-nos-text-card p:last-child {
    margin-bottom: 0;
}

.valores-destaque {
    color: #00ffd5;
}

.sobre-nos-text-card ul {
    padding-left: 20px;
    margin: 0;
}

.sobre-nos-text-card ul li {
    padding: 4px 0;
    font-size: 1em;
    font-weight: 400;
}

/* Indicador de scroll */
.scroll-down-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
    font-size: 0.82em;
    opacity: 0.45;
    font-weight: 300;
    animation: bounce 2s infinite;
}

.scroll-down-hint .material-icons {
    font-size: 20px;
}

/* Cards dos directores */
.grid-direccao {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.card-director {
    text-align: center;
    padding: 28px 20px;
}

.director-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(0,255,213,0.3);
    padding: 3px;
    background: rgba(255,255,255,0.06);
    margin-bottom: 14px;
    transition: transform 0.3s ease;
}

.director-photo:hover {
    transform: scale(1.06);
}

.card-director h3 {
    margin-bottom: 2px;
}

.director-role {
    color: #00ffd5;
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.card-director p {
    font-size: 0.88em;
    text-align: left;
}

/* Impacto */
.slide[data-index="3"] .slide-content {
    padding-top: 70px;
    padding-bottom: 20px;
}

.slide[data-index="3"] .section-title {
    margin-bottom: 20px;
}

.slide[data-index="3"] .card {
    padding: 30px 25px;
}

.slide[data-index="3"] .chart-container {
    margin-top: 18px;
    padding: 20px 24px;
}

.slide[data-index="3"] #grafico {
    max-height: 300px;
}

/* Cursos */
.slide[data-index="4"] .slide-content {
    padding-top: 80px;
}

.slide[data-index="4"] .card {
    padding: 18px 20px;
}

.slide[data-index="4"] .card .icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.slide[data-index="4"] .card h3 {
    margin: 0 0 6px;
    font-size: 1.05em;
}

/* Links nos cursos */
.curso-links {
    list-style: none;
    padding-left: 0;
}

.curso-links li {
    padding: 0;
}

.curso-links li a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    margin: 1px 0;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.84em;
    transition: all 0.25s ease;
    border-left: 2px solid transparent;
}

.curso-links li a::before {
    content: 'chevron_right';
    font-family: 'Material Icons';
    font-size: 14px;
    color: rgba(0,255,213,0.5);
    transition: color 0.25s ease, transform 0.25s ease;
}

.curso-links li a:hover {
    background: rgba(0,255,213,0.1);
    border-left-color: #00ffd5;
    color: #00ffd5;
    transform: translateX(4px);
}

.curso-links li a:hover::before {
    color: #00ffd5;
    transform: translateX(2px);
}

/* Bolsas */
.slide[data-index="5"] .slide-content {
    padding-top: 70px;
    padding-bottom: 5px;
    gap: 0;
}

.slide[data-index="5"] .section-title {
    margin-bottom: 10px;
}

.slide[data-index="5"] .section-title h2 {
    font-size: 1.5em;
}

.slide[data-index="5"] .grid {
    gap: 14px;
}

.slide[data-index="5"] .card {
    padding: 24px 16px;
}

.slide[data-index="5"] .card .icon {
    font-size: 38px;
    margin-bottom: 4px;
}

.slide[data-index="5"] .card h3 {
    font-size: 0.95em;
    margin-bottom: 4px;
}

.slide[data-index="5"] .counter {
    font-size: 34px;
}

.slide[data-index="5"] .counter-label {
    font-size: 0.85em;
}

.slide[data-index="5"] .total-badge {
    font-size: 1em;
    padding: 5px 16px;
}

.slide[data-index="5"] .chart-container {
    margin-top: 8px;
    padding: 10px 16px;
}

.slide[data-index="5"] .chart-container h3 {
    font-size: 0.9em;
    margin-bottom: 6px;
}

.slide[data-index="5"] #graficoBolsas {
    max-height: 220px;
}

/* Parceiros */
.slide[data-index="6"] .slide-content {
    padding-top: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.grid-parceiros {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
}

.card-parceiro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 36px;
}

.card-parceiro h3 {
    margin-bottom: 18px;
    font-size: 1.2em;
    color: #00ffd5;
}

.card-parceiro-unico {
    width: 100%;
    gap: 26px;
}

.parceiro-secao {
    width: 100%;
}

.parceiro-secao + .parceiro-secao {
    border-top: 1px solid rgba(255,255,255,0.16);
    padding-top: 26px;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.logo-parceiro {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    padding: 10px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-parceiro:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 6px 18px rgba(0,255,213,0.35));
}

.logo-tutela {
    max-width: 680px;
    max-height: 520px;
}

.logo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    justify-content: center;
}

/* Contacto */
.slide[data-index="7"] .slide-content {
    padding-top: 100px;
}

/* Galeria */
.slide[data-index="8"] .slide-content {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 48px;
    padding-left: 34px;
    padding-right: 0;
}

.slide-galeria-content {
    max-width: 100%;
}

.galeria-overlay {
    width: min(470px, calc(100vw - 80px));
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.galeria-header-topright {
    position: absolute;
    top: 60px;
    left: 40px;
    z-index: 3;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 6px 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    text-align: left;
}

.galeria-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(0,255,213,0.45);
    color: #9fffee;
    font-size: 0.74em;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.galeria-header-topright h2 {
    margin: 0;
    font-size: 1.9em;
    text-shadow: 0 0 24px rgba(0,255,213,0.28);
}

.galeria-legenda-dinamica {
    position: absolute;
    bottom: 45px;
    right: 20px;
    width: min(420px, 44vw);
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 16px;
    padding: 4px 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
    text-shadow: 0 3px 14px rgba(0,0,0,0.65);
}

.galeria-legenda-dinamica h3 {
    margin: 0 0 6px;
    color: #00ffd5;
    font-size: 1.28em;
}

.galeria-legenda-dinamica p {
    margin: 0;
    opacity: 0.93;
    line-height: 1.55;
    font-size: 1.02em;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    /* Auto-hide nav em telemóveis (todas as páginas) */
    nav:not(.curso-sidebar) {
        opacity: 0;
    }
    nav:not(.curso-sidebar) > * {
        pointer-events: none;
    }
    nav:not(.curso-sidebar):hover,
    nav:not(.curso-sidebar):focus-within {
        opacity: 1;
    }
    nav:not(.curso-sidebar):hover > *,
    nav:not(.curso-sidebar):focus-within > * {
        pointer-events: auto;
    }

    .hero h1 { font-size: 2em; }
    .hero img { height: 90px; }
    .hero .subtitle { font-size: 1em; }
    .slide-content { padding: 20px 15px; }
    .section-title h2 { font-size: 1.4em; }
    .counter { font-size: 32px; }
    nav button { padding: 6px 12px; font-size: 0.75em; }
    .nav-external-links { position: static; transform: none; gap: 6px; }
    .nav-ext-link { padding: 5px 10px; font-size: 0.72em; }
    .nav-logo { left: 10px; height: 44px; width: 44px; }
    .qr-card img { width: 120px; height: 120px; }
    .slide-arrow { display: none; }
    .slide-indicators { right: 10px; }
    .slide-indicators .dot { width: 8px; height: 8px; }
    .card { padding: 18px; }
    .card-parceiro { padding: 24px 18px; }
    .card-parceiro h3 { font-size: 1.05em; }
    .logo-parceiro { max-width: 190px; max-height: 120px; }
    .logo-tutela { max-width: 280px; max-height: 160px; }
    .logo-row { gap: 16px; }
    .slide[data-index="8"] .slide-content { align-items: flex-start; padding-left: 15px; padding-right: 0; }
    .galeria-overlay { width: 100%; }
    .galeria-header-topright { width: 100%; padding: 12px 14px; }
    .galeria-legenda-dinamica { position: absolute; bottom: 20px; right: 14px; width: calc(100vw - 28px); text-align: left; padding: 8px 14px; }
    .galeria-header-topright h2 { font-size: 1.42em; }
    .galeria-legenda-dinamica h3 { font-size: 1.06em; }
    .galeria-legenda-dinamica p { font-size: 0.95em; }
}

/* ===== SLIDE EVENTOS ===== */
.slide[data-index="1"] .slide-content {
    padding-top: 90px;
    padding-bottom: 15px;
    gap: 14px;
}

/* Evento em destaque */
.evento-featured {
    width: 100%;
    max-width: 1050px;
}

.evento-card-main {
    display: flex;
    overflow: hidden;
    padding: 0 !important;
    min-height: 360px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(11,61,145,0.35) 30%, rgba(10,125,94,0.2) 100%);
}

.evento-banner-wrap {
    position: relative;
    width: 55%;
    flex-shrink: 0;
    margin-right: -10%;
    z-index: 1;
}

.evento-banner-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.55) 15%, rgba(0,0,0,0.3) 50%, transparent 100%);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, black 40%, transparent 100%);
    mask-image: linear-gradient(to right, black 40%, transparent 100%);
}

.evento-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-mask-image: linear-gradient(to right, black 45%, transparent 92%);
    mask-image: linear-gradient(to right, black 45%, transparent 92%);
}

.evento-featured-text {
    flex: 1;
    padding: 32px 48px 32px 8%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    z-index: 2;
}

.evento-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 5;
    padding: 6px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(0,255,213,0.35), rgba(0,200,180,0.15));
    border: 1.5px solid rgba(0,255,213,0.6);
    color: #00ffd5;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    animation: pulseBadge 2.5s ease-in-out infinite;
}

@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 8px rgba(0,255,213,0.3); }
    50% { box-shadow: 0 0 20px rgba(0,255,213,0.6); }
}

.evento-featured-text h3 {
    font-size: 1.65em;
    margin: 0;
}

.evento-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88em;
    color: rgba(255,255,255,0.8);
    font-weight: 300;
}

.evento-meta .material-icons {
    font-size: 18px;
    color: #00ffd5;
}

.evento-featured-text > p {
    font-size: 1em;
    line-height: 1.5;
    opacity: 0.85;
    margin: 0;
}

.btn-evento {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-end;
    padding: 12px 28px;
    border-radius: 30px;
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #003;
    font-weight: 700;
    font-size: 0.92em;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
    box-shadow: 0 4px 16px rgba(0,255,213,0.35);
    letter-spacing: 0.3px;
}

.btn-evento:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,255,213,0.4);
}

.btn-evento .material-icons {
    font-size: 16px;
}

/* Grelha de eventos secundários */
.grid-eventos {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    max-width: 900px;
}

.evento-card {
    padding: 20px !important;
}

.evento-card h3 {
    font-size: 0.95em;
}

.evento-card p {
    font-size: 0.85em;
}

/* Links do site (no slide Contacto) */
.site-links-section {
    margin-top: 20px;
    width: 100%;
}

.site-links-section h3 {
    text-align: center;
    color: #00ffd5;
    margin-bottom: 12px;
    font-size: 1em;
}

.site-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.site-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 25px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 400;
    transition: all 0.3s ease;
}

.site-link:hover {
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #003;
    border-color: transparent;
    transform: translateY(-2px);
}

.site-link .material-icons {
    font-size: 16px;
}

/* ===== RESPONSIVO — EVENTOS ===== */
@media (max-width: 768px) {
    .evento-card-main {
        flex-direction: column;
        min-height: auto;
    }
    .evento-banner-wrap {
        width: 100%;
        height: 220px;
        margin-right: 0;
        margin-bottom: -40px;
    }
    .evento-banner-img {
        object-fit: cover;
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
        mask-image: linear-gradient(to bottom, black 40%, transparent 95%);
    }
    .evento-banner-wrap::after {
        -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    }
    .evento-featured-text {
        padding: 20px;
        padding-top: 30px;
    }
    .grid-eventos {
        grid-template-columns: 1fr;
    }
    .evento-featured-text h3 {
        font-size: 1.1em;
    }
}

/* ===== MAPA + RODAPÉ (abaixo dos slides) ===== */
.site-map-footer {
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, #062a5a 0%, #041c3d 100%);
}

/* MAPA */
.map-section {
    padding: 60px 5% 40px;
    text-align: center;
}

.map-section h2 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.map-section h2 .material-icons {
    font-size: 1.2em;
    color: #00ffd5;
}

.map-subtitle {
    font-size: 0.95em;
    color: rgba(255,255,255,0.7);
    margin: 0 0 30px;
}

.map-container {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.1);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: 0;
    display: block;
}

/* RODAPÉ */
.site-footer {
    padding: 50px 5% 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 90px;
    max-width: 1300px;
    margin: 0 auto;
    align-items: start;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col:last-child {
    justify-self: end;
}

.footer-col h4 {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0 0 18px;
    color: #00ffd5;
    letter-spacing: 0.02em;
}

/* Parceiros no rodapé */
.footer-parceiros-logos {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-parceiro-grupo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.footer-parceiro-label {
    font-size: 0.8em;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    padding: 2px 4px;
    display: inline-block;
    align-self: flex-start;
}

.footer-logo-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* Contactos no rodapé */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.92em;
    color: rgba(255,255,255,0.85);
}

.footer-contact-item .material-icons {
    font-size: 1.2em;
    color: #00ffd5;
    flex-shrink: 0;
}

.footer-social-icon {
    width: 1.2em;
    height: 1.2em;
    color: #00ffd5;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: #00ffd5;
    text-decoration: none;
}

.footer-contact-item a:hover {
    text-decoration: underline;
}

/* QR no rodapé */
.footer-qr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.footer-qr-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: white;
    padding: 4px;
}

.footer-qr span {
    font-size: 0.82em;
    color: rgba(255,255,255,0.6);
}

/* Barra inferior */
.footer-bottom {
    text-align: center;
    padding: 28px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.85em;
    color: rgba(255,255,255,0.5);
}

/* Responsivo — mapa + rodapé */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .map-container iframe {
        height: 300px;
    }
    .map-section {
        padding: 40px 4% 30px;
    }
}
