/* EnCantem · Mòbil compacte i fidel al disseny d'escriptori.
   S'aplica DESPRÉS de tots els estils de secció per evitar regles contradictòries. */
@media (max-width: 760px) {
  html,body{max-width:100%;overflow-x:clip}
  main{min-width:0}
  .topbar{min-height:72px;gap:10px;padding:12px 5%}
  .topbar .logo{width:clamp(116px,32vw,145px);flex:0 0 auto}
  .topbar .logo img{display:block;width:100%;height:auto}
  .topbar #menubtn{flex:none;width:44px;height:44px;min-width:44px;display:grid;place-items:center;z-index:40}
  body:has(.inner-page) .topbar{min-height:89px}
  body:has(.inner-page) .topbar::after{left:30%;right:16%;height:51px;opacity:.64}
  .topbar nav,body:has(.inner-page) .topbar nav{top:100%;width:100%;left:0;right:0;z-index:41}
  .topbar nav a{min-height:46px;display:flex;align-items:center}
  .hero{height:clamp(445px,125vw,510px)!important;min-height:0;background-position:63% center}
  .hero-content{width:90%;padding:113px 0 91px!important;max-width:100%}
  .hero h1{font-size:clamp(32px,8.5vw,43px)!important;line-height:1.08;letter-spacing:-.025em;max-width:370px;overflow-wrap:break-word}
  .hero h1 .title-line-underlined{white-space:normal!important;overflow-wrap:normal}
  .hero p{font-size:14px;line-height:1.47;max-width:320px;margin:11px 0 14px}
  .hero .btn.light{min-height:44px;padding:11px 18px;font-size:14px}
  .hero-bottom{bottom:44px!important;font-size:12px;padding:0 6%}
  .section{margin:0 auto;padding-left:5%;padding-right:5%}
  .section-categories{padding-top:21px!important;padding-bottom:25px!important}
  .section-title{align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:13px}
  .section-title h2{font-size:clamp(22px,5.8vw,27px)}
  .section-title a{min-height:38px}
  /* Cinc il·lustracions, ara en només dues files menudes. */
  .categories,
  .inner-page .categories,
  .section-categories .categories{
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;margin:0;
  }
  .category,
  .section-categories .category,
  .inner-page .category,
  .category:last-child,
  .section-categories .category:last-child,
  .inner-page .category:last-child{
    grid-column:auto;min-width:0;min-height:0!important;height:clamp(91px,26vw,116px);
    padding:7px 5px 8px;gap:2px;border-radius:12px;
    align-items:center;justify-content:flex-end;
    box-shadow:0 5px 12px rgba(47,28,49,.11);
  }
  .category .category-art{inset:0}
  .category .category-name{
    text-align:center;margin:0 auto;font-size:clamp(12px,3.4vw,15px);
    line-height:1.06;letter-spacing:-.015em;
    overflow-wrap:anywhere;
    text-shadow:0 1px 7px rgba(14,9,19,.85);
  }
  .category .arrow{
    margin:3px auto 0;width:22px;height:22px;min-width:22px;
    font-size:12px;line-height:1;
  }
  .category:hover{transform:none}
  .section-songs{padding-top:9px!important;padding-bottom:26px}
  .section-songs .latest-title{padding-bottom:0!important;min-height:0;align-items:baseline}
  .section-songs .latest-title a{font-size:12px}
  .video-gallery.cards{grid-template-columns:1fr;gap:13px}
  .video-gallery .video-song-card.song-card{max-width:none;border-radius:14px}
  .video-gallery .video-poster.poster{aspect-ratio:16/9;max-height:250px}
  .video-gallery .song-info{padding:12px 15px 15px}
  .video-gallery .song-card h3{font-size:clamp(19px,5.3vw,23px);margin-bottom:5px}
  .video-gallery .video-description{font-size:13px;line-height:1.42;min-height:0;margin:0 0 10px}
  .video-gallery .video-status{padding:8px 11px;font-size:10px;letter-spacing:.07em}
  .video-gallery .video-play{width:48px;height:48px}
  .video-gallery .video-play-triangle{border-top-width:8px;border-bottom-width:8px;border-left-width:13px}
  .video-gallery .encantem-lock img{width:57px!important}
  .closing-band{min-height:0}
  .quote-banner{padding:30px 6% 16px}
  .quote-banner p{font-size:clamp(21px,5.5vw,28px)}
  .subscribe{margin:0 5% 24px;padding:22px 17px}
  .subscribe h2{font-size:clamp(23px,6vw,28px)}
  .subscribe form{max-width:100%}
  .subscribe input[type=email]{font-size:16px;min-width:0}
  .footer{padding:27px 5% 30px}
  .footer p{font-size:12px;line-height:1.65}
  /* Catàleg i pàgines informatives. */
  .inner-page:not(.song-article-sheet):not(.admin){width:100%;padding:113px 5% 43px;max-width:100%}
  .inner-page:not(.song-article-sheet):not(.admin)>h1{font-size:clamp(30px,8vw,40px);margin:0 0 13px}
  .inner-page:not(.song-article-sheet):not(.admin)>p{font-size:14px;line-height:1.6}
  .inner-page:not(.song-article-sheet):not(.admin)>h2{font-size:24px;margin:23px 0 13px}
  .inner-page .section-title{margin-top:24px}
  .inner-page .categories{margin:12px 0 23px}
  /* Fitxa tipus pergamí: marges reals, vídeo a tota l'amplària i lletres apilades. */
  .song-article-sheet.inner-page.detail{
    box-sizing:border-box;width:calc(100% - 28px);max-width:none;
    margin:0 auto;padding:115px 0 30px;
  }
  .song-article-sheet .article-sheet{
    box-sizing:border-box;min-width:0;padding:29px 19px 29px;
    border-radius:20px;
    background-size:44px 55px,44px 55px,cover,auto;
    background-position:right 15px top 15px,left 15px bottom 15px,center,center;
  }
  .song-article-sheet .article-sheet::before{inset:8px;border-radius:14px}
  .song-article-sheet .article-sheet::after{inset:13px;border-radius:11px}
  .song-article-sheet .detail-back{font-size:12px;margin-bottom:14px}
  .song-article-sheet .article-intro-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:17px;align-items:stretch}
  .song-article-sheet .article-intro h1{font-size:clamp(30px,8vw,41px);line-height:1.1;margin:9px 0 7px}
  .song-article-sheet .article-film{font-size:18px;margin-bottom:11px}
  .song-article-sheet .article-live-tag{padding:7px 11px;font-size:10px}
  .song-article-sheet .article-lead{margin-top:13px;font-size:15px;line-height:1.65}
  .song-article-sheet .article-video-column{width:100%;min-width:0}
  .song-article-sheet .article-video{width:100%;aspect-ratio:16/9;border-width:3px;border-radius:12px}
  .song-article-sheet .article-section{margin:29px 0 0;padding-bottom:14px}
  .song-article-sheet .article-section-heading{gap:5px;margin:-12px auto 14px}
  .song-article-sheet .article-section-heading::before,
  .song-article-sheet .article-section-heading::after{width:clamp(8px,5vw,20px)}
  .song-article-sheet .article-section-heading h2{font-size:clamp(21px,5.8vw,27px);line-height:1.23;padding:0 4px}
  .song-article-sheet .article-lyrics-grid{grid-template-columns:1fr;gap:13px}
  .song-article-sheet .article-lyrics-heading{padding:10px 13px}
  .song-article-sheet .article-lyrics h3{font-size:17px}
  .song-article-sheet .article-lyric-copy{padding:14px 15px;font-size:15px;line-height:1.68}
  .song-article-sheet .article-story{padding:5px 4px}
  .song-article-sheet .article-story .article-copy{font-size:15px;line-height:1.7}
  .song-article-sheet .article-credit-card{padding:14px;gap:12px}
  .song-article-sheet .article-credit-card .article-copy{font-size:14px}
  .song-article-sheet .article-bottom{padding:22px 0 0}
  .song-article-sheet .article-bottom h2{font-size:24px}
  .song-article-sheet .article-return{min-height:44px}
  body:has(.song-article-sheet){background-attachment:scroll,scroll,scroll,scroll,scroll;background-size:72px 100%,72px 100%,cover,cover,cover}
  /* Formularis públics. */
  input[type=email],input[type=text],textarea,select{max-width:100%}
  button,a,input,select,textarea{touch-action:manipulation}
}
@media (max-width: 380px) {
  .category,.section-categories .category,.inner-page .category{height:87px}
  .category .category-name{font-size:11px}
  .category .arrow{width:19px;height:19px;min-width:19px}
  .hero{height:445px!important}
  .hero h1{font-size:31px!important}
  .section-title h2{font-size:22px}
  .song-article-sheet.inner-page.detail{width:calc(100% - 20px)}
  .song-article-sheet .article-sheet{padding:27px 16px}
}
@media (min-width: 761px) and (max-width: 1000px){
  /* Tauletes: encara es veuen totes les categories sense targetes gegants. */
  .categories{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}
  .category,.category:last-child{min-height:130px}
  .category .category-name{font-size:14px}
  .video-gallery.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .song-article-sheet .article-intro-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px}
}
@media (prefers-reduced-motion:reduce){
  .category,.category .category-art,.video-gallery .video-song-card{transition:none}
}

