/* =========================================================
   VIII SEMINÁRIO ANGOLA-BRASIL — Estilos
   ========================================================= */

/* RESET BÁSICO */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CORPO */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #061f4a 0%, #0b3d91 40%, #0a7d5e 100%);
    background-attachment: fixed;
    color: #e8e8e8;
    min-height: 100vh;
    /* Anular styles.css que bloqueia scroll */
    overflow: visible;
    height: auto;
    width: auto;
}

/* Nav — altura mínima sem botões */
nav {
    min-height: 70px;
}

/* ===================== LAYOUT ===================== */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ===================== SIDEBAR / MENU ===================== */
.sidebar {
    width: 270px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(6, 20, 50, 0.92) 0%, rgba(8, 40, 70, 0.88) 100%);
    border-right: 1px solid rgba(0, 255, 213, 0.12);
    padding: 30px 22px;
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar h2 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00ffd5;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0, 255, 213, 0.18);
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    cursor: pointer;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}

.sidebar a:hover {
    color: #00ffd5;
    background: rgba(0, 255, 213, 0.08);
    transform: translateX(4px);
}

.sidebar a.active-link {
    color: #00ffd5;
    background: rgba(0, 255, 213, 0.12);
    font-weight: 600;
}

/* PESQUISA */
.search {
    width: 100%;
    padding: 11px 16px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 18px;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.search::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search:focus {
    border-color: #00ffd5;
    background: rgba(0, 255, 213, 0.06);
}

/* BOTÃO PDF */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
    padding: 12px 20px;
    border-radius: 25px;
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #062040;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 20px rgba(0, 255, 213, 0.25);
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 255, 213, 0.4);
    background: linear-gradient(135deg, #00e6c0, #00b89a);
}

/* ===================== CONTEÚDO PRINCIPAL ===================== */
.content {
    margin-left: 270px;
    padding: 40px 36px;
    max-width: 1120px;
    width: 100%;
}

/* ===================== SEÇÕES ===================== */
.section {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 35px 32px;
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: fadeSection 0.4s ease;
    /* Anular possíveis estilos do styles.css */
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
}

.section.active {
    display: block;
}

@keyframes fadeSection {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================== TIPOGRAFIA ===================== */
h1 {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

h2 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: #00ffd5;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

h3 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8be8d4;
}

.subtitle {
    text-align: center;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    font-weight: 300;
}

/* ===================== LOGOS CABEÇALHO ===================== */
.logos-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.logos-header img {
    height: 52px;
    min-width: 0;
    flex-shrink: 0;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logos-header img:hover {
    transform: scale(1.15);
}

/* ===================== BANDEIRAS CABEÇALHO ===================== */
.bandeiras-header {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 10px auto 32px;
    border-radius: 16px;
    overflow: hidden;
    line-height: 0;
    max-width: fit-content;
    filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.6))
           drop-shadow(0 0 50px rgba(255, 215, 0, 0.35))
           drop-shadow(0 0 80px rgba(255, 180, 0, 0.2));
    animation: bandeira-glow 3s ease-in-out infinite alternate;
}

/* Overlay vidro escuro — exactamente sobre a bandeira */
.bandeiras-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    pointer-events: none;
}

.bandeiras-header img {
    display: block;
    max-width: 750px;
    width: 100%;
    height: 300px;
    border-radius: 16px;
}

@keyframes bandeira-glow {
    0%   { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 45px rgba(255, 215, 0, 0.25)); }
    100% { filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.75)) drop-shadow(0 0 70px rgba(255, 215, 0, 0.4)) drop-shadow(0 0 100px rgba(255, 180, 0, 0.25)); }
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    padding: 10px 0;
}

/* ===================== LINKS EM DESTAQUE ===================== */
.destaque-link {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.15), rgba(0, 200, 170, 0.1));
    border: 1px solid rgba(0, 255, 213, 0.4);
    border-radius: 8px;
    color: #00ffd5;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.destaque-link:hover {
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #003;
    border-color: transparent;
    box-shadow: 0 4px 18px rgba(0, 255, 213, 0.4);
    transform: translateY(-2px);
}

/* ===================== ABAS (TABS) ===================== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.tabs button {
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.tabs button:hover,
.tabs button.tab-active {
    background: linear-gradient(135deg, #00ffd5, #00c9a7);
    color: #062040;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 3px 14px rgba(0, 255, 213, 0.3);
    transform: translateY(-1px);
}

/* ===================== SEPARADOR DECORATIVO ===================== */
.section::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #00ffd5, #0a7d5e);
    border-radius: 3px;
    margin: 0 auto 22px auto;
}

/* ===================== SCROLLBAR PERSONALIZADA ===================== */
.sidebar::-webkit-scrollbar,
.section::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track,
.section::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.section::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 213, 0.25);
    border-radius: 10px;
}

/* ===================== CONTEÚDO ESTRUTURADO ===================== */

