:root {
    --c-primary: #3bb3b8;
    /* turquesa del heroi */
    --c-primary-700: #2a7f83;
    --c-bg: #e5dece;
    /* beix de blocs */
    --c-text: #2d2d2d;
    --c-muted: #6b7280;
    --c-muted-contact: #b7c4de;
    /*--c-card: #ffffff;*/
    --c-card: #f1fbfd;
    --c-dark: #3f4951;
    /* peu i contacte */
    --radius: 18px;
    --shadow: 0 10px 25px rgba(0, 0, 0, .08);
}

.logo-image {
    width: 256px;
    height: 256px;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--c-text);
    background: #f9fafb;
    width: 100%;
}

/* utilitats */
.container {
    width: min(1100px, 92vw);
    margin-inline: auto
}

.section {
    padding: 64px 0
}

.eyebrow-contact {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--c-muted-contact)
}

.eyebrow {
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--c-muted)
}

.title {
    font-size: clamp(1.4rem, 1.1rem + 1.5vw, 1.5rem);
    margin: .25rem 0 1rem
}

.lead {
    color: #334155;
    max-width: 100%
}

.btn {
    display: inline-block;
    padding: .9rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: white;
    text-decoration: none;
    color: #0f172a;
    transition: .2s;
    font-weight: 600;
    font-size: 1rem !important;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow)
}

/* capçalera */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid #e5e7eb
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 64px
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800
}

.brand-logo {
    inline-size: 34px;
    block-size: 34px;
    border-radius: 10px;

    display: inline-grid;
    place-items: center;
    color: white;
    font-weight: 900
}

.nav-menu a.active {
    border-bottom: 4px solid #56a8b1;
    padding-bottom: 4px;
    border-radius: 0px;
}

.nav-menu a.active:hover {
    border-bottom: 4px solid #80ced7;
    padding-bottom: 4px;
    border-radius: 0px;
}

.nav a {
    color: #0f172a;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px
}

.nav a:hover {
    background: #eef2f7
}

/* heroi */
.hero {
    background: radial-gradient(1400px 400px at 50% -80%, var(--c-primary) 0, #66ccd0 35%, #9ee1e3 60%, #c9f3f4 80%, transparent 81%) #f9fafb;
    padding: 72px 0 96px;
    text-align: center;
}

.hero .sub {
    max-width: 70ch;
    margin: 12px auto 0;
    color: #0f172a;
    font-size: 1.05rem
}

/* imatge destacada */
.hero-photo {
    margin: 32px auto 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    max-width: min(90vw, 640px);
    /* reduce de 820px a 640px o lo que te guste */
}

.hero-photo img {
    display: block;
    width: 100%;
    /* escala la foto al ancho del contenedor */
    height: auto;
    /* mantiene aspect ratio */
}

/* serveis */
.services {
    background: var(--c-bg)
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columnas */
    gap: 26px;
    margin-top: 28px;
    justify-items: center;
    /* centra cada card dentro de su celda */
}

.card {
    background: var(--c-card);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    /* background: #9ee0e7; */
    display: grid;
    place-items: center;
    padding: 5px;
}

.icon-contact {
    width: 16px;
    height: 16px;
}

.card h3 {
    margin: .25rem 0 .5rem;
    font-size: 1.05rem
}

.card p {
    color: #475569;
    font-size: .98rem
}

/* equip */
.team {
    background: #f5f7fb
}

.collaborations {
    background: #ebf0f9
}

.member {
    background: white;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    text-align: center
}

.avatar {
    /*aspect-ratio: 1/1;*/
    width: 100%;
    background: #e5e7eb;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 12px
}

.member h4 {
    margin: .25rem 0 .25rem
}

.role {
    color: var(--c-muted);
    font-size: .92rem
}

/* contacte */
.contact {
    background: var(--c-dark);
    color: white
}

.contact .grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
    align-items: start
}

.panel {
    margin-top: 30px;
}

.contact .panel {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 24px
}

label {
    display: block;
    margin: .4rem 0 .3rem;
    font-size: .92rem
}

input,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1
}

textarea {
    min-height: 120px
}

.contact .btn {
    background: white
}

/* peu */
footer {
    padding: 14px 0;
    text-align: center;
    color: #d1d5db;
    background: #26313a
}

