@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;
}

h3 {
    font-size: 20px;
}

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;
}

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;
}

.grid {
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 40px;
}

.partEsquerraGrid {
  order: 1;
}

.partDretaGrid {
  order: 2;
  display:flex;
  flex-direction:column;
  align-items: flex-end;
}

img.fotoPerfil {
    width: 100%;
    max-width: 300px;
    transform: rotate(-5deg);
}

textarea {
  border: none;
  background-color: #D9D9D9;
  color: black;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
  height: 200px;
  padding: 20px;
  box-sizing: border-box;
}

textarea::placeholder {
    color: #6D6D6D;
}

button {
  background-color:black;
  justify-content: center;
  color: white;
  padding: 15px 50px;
  border: none;
  cursor: pointer;
  margin-top: 20px;
}

button h3 {
  margin: 0;
}

button:hover {
  background-color:#561D25;
  justify-content: center;
  color: white;
}

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

/* Tablet */
@media (max-width: 1024px) {
    li {
        padding: 10px 50px;
        margin: 0px 20px;
    }
    
    .contingut {
        padding: 0px 30px;
    }
    
    .grid {
        grid-template-columns: 35% 65%;
        gap: 30px;
    }
    
    img.fotoPerfil {
        max-width: 250px;
    }
    
    textarea {
        height: 180px;
        padding: 15px;
    }
}

/* 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: 22px;
        margin-bottom: 30px;
    }
    
    /* Grid en columna para móvil */
    .grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .partEsquerraGrid {
        order: 1;
        display: flex;
        justify-content: center;
    }
    
    .partDretaGrid {
        order: 2;
        align-items: stretch;
    }
    
    img.fotoPerfil {
        max-width: 200px;
        transform: rotate(-5deg);
    }
    
    textarea {
        width: 100%;
        height: 150px;
        padding: 15px;
        font-size: 16px;
    }
    
    button {
        width: 100%;
        padding: 15px 30px;
        margin-top: 15px;
    }
    
    button h3 {
        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;
    }
}
