* {
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

/* Estilos globales */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Cursor pointer para elementos clickeables */
.fa-square-phone,
.fa-square-whatsapp,
.fa-square-facebook,
.fa-at,
.xarxes i {
    cursor: pointer;
    transition: transform 0.2s ease, color 0.3s ease;
}

.fa-square-phone:hover,
.fa-square-whatsapp:hover,
.fa-square-facebook:hover,
.fa-at:hover,
.xarxes i:hover {
    transform: translateY(-2px);
}

/* Animaciones para las tarjetas */
.obres,
.reformes,
.restauracions_rehabilitacions,
.microciment,
.lloguerMaquinaria,
.projectesMida {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/********** Capçalera **********/
.divHeader {
    width: 100%;
}

.tel_correu_xarxes {
    display: flex;
    justify-content: center;
    background-color: #F9F9F9;
    padding: 0 1rem;
    width: 100%;
}

.tel_correu_xarxes .container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.telCorreu {
    display: flex;
    height: 3rem;
    gap: 2rem;
    align-items: center;
    font-size: 0.9rem;
}

.xarxes {
    display: flex;
    align-items: center;
    height: 3rem;
    gap: 2rem;
    color: #8C8C8C;
    font-size: 1.5rem;
}

.divLogoMenu {
    height: 8rem;
    background-color: white;
    width: 100%;
}

.divLogoMenu .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
}

.divLogo img {
    height: 6rem;
    width: 12rem;
}

.divMenu {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.divMenu a {
    color: black;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.divMenu a:hover {
    background-color: #f0f0f0;
}

.nav-menu {
    display: flex;
    gap: 3rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/********** Banner principal (divSlogan) **********/
.divSlogan {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 1200px;
    min-height: 32rem;
    margin: 0 auto;
    padding: 3rem 6%;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
}

.divSlogan img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    z-index: -1;
    transform: none !important;
}

/* Evita que los encabezados se monten entre sí */
.divSlogan .text-sobre-imatge_1,
.divSlogan .text-sobre-imatge_2 {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: 100%;
    max-width: 900px;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}


.divSlogan .text-sobre-imatge_1 {
    color: #fff;
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.2;
}

.divSlogan .text-sobre-imatge_2 {
    color: #fff;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 400;
    line-height: 1.5;
}

.divSlogan .demana_pressupost {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 100%;
    margin: 0;
    
}

.demana_pressupost button {
    display: inline-block;
    background-color: #F37447;
    border-radius: 1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    padding: 0.9rem 1.8rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.demana_pressupost button:hover {
    background-color: #d4622a;
    transform: translateY(-2px);
}

/********** Promoció **********/
.promocio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    background-color: transparent;
}

.promocio img {
    height: 12rem;
    width: 100%;
    object-fit: cover;
}

.promocio p {
    color: #898989;
    font-size: 1rem;
    font-weight: 400;
    margin: 0 1rem;
    text-align: center;
}

.promocio h3 {
    margin: 1rem;
    text-align: center;
}

.experiencia,
.qualitat,
.pressupost {
    height: auto;
    min-height: 22rem;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

/********** Serveis **********/
.titolServeis {
    max-width: 1200px;
    margin: 0 auto;
     padding: 2rem 1rem 0.5rem 1rem; 
    text-align: center;
    font-size: 2.5rem;
    color: #333;
}

.divServeis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 0.3rem auto 2rem auto; /* Cambia el margen superior de 2rem a 0.5rem */
    max-width: 1200px;
    padding: 0 1rem;
}

.serveis_1,
.serveis_2 {
    display: contents;
}

.obres,
.reformes,
.restauracions_rehabilitacions,
.microciment,
.lloguerMaquinaria,
.projectesMida,
.servei-item {
    background-color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.obres:hover,
.reformes:hover,
.restauracions_rehabilitacions:hover,
.microciment:hover,
.lloguerMaquinaria:hover,
.projectesMida:hover,
.servei-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.divServeis img,
.serveis_1 img,
.serveis_2 img {
    height: 16rem;
    width: 100%;
    object-fit: cover;
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.divServeis h3,
.serveis_1 h3,
.serveis_2 h3 {
    text-align: center;
    margin: 1rem 0;
    color: #333;
    font-size: 1.3rem;
}

.divServeis p,
.serveis_1 p,
.serveis_2 p {
    text-align: justify;
    line-height: 1.6;
    color: #666;
    font-size: 0.95rem;
}

/********** Sobre nosaltres **********/
#sobre-nosaltres {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem 1rem;
    text-align: left;
    font-size: 2.5rem;
    color: #333;
}

.divEmpresa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem 1rem;
}

.divEmpresaImg {
    width: 40%;
    min-width: 300px;
    height: 25rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.divEmpresa img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.divEmpresa img:hover {
    transform: scale(1.05);
}

.divEmpresaText {
    width: 55%;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.divEmpresaText p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    text-align: justify;
    margin: 0;
}

/********** Galeria **********/
.divImatges {
    padding: 3rem 1rem;
    text-align: center;
    background-color: #f8f9fa;
}

.divImatges h1 {
    margin-bottom: 1rem;
    color: #333;
}

.divImatges p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.galeria-item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeria-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.galeria-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.galeria-item:hover img {
    transform: scale(1.1);
}

.galeria-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
    transform: translateY(0);
}

.galeria-overlay h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.galeria-overlay p {
    margin: 0;
    color: #ddd;
    font-size: 0.9rem;
}

.galeria-boton button {
    background-color: #F37447;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.galeria-boton button:hover {
    background-color: #d4622a;
    transform: translateY(-2px);
}

/********** Contacte **********/
.divContacte {
    padding: 3rem 1rem;
    background-color: #fff;
}

.divContacte h1 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.divContacte>p {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.contacte-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contacte-info h2,
.contacte-form h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.contacte-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.contacte-item:hover {
    background-color: #f8f9fa;
}

.contacte-item i {
    font-size: 1.5rem;
    color: #F37447;
    margin-top: 0.2rem;
    min-width: 24px;
}

.contacte-item h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.contacte-item p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.contacte-xarxes {
    margin-top: 2rem;
}

.contacte-xarxes h3 {
    margin-bottom: 1rem;
    color: #333;
}

.xarxes-icons {
    display: flex;
    gap: 1rem;
}

.xarxes-icons i {
    font-size: 2rem;
    color: #F37447;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

.xarxes-icons i:hover {
    color: #d4622a;
    transform: translateY(-3px);
}

.contacte-form {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F37447;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-button {
    background-color: #D4622A;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.form-button:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

.form-button i {
    font-size: 1.2rem;
}

/********** Footer **********/
.generalFooter {
    background-color: #333;
    color: white;
    padding: 3rem 1rem 1rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.footer-section h3 {
    color: #F37447;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    color: #ccc;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.footer-section ul li::before {
    content: '▶';
    color: #F37447;
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}

.footer-xarxes {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-xarxes i {
    font-size: 1.5rem;
    color: #F37447;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer-xarxes i:hover {
    color: white;
    transform: translateY(-3px);
}

.footer-contacte p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.footer-contacte p:hover {
    color: #F37447;
}

.footer-contacte i {
    color: #F37447;
    width: 20px;
}

.footer-horari p {
    margin-bottom: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 2rem;
    text-align: center;
    color: #999;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/********** Media Queries (Dispositius mòbils i tablets) **********/
@media screen and (max-width: 768px) {
    .tel_correu_xarxes .container {
        flex-direction: column;
        align-items: center;
    }

    .telCorreu,
    .xarxes {
        gap: 1rem;
        font-size: 0.69rem;
    }

    .menu-toggle {
        display: flex;
    }

 .divSlogan .demana_pressupost {
        align-self: center;
          margin-top: 2.5rem; /* espacio extra por encima del botón */
    }


    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding-top: 5rem;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.mobile-open {
        right: 0;
    }

    .divSlogan {
        min-height: 24rem;
        padding: 2.5rem 1.25rem;
        gap: 0.9rem;
    }

    .divSlogan .text-sobre-imatge_1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        line-height: 1.2;
    }

    .divSlogan .text-sobre-imatge_2 {
        font-size: clamp(1rem, 4vw, 1.3rem);
        line-height: 1.45;
    }

    .divEmpresa {
        flex-direction: column;
    }

    .divEmpresaImg,
    .divEmpresaText {
        width: 100%;
    }

    .contacte-container {
        grid-template-columns: 1fr;
    }

    .titolServeis {
        font-size: 1.9rem;
        text-align: center;
    }



}

@media screen and (max-width: 480px) {
    .divSlogan {
        min-height: 22rem;
        padding: 2rem 1rem;
        gap: 0.8rem;
    }

    .divSlogan .text-sobre-imatge_1 {
        font-size: 1.8rem;
    }

    .divSlogan .text-sobre-imatge_2 {
        font-size: 1rem;
    }

    .demana_pressupost button {
        font-size: 0.95rem;
        padding: 0.8rem 1.2rem;
    }
}

/********** Accessibilitat i ajustos finals **********/
button:focus-visible,
a:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid #F37447;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}