html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: #F2F2F2;
    color: #333;
}

h1, h2, h3 {
    margin-top: 0;
}

a {
    text-decoration: none;
    color: #4A6FA5;
}

.btn {
    background: #A7C7E7;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    color: #2c3e50;
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;
    border: 2px solid #8DB5D9;
    transition: 0.3s;
}

.btn:hover {
    background: #8DB5D9;
}

.header-principal {
    background: #A7C7E7; 
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8DB5D9;
}

.menu {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    padding: 0;
    margin: 0;
}

.menu a.active {
    font-weight: bold;
    color: #2d4a78;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
}

.hero h1 {
    font-size: 2.3rem;
    color: #333;
}

.seccio-llocs {
    padding: 2rem;
    background: #E8E8E8;
}

.graella-llocs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.graella-llocs img {
    width: 100%;
    border-radius: 12px;
    border: 3px solid #A7C7E7;
}

.targeta {
    background: #F4F4F4;
    padding: 1.2rem;
    border-radius: 12px;
    border: 2px solid #DDDDDD;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.seccio-barris {
    padding: 2rem;
    background: #E8E8E8; 
}

.barris-container {
    display: flex;
    gap: 1.2rem;
}

.descripcio-barri {
    flex: 1;
    background: #F4F4F4; 
    padding: 1.2rem;
    border-radius: 12px;
    border: 2px solid #DDDDDD;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.barris-container img {
    width: 100%;
    border-radius: 12px;
    border: 3px solid #A7C7E7;
}

.footer-principal {
    background: #D4E7D5;
    text-align: center;
    padding: 1rem;
    border-top: 2px solid #BBD6BB;
    margin-top: auto;
    font-weight: bold;
}

.galeria-main {
    padding: 2rem;
    text-align: center;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.galeria-grid img {
    width: 100%;
    border-radius: 12px;
    border: 3px solid #A7C7E7;
}

.contacte-main {
    padding: 2rem;
    text-align: center;
}

.formulari {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 2px solid #E8E8E8;
}

.formulari input,
.formulari textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #ffffff;
}

.formulari label{
    text-align: left;
}

@media (max-width: 900px) {
    .graella-llocs {
        grid-template-columns: repeat(2, 1fr);
    }
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .menu {
        flex-direction: column;
        text-align: center;
    }

    .graella-llocs,
    .galeria-grid {
        grid-template-columns: 1fr;
    }

    .barris-container {
        flex-direction: column;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
}

img {
    width: 600px;
    height: 400px;
}