@import url('https://fonts.cdnfonts.com/css/nimbus-sans-l');     

html {
    margin: 0; 
    padding: 0;
    font-family: 'Nimbus Sans L', sans-serif;
}

body {
    margin: 0; 
    padding: 0;
}

h2 {
    font-size: 24px;
}

header {
    padding: 10px 0;
}

/* Menú hamburguesa - oculto por defecto en desktop */
.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
}

ul {
    display:flex;
    justify-content: center;
    flex-direction: row;
    list-style: none;
}

a {
    text-decoration: none;
    color: black;
}

li {
    margin: 0 0px;
    padding: 10px 95px;
    margin: 0px 50px;
}

li:hover {
  background-color:black;
  transform: rotate(-5deg);
  justify-content: center;
  color: white;
}

li.seleccionat {
  background-color:#561D25;
  transform: rotate(-5deg);
  justify-content: center;
  color: white;
}

.contingut {
    padding: 0px 60px;
}

.projectes1 {
    display: flex;
    flex-direction: row;
    padding-top:20px;
}

.projectes2 {
    display: flex;
    flex-direction: row;
    padding-top:20px;
}

.prevProjecte1 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/1/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte1 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.prevProjecte2 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/2/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte2 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.prevProjecte3 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/3/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte3 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.prevProjecte4 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/4/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte4 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.prevProjecte5 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/5/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte5 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.prevProjecte6 {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    background-image: url('img/6/prev.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 500px;
    height: 250px;
    padding: 20px;
    margin-right: 20px;
    color: white
}

.prevProjecte6 h2 {
  max-width: 300px;
  word-wrap: break-word;
  text-align: right;
}

.cercador {
    padding-left: 20px;
    padding-top: 15px;
    padding-bottom: 15px;
    background-color: black;
    color: gray;
    max-width: 200px;
    font-size: 24px;
    border: none;
    margin-top: 10px;
}

.cercador::placeholder {
    color: gray;
}

footer {
    background-color:black;
    color:white;
    padding: 0px 60px;
    padding-top:100px;
    padding-bottom: 70px;
    margin-top: 100px;
}

h4 {
    font-size: 20px;
}

.xarxesFooter {
    display: flex;
    justify-content: flex-start;
    align-items:center;
    gap: 50px;
}

/* ========== MEDIA QUERIES - RESPONSIVE ========== */

/* Tablet */
@media (max-width: 1024px) {
    li {
        padding: 10px 50px;
        margin: 0px 20px;
    }
    
    .contingut {
        padding: 0px 30px;
    }
    
    .projectes1,
    .projectes2 {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .prevProjecte1,
    .prevProjecte2,
    .prevProjecte3,
    .prevProjecte4,
    .prevProjecte5,
    .prevProjecte6 {
        width: 400px;
        height: 200px;
        margin-bottom: 20px;
    }
    
    .cercador {
        max-width: 300px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Header y menú hamburguesa */
    header {
        position: relative;
        padding: 20px;
    }
    
    .menu-icon {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 35px;
        font-weight: bold;
        cursor: pointer;
        z-index: 1000;
    }
    
    .menuHeader {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 999;
        padding: 0;
        margin: 0;
    }
    
    .menuHeader.active {
        right: 0;
    }
    
    .menuHeader li {
        margin: 10px 0;
        padding: 15px 40px;
        font-size: 28px;
        background-color: transparent;
        color: black;
    }
    
    .menuHeader li:hover {
        background-color: transparent;
        transform: none;
        color: black;
    }
    
    .menuHeader li.seleccionat {
        background-color: transparent;
        transform: none;
        color: black;
    }
    
    .menuHeader a {
        width: 100%;
        text-align: right;
        padding-right: 40px;
        color: black;
    }
    
    /* Contenido */
    .contingut {
        padding: 0px 20px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    /* Buscador */
    .cercador {
        max-width: 100%;
        width: calc(100% - 40px);
        font-size: 18px;
        padding: 12px 20px;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    
    /* Proyectos en columna */
    .projectes1,
    .projectes2 {
        flex-direction: column;
        gap: 20px;
        padding-top: 10px;
    }
    
    .prevProjecte1,
    .prevProjecte2,
    .prevProjecte3,
    .prevProjecte4,
    .prevProjecte5,
    .prevProjecte6 {
        width: calc(100% - 40px);
        height: 180px;
        margin-right: 0;
        margin-bottom: 0;
    }
    
    .prevProjecte1 h2,
    .prevProjecte2 h2,
    .prevProjecte3 h2,
    .prevProjecte4 h2,
    .prevProjecte5 h2,
    .prevProjecte6 h2 {
        max-width: 100%;
        font-size: 18px;
    }
    
    /* Footer */
    footer {
        padding: 60px 20px 40px;
        margin-top: 60px;
        text-align: center;
    }
    
    footer img[width="75px"] {
        width: 60px;
    }
    
    h4 {
        font-size: 18px;
        margin-top: 20px;
    }
    
    .xarxesFooter {
        justify-content: center;
        gap: 30px;
        margin-top: 30px;
    }
    
    .xarxesFooter a {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .xarxesFooter img {
        width: 35px;
        height: 35px;
        object-fit: contain;
    }
}
