@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1400px)
  and (-webkit-min-device-pixel-ratio: 2) {
    
    
    .info-andares {
        grid-template-columns: 1fr;
        margin: auto;
    }

    .info-andares img{
        display: none;
    }
    .info-rest{
        display: none;
    }


    /* CARROUSSEL MÒBIL */

    .carousel-container {
        display: block;
        width: 100%;
        overflow: hidden; 
        padding: 50px 0;   
    }

    .carousel-track {
        display: flex;               /* Posem els elements en línia horitzontal */
        overflow-x: auto;            /* Activem l'scroll horitzontal */
        scroll-behavior: smooth;     /* Scroll suau */
        
        /* --- Scroll Snap (Natiu) --- */
        /* Això fa que la imatge "s'enganxi" a la vora enlloc de quedar a mitges */
        scroll-snap-type: x mandatory; 
        
        /* --- Millores d'UX per a mòbil --- */
        -webkit-overflow-scrolling: touch; /* Scroll més suau en iOS antic */
        scrollbar-width: none;          /* Amaguem la barra d'scroll en Firefox */
        padding: 0 10%;                 /* Pàding lateral per centrar la primera imatge */
    }

    /* Amaguem la barra d'scroll en Chrome, Safari i Edge */
    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-item {
        flex: 0 0 95%;      
        margin-right: 15px;  
        scroll-snap-align: center; /* L'element s'alinia al centre del contenidor*/
    }

    /* Últim element sense marge a la dreta */
    .carousel-item:last-child {
        margin-right: 0;
    }

    .carousel-item img {
        width: 100%;         /* La imatge ocupa tot el seu contenidor */
        height: 600px;       
        object-fit: cover;   /* Manté la proporció retallant si cal (molt important!) */
        display: block;
    }
    
    .card-content{
        flex-direction: row;
    }
    .card-thumb {
        width: 50%;
    }

    .card-details img{
        width: 100%;
    }

   

    .about-section{
        padding: 5%;
    }

    .about-section .container{
        flex-direction: column;
    }
    .about-image img {
        width: 95vw;
        max-height: 600px;
        object-fit: cover;
    }
    .testimonials-container{
        padding: 0 5%;
    }
    .name{
        font-size: 1.8rem;
    }

    .time {
        font-size: 16px;
    }

    .review-text {
        font-size: 16px;
    }

    .info-card{
        bottom: -275px;
    }

    .form-wrapper{
        margin-top: 225px;
    }

    .footer-group-logos{
        margin: 0;
    }
  }

    @media screen and (max-width: 1600px) and (min-width: 1000px) {
  .card-thumb {
    width: 220px;
  }
}


