.portada-serveis{
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.portada-serveis h1{
    line-height: 1;
}

.intro-serveis{
    padding: 5% 20% 5% 20%;
    width: 90vw;
    margin: 0 auto;

    p{
        text-align: center;
    }
}


/* GRID SERVEIS */

.serveis {
    background: #D1C198 var(--backgroundImage01) center ;
}

.serveis.whiteBackground {
    background: #ffffff ;
}

.serveis .alga-sectio-title-dark {
    font-size: 3rem;
    padding: 5% 20% 0 20%; 
}

/* Contenidor de la graella */
.serveis-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 40px;
    row-gap: 100px; /* Espai ampli per a les línies */
    padding: 80px 20%;                     
    margin: 0 auto;
    text-align: center;
    position: relative; /* Necessari per posicionar les línies */
}

/* LES LÍNIES CONTINUES (S'apliquen sobre el grid-gap) */
.serveis-grid::before {
    content: "";
    position: absolute;
    top: 40px;
    left: 20%; /* Coincideix amb el padding del grid */
    right: 20%;
    bottom: 0px; /* Acaba on comença l'última secció */
    /* Dibuixa dues línies blanques horitzontals */
/*
    background-image: linear-gradient(to bottom,
        transparent calc(33.3% - 0.5px), #fff calc(33.3% - 0.5px), #fff calc(33.3% + 0.5px), transparent calc(33.3% + 0.5px),
        transparent calc(66.6% - 0.5px), #fff calc(66.6% - 0.5px), #fff calc(66.6% + 0.5px), transparent calc(66.6% + 0.5px)
    );
    background-repeat: no-repeat;
 */
    pointer-events: none;
}


/* Afegim la línia final de tancament si vols que n'hi hagi una a sota de tot */
.serveis-grid {
    border-bottom: 1px solid #fff;
}

/* Estil de cada card de servei */
.servei-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Ajuda a alinear els botons al final */
}

.icona img {
    height: 80px;                          
    width: auto;
    margin-bottom: 0;
}


.servei-card .icona img {
    margin-bottom: 20px;
}

.titol-servei h3 {                         
    font-family: "Inter", sans-serif;
    color: #1a2a40;                        
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 15px;
}

.descripcio-servei {
    font-family: "Inter", sans-serif;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.extres {
    font-family: "Inter", sans-serif;
    font-weight: 700;                     
    font-size: 0.9rem;
    color: #1a2a40;
    /*margin-top: auto; */ /* Empeny el contingut cap avall */
}

/* BOTÓ FOSC (Arreglat per evitar talls) */
.extres .alga-btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1d2538; /* Blau molt fosc/negre */
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 15px 35px; /* Padding equilibrat */
    border-radius: 100px;
    white-space: nowrap; /* Imprescindible per al botó de normativa */
    transition: transform 0.2s ease;
}

.extres .alga-btn-dark:hover {
    transform: scale(1.05);
}

/* VIDEO */

.seccio-video-full {
    width: 100%;
    line-height: 0; /* Elimina espais buits sota l'iframe */
    overflow: hidden;
    padding-top: 3%;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; 
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


/* RESPONSIVE */

@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1400px)
  and (-webkit-min-device-pixel-ratio: 2) {

    .serveis-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 50px;
        padding: 30px 8%;
    }

    .serveis-grid::before{
        background-image: none;
    }

  }



/* TABLET FINS A 1024px */

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

    .portada-button{
        display: block;
    }

    .booking-box {
        display: none;
    
    }

    .intro-serveis{
        padding: 10% 8%;
    }

    .serveis-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 50px;
        padding: 30px 8%;
    }

    .serveis .alga-sectio-title-dark {
        padding: 5% 10% 0 10%;
    }

    .serveis-grid::before {
        background-image: none;
    }
    .titol-servei h3 {
        margin: 0;
    }
    .descripcio-servei {
        margin: 0;
    }
}

@media screen and (max-width: 768px) {
    .serveis-grid {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 50px;
        padding: 30px 8%;
    }




}
@media only screen 
and (min-device-width: 320px) 
and (max-device-width: 568px)
and (-webkit-min-device-pixel-ratio: 2)
and (orientation: portrait) {

    .portada-button{
        display: block;
    }

    .intro-serveis {
        padding: 10% 20% 5% 20%;
    }

    .serveis{
        background-size: 400%;
    }

    .serveis-grid {
        grid-template-columns: repeat(1, 1fr);
        row-gap: 50px;
        padding: 30px 25px;
    }

    .serveis .alga-sectio-title-dark {
        font-size: 3rem;
        padding: 15% 10% 0 10%;
        line-height: normal;
    }

    .titol-servei h3 {
        margin: 0;
    }

    .descripcio-servei {
        margin-bottom: 0;
    }

    .serveis-grid::before{
        background-image: none;
    }

    .servei-card{
        /* border-bottom: solid 1px #fff; */
        padding-bottom: 25px;
    }

    .pet-card{
         border-bottom: none;
    }

    .seccio-video-full {
        padding-top: 0; /* Eliminem el padding superior en mòbil per aprofitar l'espai */
    }

    .video-container {
        padding-bottom: 120%; 
        height: 0;
        overflow: hidden;
    }

    .video-container iframe {

        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        transform: scale(2.5);
        transform-origin: center;
    }

}