/* A prop · portada de comarca polida i premium (03/12/2026).
   Continua el llenguatge de la portada general: menys caixes, més aire, fotografia gran amb cantonades suaus,
   títols de secció grans i bandes de color de la marca (blau per al cercador, groc per als negocis).
   Només afecta la portada de comarca (main.home-page) i es carrega després de white-canvas.css.
   Només variables de la marca i el blanc del llenç; sense degradats ni ombres. */
:root{
  --cp-line:color-mix(in srgb,var(--brand-blue) 22%,transparent);
  --cp-on-blue-line:color-mix(in srgb,var(--brand-cream) 34%,transparent);
  --cp-radius-photo:28px;
  --cp-radius-card:22px;
  --cp-section:clamp(72px,8vw,128px);
}

body:not(#x) main.home-page{
  font-size:18px;

  /* ---------- Primera pantalla: nom de l'edició en gran i la fotografia publicada ---------- */
  .hero{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:32px 56px;align-items:center;margin:28px 0 0;padding:0;border:0;border-radius:0;background:transparent;overflow:visible;min-height:0}
  .hero>*{grid-area:auto}
  .herotext{grid-column:1;grid-row:1;align-self:center;justify-self:stretch;position:static;z-index:auto;max-width:none;margin:0;padding:24px 0;border:0;border-radius:0;background:transparent;box-shadow:none}
  .heroimage{grid-column:2;grid-row:1}
  .herotext .eyebrow{margin:0 0 14px;font-family:var(--font-heading);font-size:clamp(48px,5.2vw,76px);font-weight:400;line-height:.9;text-transform:none;letter-spacing:0;color:var(--brand-blue)}
  .hero .herotext p{display:block;max-width:36ch;margin:22px 0 28px;overflow:visible;-webkit-line-clamp:unset}
  .herotext .hero-link{display:inline-flex;align-items:center;min-height:52px;padding:0 26px;border:0;border-radius:999px;background:var(--brand-yellow);color:var(--brand-blue);font-size:19px;text-decoration:none}
  .herotext .hero-link:is(:hover,:focus-visible){background:var(--brand-blue);color:var(--brand-cream)}
  .hero-territory{display:block;margin-top:18px;font-size:16px}
  .heroimage{position:relative;height:clamp(360px,40vw,560px);margin:0;border-radius:var(--cp-radius-photo);overflow:hidden;background:var(--brand-cream)}
  .heroimage img{display:block;width:100%;height:100%;object-fit:cover}
  .hero-photo-credits{right:14px;bottom:14px;border-radius:12px}
  .hero-gallery-controls button{border-radius:999px}

  /* ---------- Cercador: banda blava arrodonida ---------- */
  .explore-search{margin:40px 0 0;padding:clamp(28px,4vw,56px);border:0;border-radius:36px;background:var(--brand-blue);color:var(--brand-cream)}
  .explore-search .section-mark{border-radius:16px}
  .explore-search :is(input,select){min-height:52px;border:0;border-radius:14px;font-size:17px}
  .explore-search button.solid{min-height:52px;padding:0 28px;border:0;border-radius:999px;background:var(--brand-yellow);color:var(--brand-blue);font-size:18px}
  .explore-search button.solid:is(:hover,:focus-visible){background:var(--brand-cream);color:var(--brand-blue)}

  /* ---------- Capçaleres de secció: sense filets ni caixes ---------- */
  :is(#descobreix,#agenda){margin:var(--cp-section) 0 0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
  .sectionhead{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:18px 20px;margin:0 0 36px;padding:0;border:0}
  .sectionhead>.section-mark{grid-column:1/-1}
  .search-intro .eyebrow{font-size:17px;font-weight:400;text-transform:none;letter-spacing:0}
  .sectionhead h2,.business-title h2{margin:0;font-size:clamp(40px,4.6vw,64px);line-height:.95}
  .sectionhead .eyebrow,.business .eyebrow{margin:0 0 10px;font-size:18px;font-weight:400;text-transform:none;letter-spacing:0}
  .sectionhead .sub{font-size:17px}
  .section-mark{border-radius:16px;color:var(--brand-yellow)}

  /* ---------- Guies: targetes netes amb foto arrodonida ---------- */
  .guide-toolbar{margin-bottom:24px}
  .guide-toolbar input{min-height:48px;border-radius:14px}
  .categories :is(button,a){min-height:44px;padding:0 18px;border-radius:999px}
  #results{gap:28px 24px}
  #results .card{padding:0;border:0;border-radius:var(--cp-radius-card);overflow:hidden}
  #results .card .photo-preview-link:focus-visible{outline-offset:-4px}
  #results .cardphoto{border-radius:0}
  #results .cardphoto img{transition:transform .8s cubic-bezier(.2,.7,.2,1)}
  #results .card .save{border-radius:999px}
  .home-guides-more .outline{display:inline-flex;align-items:center;min-height:52px;padding:0 26px;border:1.5px solid var(--brand-blue);border-radius:999px;font-size:18px;text-decoration:none}
  .home-guides-more .outline:is(:hover,:focus-visible){background:var(--brand-blue);color:var(--page)}

  /* ---------- Agenda: tres plans amb el dia en gran ---------- */
  #agenda-results .home-plans-grid{gap:20px}
  #agenda-results .ephemeral-card.agenda-compact{border:0;border-radius:var(--cp-radius-card);overflow:hidden}
  #agenda-results .agenda-compact .agenda-date-block{border-radius:14px;padding:10px 14px}
  #agenda-results .agenda-date-block strong{font-family:var(--font-heading);font-size:40px;font-weight:400;line-height:.9}
  #agenda-results .agenda-compact .ephemeral-open{border-radius:999px}
  #agenda a.solid{display:inline-flex;align-items:center;min-height:52px;padding:0 26px;border-radius:999px;font-size:18px}

  /* ---------- Negocis: banda groga ---------- */
  .business{margin:var(--cp-section) 0 0;padding:clamp(36px,5vw,72px);border:0;border-radius:40px;background:var(--brand-yellow);color:var(--brand-blue)}
  .business .section-mark{background:var(--brand-blue);color:var(--brand-yellow)}
  .business .rate-cards li{border-color:var(--brand-blue)}
  .business .rate-icon{border-radius:12px}
  .business #commercial{min-height:56px;padding:0 28px;border:0;border-radius:999px;background:var(--brand-blue);color:var(--brand-cream);font-size:19px}
  .business #commercial:is(:hover,:focus-visible){background:var(--brand-cream);color:var(--brand-blue)}

  .editorial-note{margin:48px 0 0;padding:20px 0 0;border-top:1px solid var(--cp-line);font-size:16px}
}

/* Zoom suau de les fotos de les guies, només sense moviment reduït. */
@media (prefers-reduced-motion:no-preference){
  body:not(#x) main.home-page #results .card:is(:hover,:focus-within) .cardphoto img{transform:scale(1.045)}
}

@media (max-width:900px){
  body:not(#x) main.home-page{
    .hero{grid-template-columns:minmax(0,1fr);gap:20px}
    .heroimage{grid-column:1;grid-row:2;height:clamp(240px,56vw,420px)}
  }
}
@media (max-width:550px){
  body:not(#x) main.home-page{
    font-size:17px;
    .hero{margin-top:12px}
    .herotext{padding:8px 0 0}
    .herotext .eyebrow{font-size:clamp(44px,13vw,56px)}
    .hero .herotext p{margin:16px 0 20px}
    .herotext .hero-link{min-height:48px;font-size:17px}
    .heroimage{border-radius:22px}
    .explore-search{margin-top:28px;padding:24px 18px;border-radius:26px}
    .sectionhead{gap:14px;margin-bottom:24px}
    .sectionhead h2,.business-title h2{font-size:clamp(34px,10vw,40px)}
    .business{padding:28px 20px;border-radius:28px}
  }
}

/* Excepcions amb !important: home-layout.css fixa amb !important l’entradeta del hero a 16 px.
   Aquí torna a ser text de lectura (19/17 px). */
body:not(#x) main.home-page .hero .herotext p{font-size:19px!important;line-height:1.5}
@media (max-width:550px){body:not(#x) main.home-page .hero .herotext p{font-size:17px!important}}
/* identity.css també fixa .card h3 a 26/24 px: al tast de guia de la portada, el títol és de targeta compacta (21/19 px). */
body:not(#x) main.home-page #results>.card h3{font-size:21px!important;line-height:1.15!important}
@media (max-width:550px){body:not(#x) main.home-page #results>.card h3{font-size:19px!important}}

/* La portada és un tast: els llistats complets són a cada apartat. */
body:not(#x) main.home-page{
  --cp-section:clamp(28px,4vw,48px);
  .hero{margin-top:16px;gap:18px 36px}
  .herotext{padding:10px 0}
  .herotext .eyebrow{margin-bottom:8px;font-size:clamp(36px,4.7vw,60px)}
  .hero .herotext p{margin:12px 0 16px}
  .heroimage{height:clamp(220px,25vw,330px)}
  .hero-territory{margin-top:10px;font-size:14px}
  .herotext .hero-link{min-height:44px}
  .explore-search{margin-top:24px;padding:clamp(16px,2.4vw,32px);border-radius:24px}
  .explore-search .search-intro{display:flex;flex-direction:row;align-items:center;gap:10px;margin-bottom:10px}
  .explore-search .search-intro h2{font-size:clamp(26px,3vw,40px);margin-top:0}
  .explore-search :is(input,select,button.solid){min-height:44px}
  .search-bottom{margin-top:10px;justify-content:flex-start;flex-wrap:wrap;gap:8px 16px}
  .search-bottom #clear-search:disabled{display:none}
  .search-bottom .town-selected-link{margin:0}
  .search-bottom .town-selected-link[hidden]{display:none}
  #active-filters:empty{display:none}

  .county-home-featured,.county-home-sections{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
  .county-home-featured,.county-home-directory{margin-top:var(--cp-section)}
  .county-home-featured>section,.county-taste{
    min-width:0;margin:0;padding:16px;background:var(--brand-cream);border:0;border-radius:18px;
    overflow-wrap:anywhere;box-shadow:none
  }
  .county-home-featured>:is(#descobreix,#agenda,#municipis){display:flex;flex-direction:column;margin:0;padding:22px;background:var(--brand-cream);border:0;border-radius:var(--cp-radius-card)}
  .county-home-featured :is(#agenda-results,#home-business-results){display:flex;flex-direction:column;flex:1 1 auto;min-width:0}
  .county-home-featured .sectionhead{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:10px;margin-bottom:8px}
  .county-home-featured .section-mark,.business .section-mark{width:36px;height:36px;min-width:36px;border-radius:8px}
  .county-home-featured .section-mark .ap-icon,.business .section-mark .ap-icon{width:22px;height:22px}
  .county-home-featured .sectionhead h2,.business-title h2,.county-home-directory h2{font-size:clamp(25px,2.6vw,34px);line-height:1.05}
  .county-home-featured .sectionhead .eyebrow,.business .eyebrow{font-size:13px;margin:0 0 4px}
  .county-home-featured .sub{font-size:14px;margin:3px 0 0}
  .county-guide-filter{margin:0;color:var(--brand-blue)}
  .county-guide-filter summary{display:list-item;width:fit-content;min-height:44px;padding:11px 0;cursor:pointer;font-size:15px}
  .county-guide-filter .guide-toolbar{display:grid;margin-bottom:10px}
  #results,#agenda-results .home-plans-grid{grid-template-columns:minmax(0,1fr);gap:8px;margin:0}
  #results>.card,.home-business-row{
    display:grid;grid-template-columns:68px minmax(0,1fr);align-items:start;gap:10px;background:var(--page);
    border:0;border-radius:16px;padding:10px;min-width:0
  }
  #results>.card{grid-template-columns:68px minmax(0,1fr) 44px}
  #results>.card>:is(.county-guide-text,.save){margin:0;min-width:0}
  #results>.card .cardphoto,#results>.card .cardphoto :is(.photo-preview-link,.hub-picto),.home-business-row :is(.photo-preview-link,.hub-picto){display:grid;place-items:center;width:68px;height:68px;min-height:0;aspect-ratio:1;border:0;border-radius:12px;overflow:hidden}
  #results>.card .cardphoto,.home-business-row .photo-preview-link{margin:0}
  #results>.card img,.home-business-row img{width:100%;height:100%;object-fit:cover}
  #results>.card :is(h3,.meta),.home-business-row :is(h3,.meta){padding:0;margin:2px 0}
  #results>.card h3,.home-business-row h3{font-size:18px;line-height:1.18}
  #results>.card h3 a{text-decoration:none}
  #results>.card h3 a:is(:hover,:focus-visible){text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}
  #results>.card .meta,.home-business-row .meta{font-size:14px;line-height:1.4}
  #results>.card .save{position:static;width:44px;height:44px;padding:0;box-shadow:none}
  #agenda-results .ephemeral-card.agenda-compact{background:var(--page);border:0;border-radius:16px}
  #agenda-results .ephemeral-card.agenda-compact>summary{min-height:0;height:auto;padding:10px;gap:8px}
  #agenda-results .agenda-compact .agenda-date-block{min-height:34px;padding:5px 9px;border-radius:8px}
  #agenda-results .agenda-date-block strong{font-size:27px}
  #agenda-results .agenda-compact .agenda-row-text{gap:4px}
  #agenda-results .agenda-compact .agenda-row-text .ap-category{display:none}
  .county-home-featured :is(.agenda-home-more,.home-guides-more,.home-business-more){display:flex;justify-content:flex-start;margin:auto 0 0;padding-top:16px}

  .county-home-directory h2{margin-bottom:10px}
  .county-home-sections{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px;list-style:none;padding:0;margin:0}
  .county-taste{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 16px;padding:14px 18px}
  .county-taste>:not(.county-home-cta){grid-column:1}
  .county-taste h3{display:flex;align-items:center;gap:8px;margin:0;font-size:18px;line-height:1.13}
  .county-taste h3 .ap-icon{width:22px;height:22px;flex:none}
  .county-taste-count{flex:0 0 auto;white-space:nowrap;overflow-wrap:normal;font-size:13px;font-family:var(--font-body);font-weight:400}
  .county-taste p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%;font-size:15px;line-height:1.3;margin:0}
  .county-taste-source{display:inline-flex;align-items:center;min-height:24px;font-size:14px;text-decoration:underline}
  .county-taste .county-home-cta{grid-column:2;grid-row:1/span 3;margin:0;white-space:nowrap}
  .county-home-cta{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;max-width:100%;
    min-height:44px;padding:6px 18px;border:1.5px solid var(--brand-blue);border-radius:999px;
    background:transparent;color:var(--brand-blue);font-size:16px;line-height:1.2;text-align:center;text-decoration:none
  }
  .county-home-cta:is(:hover,:focus-visible){background:var(--brand-blue);color:var(--brand-cream)}
  .county-home-cta:focus-visible{outline:2px solid currentColor;outline-offset:-4px}
  .explore-search .county-home-cta{border-color:var(--brand-cream);color:var(--brand-cream);background:transparent}
  .explore-search .county-home-cta:is(:hover,:focus-visible){background:var(--brand-cream);color:var(--brand-blue)}

  .business{margin-top:var(--cp-section);padding:16px clamp(16px,3vw,32px);border-radius:20px}
  .business-title{gap:10px}
  .business p{margin:6px 0}
  .business .rate-cards{margin:8px 0 0}
  .business #commercial{min-height:44px;padding:8px 16px;font-size:16px;white-space:normal}
  .editorial-note{margin-top:20px;padding-top:8px}
  .editorial-note button{min-height:44px}
}
@media (max-width:1090px){
  body:not(#x) main.home-page .county-home-featured .county-home-cta{width:auto}
}
@media (max-width:800px){
  body:not(#x) main.home-page{
    .county-home-featured{grid-template-columns:minmax(0,1fr)}
    .county-home-sections{grid-template-columns:minmax(0,1fr)}
  }
}
@media (max-width:550px){
  body:not(#x) main.home-page{
    .hero{margin-top:8px}
    .herotext{padding:4px 0}
    .heroimage{height:170px;border-radius:16px}
    .explore-search{margin-top:18px}
    .explore-search #explore-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
    #explore-form :is(.search-query,button.solid){grid-column:1/-1}
    #explore-form label,#explore-form label select{min-width:0;width:100%}
    .county-home-featured>:is(#descobreix,#agenda,#municipis){padding:18px}
    /* En mòbil, «Més de la comarca» és una llista d'un sol panell crema: cada fila té el pictograma, el nom, el recompte i el tast,
       i el botó rodó de la dreta obre l'apartat (tota la fila és clicable). El nom accessible del botó no canvia. */
    .county-home-sections{grid-template-columns:minmax(0,1fr);gap:0;padding:4px 18px;background:var(--brand-cream);border-radius:var(--cp-radius-card)}
    .county-taste{position:relative;grid-template-columns:minmax(0,1fr) 44px;gap:4px 14px;padding:14px 0;background:transparent;border:0;border-bottom:1px solid var(--cp-line);border-radius:0}
    .county-taste:last-child{border-bottom:0}
    .county-taste h3{gap:8px;font-size:19px}
    .county-taste-source{position:relative;z-index:1;width:fit-content}
    .county-taste .county-home-cta{width:44px;height:44px;min-height:44px;padding:0;gap:0;font-size:0}
    .county-taste .county-home-cta>span{font-size:20px;line-height:1}
    .county-taste .county-home-cta::after{content:"";position:absolute;inset:0}
    .county-taste:has(.county-home-cta:hover) .county-home-cta{background:var(--brand-blue);color:var(--brand-cream)}
  }
  #app:has(.county-home-featured) .site-footer{
    margin-top:20px;padding:20px 0;
    .wrap{gap:12px 16px}
    .footer-brand{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px}
    .footer-brand p{margin:0}
    .footer-brand p:last-child{flex-basis:100%}
    .footer-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;padding-top:10px}
    .footer-meta :is(a,summary){display:inline-flex;align-items:center;min-height:28px;overflow-wrap:anywhere}
    .footer-meta .photo-credits{grid-column:1/-1}
  }
}
@media (max-width:420px){
  body:not(#x) main.home-page .explore-search #explore-form{grid-template-columns:minmax(0,1fr)}
}