/* Responsivo: en pantallas medianas, 2 columnas */
@media (max-width: 980px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsivo: en pantallas pequeñas, 1 columna */
@media (max-width: 620px) {
    .service-grid {
        grid-template-columns: 1fr;
    }
}

/* CSS */
#g-recaptcha-response {
    display: block !important;
    position: absolute;
    margin: -50px 0 0 0 !important;
    z-index: -999999;
    opacity: 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 26px;
    margin-top: 28px;
    justify-content: center;
}

.team-grid .member img {
    width: 100%;
    height: 390px;
    /* altura fija, ajusta según diseño */
    object-fit: cover;
    /*aspect-ratio: 1/1;*/
    /* recorta manteniendo proporción */
    object-position: 50% 30%;
    /* centra el recorte */
    border-radius: 14px;
    /* mismo radio que la tarjeta */
    display: block;
}

@media (max-width: 620px) {
    .team-grid {
        grid-template-columns: 1fr;
        /* una columna en pantallas pequeñas */
    }
}


.colab-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 26px;
    margin-top: 28px;
    justify-content: center;
}

.colab-grid .member img {
    width: 100%;
    height: 390px;
    /* altura fija, ajusta según diseño */
    object-fit: cover;
    /*aspect-ratio: 1/1;*/
    /* recorta manteniendo proporción */
    object-position: 50% 30%;
    /* centra el recorte */
    border-radius: 14px;
    /* mismo radio que la tarjeta */
    display: block;
}

@media (max-width: 1100px) {
  .colab-grid {
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }
}

@media (max-width: 700px) {
  .colab-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 18px;
  }
  .colab-grid .member img {
    height: 260px; /* más pequeñita */
  }
}

@media (max-width: 320px) {
  .colab-grid {
    grid-template-columns: 1fr;
  }
  .colab-grid .member img {
    height: 220px;
  }
}

@media (max-width: 768px) {

    /* contenedor header */
    .nav {
        height: auto;
        /* permite crecer en vertical */
        padding: 8px 0;
        position: relative;
    }

    /* logo + nombre compactos */
    header .logo-image {
        width: 34px;
        height: 34px;
    }

    .brand {
        gap: 8px;
    }

    .brand span {
        font-size: 1rem;
        line-height: 1;
        white-space: nowrap;
        /* evita salto “Centre / Juno” */
    }

    /* botón hamburguesa a la derecha */
    .menu-toggle {
        display: none;
        margin-left: auto;
        background: none;
        border: 0;
        font-size: 1.6rem;
        line-height: 1;
        padding: 6px 8px;
    }

    @media (max-width:768px) {
        .menu-toggle {
            display: block;
        }
    }

    /* menú desplegable ocupa todo el ancho bajo la cabecera */
    nav.nav-menu {
        display: none;
        /* oculto por defecto */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 10px 25px rgba(0, 0, 0, .06);
        flex-direction: column;
    }

    nav.nav-menu.open {
        display: flex;
    }

    /* enlaces en bloque, cómodos para el dedo */
    nav.nav-menu a {
        display: block;
        padding: 14px 18px;
        border-radius: 0;
        font-size: 1.05rem;
    }

    nav.nav-menu a+a {
        border-top: 1px solid #f2f4f7;
    }
}

/* XS extra: si aún se apretuja, ocultar texto largo del brand */
@media (max-width: 380px) {
    .brand span {
        display: none;
    }

    /* deja solo el isologo */
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    /* espacio entre filas */
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-list a {
    color: #e5f4f5;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    /* fondo suave */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-badge img {
    width: 20px;
    height: 20px;
}

/* botón hamburguesa por defecto oculto */
.menu-toggle {
    display: none !important;
}

/* visible solo en pantallas pequeñas */
@media (max-width: 768px) {
    .menu-toggle {
        display: block !important;
    }
}

article {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

article:hover {
    box-shadow: 0 0 0 3px var(--c-primary);
    /* borde con color turquesa */
    transform: translateY(-4px);
    /* opcional: pequeño "lift" */
    border-radius: var(--radius);
    /* mismo radio que tus tarjetas */
}

/* Compensar header sticky cuando saltas por anclas */
section {
    scroll-margin-top: 80px;
}

/* ajusta si tu header cambia de altura */
@media (max-width:768px) {
    .nav-menu a.active {
        border-bottom: none;
        border-left: 4px solid var(--c-primary);
        background: #f1fbfc;
        padding-bottom: 12px;
    }
}

/*@media (min-width: 768px) {
    .phone {
      display: none;
    }
  }*/