/* TABLET FINS A 1024px */

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

    .brand-header {
        display: none !important;
    }

    .hero-header-mbl {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        position: relative;
        z-index: 1001;
    }

   

    /* Forcem que el botó es vegi i estigui per sobre */
    .menu-toggle {
        display: block !important;
        background: transparent;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        position: relative;
        z-index: 1100; /* Per sobre del menú desplegat */
    }

    /* El contenidor del menú */
    .hero-header-mbl .main-nav {
        display: none; /* Amagat per defecte */
        position: fixed;
        top: 0;
        right: -100%; 
        width: 100%; /* Millor 100% en mòbils petits */
        height: 100vh;
        background:#2D1A15;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1050;
    }

    /* Quan s'activa */
    .hero-header-mbl .main-nav.active {
        display: flex !important; /* El fem aparèixer */
        right: 0;
        gap: 50px;
    }

    .hero-header-mbl .main-nav ul {
        list-style: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .hero-header-mbl .main-nav ul li a {
        color: white;
        text-decoration: none;
        font-size: 1.8rem;
        font-family: 'Montserrat', sans-serif;
    }

    /* CONTINGUT BRAND */

    .info-andares {
        grid-template-columns: 1fr;
        margin: auto;
        padding-top: 100px;
    }

    .info-rest{
        display: none;
    }
    .info-andares img{
        display: none;
    }

    /* CARROUSSEL MÒBIL */

    .carousel-container {
        display: block;
        width: 100%;
        overflow: hidden; 
        padding: 50px 0;   
    }

    .carousel-track {
        display: flex;               /* Posem els elements en línia horitzontal */
        overflow-x: auto;            /* Activem l'scroll horitzontal */
        scroll-behavior: smooth;     /* Scroll suau */
        
        /* --- Scroll Snap (Natiu) --- */
        /* Això fa que la imatge "s'enganxi" a la vora enlloc de quedar a mitges */
        scroll-snap-type: x mandatory; 
        
        /* --- Millores d'UX per a mòbil --- */
        -webkit-overflow-scrolling: touch; /* Scroll més suau en iOS antic */
        scrollbar-width: none;          /* Amaguem la barra d'scroll en Firefox */
        padding: 0 10%;                 /* Pàding lateral per centrar la primera imatge */
    }

    /* Amaguem la barra d'scroll en Chrome, Safari i Edge */
    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-item {
        flex: 0 0 90%;       /* CADA IMATGE OCUPA EL 80% DE L'AMPLADA */
                            /* Això deixa un 20% (10% a cada costat aprox) per veure la següent/anterior */
        margin-right: 15px;  /* Espai entre imatges */
        scroll-snap-align: center; /* L'element s'alinia al centre del contenidor en fer snap */
    }

    /* Últim element sense marge a la dreta */
    .carousel-item:last-child {
        margin-right: 0;
    }

    .carousel-item img {
        width: 100%;         /* La imatge ocupa tot el seu contenidor */
        height: 400px;       /* Altura fixa (ajusta-la com vulguis, p.ex. 60vh o 300px) */
        object-fit: cover;   /* Manté la proporció retallant si cal (molt important!) */
        display: block;
    }

    

    /* TESTIMONIALS */

    .testimonials{
        padding: 0;
    }

    .testimonial-item{
        padding: 20px;
    }

    .testimonials-container {
        grid-template-columns: repeat(1, 1fr);
    }

    .name{
        font-size: 2rem;
    }
    .time {
        font-size: 22px;
    }

    /* CONTACTE SECCIÓ */

    .info-card {
        width: 75%;
        flex-direction: column;
        bottom: -560px;
    }

    .card-content{
        flex-direction: column;
    }
    .card-thumb{
        width: 100%;
    }

    .card-details img{
        width: 150px;
    }

    .italic-serif{
        font-size: 4rem;
        text-align: center;
        padding-left: 0;
    }

    .form-wrapper{
        margin-top: 600px;
        padding: 10%;
    }

    .input-group input, .input-group textarea{
        width: stretch;
    }

    .recaptcha-placeholder img{
        width: stretch;
    }

    /* FOOTER */
    .footer-container{
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-top: 50px;
    }

    .footer-logo{
        margin-bottom: 0;
    }

    .footer-logo img{
        width: stretch;
    }

    .footer-social {
        position: relative;
        left: 0px;
        display: flex;
        gap: 15px;
        
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .footer-group-logos{
        display: none;
    }

    .mobile-logos-section-footer {
        display: block !important;
        background-color: white;
        padding: 40px 20px; /* Afegeix padding per donar aire */
        width: 100%;
        box-sizing: border-box;
        opacity: 1 !important; /* Forcem visibilitat */
        transform: none !important; /* Anul·lem el desplaçament de l'animació */
    }

    .logos-grid-mbl {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 30px;
        align-items: center;
        justify-items: center;
        padding: 5%;
    }

    .logos-grid-mbl .logo-item {
        opacity: 1 !important; 
        transform: none !important;
        padding: 0;
    }

    .logos-grid-mbl img {
        max-width: 100%;
        height: auto;
        filter: none !important; 
    }
    


  }


/* MÒBILS PETITS */
@media only screen 
  and (min-device-width: 320px) 
  and (max-device-width: 480px)
  and (-webkit-min-device-pixel-ratio: 2)
  and (orientation: portrait) {
    
    
    .brand-header {
        display: none !important;
    } 


    .hero-header-mbl {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        position: relative;
        z-index: 1001;
    }

    /* Forcem que el botó es vegi i estigui per sobre */
    .menu-toggle {
        display: block !important;
        background: transparent;
        border: none;
        color: white;
        font-size: 2rem;
        cursor: pointer;
        position: relative;
        z-index: 1100; /* Per sobre del menú desplegat */
    }

    /* El contenidor del menú */
    .hero-header-mbl .main-nav {
        display: none; /* Amagat per defecte */
        position: fixed;
        top: 0;
        right: -100%; 
        width: 100%; /* Millor 100% en mòbils petits */
        height: 100vh;
        background:#2D1A15;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 1050;
    }

    /* Quan s'activa */
    .hero-header-mbl .main-nav.active {
        display: flex !important; /* El fem aparèixer */
        right: 0;
        gap: 50px;
    }

    .hero-header-mbl .main-nav ul {
        list-style: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .hero-header-mbl .main-nav ul li a {
        color: white;
        text-decoration: none;
        font-size: 1.2rem;
        font-family: 'Montserrat', sans-serif;
    }


    /* CONTINGUT BRAND */

    .info-andares {
        grid-template-columns: 1fr;
        margin: auto;
        padding-top: 50px;
    }

    .info-rest{
        display: none;
    }
    .info-andares img{
        display: none;
    }

    /* CARROUSSEL MÒBIL */

    .carousel-container {
        display: block;
        width: 100%;
        overflow: hidden; 
        padding: 50px 0;   
    }

    .carousel-track {
        display: flex;               /* Posem els elements en línia horitzontal */
        overflow-x: auto;            /* Activem l'scroll horitzontal */
        scroll-behavior: smooth;     /* Scroll suau */
        
        /* --- Scroll Snap (Natiu) --- */
        /* Això fa que la imatge "s'enganxi" a la vora enlloc de quedar a mitges */
        scroll-snap-type: x mandatory; 
        
        /* --- Millores d'UX per a mòbil --- */
        -webkit-overflow-scrolling: touch; /* Scroll més suau en iOS antic */
        scrollbar-width: none;          /* Amaguem la barra d'scroll en Firefox */
        padding: 0 10%;                 /* Pàding lateral per centrar la primera imatge */
    }

    /* Amaguem la barra d'scroll en Chrome, Safari i Edge */
    .carousel-track::-webkit-scrollbar {
        display: none;
    }

    .carousel-item {
        flex: 0 0 90%;       /* CADA IMATGE OCUPA EL 80% DE L'AMPLADA */
                            /* Això deixa un 20% (10% a cada costat aprox) per veure la següent/anterior */
        margin-right: 15px;  /* Espai entre imatges */
        scroll-snap-align: center; /* L'element s'alinia al centre del contenidor en fer snap */
    }

    /* Últim element sense marge a la dreta */
    .carousel-item:last-child {
        margin-right: 0;
    }

    .carousel-item img {
        width: 100%;         /* La imatge ocupa tot el seu contenidor */
        height: 200px;       /* Altura fixa (ajusta-la com vulguis, p.ex. 60vh o 300px) */
        object-fit: cover;   /* Manté la proporció retallant si cal (molt important!) */
        display: block;
    }

    /* TESTIMONIALS */

    .testimonials{
        padding: 0;
        margin-top: 0;
    }

    .testimonial-item{
        padding: 20px;
    }

    .testimonials-container {
        grid-template-columns: repeat(1, 1fr);
    }

    .name{
        font-size: 2rem;
    }
    .time {
        font-size: 16px;
    }

    /* CONTACT */

    .info-card {
        width: 75%;
        flex-direction: column;
        bottom: -350px;
    }

    .card-content{
        flex-direction: column;
    }
    .card-thumb{
        width: 100%;
    }

    .italic-serif{
        font-size: 4rem;
        text-align: center;
        padding-left: 0;
    }

    .form-wrapper{
        margin-top: 400px;
        padding: 10%;
    }

    .input-group input, .input-group textarea{
        width: stretch;
    }

    .recaptcha-placeholder img{
        width: stretch;
    }
    

    /* FOOTER */
    .footer-container{
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-top: 50px;
    }

    .footer-logo{
        margin-bottom: 0;
    }

    .footer-logo img{
        width: stretch;
    }

    .footer-social {
        position: relative;
        left: 0px;
        display: flex;
        gap: 15px;
        
    }

    .footer-nav {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .footer-group-logos{
        display: none;
    }

    .mobile-logos-section-footer {
        display: block !important;
        background-color: white;
        width: 100%;
        box-sizing: border-box;
        opacity: 1 !important; /* Forcem visibilitat */
        transform: none !important; /* Anul·lem el desplaçament de l'animació */
    }

    .logos-grid-mbl {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 30px;
        align-items: center;
        justify-items: center;
        padding: 10%;
    }

    .logos-grid-mbl .logo-item {
        opacity: 1 !important; 
        transform: none !important;
        padding: 0;
    }

    .logos-grid-mbl img {
        max-width: 100%;
        height: auto;
        filter: none !important; 
    }
    
    
  }