/* ============================================================================
   /home/htmd/public_html/css/artigo.css
   Página do artigo (artigo.php).
   A primeira parte é a barra de topo, o fundo e o rodapé, copiados do
   <style> do index.php para a página ficar igual; a segunda é a do artigo.
   ============================================================================ */

:root {
    --bg: #050505;
    --accent-gold: #a38b2d;
    --accent-petrol: #216778;
    --gold: #d3bc5f;
    --text-main: #FFFFFF;
    --text-muted: #888888;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ── Igual ao index.php: fundo, barra de topo, menu do telemóvel, rodapé ── */

.hero-art {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(33, 103, 120, 0.4), transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(255, 204, 0, 0.15), transparent 40%);
    filter: blur(80px);
}

nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 50px;
    padding: 15px 30px; display: flex; gap: 30px; z-index: 100;
}

.htmd-nav a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.htmd-nav a:hover {
    color: var(--gold);
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor;
    transform: translateY(-1px);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
}

.mobile-toggler {
    display: none;
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-item { display: none !important; }
    .mobile-toggler { display: block !important; color: white !important; z-index: 2000; }
}

#menuMobile {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    z-index: 999;
}

.container {
    position: relative;
    z-index: 2;
}

.footer-custom { background-color: var(--azul-escuro); color: #999; padding: 5rem 0 2rem; font-size: 0.9rem; position: relative; z-index: 1; }
.footer-title { color: var(--branco); font-weight: 600; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-links { line-height: 80%; list-style: none; padding: 0; }
.footer-links li { margin-bottom: 1rem; }
.footer-links a { color: #999; text-decoration: none; transition: all 0.3s; }
.footer-links a:hover { color: var(--azul-medio); padding-left: 5px; }
.copyright { padding-top: 2rem; margin-top: 3rem; }

/* ── Página do artigo ───────────────────────────────────────────────────── */

.artigo {
    padding: 130px 0 60px;   /* por cima: espaço para a barra de topo fixa */
}

.artigo-voltar {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 2rem;
    color: #ccc;
    text-decoration: none;
    font-size: .95rem;
}

.artigo-voltar:hover {
    color: var(--gold);
}

/* Galeria */
/* Foto grande em bleed: a imagem ocupa a caixa toda, sem margem branca */
.artigo-foto-grande {
    aspect-ratio: 1;
    border-radius: 16px;
    overflow: hidden;
}

.artigo-foto-grande img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sem fotografias: o logótipo da HTMD, esse sim sobre fundo branco */
.artigo-foto-grande.sem-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.artigo-foto-grande.sem-foto img {
    width: 55%;
    height: auto;
    object-fit: contain;
}

.artigo-miniaturas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: .6rem;
    margin-top: .9rem;
}

.artigo-miniatura {
    aspect-ratio: 1;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    opacity: .65;
    transition: opacity .2s, border-color .2s;
}

.artigo-miniatura img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;   /* também em bleed */
}

.artigo-miniatura:hover,
.artigo-miniatura.ativa {
    opacity: 1;
}

.artigo-miniatura.ativa {
    border-color: var(--gold);
}

/* Dados */
.artigo-categoria {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .8rem;
    margin-bottom: .5rem;
}

.artigo-nome {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 1rem;
}

.artigo-ref {
    font-weight: 500;
    margin-bottom: 1.75rem;
}

.artigo-texto {
    color: #d6d6d6;
    line-height: 1.65;
}

.artigo-texto p {
    margin-bottom: 1rem;
}

.artigo-botao {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-top: .75rem;
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--accent-petrol);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: .3s;
}

.artigo-botao:hover {
    background: var(--gold);
    color: #000;
}

/* Secções complementares */
.artigo-secao {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.artigo-secao h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.artigo-caracteristicas {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    gap: .6rem 2rem;
    margin: 0;
}

.artigo-caracteristicas dt {
    color: var(--text-muted);
    font-weight: 400;
}

.artigo-caracteristicas dd {
    margin: 0;
    color: #eee;
}

/* Artigo inexistente ou inativo */
.artigo-indisponivel {
    padding: 4rem 0 6rem;
}

.artigo-indisponivel h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.artigo-indisponivel p {
    color: #ccc;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .artigo {
        padding-top: 110px;
    }

    .artigo-caracteristicas {
        grid-template-columns: 1fr;
        gap: .15rem;
    }

    .artigo-caracteristicas dd {
        margin-bottom: .75rem;
    }
}
