@charset "utf-8";

/* 1. ESTILOS XERAIS */
html {
    overflow-x: hidden !important;
    width: 100%;
    height: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: "Segoe UI", sans-serif;
    background-color: #f8fafc;
    color: #1c3b26;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* 2. TÍTULOS E TEXTOS */
h1, h2, h3, h4, h5, h6 {
    font-family: "Segoe UI", sans-serif; 
    color: #1c3b26; 
    font-weight: 700;
}

h2 {
    margin: 0 0 15px 0;
    color: #1c3b26;
    font-size: 1.8rem;
    border-left: 5px solid #9bc987;
    padding-left: 15px;
    line-height: 1.3;
}

h3 { margin: 0px; }

/* 3. ENLACES */
a {
    color: #1c3b26;
    transition: all 0.2s ease;
}

a:hover {
    color: #64748b;
    text-decoration: none;
}

.enlaceexterno {
    font-style: italic;
    color: #223e15;
}

/* 4. CONTEDORES E TARXETAS (Noticias) */
.ficha-nova, aside, main {
    max-width: 900px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #cddfd3;
    box-sizing: border-box;
}

article {
    margin-bottom: 2.5em;
}

hr {
    border: 0;
    height: 1px;
    background: #cddfd3;
    margin: 20px 0;
}

.autor, .tag-autor {
    background: #cddfd3;
    color: #1c3b26;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
}

/* 5. IMAXES */
.img-responsive, img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

.piefoto {
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
    margin-top: 5px;
    font-style: italic;
}

/* 6. BOTÓNS DE IDIOMA E LER MÁIS */
.enlaces {
    margin-top: 2em;
    padding-top: 20px;
    border-top: 1px dashed #cddfd3;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.enlaces a, .btn-volver {
    display: inline-block;
    background: #f8fafc;
    color: #1c3b26;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #cddfd3;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.2s;
}

.enlaces a:hover, .btn-volver:hover {
    background: #9bc987;
    color: #ffffff;
    border-color: #9bc987;
    text-decoration: none;
}

/* 7. PAXINACIÓN */
.paginacion {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 30px 0 10px 0;
    justify-content: center;
}

.paginacion a, .paginacion span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #cddfd3;
    color: #1c3b26;
    text-decoration: none;
    font-weight: 600;
    background: white;
    transition: 0.2s;
    font-size: 0.95rem;
}

.paginacion span.negrita {
    background: #223e15;
    color: white;
    border-color: #223e15;
}

.paginacion a:hover {
    background: #cddfd3;
    border-color: #1c3b26;
}

/* Mensaxe Cookies */
.msg-cookie { 
    background: #ffffff; 
    border-top: 2px solid #cddfd3;
    position: fixed; 
    bottom: 0px; 
    z-index: 1000; 
    padding: 15px;
    width: 100%;
    color: #1c3b26;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
}

/* --- ESTILOS DO SLIDER/CAROUSEL ORIXINAL ADAPTADOS --- */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 4px 4px 0;
    user-select: none;
    background-color: rgba(28, 59, 38, 0.4);
}
.next { right: 0; border-radius: 4px 0 0 4px; }
.prev:hover, .next:hover { background-color: #1c3b26; }
.text {
    color: #ffffff;
    background: rgba(28, 59, 38, 0.8);
    font-size: 15px;
    padding: 8px 12px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
}
.numbertext {
    color: #ffffff;
    background: rgba(28, 59, 38, 0.6);
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
    border-radius: 0 0 4px 0;
}





/* =========================================================
   REGRAS "NUCLEARES" PARA PISAR OS ESTILOS DO XESTOR
   ========================================================= */

/* 1. Aniquilar o fondo gris feo e convertelo na nosa tarxeta branca */
div[style*="background-color:#f7f7f7"] {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    border: 1px solid #cddfd3 !important;
    padding: 40px !important;
    max-width: 900px !important;
    margin: 20px auto !important;
}

/* 2. Ocultar a caixa superior de "Lab. do Territorio / Novas" que agora sobra */
.titularseccion {
    display: none !important;
}

/* 3. Transformar o título antigo (azul escuro) no noso título verde coa raia */
h3[style*="color:#005454"], h3[style*="color: #005454"] {
    color: #1c3b26 !important;
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    border-left: 5px solid #9bc987 !important;
    padding-left: 15px !important;
    line-height: 1.2 !important;
    margin-top: 20px !important;
}

/* 4. Transformar o texto do autor (verde pistacho) na nosa etiqueta de fondo */
span[style*="color:#a8b846"], span[style*="color: #a8b846"] {
    background: #cddfd3 !important;
    color: #1c3b26 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    display: inline-block !important;
}

/* 5. Transformar o botón xigante negro de "Voltar" nun botón moderno */
div[style*="background-color:#000000"] {
    background-color: #f8fafc !important;
    color: #1c3b26 !important;
    border: 1px solid #cddfd3 !important;
    border-radius: 6px !important;
    width: auto !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: 0.2s !important;
}

div[style*="background-color:#000000"]:hover {
    background-color: #9bc987 !important;
    color: white !important;
    border-color: #9bc987 !important;
}