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

    .info-rest {
        grid-template-columns: 1fr;
        padding: 25px 0;
    }
    
    .masonry{
        display: none;
    }

    /* TESTIMONIALS */

    .testimonials-container{
        padding: 0 5%;
    }
    .name{
        font-size: 1.8rem;
    }

    .time {
        font-size: 16px;
    }

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

    /* INSTAGRAM */

    .instagram {
        width: 100%;
        padding: 40px 0; /* Padding vertical, 0 horitzontal per l'scroll */
        overflow: hidden; /* Talla qualsevol contingut que s'escapi lateralment */
    }
    .instagram h2{
        padding-left: 10%;
    }

    .grid-instagram {
        display: flex;
        width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 10%; /* Això fa que la primera imatge surti una mica separada de la vora */
        gap: 20px;
        scrollbar-width: none;
        box-sizing: border-box;
    }

    .grid-instagram::-webkit-scrollbar {
        display: none;
    }

    .grid-instagram > div, 
    .grid-instagram > a { 
        flex: 0 0 75%; /* Una mica més petit per a tauletes perquè es vegi millor la següent */
        scroll-snap-align: center;
    }

    .grid-instagram img {
        width: 45%;
        height: auto;
        display: block;
        border-radius: 12px;
    }

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

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

    .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: #29479B;
        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:#ffffff;
        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: #29479B;
        text-decoration: none;
        font-size: 1.2rem;
        font-family: 'Montserrat', sans-serif;
    }

    /* INFORMACIÓ RESTAURANT */
    .info-rest {
        grid-template-columns: 1fr;
        padding: 25px 0;
    }

    /* MASONRY */

    .masonry{
        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 auto;       /* 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: auto;         /* La imatge ocupa tot el seu contenidor */
        height: 700px;       /* Altura fixa (ajusta-la com vulguis, p.ex. 60vh o 300px) */
        object-fit: cover;   /* Manté la proporció retallant si cal (molt important!) */
        display: block;
        border-radius: 25px;
    }

    /* TESTIMONIALS */

    .testimonials{
        padding: 0;
    }

    .testimonial-item{
        padding: 20px;
    }

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

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

    /* INSTAGRAM */

    .instagram {
        width: 100%;
        padding: 40px 0; /* Padding vertical, 0 horitzontal per l'scroll */
        overflow: hidden; /* Talla qualsevol contingut que s'escapi lateralment */
    }
    .instagram h2{
        padding-left: 10%;
    }

    .grid-instagram {
        display: flex;
        width: 100%;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 10%; /* Això fa que la primera imatge surti una mica separada de la vora */
        gap: 20px;
        scrollbar-width: none;
        box-sizing: border-box;
    }

    .grid-instagram::-webkit-scrollbar {
        display: none;
    }

    .grid-instagram > div, 
    .grid-instagram > a { 
        flex: 0 0 75%; /* Una mica més petit per a tauletes perquè es vegi millor la següent */
        scroll-snap-align: center;
    }

    .grid-instagram img {
        width: 100%; /* Ocupa tot el 75% definit a dalt */
        height: auto;
        display: block;
        border-radius: 12px;
    }

    /* CONTACT */

    .serif {
        font-size: 5rem;   
        padding-left: 0;
        text-align: center;
    }
    
    .info-card {
        width: 75%;
        flex-direction: column;
        bottom: -650px;
    }

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

    .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-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; 
    }



}



/* 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: #29479B;
        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:#ffffff;
        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: #29479B;
        text-decoration: none;
        font-size: 1.2rem;
        font-family: 'Montserrat', sans-serif;
    }


    /* INFORMACIÓ RESTAURANT */
    .info-rest {
        grid-template-columns: 1fr;
        padding: 25px 0;
    }

    /* MASONRY */

    .masonry{
        display: none;
    }


    .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: 100%;       /* Altura fixa (ajusta-la com vulguis, p.ex. 60vh o 300px) */
        object-fit: cover;   /* Manté la proporció retallant si cal (molt important!) */
        display: block;
        border-radius: 25px;
    }

    /* 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;
    }

    /* INSTAGRAM */
    .grid-instagram {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 0 20px;
        gap: 10px;
        scrollbar-width: none; /* Firefox */
    }

    /* Amaguem la barra d'scroll en Chrome/Safari */
    .grid-instagram::-webkit-scrollbar {
        display: none;
    }

    .grid-instagram > div, 
    .grid-instagram > a { 
        flex: 0 0 80%;
        scroll-snap-align: center;
    }

    .grid-instagram img {
        width: 80%;
        height: auto;
        display: block;
        border-radius: 8px; /* Opcional, per seguir l'estil anterior */
    }

    /* CONTACT */

    .serif {
        font-size: 5rem;   
        padding-left: 0;
        text-align: center;
    }
    
    .info-card {
        width: 75%;
        flex-direction: column;
        bottom: -650px;
    }

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

    .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-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; 
    }
    


    
}