/* =========================================================
   PÀGINA TALLERS — VERSIÓ ESCRIPTORI
   Aquest CSS es carrega després del CSS general.
========================================================= */


/* =========================================================
   HEADER
========================================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
  
    border-bottom: 1px solid rgba(47, 93, 80, 0.08);
  
    /* Lleugerament transparent perquè es vegi el hero al darrere */
    background: rgba(252, 251, 248, 0.78);
  
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  
    transition:
      background 0.25s ease,
      box-shadow 0.25s ease,
      backdrop-filter 0.25s ease;
  }
  
  .topbar.is-scrolled {
    background: rgba(250, 249, 245, 0.97);
    box-shadow: 0 8px 24px rgba(36, 64, 55, 0.14);
  }
  
  
  /* Opció activa del menú */
  
  .menu a.active {
    color: var(--primary);
  }
  
  .menu a.active::after {
    width: 100%;
  }
  
  
  /* =========================================================
     HERO TALLERS
  ========================================================= */
  
  .hero.hero-tallers {
    position: relative;
  
    display: flex;
    align-items: center;
  
    /* El hero entra per sota del header */
    margin-top: -110px;
  
    /*
      78 px corresponen aproximadament a l’alçada del header.
      L'espai superior compensa el marge negatiu.
    */
    padding:
      calc(78px + 5.5rem)
      0
      9rem;
  
    min-height: 780px;
  
    overflow: hidden;
  
    /*
      Imatge original, sense invertir.
      La planta continua a l’esquerra.
    */
    background-image: url("../img/hero_tallers.png");
    background-repeat: no-repeat;
    background-size: cover;
  
    /*
      Important:
      top evita que background-size: cover retalli
      massa espai per sobre de la marieta.
    */
    background-position: left top;
  
    /*
      Neutralitzem el filtre general de .hero,
      perquè enfosquia o alterava tota la composició.
    */
    filter: none;
  }
  
  
  /* =========================================================
     CAPES DEL HERO
  ========================================================= */
  
  /*
    Eliminem completament el primer degradat blanc heretat
    de la pàgina principal.
  */
  
  .hero.hero-tallers::before {
    content: none;
  }
  
  
  /*
    Única capa de lectura.
  
    El degradat neix a la dreta, darrere del text,
    i desapareix abans d’arribar a la planta.
  */
  
  .hero.hero-tallers::after {
    content: "";
  
    position: absolute;
    inset: 0;
  
    z-index: 1;
  
    pointer-events: none;
  
    background: linear-gradient(
      270deg,
  
      rgba(252, 251, 248, 0.94) 0%,
      rgba(252, 251, 248, 0.88) 20%,
      rgba(252, 251, 248, 0.72) 34%,
      rgba(252, 251, 248, 0.42) 48%,
      rgba(252, 251, 248, 0.14) 61%,
      rgba(252, 251, 248, 0) 73%
    );
  }
  
  
  /* =========================================================
     DISTRIBUCIÓ DEL CONTINGUT
  ========================================================= */
  
  .hero-tallers .hero-grid {
    position: relative;
    z-index: 2;
  
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
  
    display: grid;
    grid-template-columns: 1fr 1fr;
  
    align-items: center;
    gap: 64px;
  }
  
  
  /*
    El primer espai de la graella queda reservat
    visualment per a la planta.
  */
  
  .hero-tallers__content {
    grid-column: 2;
  
    width: 100%;
    max-width: 610px;
  
    justify-self: end;
  }
  
  
  /* =========================================================
     ETIQUETA SUPERIOR
  ========================================================= */
  
  .hero-tallers .eyebrow {
    margin-bottom: 24px;
  
    padding: 0.55rem 1rem;
  
    border: 1px solid rgba(47, 93, 80, 0.14);
    border-radius: 999px;
  
    background: rgba(252, 251, 248, 0.82);
  
    box-shadow:
      0 6px 18px rgba(24, 37, 33, 0.04);
  
    color: var(--primary);
  
    font-size: 0.82rem;
    font-weight: 600;
  
    letter-spacing: 0.03em;
    text-transform: uppercase;
  
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  
  /* =========================================================
     TÍTOL
  ========================================================= */
  
  .hero-tallers h1 {
    margin: 0 0 22px;
    font-size: clamp(4.8rem, 7vw, 7rem);
    font-weight: 500;  
    line-height: 0.95;
    letter-spacing: -0.045em;
    color: var(--primary-strong);
  }
  
  
  /* =========================================================
     SEPARADOR VERD
  ========================================================= */
  
  .hero-tallers__separator {
    display: block;
  
    width: 52px;
    height: 3px;
  
    margin: 0 0 28px;
  
    border-radius: 999px;
  
    background: linear-gradient(
      90deg,
      #759d3f 0%,
      #91b55b 100%
    );
  }
  
  
  /* =========================================================
     TEXT DESCRIPTIU
  ========================================================= */
  
  .hero-tallers .lead {
    max-width: 610px;
  
    margin: 0;
  
    color: #344941;
  
    font-size: 1.18rem;
    font-weight: 400;
  
    line-height: 1.75;
  
    text-wrap: pretty;
  }
  
  
  /* =========================================================
     ONA INFERIOR
  ========================================================= */
  
  .hero-wave {
    position: absolute;
  
    left: 0;
    right: 0;
    bottom: -1px;
  
    z-index: 3;
  
    width: 100%;
    height: 130px;
  
    overflow: hidden;
  
    pointer-events: none;
  }
  
  .hero-wave svg {
    display: block;
  
    width: 100%;
    height: 100%;
  }
  
  
  /*
    El color ha de coincidir amb el fons
    de la secció posterior.
  */
  
  .hero-wave path {
    fill: var(--bg);
  }
  
  
  /* =========================================================
     ICONA CENTRAL DE L’ONA
  ========================================================= */
  
  .hero-wave__icon {
    position: absolute;
  
    left: 50%;
    bottom: 20px;
  
    width: 36px;
    height: auto;
  
    transform: translateX(-50%);
  
    filter:
      drop-shadow(
        0 4px 8px rgba(47, 93, 80, 0.12)
      );
  }
  
  
  /* =========================================================
     SECCIÓ DE TARGETES
  ========================================================= */
  
  .workshops-section {
    position: relative;
  
    margin-top: -1px;
  
    padding:
      56px
      0
      var(--section-space);
  
    background: var(--bg);
  }
  
  
  /* Capçalera opcional de la secció */
  
  .workshops-section .section-head {
    max-width: 760px;
    margin-bottom: 42px;
  }
  
  
  /* Graella dels tallers */
  
  .workshops-grid {
    display: grid;
  
    grid-template-columns: repeat(3, minmax(0, 1fr));
  
    gap: 28px;
  
    align-items: stretch;
  }
  
  
  /* =========================================================
     TARGETES
  ========================================================= */
  
  .workshop-card {
    position: relative;
    display: flex;
    flex-direction: column; 
    min-height: 440px;
    overflow: hidden;
  
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
  
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.96),
        rgba(248, 246, 241, 0.84)
      );
  
    box-shadow: var(--shadow-md);
  
    transition:
      transform 0.22s ease,
      box-shadow 0.22s ease,
      border-color 0.22s ease;
  }
  
  .workshop-card:hover {
    transform: translateY(-5px);
  
    border-color: var(--border-strong);
  
    box-shadow: var(--shadow-lg);
  }
  
  
  /* Línia decorativa superior */
  
  .workshop-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    
    background: linear-gradient(
      90deg,
      rgba(196, 138, 74, 0),
      rgba(196, 138, 74, 0.5),
      rgba(196, 138, 74, 0)
    );
  }
  
  
  /* Imatge superior de la targeta */
  
  .workshop-card__image {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: var(--primary-soft);
  }
  
  .workshop-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
  }
  
  .workshop-card:hover .workshop-card__image img {
    transform: scale(1.035);
  }
  
  
  /* Contingut */
  
  .workshop-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
  
    padding: 28px;
  }
  
  
  /* Bloc */
  
  .workshop-card__block {
    margin-bottom: 10px;
  
    color: var(--accent);
  
    font-size: 0.78rem;
    font-weight: 700;
  
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  
  
  /* Títol */
  
  .workshop-card h2,
  .workshop-card h3 {
    margin-bottom: 14px;
    color: var(--primary-strong);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.08;
  }
  
  
  /* Descripció */
  
  .workshop-card__description {
    margin-bottom: 22px;
  
    color: var(--text-soft);
  
    font-size: 0.98rem;
    line-height: 1.65;
  }
  
  
  /* =========================================================
   INFORMACIÓ PRÀCTICA DE LA TARGETA
========================================================= */

.workshop-card__details {
  display: grid;
  gap: 14px;

  margin-top: 2px;
  margin-bottom: 26px;
  padding-top: 20px;

  border-top: 1px solid var(--border);
}

.workshop-card__detail {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.workshop-card__detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  border: 1px solid rgba(47, 93, 80, 0.1);
  border-radius: 50%;

  background: rgba(223, 236, 230, 0.55);

  color: var(--primary);
  font-size: 0.9rem;
}

.workshop-card__detail-content {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.workshop-card__detail-label {
  color: var(--text-muted);

  font-size: 0.7rem;
  font-weight: 700;

  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workshop-card__detail-value {
  color: var(--text-soft);

  font-size: 0.91rem;
  font-weight: 500;

  line-height: 1.45;
}
  
  
  /* Peu de targeta */
  
  .workshop-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
    padding-top:20px;
    border-top:1px solid var(--border);
  }
  
  
  /* =========================================================
     ESTATS
  ========================================================= */
  
  .workshop-status {
    display: inline-flex;
  
    align-items: center;
  
    width: fit-content;
  
    min-height: 30px;
  
    padding: 0 12px;
  
    border-radius: 999px;
  
    font-size: 0.76rem;
    font-weight: 650;
  }
  
  
  /* Inscripcions obertes */
  
  .workshop-status--open {
    background: var(--primary-soft);
    color: var(--primary-strong);
  }
  
  
  /* Properament */
  
  .workshop-status--soon {
    background: var(--accent-soft);
    color: #865c2f;
  }
  
  
  /* En preparació */
  
  .workshop-status--preparing {
    background: rgba(124, 139, 134, 0.12);
    color: var(--text-soft);
  }
  
  
  /* Targetes futures una mica més discretes */
  
  .workshop-card--future {
    background:
      linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.83),
        rgba(247, 246, 242, 0.76)
      );
  }
  
  /*
  .workshop-card--future .workshop-card__image img {
    filter:
      saturate(0.55)
      opacity(0.78);
  }*/
  
  
  /* =========================================================
     AJUSTOS PER A PANTALLES D’ESCRIPTORI MÉS ESTRETES
  ========================================================= */
  
  @media (max-width: 1280px) {
    .hero.hero-tallers {
      min-height: 720px;
  
      background-position: 18% top;
    }
  
    .hero-tallers .hero-grid {
      gap: 40px;
    }
  
    .hero-tallers__content {
      max-width: 550px;
    }
  
    .hero-tallers h1 {
      font-size: clamp(4.4rem, 6vw, 6rem);
    }
  
    .hero-tallers .lead {
      font-size: 1.1rem;
    }
  }




  /* =========================================================
   TANCAMENT DE LA PÀGINA TALLERS
========================================================= */