/* --- Títulos de secção --- */
.sec-titulo {
    font-size: 1.15rem;
    font-weight: 700;
    color: #00ffd5;
    margin: 28px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid rgba(0, 255, 213, 0.25);
    letter-spacing: 0.5px;
}

.sec-subtitulo {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin: 8px 0;
}

.sec-subtitulo2 {
    font-size: 1rem;
    font-weight: 600;
    color: #7fffe0;
    margin: 20px 0 8px 0;
    padding-left: 10px;
    border-left: 3px solid #00ffd5;
}

/* --- Banner temático --- */
.tema-destaque {
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.12), rgba(0, 200, 170, 0.08));
    border: 1px solid rgba(0, 255, 213, 0.3);
    border-radius: 10px;
    padding: 16px 20px;
    margin: 18px 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #fff;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    line-height: 1.5;
}

/* --- Listas de instituições --- */
.instituicoes-lista {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    text-align: center;
}

.instituicoes-lista li {
    padding: 3px 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Listas temáticas (numeradas) --- */
.lista-tematica {
    list-style: lower-alpha;
    padding-left: 24px;
    margin: 10px 0;
}

.lista-tematica li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* --- Listas de eixos --- */
.lista-eixos {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.lista-eixos li {
    padding: 8px 14px;
    margin: 6px 0;
    background: rgba(0, 255, 213, 0.06);
    border-left: 3px solid #00ffd5;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

/* --- Listas genéricas com bullets --- */
.lista-bullets {
    list-style: disc;
    padding-left: 24px;
    margin: 10px 0;
}

.lista-bullets li {
    padding: 5px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
}

/* --- Listas de membros (Organização) --- */
.lista-membros {
    list-style: none;
    padding: 0;
    margin: 8px 0 18px 0;
    columns: 1;
}

.lista-membros li {
    padding: 5px 12px;
    margin: 3px 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.88);
    border-left: 2px solid rgba(0, 255, 213, 0.2);
    line-height: 1.5;
}

.lista-membros li:hover {
    background: rgba(0, 255, 213, 0.05);
    border-left-color: #00ffd5;
}

/* --- Datas importantes --- */
.lista-datas {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.lista-datas li {
    padding: 10px 16px;
    margin: 6px 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border-left: 3px solid #00ffd5;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
}

/* --- Nota de destaque (aviso) --- */
.nota-destaque {
    background: rgba(255, 200, 0, 0.1);
    border: 1px solid rgba(255, 200, 0, 0.35);
    border-radius: 8px;
    padding: 12px 18px;
    margin: 14px 0;
    font-size: 0.9rem;
    color: #ffd966;
    font-weight: 500;
    line-height: 1.6;
}

/* --- Info box (direitos) --- */
.info-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 18px 0;
}

.info-box p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
    margin: 6px 0 14px 0;
}

/* --- Tabela de preços --- */
.tabela-precos {
    overflow-x: auto;
    margin: 16px 0;
}

.tabela-inscricao {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    border-radius: 8px;
    overflow: hidden;
}

.tabela-inscricao thead {
    background: linear-gradient(135deg, rgba(0, 255, 213, 0.2), rgba(0, 200, 170, 0.15));
}

.tabela-inscricao th {
    padding: 12px 16px;
    text-align: left;
    color: #00ffd5;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 255, 213, 0.3);
}

.tabela-inscricao td {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tabela-inscricao tbody tr:hover {
    background: rgba(0, 255, 213, 0.05);
}

/* --- Contacto rodapé --- */
.contacto-rodape {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 213, 0.15);
    border-radius: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.8;
}

.contacto-rodape strong {
    color: #00ffd5;
    font-size: 0.9rem;
}

/* ===================== PROGRAMAÇÃO — BLOCOS HORÁRIOS ===================== */

.dia-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #00ffd5;
    text-align: center;
    margin: 10px 0 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 255, 213, 0.2);
    letter-spacing: 1px;
}

.horario-bloco {
    display: flex;
    gap: 16px;
    padding: 14px 16px;
    margin: 6px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid #00ffd5;
    transition: background 0.2s ease;
}

.horario-bloco:hover {
    background: rgba(0, 255, 213, 0.05);
}

.horario-bloco.intervalo {
    border-left-color: rgba(255, 255, 255, 0.2);
    opacity: 0.7;
}

.horario {
    min-width: 120px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #00ffd5;
    white-space: nowrap;
    padding-top: 2px;
}

.horario-conteudo {
    flex: 1;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.65;
}

.horario-conteudo strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.92rem;
}

.mesa-titulo {
    display: block;
    font-size: 1rem !important;
    font-weight: 700;
    color: #ffd966;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.mesa-tema {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin: 4px 0 10px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.orador {
    margin: 3px 0;
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.8);
}

.orador em {
    color: #7fffe0;
    font-style: normal;
    font-weight: 500;
}

.cargo {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.83rem;
}

