@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

body {
    font-family: "Comfortaa", sans-serif;
    margin: 0 0 ;
    padding: 0;
    background-color: #ECEDD5;
    color: #333; 
}

header {
    color: black;
    padding: 10px;
    text-align: center;
}


nav {
    background-color: #ECEDD5;
    color: #000000;
    padding: 10px;
    text-align: center;
}

.codisPostalXat {
    color: #000000;
    text-align: center;
}

body #llistaCodisPostal a {
    text-align: center;

}

#llistaCodisPostal {
    margin: 0 0 100 0;
}

#llistaCodisPostal a {
    text-decoration: none;
    color: #61D4B0;
    padding: 10px;
    font-size: large;
    color: #61D4B0;
}

.barra{
    height: 10px;
    width: 100%;
    background-color: #61D4B0;
}

.imagotip {
    padding: 30 0;
}

.imagotip img{
    max-height: 200px;
}

.top-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin: 10px;
}

.top-icons img {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 10px;
    width: 100px;
    height: auto;
}

.bottom-icons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin: 10px;
}

.bottom-icons img{
    height: 50px;
    width: auto;
}

.buscar-icon {
    justify-content:center;
    align-items: center;
    padding: 0 20px;
    margin: 10px;
}


.search-bar {
    display: flex;
    justify-content: right;
    margin-bottom: 10px;
    width: 250;
    padding: 10px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: 10px;
    border-radius: 5px;
}

.search-bar input {
    padding: 8px;
    border: none;
    border-radius: 5px;
    margin-right: 5px;
}

.search-bar button {
    background-color: #61D4B0;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}

#search-button, .search-parameters input, #search-input {
    font-family: "Comfortaa", sans-serif;
}

#publish-button, #desplegable {
    font-family: "Comfortaa", sans-serif;
    background-color: #61D4B0;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

#boto_desplegable {
    text-align: center;
}

#profile-image input {
    background-color: white;
    color: #61D4B0;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-family: "Comfortaa", sans-serif;
}

main {
        padding: 20px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
        padding-bottom: 100px;
}

.margesPublicar {
    margin: 0 0 50 0px;
}

.mainInici {
    padding: 0 0 100 0;
}

#product-list{
    margin: 0 0 100 0;
}

.product-list p{
    text-decoration: none;
}

.search-parameters {
    display: flex;
    flex-direction: column; /* inputs verticals */
    width: 300px;
    padding: 10px;
    background-color: #61D4B0;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 5px;
}

.search-parameters label {
    margin: 5px 0; /* ajusta marge top i bottom */
    font-size: 0.9em;
    text-align: center;
}

.search-parameters input,
.search-parameters select {
    padding: 8px;
    margin: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-parameters button {
    background-color: white;
    color: #61D4B0;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-family: "Comfortaa", sans-serif;
}

.botons-usuari button, #filter-button {
    background-color: white;
    color: #61D4B0;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-size: 1.2em;
    font-family: "Comfortaa", sans-serif;
}


.botonet {
    background-color: white;
    color: #61D4B0;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-size: 1.2em;
    font-family: "Comfortaa", sans-serif;
    text-decoration: none;
}

.botons-accepta button{
    background-color:#61D4B0;
    color: #ffffff;
    border-color: #61D4B0;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-size: 1.2em;
    font-family: "Comfortaa", sans-serif; 
}

.botons-rebutja button{
    background-color: #ffffff;
    color: #61D4B0;
    border-color: #61D4B0;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    font-size: 1.2em;
    font-family: "Comfortaa", sans-serif; 
}

.search-parameters {
    display: none;
}

.search-parameters.show {
    display: flex;
}

.product-item {
    background-color: #61D4B0;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 10px;
    padding: 15px;
    width: 300px;
    height: 250px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-decoration: none;

}

.product-item img {
    width: 280px;
    height: 175px;
    margin-bottom: 10px;
    object-fit: cover;
}

.product-item h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.product-item p {
    margin: 0;
    font-size: 0.9em;
    color: #777;
}

