* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f0edff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}


/* Header Styles */
.header {
    background-color: #ffffff;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 107.42px;
}

.logo-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-right {
    color: white;
    padding: 0.5rem 0.5rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: 2fr 2fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
    max-height: auto;
}


.card {
    border-radius: 0.4rem;
    /* padding: 1rem; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.logomenu {
    width: 10rem;
    margin-bottom: 1.5rem;
}

.ciutadania-logo{
    width: 14rem;
}

.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}


a.card-link {
    display: block;
    text-decoration: none;
    color: inherit; /* opcional, para que no herede color azul típico de links */
}


.card-large {
    grid-row: span 2;
    background: linear-gradient(270deg, #4489CA, #4489CA);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; /* necessari per al ::before */
    z-index: 0;
}

.card-large::before {
  content: "";
  position: absolute;
  inset: 0; /* ocupa tot el div */
  background-image: url('/elila/public/logos/logoics.png');
  background-repeat: repeat;     /* repeteix la imatge */
  background-size: 120px auto;   /* ajusta la mida del mosaic */
  opacity: 0.1;                  /* 10% d'opacitat */
  z-index: -1;                   /* darrere del contingut */
}

.card-small-jocs {
    background: linear-gradient(90deg, #4489CA, #4489CA);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; /* necessari per al ::before */
    z-index: 0;
}

.card-small-ciutadans {
    background: linear-gradient(90deg, #4489CA, #4489CA);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative; /* necessari per al ::before */
    z-index: 0;
}

.card-small-jocs::before {
  content: "";
  position: absolute;
  inset: 0; /* ocupa tot el div */
  background-image: url('/elila/public/logos/dad02.png');
  background-repeat: repeat;     /* repeteix la imatge */
  background-size: 120px auto;   /* ajusta la mida del mosaic */
  opacity: 0.1;                  /* 10% d'opacitat */
  z-index: -1;                   /* darrere del contingut */
}

.card-small-ciutadans::before {
  content: "";
  position: absolute;
  inset: 0; /* ocupa tot el div */
  background-image: url('/elila/public/logos/ciutadans.png');
  background-repeat: repeat;     /* repeteix la imatge */
  background-size: 120px auto;   /* ajusta la mida del mosaic */
  opacity: 0.1;                  /* 10% d'opacitat */
  z-index: -1;                   /* darrere del contingut */
}

.icsimg {
    width: 24rem;
}

.card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.card-title-main {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 2.8rem;
    font-weight: bold;
}

.card-subtitle {
    font-size: 1.8rem;
    opacity: 0.9;
}

/* Footer Styles */
.footer {
    background-color: #ffffff;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    transition: background-color 0.5s ease;
    min-height: 114.31px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: row;
}

.logos-cuidem-igual{
    max-width: 23rem;
}

.logo-pacte{
    max-width: 7rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    color: #333;
}

.footer-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.phone-info {
    text-align: center;
    padding: 0.5rem 1rem;
    border: 2px solid #ff555c;
    border-radius: 8px;
    color: #ff555c;
    font-weight: bold;
}

.footer-mobile-only {
  display: none;
}

/* Responsive Design */
@media (max-width: 767px) {
    .icsimg{
        width: 10rem;
    }

    .card{
        padding: 2rem;
    }

    .header {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 2rem 1rem;
    }

    .card-title {
        font-size: 1.8rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }

    .card-title-main {
        font-size: 1.8rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }

    .card-subtitle {
        font-size: 1.2rem;
        opacity: 0.9;
    }

    .card-large img {
        grid-row: span 1;
    }
    
    .card-small {
        grid-row: span 1;
    }

    .footer {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .footer-left {
        flex-direction: row;
        gap: 1rem;
    }

    .logomenu {
        margin-bottom: 0.5rem;
    }

}

@media (max-width: 480px) {
    .header {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
    }

    .card-title-main {
        font-size: 1.8rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
    }

    .card-title {
        font-size: 1.8rem;
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .card-subtitle {
        font-size: 1.2rem;
        opacity: 0.9;
    }

    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        padding: 2rem 1rem;
    }

    .logomenu {
        width: 8rem !important;
    }

    .card-large img {
        grid-row: span 1;
    }
    
    .card-small {
        grid-row: span 1;
    }

    .footer {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        min-height: auto;
    }

    .footer-left {
        flex-direction: row;
        gap: 1rem;
    }

    .logo-pacte{
        max-width: 4rem;
    }

    .logos-cuidem-igual{
        max-width: 10rem;
    }

    .phone-info {
        text-align: center;
        padding: 0.2rem;
        border: 2px solid #ff555c;
        border-radius: 8px;
        color: #ff555c;
        font-weight: bold;
        max-width: 200px;
        font-size: 0.6rem;
    }

    .card-large::before {
        content: "";
        position: absolute;
        inset: 0; /* ocupa tot el div */
        background-image: url('/elila/public/logos/logoics.png');
        background-repeat: repeat;     /* repeteix la imatge */
        background-size: 80px auto;   /* ajusta la mida del mosaic */
        opacity: 0.1;                  /* 10% d'opacitat */
        z-index: -1;                   /* darrere del contingut */
    }

    .card-small-jocs::before {
        content: "";
        position: absolute;
        inset: 0; /* ocupa tot el div */
        background-image: url('/elila/public/logos/dad02.png');
        background-repeat: repeat;     /* repeteix la imatge */
        background-size: 80px auto;   /* ajusta la mida del mosaic */
        opacity: 0.1;                  /* 10% d'opacitat */
        z-index: -1;                   /* darrere del contingut */
    }

    .card-small-ciutadans::before {
        content: "";
        position: absolute;
        inset: 0; /* ocupa tot el div */
        background-image: url('/elila/public/logos/ciutadans.png');
        background-repeat: repeat;     /* repeteix la imatge */
        background-size: 80px auto;   /* ajusta la mida del mosaic */
        opacity: 0.1;                  /* 10% d'opacitat */
        z-index: -1;                   /* darrere del contingut */
    }

    .footer-mobile-none {
        display: none;
    }

    .footer-mobile-only {
        display: inline-block;
    }

    /* Footer Styles */
    /* .footer {
        background-color: #ffffff;
        padding: 0.5rem 2rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    } */
}