* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column; 
    min-height: 100vh;
}

.linear {
    margin: 0;
    height: 100px;
    width: 100vw; 
    background-image: linear-gradient(225deg, rgb(182, 222, 247), rgb(99, 193, 251), DodgerBlue);
    text-align: center;
}

h1 {
    margin: 0;

}

h1.Titulo {
    margin: 0;
    font-size: 60px;
    text-decoration: underline;
}

h2 {
    font-size: 15px;
}

.titulo2 {
    font-size:40px;
}

h3 {
    margin: 10px;
    padding-left: 0;
    font-size: 30px;
}

h4 {
    font-size: 20px;
}

h4.Publicitat {
    margin: 0;
    padding: 0;
    font-size: 25px;
    text-align: left;
}

p {
    margin: 5px;
}

/* Enlaces globales */
a:link, a:visited {
    color: #2c72ff !important;      
    text-decoration: none;           
    transition: color 0.3s ease;     
}
      

nav {
    width: 100%;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    height: 60px;
    background-image: linear-gradient(225deg, rgb(29, 28, 28), rgb(59, 59, 59));
    color: white;
}

nav select {
    display: inline;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px;
    font-family: 'Poppins', sans-serif;
}

nav ul {
    display: flex;
    padding: 0;
    margin: 0;
}

nav ul li {
    list-style: none;
    margin-right: 25px; 
    color: white;
    font-weight: 600;
}

.contenido-principal {
    display: flex;
    width: 100%;
    flex: 1; 
    align-items: stretch; 
}


main {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    flex: 1;
    margin: 10px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    z-index: 1000;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.3s;
}

aside {
    width: 25%;
    background-color: #0288d1;
    color: white;
    padding: 15px;
    box-sizing: border-box;
    background-image: linear-gradient(225deg, rgb(147, 205, 241), rgb(77, 182, 247), DodgerBlue);
}

.Publicitat {
    display: flex;
    justify-content: center;
    align-items: center;     
    margin: 15px auto;
}

.aboutme {
    width: 27.75vw;         
    height: auto;          
    display: block;        
    margin: 0 auto;        
}

#examinator {
    width: 88px;
    height: 31px;
}

footer {
    background-image: linear-gradient(225deg, rgb(29, 28, 28), rgb(59, 59, 59));
    width: 100%;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
}

/* --- MENÚ DESPLEGABLE --- */

nav ul li {
    position: relative;
    list-style: none;
    margin-right: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}


nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgb(59, 59, 59);
    border-radius: 5px;
    padding: 5px 0;
    min-width: 160px;
    z-index: 1000;
}

nav ul li ul li {
    color: white;
    padding: 8px 15px;
    margin: 0;
    white-space: nowrap;
}


nav ul li:hover > ul {
    display: block;
}


nav ul li ul li:hover {
    background-color: rgb(90, 90, 90);
}

/* --- NOUS ESTILS PER A TAULES DE RH --- */
.taula-rh {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    font-size: 0.95em;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #ffffff;
}

/* Capçaleres de Taula (Color fosc com el teu nav) */
.taula-rh thead th {
    background-color: rgb(89, 172, 255);
    color: black;
    padding: 12px 15px;
    text-align: left;
    border-bottom: 3px solid rgb(29, 28, 28);
}

/* Fila de Dades */
.taula-rh tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

/* Efecte Zebra (Alternar colors de fila) */
.taula-rh tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* Gris molt clar */
}

/* Efecte Hover */
.taula-rh tbody tr:hover {
    background-color: #e9ecef;
}

/* --- ESTILS PER A LA SECCIÓ DE PERFILS (APARTAT B) --- */

.contenidor-perfils {
    display: flex;
    flex-wrap: wrap; /* Permet que les targetes passin a una nova línia en pantalles petites */
    gap: 20px; /* Espai entre targetes */
    justify-content: center; /* Centra les targetes */
    margin-top: 20px;
}

.perfil-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    width: 100%; /* Default per a mòbils */
    max-width: 300px; /* Mida màxima de la targeta */
    transition: transform 0.3s ease;
}

.perfil-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.perfil-header {
    text-align: center;
    border-bottom: 2px solid #eee;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.perfil-foto {
    width: 100px;
    height: 100px;
    border-radius: 50%; /* Per fer la foto circular */
    object-fit: cover;
    margin-bottom: 5px;
    border: 3px solid DodgerBlue; /* Un toc de color de Safyra */
}

.perfil-carrec {
    color: #555;
    font-size: 0.9em;
}

.perfil-cos h4 {
    color: DodgerBlue;
    border-bottom: none; /* Desactivem la línia dels h4 generals */
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 1.1em;
    text-align: left;
}

.perfil-cos ul {
    list-style-type: disc;
    margin-left: 20px;
    padding-left: 0;
    font-size: 0.9em;
}

/* Media Query per a pantalles d'ordinador */
@media (min-width: 768px) {
    .contenidor-perfils {
        justify-content: space-between; /* Distribueix l'espai entre les targetes */
    }
}

/* --- Nou estil per a la imatge dins la taula (UNIFORMITAT) --- */
.perfil-foto-taula {
    /* CLAU: Mida fixa per a totes les imatges */
    width: 50px; 
    height: 50px;
    
    /* Assegura que la imatge no es distorsioni i ompli l'espai */
    object-fit: cover; 
    
    /* Estil per a l'aparença */
    border-radius: 50%; /* Circular */
    display: block; 
    margin: 0 auto; /* Centra la imatge dins de la cel·la */
    border: 1px solid #ccc; /* Un petit marc */
}