.workshops-closing {
  padding:
      2rem
      0
      clamp(5rem, 8vw, 7rem);

  background: transparent;
}

.workshops-closing__content {
  max-width: 760px;
  margin: 0 auto;
}

.workshops-closing__text {
  margin: 0;

  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-style: italic;
  font-weight: 400;

  line-height: 1.9;
  letter-spacing: 0.01em;

  color: var(--text-soft);

  text-align: left;

  text-wrap: pretty;
}

@media (max-width: 768px) {

  .workshops-closing {
      padding:
          1.5rem
          0
          4.5rem;
  }

  .workshops-closing__text {

      font-size: 1.3rem;

      line-height: 1.8;

      text-align: center;
  }

}






/* =========================================================
   RESPONSIVE — PÀGINA TALLERS
   Afegir al final de tallers.css
========================================================= */


/* =========================================================
   TABLET I PORTÀTILS PETITS — FINS A 1100 px
========================================================= */

@media (max-width: 1100px) {

  /* HERO */

  .hero.hero-tallers {
    min-height: 680px;

    padding:
      calc(78px + 4.5rem)
      0
      8rem;

    background-position: 12% top;
  }

  .hero-tallers .hero-grid {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 36px;
  }

  .hero-tallers__content {
    max-width: 520px;
  }

  .hero-tallers h1 {
    font-size: clamp(4rem, 6vw, 5.4rem);
  }

  .hero-tallers .lead {
    font-size: 1.08rem;
    line-height: 1.7;
  }

  .hero-wave {
    height: 115px;
  }


  /* SECCIÓ DE CARDS */

  .workshops-section {
    padding:
      48px
      0
      80px;
  }

  .workshops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }

  .workshop-card {
    min-height: auto;
  }

  .workshop-card__image {
    height: 180px;
  }


  /* FRASE FINAL */

  .workshops-closing__content {
    width: min(calc(100% - 40px), 760px);
  }

}