.registratAqui {
    margin: 0 0 100 0px;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #ECEDD5;
    color: white;
    position: fixed;
    bottom: 0;
    width: 100%;
    text-align: center;
}

.label_forum {
    margin: 20 0 10 0px;
}

#fotoEditar{
    margin: 20 0 10 0px;
}

/* login */
.formulari2_login {
    background-color: #61D4B0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 600px; 
    max-width: 90%; 
    text-align: center;
}

.formulari_login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 20vh;
}


.profile-image {
    width: 100%;
    height: auto;
    padding-bottom: 100%;
    border-radius: 5%;
    margin: 0 auto 10px;
    overflow: hidden;
    display: block;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

.profile-image img {
    width: 100%;
    height: auto;
    max-height: 400px;

}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #66afe9;
}

#exit {
    text-decoration: none;
}

/* formulari desktop */

.formulari_desktop {
    display: flex;
    justify-content: center;
    align-items:baseline;
    max-height: 50%;
    margin: 0 0 100 0;
}

.formulari_cookies {
    background-color: white;
    padding: 20px;
    border-style: groove;
    border-color: #61D4B0;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 90%; 
    text-align: center;
    margin: 0 0 100 0;
}

.formulari_usuari {
    background-color: #61D4B0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 90%; 
    text-align: center;
    /* margin: 0 0 100 0; */
}

.formulari_usuari_xat {
    background-color: #61D4B0;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 600px;
    max-width: 90%; 
    text-align: center;
    /* margin-bottom: 200px; */
}

.usuari-enllac {
    text-align: center;
    margin: 10px 0;

}

.registratLogin {
    color: black;
}


/* fòrum */

.chat-container {
    width: 320px;
    height: 568px; /* iPhone SE height */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #61D4B0;
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.chat-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #ffffff;
    max-height: 40%;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 5px;
}

.message.sent {
    background-color: #ffffff80;
    text-align: left;
}

.message.received {
    background-color: #ecedd580;
    text-align: left;
}

.chat-input {
    padding: 10px;
    border-top: 1px solid #ECEDD5;
    display: flex;
}

.chat-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ECEDD5;
    border-radius: 5px;
    margin-right: 5px;
}

.chat-input button {
    background-color: #61D4B0;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
}


/* anunci usuari */

.producte_anunci {
    width: 100%;
    height: auto;
    border-radius: 0%;
    background-color: #ddd;
    overflow: hidden;
    display: grid;
    justify-content: center;
    align-items: center;
}
.seccio_descriptiu {
    width: 100%;
    margin: 5 0px;
    border-radius: 4px;
    box-sizing: border-box;
}

.publicacions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 20px auto;
}
.publicacions img {
    max-width: 300px;
    height: auto;
    margin-top: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contingut-publicacions {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.titular_anuncisPublicats {
    text-align: center;
} 

@media only screen and (max-width: 850px) {
    .formulari_usuari {
        width: auto;
    }
    .profile-image {
        height: 50$;
    }
}

@media (max-width: 768px) {
    .formulari_desktop {
        padding: 10px;
    }

    .formulari_usuari {
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    form input[type="text"],
    form textarea,
    form input[type="file"],
    form input[type="submit"] {
        width: 100%;
        font-size: 16px;
    }

    form label {
        font-size: 16px;
    }

    #publish-button {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}


@media only screen and (max-width: 650px) {
    .formulari_desktop, .formulari_login {
        width: 450px; 
    }
}

@media only screen and (max-width: 500px) {
    .bottom-icons img{
        height: 35px;
        width: auto;
    }
    .formulari_desktop, .formulari_login {
        width: 300px; 
    }

    
}



@media only screen and (max-width: 350px) {

    .search-parameters {
        width: 250px; 
    }
    .formulari_desktop, .formulari_login {
        width: 250px; 
    }
    .chat-input {
        flex-direction: column;

    }
}

@media only screen and (max-width: 300px) {

    .search-parameters {
        width: 200px;
    }

}