/* Cinc categories en una única fila en telèfons (sense desplaçament horitzontal). */
@media(max-width:760px){
  .categories,
  .inner-page .categories,
  .section-categories .categories{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:clamp(4px,1.3vw,8px);
    width:100%;
  }
  .category,
  .section-categories .category,
  .inner-page .category,
  .category:last-child,
  .section-categories .category:last-child,
  .inner-page .category:last-child{
    grid-column:auto;
    height:clamp(78px,22vw,102px);
    min-height:0!important;
    border-radius:9px;
    padding:5px 2px 7px;
  }
  .category .category-name{
    font-size:clamp(9px,2.55vw,12px);
    letter-spacing:-.025em;
    line-height:1.08;
    max-width:100%;
    word-break:normal;
    overflow-wrap:anywhere;
  }
  .category .arrow{
    width:18px;height:18px;min-width:18px;
    font-size:11px;margin:3px auto 0;
  }
  .inner-page .categories{margin:12px 0 23px}
}
@media(max-width:380px){
  .category,.section-categories .category,.inner-page .category{
    height:76px;
  }
  .category .category-name{font-size:9px}
  .category .arrow{width:17px;height:17px;min-width:17px}
}

/* Ajust fi d'escriptori: categories una mica més discretes.
   No modifica ni el mòbil ni la resta de la portada. */
@media(min-width:1001px){
  .section-categories{padding-top:24px;padding-bottom:23px}
  .section-categories .categories{
    max-width:1100px;
    margin-left:auto;
    margin-right:auto;
    gap:12px;
  }
  .section-categories .category{
    min-height:130px;
    height:130px;
    padding:10px 8px 10px;
    border-radius:15px;
  }
  .section-categories .category .category-name{font-size:16px}
  .section-categories .category .arrow{
    width:24px;height:24px;
    margin-top:7px;
  }
}