.eixo-titulo {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffd966;
    margin: 18px 0 8px 0;
    padding: 6px 12px;
    background: rgba(255, 217, 102, 0.08);
    border-radius: 6px;
    border-left: 3px solid #ffd966;
}

.oficina {
    padding: 10px 14px;
    margin: 6px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.oficina em {
    color: #fff;
    font-weight: 500;
}

/* ===================== RESPONSIVIDADE ===================== */
@media screen and (max-width: 860px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 16px;
        gap: 4px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 255, 213, 0.12);
    }

    .sidebar h2 {
        width: 100%;
        margin-bottom: 10px;
        padding-bottom: 10px;
        font-size: 1.1rem;
    }

    .sidebar a {
        padding: 8px 14px;
        font-size: 0.82rem;
    }

    .search {
        order: -1;
        margin-bottom: 10px;
    }

    .btn {
        margin-top: 6px;
    }

    .wrapper {
        flex-direction: column;
    }

    .content {
        margin-left: 0;
        padding: 24px 16px;
    }

    h1 { font-size: 1.2rem; }
    h2 { font-size: 1.1rem; }

    .section {
        padding: 24px 18px;
    }

    pre {
        font-size: 0.82rem;
    }

    /* Logos — reduzir em tablet */
    .logos-header {
        gap: 10px;
        padding: 10px 14px;
    }

    .logos-header img {
        height: 42px;
    }

    /* Bandeiras — reduzir */
    .bandeiras-header img {
        max-width: 100%;
        height: auto;
        max-height: 220px;
    }

    .horario-bloco {
        flex-direction: column;
        gap: 4px;
    }

    .horario {
        min-width: auto;
    }

    .tabela-inscricao th,
    .tabela-inscricao td {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    /* Nav — ajuste mobile */
    nav {
        min-height: 56px;
        padding: 12px 16px;
    }
}

@media screen and (max-width: 480px) {
    .sidebar a {
        padding: 7px 10px;
        font-size: 0.78rem;
    }

    .content {
        padding: 16px 10px;
    }

    h1 { font-size: 1rem; }

    .tabs button {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* Logos — mais compactos em mobile */
    .logos-header {
        gap: 8px;
        padding: 8px 10px;
    }

    .logos-header img {
        height: 34px;
    }

    /* Bandeiras — mais compactas */
    .bandeiras-header {
        margin: 8px auto 20px;
    }

    .bandeiras-header img {
        max-height: 160px;
    }

    /* Secção título */
    .tema-destaque {
        font-size: 0.85rem;
        padding: 12px 14px;
    }

    .sec-titulo {
        font-size: 1rem;
    }

    .dia-titulo {
        font-size: 0.95rem;
    }

    .mesa-titulo {
        font-size: 0.88rem !important;
    }

    .oficina {
        padding: 8px 10px;
        font-size: 0.82rem;
    }

    .contacto-rodape {
        padding: 14px;
        font-size: 0.8rem;
    }
}

/* ===================== IMPRESSÃO (PDF) ===================== */
@media print {
    /* Esconder navegação e sidebar */
    nav,
    .sidebar,
    .tabs,
    .search,
    .btn {
        display: none !important;
    }

    /* Eliminar margens e alturas mínimas que criam páginas em branco */
    body {
        background: #fff;
        color: #111;
        min-height: 0;
        height: auto;
        overflow: visible;
        margin: 0;
        padding: 0;
    }

    .wrapper {
        display: block;
        min-height: 0;
    }

    .content {
        margin-left: 0;
        padding: 0;
        max-width: 100%;
    }

    .section {
        display: block !important;
        background: none;
        border: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        padding: 10px 0;
        margin: 0;
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        animation: none;
    }

    .section::before {
        display: none;
    }

    /* Bandeiras e logos — reduzir para impressão */
    .logos-header {
        background: #f5f5f5;
        box-shadow: none;
    }

    .bandeiras-header {
        filter: none;
        animation: none;
    }

    .bandeiras-header::after {
        display: none;
    }

    pre {
        color: #111;
    }

    h1, h2, h3 {
        color: #0b3d91;
    }

    .sec-titulo, .dia-titulo { color: #0b3d91; border-color: #0b3d91; }
    .sec-subtitulo2, .eixo-titulo { color: #0b3d91; }
    .mesa-titulo { color: #333; }
    .horario { color: #0b3d91; }
    .horario-bloco { border-left-color: #0b3d91; background: none; }
    .tema-destaque { background: #eee; border-color: #999; color: #111; }
    .lista-eixos li { background: #f5f5f5; border-left-color: #0b3d91; color: #111; }
    .nota-destaque { background: #fff8e1; border-color: #cca300; color: #665200; }
    .tabela-inscricao th { color: #0b3d91; background: #e8f5f0; }
    .tabela-inscricao td { color: #111; }
    .oficina, .orador, .horario-conteudo, .sec-subtitulo, .lista-bullets li, .lista-membros li { color: #222; }
    .cargo { color: #555; }

    #d1, #d2, #d3 {
        display: block !important;
    }
}