/* =========================================================
   TABLET VERTICAL — FINS A 820 px
========================================================= */

@media (max-width: 820px) {

  /* HERO */

  .hero.hero-tallers {
    align-items: flex-end;
    margin-top: -92px;
    min-height: 760px;
    padding: calc(72px + 19rem) 0 7.5rem;
    background-position: 28% top;
  }

  /*
    En pantalles verticals, el degradat passa a protegir
    sobretot la zona inferior on es col·loca el text.
  */

  .hero.hero-tallers::after {
    background:
      linear-gradient(
        180deg,
        rgba(252, 251, 248, 0.02) 0%,
        rgba(252, 251, 248, 0.08) 24%,
        rgba(252, 251, 248, 0.32) 42%,
        rgba(252, 251, 248, 0.78) 60%,
        rgba(252, 251, 248, 0.95) 78%,
        rgba(252, 251, 248, 0.98) 100%
      );
  }

  .hero-tallers .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-tallers__content {
    grid-column: 1;

    width: 100%;
    max-width: 620px;

    justify-self: start;
  }

  .hero-tallers .eyebrow {
    margin-bottom: 18px;
  }

  .hero-tallers h1 {
    margin-bottom: 18px;

    font-size: clamp(3.7rem, 11vw, 4.8rem);
    line-height: 0.98;
  }

  .hero-tallers__separator {
    margin-bottom: 22px;
  }

  .hero-tallers .lead {
    max-width: 580px;

    font-size: 1.05rem;
    line-height: 1.65;
  }

  .hero-wave {
    height: 95px;
  }

  .hero-wave__icon {
    bottom: 14px;
    width: 32px;
  }


  /* CAPÇALERA DE LA SECCIÓ */

  .workshops-section {
    padding:
      42px
      0
      72px;
  }

  .workshops-section .section-head {
    margin-bottom: 34px;
  }


  /* CARDS EN UNA SOLA COLUMNA */

  .workshops-grid {
    grid-template-columns: 1fr;

    width: min(100%, 680px);
    margin: 0 auto;

    gap: 28px;
  }

  .workshop-card {
    min-height: auto;
  }

  /* Identificació del bloc sobre la fotografia */

  .workshop-card::before {
    content: none;
  }
  
  .workshop-card__block {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
  
    display: inline-flex;
    align-items: center;
  
    width: fit-content;
    min-height: 30px;
    margin: 0;
    padding: 0 12px;
  
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
  
    background: rgba(252, 251, 248, 0.9);
  
    box-shadow:
      0 6px 18px rgba(24, 37, 33, 0.12);
  
    color: var(--accent);
  
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
  
    letter-spacing: 0.08em;
    text-transform: uppercase;
  
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

/* En mòbil ja no cal repetir "Bloc 1" sota la fotografia */



  .workshop-card__image {
    height: 210px;
  }

  .workshop-card__body {
    padding: 24px 26px 26px;
  }

  .workshop-card h2,
  .workshop-card h3 {
    font-size: 1.85rem;
  }


  /* INFORMACIÓ PRÀCTICA */

  .workshop-card__details {
    gap: 13px;

    margin-bottom: 24px;
    padding-top: 18px;
  }


  /* FRASE FINAL */

  .workshops-closing {
    padding:
      1.5rem
      0
      4.5rem;
  }

  .workshops-closing__content {
    width: min(calc(100% - 40px), 680px);
  }

  .workshops-closing__text {
    padding-left: 0;

    font-size: 1.4rem;
    line-height: 1.75;

    text-align: left;
  }

}


/* =========================================================
   MÒBIL — FINS A 600 px
========================================================= */

@media (max-width: 600px) {

  /* HERO */

  .hero.hero-tallers {
    margin-top: -88px;

    min-height: 620px;

    padding:
      calc(72px + 10rem)
      0
      5.5rem;

    background-position: 30% center;
  }

  .hero-tallers .hero-grid {
    width: min(calc(100% - 32px), var(--container));
  }

  .hero-tallers__content {
    max-width: none;
  }

  .hero-tallers .eyebrow {
    margin-bottom: 14px;
    padding: 0.45rem 0.85rem;
    font-size: 0.75rem;
  }

  .hero-tallers h1 {
    margin-bottom: 14px;

    font-size: clamp(3.25rem, 15vw, 4rem);
    letter-spacing: -0.04em;
  }

  .hero-tallers__separator {
    width: 44px;
    margin-bottom: 18px;
  }

  .hero-tallers .lead {
    max-width: 34rem;

    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-wave {
    height: 0px;
  }

  .hero-wave__icon {
    bottom: 9px;
    width: 28px;
  }


  /* SECCIÓ DE CARDS */

  .workshops-section {
    padding:
      36px
      0
      62px;
  }

  .workshops-section .section-head {
    margin-bottom: 30px;
  }

  .workshops-section .section-head h2 {
    font-size: clamp(1.8rem, 9vw, 2.3rem);
  }

  .workshops-section .section-head p {
    font-size: 1rem;
  }

  .workshops-grid {
    gap: 24px;
  }


  /* CARDS */

  .workshop-card {
    min-height: auto;
    border-radius: 20px;
  }

  .workshop-card__image {
    height: 185px;
  }

  .workshop-card__body {
    padding: 22px 22px 24px;
  }

  .workshop-card__block {
    margin-bottom: 8px;
    font-size: 0.73rem;
  }

  .workshop-card h2,
  .workshop-card h3 {
    margin-bottom: 12px;

    font-size: 1.65rem;
    line-height: 1.12;
  }

  .workshop-card__description {
    margin-bottom: 19px;

    font-size: 0.95rem;
    line-height: 1.6;
  }


  /* INFORMACIÓ PRÀCTICA */

  .workshop-card__details {
    gap: 12px;

    margin-top: 0;
    margin-bottom: 22px;
    padding-top: 17px;
  }

  .workshop-card__detail {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 11px;
  }

  .workshop-card__detail-icon {
    width: 32px;
    height: 32px;

    font-size: 0.84rem;
  }

  .workshop-card__detail-label {
    font-size: 0.66rem;
  }

  .workshop-card__detail-value {
    font-size: 0.88rem;
    line-height: 1.4;
  }


  /* PEU I ESTAT */

  .workshop-card__footer {
    gap: 12px;

    padding-top: 17px;
  }

  .workshop-status {
    min-height: 29px;

    padding: 0 11px;

    font-size: 0.72rem;
  }


  /* SEPARADOR ORNAMENTAL */

  .ornamental-divider {
    gap: 14px;
    margin: 28px auto;
  }

  .ornamental-divider .line {
    width: 82px;
  }

  .divider-logo {
    width: 32px;
    height: 32px;
  }


  /* FRASE FINAL */

  .workshops-closing {
    padding:
      1rem
      0
      4rem;
  }

  .workshops-closing__content {
    width: min(calc(100% - 36px), 520px);
  }

  .workshops-closing__text {
    font-size: 1.3rem;
    line-height: 1.7;

    text-align: left;
  }

}


/* =========================================================
   MÒBIL PETIT — FINS A 420 px
========================================================= */

@media (max-width: 420px) {

  /* HERO */

  .hero.hero-tallers {
    min-height: 590px;

    padding:
      calc(72px + 8.5rem)
      0
      0rem;

    background-position: 0% center;
  }

  .hero-tallers h1 {
    font-size: clamp(3rem, 16vw, 3.6rem);
  }

  .hero-tallers .lead {
    font-size: 0.96rem;
    line-height: 1.55;
  }


  /* CARDS */

  .workshops-section {
    padding-top: 32px;
  }

  .workshop-card__image {
    height: 165px;
  }

  .workshop-card__body {
    padding:
      21px
      19px
      22px;
  }

  .workshop-card h2,
  .workshop-card h3 {
    font-size: 1.52rem;
  }

  .workshop-card__description {
    font-size: 0.92rem;
  }

  .workshop-card__detail {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
  }

  .workshop-card__detail-icon {
    width: 30px;
    height: 30px;
  }

  .workshop-card__detail-value {
    font-size: 0.85rem;
  }


  /* SEPARADOR */

  .ornamental-divider .line {
    width: 64px;
  }


  /* FRASE FINAL */

  .workshops-closing__content {
    width: min(calc(100% - 30px), 440px);
  }

  .workshops-closing__text {
    font-size: 1.22rem;
    line-height: 1.68;
  }

}


/* =========================================================
   DISPOSITIUS TÀCTILS
   Evita moviments de hover que no aporten res al tacte.
========================================================= */

@media (hover: none) {

  .workshop-card:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow-md);
  }

  .workshop-card:hover .workshop-card__image img {
    transform: none;
  }

}