* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.8;
    color: #222;
    background-size: cover;
    background-attachment: fixed;
}

/* FUNDOS */
body.inicio { background-image: url("../images/fundo-inicio.jpg"); }
body.rtp { background-image: url("../images/fundo-rtp.jpg"); }
body.sic { background-image: url("../images/fundo-sic.jpg"); }
body.tvi { background-image: url("../images/fundo-tvi.jpg"); }

/* MENU TOPO */
nav {
    background: rgba(0,0,0,0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    color: #fff;
    font-size: 1.4em;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* HEADER */
header {
    padding: 90px 20px 70px;
    text-align: center;
    color: white;
    background: linear-gradient(to bottom, rgba(0,0,0,0.65), rgba(0,0,0,0));
}

header h1 {
    font-size: 3em;
}

/* CONTEÚDO */
main {
    max-width: 1200px;
    margin: auto;
    padding: 60px 20px;
}

.section-card {
    background: rgba(255,255,255,0.96);
    padding: 50px;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    margin-bottom: 60px;
    animation: fadeUp 0.8s ease;
}

.section-card h2 {
    font-size: 2.3em;
    margin-bottom: 20px;
}

.section-card h3 {
    margin-top: 35px;
    margin-bottom: 12px;
}

.section-card p {
    margin-bottom: 16px;
}

.section-card ul {
    margin-left: 20px;
}

.logo-canal {
    width: 180px;
    margin-bottom: 30px;
}

/* FOOTER */
footer {
    background: #111;
    color: #bbb;
    text-align: center;
    padding: 20px;
}

/* ANIMAÇÃO */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVO */
@media (max-width: 900px) {
    header h1 { font-size: 2.2em; }
    .section-card { padding: 30px; }
    .nav-links { gap: 15px; }
}

/* ============================= */
/* CORES DIFERENTES DO MENU      */
/* ============================= */

/* INÍCIO */
body.inicio nav {
    background: rgba(40, 40, 40, 0.9);
}

/* RTP - Azul institucional */
body.rtp nav {
    background: rgba(0, 80, 160, 0.95);
}

/* SIC - Vermelho */
body.sic nav {
    background: rgba(180, 30, 30, 0.95);
}

/* TVI - Azul escuro */
body.tvi nav {
    background: rgba(0, 50, 100, 0.95);
}

/* Hover comum */
nav .nav-links a:hover::after {
    background: #fff;
}

/* ===================================== */
/* MENU COM CORES DOS LOGOS DOS CANAIS    */
/* ===================================== */

/* INÍCIO – neutro elegante */
body.inicio nav {
    background: linear-gradient(90deg, #2c2c2c, #1a1a1a);
}

/* RTP – azul institucional */
body.rtp nav {
    background: linear-gradient(90deg, #0056a6, #003d7a);
}

/* SIC – vermelho institucional */
body.sic nav {
    background: linear-gradient(90deg, #c40018, #8f0012);
}

/* TVI – azul/roxo escuro */
body.tvi nav {
    background: linear-gradient(90deg, #1a237e, #0d133f);
}

/* TEXTO DO MENU */
nav .nav-logo,
nav .nav-links a {
    color: #ffffff;
}

/* LINHA ANIMADA NO HOVER */
nav .nav-links a::after {
    background: rgba(255,255,255,0.9);
}

/* LINK ATIVO */
.nav-links a.active {
    font-weight: 700;
}

.nav-links a.active::after {
    width: 100%;
}

/* ===================================== */
/* RODAPÉ COM CORES DOS CANAIS            */
/* ===================================== */

footer {
    color: #e0e0e0;
    font-size: 1em;
}

/* INÍCIO */
body.inicio footer {
    background: linear-gradient(90deg, #1a1a1a, #2c2c2c);
}

/* RTP */
body.rtp footer {
    background: linear-gradient(90deg, #003d7a, #0056a6);
}

/* SIC */
body.sic footer {
    background: linear-gradient(90deg, #8f0012, #c40018);
}

/* TVI */
body.tvi footer {
    background: linear-gradient(90deg, #0d133f, #1a237e);
}

/* ===================================== */
/* TRANSIÇÃO ENTRE PÁGINAS                */
/* ===================================== */

body {
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.page-exit {
    opacity: 0;
    transform: translateY(20px);
}