/*
Theme Name: David Daura
Theme URI: https://www.daurapenal.com
Author: David Oliveras
Version: 2026
*/

/******************************************
* RESET                         
******************************************/
* {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
}

:root {
  --colornegre: #1a1a1a;
  --color1: #151006;
  --color2: #605c51;
  --color3: #a88651;
  --colorfooter: #f4efe6;
  --colorblanc: #fafafa;
  --colorvermell: #df000c;
  --colorverd: #008000;
  --font1: 'EB Garamond', serif;
  --font2: 'Signal', serif;
}

html {
  font-size: clamp(16px, 0.3vw + 15.5px, 17.5px);
  /*scroll-behavior: smooth;*/
}

:focus,
* {
  outline: none;
}

::-moz-selection {
  background-color: var(--colornegre);
  color: var(--colorblanc);
}

::selection {
  background-color: var(--colornegre);
  color: var(--colorblanc);
}

::placeholder {
  color: var(--colornegre);
  opacity: 0.6;
}

::-ms-input-placeholder {
  color: var(--colornegre);
}

html,
body,
div,
span,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
pre,
abbr,
address,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
samp,
small,
strong,
sub,
sup,
var,
b,
i,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
summary,
time,
mark,
audio,
video {
  outline: 0;
  font-weight: normal;
  vertical-align: baseline;
  background: transparent;
}

article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section,
code {
  display: block;
  zoom: 1;
}

a {
  vertical-align: baseline;
}

img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

input,
select {
  vertical-align: middle;
}

/******************************************
* GENERALS                      
******************************************/
p {
  margin-bottom: 2rem;
}

p:last-of-type {
  margin-bottom: 0;
}

p+h1,
p+h2,
p+h3,
p+img,
p+div {
  margin-top: 2.5rem;
}

a:link {
  color: var(--color3);
  transition: all 0.5s ease;
  font-size: 100%;
  text-decoration: none;
}

a:visited {
  color: var(--color3);
}

a:active {
  color: var(--color3);
}

a:hover,
a:focus {
  color: var(--color3);
}

h1 {
  text-align: center;
  font-family: var(--font1);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 3rem;
}

h3 {
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  line-height: 1.4;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

h4 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.6rem;
  margin-bottom: 0;
}

input,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  filter: none;
}

select::-ms-expand {
  display: none;
}

button::-moz-focus-inner {
  border: 0;
}

strong {
  font-weight: 700;
  font-size: 100%;
}

i,
em,
span {
  font-size: 100%;
}

iframe {
  width: auto;
  max-width: 100%;
  display: block;
  border: 0;
  margin: 4rem auto;
  aspect-ratio: 16 / 9;
}

/******************************************
* GRID                       
******************************************/
body {
  display: grid;
  grid-template-columns: 100%;
  grid-template-areas: "header" "content" "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  background-color: var(--colorblanc);
  color: var(--colornegre);
  font-family: var(--font2);
  line-height: 1.5rem;
  font-weight: 400;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/******************************************
* HEADER                        
******************************************/
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  padding: 3rem 4rem 2rem 4rem;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  z-index: 100;
  transition: all 0.6s ease;
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(
   to bottom,
   rgba(255, 255, 255, 0.9) 0%,
   rgba(255, 255, 255, 0.5) 60%,
   rgba(255, 255, 255, 0.15) 85%,
   transparent 100%
   );
}

.home header {
  position: fixed;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  background-color: transparent;
}

.home header.shrink {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

header .logo {
  display: block;
  text-align: left;
  color: var(--colornegre);
  font-family: var(--font1);
  font-size: 1.4rem;
  line-height: 1.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

header .logo span {
  display: block;
  color: var(--colorvermell);
  font-family: var(--font2);
  font-size: 1rem;
  line-height: 20px;
  letter-spacing: 0.3px;
  text-transform: none;
  font-weight: 400;
}

header.shrink .logo {
  color: var(--colornegre);
}

header .header-menu {
  display: grid;
  align-self: center;
  text-align: right;
}

header nav {
  justify-self: end;
}

/* idiomes */

.idiomes {
  position: fixed;
  top: 0.5rem;
  right: 3rem;
  display: flex;
  gap: 0;
  align-items: center;
  z-index: 1000;
}

.idiomes img {
  width: 1.2rem;
  height: auto;
  transition: all 0.5s ease;
  margin: 1rem 1rem 1rem 0;
}

/* ==========================================================================
   MENÚ PRINCIPAL
   ========================================================================== */

header .menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0;
}

header .menu li {
  list-style: none;
  margin: 0 0 0 5rem;
}

header .menu ul {
  display: none;
}

/* Estils base dels enllaços (Normal i Shrink) */
:is(header, header.shrink) .menu li a:link,
:is(header, header.shrink) .menu li a:visited,
:is(header, header.shrink) .menu li a:active {
  color: var(--colornegre);
  font-family: var(--font2);
  font-size: 1rem;
  line-height: 1rem;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 5px;
}

/* Efectes Hover i Focus */
:is(header, header.shrink) .menu li a:hover,
:is(header, header.shrink) .menu li a:focus {
  border-bottom: 1px solid var(--colorvermell);
}

/* Pàgina activa o ancestres (Comportament natiu de WordPress) */
:is(header, header.shrink) .menu :is(.current-menu-item, .current-post-ancestor) a {
  border-bottom: 1px solid var(--colorvermell) !important;
}

/* ==========================================================================
   EXCEPCIÓ: FILTRE PER A L'ÀNCORA DE SERVEIS (TOTS ELS IDIOMES)
   ========================================================================== */

/* 1. Anul·lem el subratllat automàtic de WP a la Home per a qualsevol idioma */
:is(header, header.shrink) .menu .current-menu-item a[href*="#linkserveis"] {
  border-bottom: 0px transparent !important;
}

/* 2. Forcem que el Hover continuï funcionant a l'enllaç de serveis */
:is(header, header.shrink) .menu a[href*="#linkserveis"]:hover {
  border-bottom: 1px solid var(--colorvermell) !important;
}

/* 3. Activem el subratllat NOMÉS quan l'àncora #linkserveis estigui activa a la URL */
body:has(#linkserveis:target) :is(header, header.shrink) .menu a[href*="#linkserveis"] {
  border-bottom: 1px solid var(--colorvermell) !important;
}

/******************************************
* CONTINGUT                     
******************************************/

/* Capçalera */

.hero {
  width: 100%;
  margin-top: 145px;
  margin-bottom: 3.8rem;
  display: grid;
  grid-template-columns: 40% 60%;
  font-family: var(--font1);
}

.hero-image {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 30vh;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-title {
  width: 100%;
  height: 100%;
  background: linear-gradient(111deg, #161412 0%, #090807 100%);
  text-align: left;
  color: var(--colorblanc);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

/*.page .hero-title {
  background: linear-gradient(111deg, rgb(21, 16, 6), rgb(133, 103, 58));
}*/

.hero-title div {
  border-left: 5px solid var(--colorblanc);
  padding-left: 2rem;
}

.hero-title h1 {
  text-align: left;
  margin: 0;
}

.hero-title span, .hero-title time {
  font-family: var(--font2);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* Detall */

.content {
  grid-area: content;
  width: 100%;
  margin: 0 auto;
  animation: fadein 1s;
}

@keyframes fadein {from {opacity:0;} to {opacity:1;}}

.detall {
  width: calc(100% - 4rem);
  max-width: 60rem;
  margin: 0 auto;
}

/*
.detall a {
  text-decoration: none;
  border-bottom: 1px solid var(--color3);
  padding-bottom: 1px;
}
*/

.entrada {
  text-align: left;
  width: 100%;
  margin: 0 auto 4rem auto;
}

.entrada_2columnes {
  column-count: 2;
  column-fill: balance;
  column-gap: 4rem;
  column-rule: 1px solid #ddd;
}

.entrada_2columnes p {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.entrada ul {
  margin: 2rem;
}

.entrada li {
  margin: 0 0 0.5rem 1rem;
  list-style: none;
}

.entrada li:last-child {
  margin-bottom: 0;
}

.entrada li:before {
  content: "• ";
  font-weight: 600;
  padding-right: 0;
  margin-left: -1.2rem;
}

.entrada blockquote {
  margin: 2rem;
  padding: 1.1rem 0.8rem 0.8rem 0.8rem;
}

.entrada blockquote:before {
  content: "\201C";
  font-size: 3rem;
  line-height: 0.1rem;
  margin-right: 0.5rem;
  vertical-align: -0.9rem;
  font-weight: 400;
}

.entrada blockquote p {
  display: inline;
  font-style: italic;
  font-weight: 600;
}

.entrada img,
.entrada div > img {
  margin: 4rem auto;
}

.entrada .wp-caption {
  max-width: 100%;
  height: auto;
  width: 100% !important;
  margin: 4rem 0 3rem 0;
  overflow: hidden;
}

.entrada .wp-caption img {
  margin: 0 auto !important;
}

.entrada .wp-caption p.wp-caption-text {
  font-size: 1rem;
  line-height: 1.2rem;
  text-align: center;
  display: block;
  width: auto;
  font-style: italic;
  margin: 0.8rem 0 0 0;
}

/** FOTO TEXT HOME */
.portada {
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  line-height: 1.4;
  text-align: left;
}

.portada a {
  display: block;
  text-decoration: none;
  border: 0;
}

.portada-image {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  height: calc(100vh);
  overflow: hidden;
  background-color: var(--colornegre);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 4rem;
}

.portada-image > div {
  position: absolute;
  left: 10%;
  top: 25%;
  text-align: left;
  color: var(--colorblanc);
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 1);
}

.portada-image > div h1, 
.portada-image > div h2, 
.portada-image > div p {
  animation: entradeta-logo 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;    
}

.portada-image > div .far {
  margin-top: 5rem;
  margin-left: 40%;
  font-size: 4rem;
  animation: batec 1.5s ease-in-out infinite both;
}

.portada-image h1 {
  color: var(--colorblanc);
  text-align: left;
  margin-bottom: 0;
  font-size: clamp(2.5rem, 5vw, 6rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.portada-image h2 {
  color: var(--colorvermell);
  text-align: left;
  margin-bottom: 0;
  font-size: clamp(2rem, 3.6vw, 4.25rem);
  line-height: 1.05;
}

.portada-image p {
  margin-top: 1rem;
  color: var(--colorblanc);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
}

.portada-image span {
  font-weight: 700;
}

.cta {
  text-align: center;
  display: table !important;
  column-span: all;
  margin: 4rem auto 0 auto;
  background-color: var(--colorvermell);
  color: var(--colorblanc) !important;
  padding: 1rem 1.2rem !important;
  border-radius: 4px;
}

.cta:hover {
  background-color: var(--colornegre);
}


@keyframes batec {
  from {
    transform: scale(1);
    transform-origin: center center;
    animation-timing-function: ease-out;
  }
  10% {
    transform: scale(0.91);
    animation-timing-function: ease-in;
  }
  17% {
    transform: scale(0.98);
    animation-timing-function: ease-out;
  }
  33% {
    transform: scale(0.87);
    animation-timing-function: ease-in;
  }
  45% {
    transform: scale(1);
    animation-timing-function: ease-out;
  }
}

@keyframes entradeta-logo {
  0% {
    transform: translateY(-1000px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* BIO */
.bio {
  position: relative;
  display: grid;
  grid-template-columns: 100%;
  padding: 0;
}

.bio .far {
  position: absolute;
  left: 50%;
  bottom: -2rem;
  transform: translateX(-50%);
  background-color: var(--color1);
  color: var(--colorblanc);
  padding: 1rem;
  font-size: 1.6rem;
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  font-weight: 100;
}

.bio-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: right top;
  background-repeat: no-repeat;
  aspect-ratio: 16 / 9;
  border-radius: 5px 5px 0 0;
}

.bio-content {
  padding: 3rem;
  background: linear-gradient(135deg, #1c1c1c 0%, #0c0c0c 50%, #000000 100%);
  border-radius: 0 0 5px 5px;
}

.bio-content div {
  column-count: 2;
  column-fill: balance;
  column-gap: 2rem;
}

/*
.bio h3 {
  position: relative;
  padding-top: 1rem; 
}

.bio h3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 25%;
  height: 3px;
  background-color: var(--colorblanc);
}
*/

.bio h3 {
  font-weight: 700 !important;
  margin: 0 auto 3rem auto;
  text-align: center;
  width: 80%;
}

.bio p {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
}

.bio h3,
.bio p,
.bio div {
  color: var(--colorblanc);
  font-family: var(--font2);
  font-weight: 400;
}

/** SERVEIS */
.serveis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  border-bottom: 5px solid var(--color3);
  padding-bottom: 4rem;
  text-align: center;
  margin-top: 5.5rem;
}

.serveis > h3 {
  font-family: var(--font1);
  font-style: italic;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  grid-column: 1 / -1;
  font-weight: 400;
}

.serveis > div > p {
  font-size: 0.9rem;
  line-height: 1.1rem;
}

.serveis > div {
  padding: 2rem;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 8px;
  color: var(--colorblanc);
  transition: all 0.3s ease;
  background: var(--colornegre);
}

.serveis > div.animacio {
  opacity: 0;
  transition: all 0.4s ease-out !important;
  transform: translate3d(0, 2em, 0);
  backface-visibility: hidden;
}

.serveis > div.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.serveis > div > h4 {
  margin-bottom: 1rem;
}

article#linkserveis {
  scroll-margin-top: 185px !important;
}

.serveis > div:nth-of-type(1) { background: var(--color1); }
.serveis > div:nth-of-type(2) { background: var(--colorvermell); }
.serveis > div:nth-of-type(3) { background: var(--colorblanc); color: var(--color1); border: 1px solid var(--color1); }
.serveis > div:nth-of-type(4) { background: var(--color2); }
.serveis > div:nth-of-type(5) { background: var(--color1); }
.serveis > div:nth-of-type(6) { background: var(--color3); }
.serveis > div:nth-of-type(7) { background: var(--colorblanc); color: var(--color1); border: 1px solid var(--color1); }
.serveis > div:nth-of-type(8) { background: var(--color2); }
.serveis > div:nth-of-type(9) { background: var(--colorvermell); }

/** BLOG */

.titol-blog > h3 {
  text-align: center;
  margin-bottom: 4rem;
  font-family: var(--font1);
  font-style: italic;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  font-weight: 400;
}

.titol-blog .categoria-descripcio {
  display: none;  
}

.titol-blog .categoria-descripcio p, .sense-resultats {
  text-align: center !important;
  max-width: 70%;
  margin: 0 auto 0 auto;
}

.archive .titol-blog .categoria-descripcio {
  display: block;
  grid-column: 1 / -1;
  margin-bottom: 2rem;
}

.llistat-blog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 4rem;
  gap: 2rem;
}

.llistat-blog a {
  color: var(--colornegre);
  border: 0;
}

.blog-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 1rem;
  background-size: cover;
}

.llistat-blog h4 {
  margin-bottom: 1rem;
}

.llistat-blog h4, 
.llistat-blog p, .llistat-blog time {
  text-align: left;
}

.llistat-blog p, .llistat-blog time {
  font-size: 0.9rem;
  line-height: 1.1rem;
}

.llistat-blog time {
  color: var(--color3);
  margin: 0 0 0.5rem 0;
  display: block;
}

.postsblog {  
  border-bottom: 5px solid var(--color3);
  padding-bottom: 4rem;   
}

/** CERCADOR */

.cercador {
    margin: 3rem auto 3.9rem auto;
    display: flex;
    justify-content: center;
}

.cercador .search-form {
    display: flex;
    width: 100%;
    max-width: 450px;
}

.cercador .search-field {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--colornegre);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.cercador .search-submit {
    padding: 10px 15px;
    background-color: var(--colornegre);
    color: var(--colorblanc);
    border: 1px solid var(--colornegre);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cercador .search-submit:hover {
    background-color: #555;
}

.sense-resultats {
    text-align: center;
    padding: 0;
    font-size: 1.1rem;
    color: var(--color2);
    width: 100%;
    line-height: 1.6;
}
.home .sense-resultats {
    margin-top: 3.5rem !important;
}

/******************************************
* PAGINADOR                     
******************************************/
.paginacio {
  margin-top: 4rem;
  display: flex;
  justify-content: center;
  align-items: center; 
  gap: 0.5rem;
  flex-wrap: wrap;
}

.paginacio .page-numbers {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid var(--color2);
  color: var(--colornegre);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Efecte en passar-hi el ratolí per sobre (Hover) */
.paginacio a.page-numbers:hover {
  background-color: var(--colornegre);
  border-color: var(--colornegre);
  color: var(--colorblanc);
}

/* Estil per a la pàgina actual (activa) */
.paginacio .page-numbers.current {
  background-color: var(--colorvermell);
  border-color: var(--colorvermell);
  color: var(--colorblanc);
  cursor: default;
}

/* Estil per als punts suspensius (...) */
.paginacio span.page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

/******************************************
* FORMULARI                     
******************************************/
.contactar {
  align-items: normal !important;
}

.wpcf7 {
  margin: 4rem 0 0 0;
  width: 100%;
  text-align: left;
}

.wpcf7 form { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 2rem;
  max-width: 80%;
  margin: 0 auto;
  border-top: 5px solid var(--color3);
  padding-top: 4rem;
}

.wpcf7 form > * {
  grid-column: 1 / -1;
}

/* Només els dos primers <p> ocupen una columna cadascun */
.wpcf7 form > p:nth-of-type(1),
.wpcf7 form > p:nth-of-type(2) {
  grid-column: auto;
}

.wpcf7 h2 {
 text-align: center;
}

.wpcf7 p {
  margin-left: 0;
  margin-right: 0;
}

.wpcf7 p:last-child {
  text-align: left;
}

.wpcf7 input {
  font-family: var(--font2);
  font-size: 1rem;
  width: 100%;
  border: 1px solid var(--colornegre);
  border-radius: 4px;
  background-color: transparent;
  margin-top: 1rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.wpcf7 textarea {
  font-family: var(--font2);
  font-size: 1rem;
  width: 100%;
  height: 10em;
  border: 1px solid var(--colornegre);
  border-radius: 4px;
  overflow: auto;
  background-color: transparent;
  margin-top: 1rem;
  padding: 0.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  resize: none;
}

.wpcf7 .cf-turnstile {
  width: 320px;
  max-width: 100%;
  margin: 1rem 0 1.5rem 0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit !important;
  -webkit-box-shadow: 0 0 0 0 transparent inset;
  transition: background-color 5000s ease-in-out 0s;
}

span.wpcf7-list-item {
  margin: 0 0 0 0 !important;
}

p.acceptar {
  text-align: left !important;
  margin-top: -0.6rem;
  margin-bottom: 0;
}

p.acceptar label {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 1rem;
  align-items: start;
}

.wpcf7 input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  margin: 0;
  background-color: transparent;
  border: 1px solid var(--colornegre);
  position: relative;
}

.wpcf7 input[type="checkbox"]:checked:after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Font Awesome 5 Pro';
  content: "\f00c";
  color: var(--colornegre);
  font-size: 90%;
  font-weight: 700;
}

.wpcf7-list-item-label {
  font-size: 0.8rem;
  line-height: 1rem;
}

.wpcf7-form ul {
  margin: 1rem 0 1.6rem 2rem !important;
  padding-left: 0;
}

.wpcf7-form li {
  font-size: 0.8rem;
  line-height: 1.2rem;
  text-align: left !important;
  margin-bottom: 0.5rem;
  list-style-position: outside;
}

.wpcf7-form li:before {
  margin-left: -14px !important;
}

.wpcf7 input[type="submit"] {
  cursor: pointer;
  padding: 0.6rem 1.2rem;
  background-color: var(--colorvermell);
  border: 0;
  border-radius: 4px;
  color: var(--colorblanc);
  appearance: none;
  -webkit-appearance: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: auto;
  text-align: center;
  height: auto;
  margin-bottom: 0;
}

.wpcf7 input[type="submit"]:hover {
  background-color: var(--colornegre);
}

.wpcf7 .wpcf7-submit:disabled {
  opacity: 0.5;
}

.wpcf7 .wpcf7-submit:disabled:hover {
  background-color: var(--colorvermell);
}

.wpcf7 .wpcf7-spinner {
  top: 15px !important;
  background-color: var(--colorvermell) !important;
  opacity: 1 !important;
}

.wpcf7-not-valid-tip {
  display: none !important;
}

.wpcf7-response-output {
  margin: 1rem 0 1.8rem 0 !important;
  padding: 0.5rem !important;
  border-radius: 4px;
  text-align: center;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
  border: 1px solid var(--colorvermell) !important;
  background-color: var(--colorvermell);
  color: var(--colorblanc);
}

.wpcf7 form.sent .wpcf7-response-output {
  border: 1px solid var(--colornegre) !important;
  background-color: var(--colornegre) !important;
  color: var(--colorblanc);
}

/******************************************
* FOOTER                        
******************************************/
footer {
  position: relative;
  overflow: hidden;
  grid-area: footer;
  display: grid;
  grid-gap: 4rem;
  grid-template-columns: auto 1fr;
  width: 100%;
  background-color: var(--colorfooter);
  padding: 4rem;
  margin-top: 4rem;
  font-size: 0.8rem;
  line-height: 1.2rem;
}

footer a:link {
  color: var(--colornegre);
  transition: all 0.5s ease;
  font-size: 100%;
  text-decoration: none;
}

footer a:visited {
  color: var(--colornegre);
}

footer a:active {
  color: var(--colornegre);
}

footer a:hover,
footer a:focus {
  color: var(--colorvermell);
}

.copy {
  display: none;
}

/* ==========================================================================
   MENU FOOTER
   ========================================================================== */

footer nav {
  display: grid;
  align-items: start;
  justify-content: end;
}

footer .menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  text-align: right;
  margin: 0;
  justify-content: flex-end;
}

footer .menu li {
  list-style: none;
  margin: 0 0 0 3rem;
}

/* Estils base dels enllaços */
footer .menu li a:link,
footer .menu li a:visited,
footer .menu li a:active {
  color: var(--colornegre);
  font-family: var(--font2);
  font-size: 0.8rem;
  line-height: 0.8rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 5px;
}

footer .menu li a:hover,
footer .menu li a:focus {
  border-bottom: 1px solid var(--colorvermell);
}

footer .menu ul {
  display: none;
}

/* Elements actius de WordPress */
footer .menu :is(.current-menu-item, .current-post-ancestor, .current-menu-parent, .current-post-parent) a {
  border-bottom: 1px solid var(--colorvermell) !important;
}

/* ==========================================================================
   EXCEPCIONS: LINKEDIN I ÀNCORA DE SERVEIS
   ========================================================================== */

/* 1. Icona de LinkedIn */
footer .fa-linkedin {
  font-size: 1.2rem !important;
  line-height: 0.8 !important;
}

/* Simplificat: Qualsevol estat de l'enllaç que contingui LinkedIn NO tindrà vora */
footer .menu li a:has(.fa-linkedin) {
  border-bottom: 0px transparent !important;
}

/* 2. Filtre per a l'àncora de Serveis al Footer (evita que quedi subratllat permanent) */
footer .menu .current-menu-item a[href*="#linkserveis"] {
  border-bottom: 0px transparent !important;
}
footer .menu .current-menu-item a[href*="#linkserveis"]:hover {
  border-bottom: 1px solid var(--colorvermell) !important;
}
body:has(#linkserveis:target) footer .menu .current-menu-item a[href*="#linkserveis"] {
  border-bottom: 1px solid var(--colorvermell) !important;
}

/******************************************
* MEDIA QUERIES                        
******************************************/

@media only screen and (max-width: 1100px) {
    
  html {
    font-size: 15px;
  }

  header {
    grid-template-columns: 1fr;
    padding: 2rem 2rem;
    grid-gap: 1rem;
  }   

  header .logo,
  header.shrink .logo {
    margin: 0;
    text-align: left;
  }   

  header nav {
    width: 100%;
    justify-self: left;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
  } 

  header nav::-webkit-scrollbar {
    display: none;
  }

  header .menu {
    flex-wrap: nowrap;
    justify-content: left;
  }

  .idiomes {
    top: 1.3rem;
    right: 1rem;      
  }   

  header .menu li {
    margin: 0 1.5rem 0 0;
  }
    
  header .menu li a {
    font-weight: bold;
  }
    
  .content {
    width: 100%;
    padding: 0;
  }

  .detall {
    width: calc(100% - 4rem);
    max-width: inherit;
  }
    
  .hero {
    grid-template-columns: 100%;
    margin-top: 150px;  
  }
    
  .hero-img {
    height: 25vh;      
  }
    
  .hero-title {
    min-height: 15vh;      
  }
    
  .serveis, 
  .llistat-blog {
    grid-gap: 1rem;
  }
    
  .serveis > div, 
  .llistat-blog > div {
    padding: 1rem;
  }
    
  .llistat-blog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
  }

  .bio h3 {
    width: 100%;  
  }

  footer {
    padding: 4rem 2rem; 
  }
    
}

@media only screen and (max-width: 768px) {
    
  h1, h2, h3, h4 {
    text-align: center;
  }
    
  .portada-image > div .far {
    margin-top: 2rem;
    margin-left: 30%;
    font-size: 3rem;
  }

  .entrada {
    text-align: left;
  }
    
  .entrada_2columnes, .bio-content div {
   column-count: 1;
  }

  .entrada img,
  .entrada div > img,
  .entrada .wp-caption {
    width: 100vw !important;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .bio {
    width: calc(100% + 4rem);
    margin-left: -2rem;
  }
    
  .bio-content {      
    padding: 3rem 2rem;
    border-radius: 0;
  }

  .bio-image {
    border-radius: 0;
  }

  .serveis {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  } 

  .serveis > div {
    aspect-ratio: inherit;
    justify-content: center;
    min-height: 10rem;
  }
    
  .llistat-blog > div {
    aspect-ratio: 16 / 9;
  }

  .llistat-blog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  } 
    
  .titol-blog .categoria-descripcio p, .sense-resultats {
   max-width: 100%;
  }

  .wpcf7 form {
   max-width: 100%;
   grid-template-columns: 100%;
  }
    
  footer {
    grid-gap: 1rem;
    padding: 2rem;
    grid-template-columns: 1fr;
    text-align: center;
  }

  footer > div {
    order: 2;
  } 

  footer nav {
    justify-content: center;
    order: 1;
  }

  footer .menu {
    text-align: center;
  }

  footer .menu li {
    margin: 0 0.5rem 0 0.5rem;
  }

  footer .menu li a:link,
  footer .menu li a:visited,
  footer .menu li a:active {
    color: var(--colornegre);
    font-family: var(--font2);
  }
    
}

@media only screen and (max-width: 480px) {
    
 h1 {
    font-size: 2rem;
    line-height: 2.2rem;
  }
    
  header, 
  header.shrink {
    padding: 1rem 2rem;
    grid-gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.9);
  }

  .idiomes {
    right: 1.5rem;
    top: 0.8rem;
  }
  
  .idiomes img {
    margin: 0.5rem;
   }

  .portada-image {
    background-position: 54% center;  
  }

  .portada h1 {
    text-align: left;
    margin-bottom: 0;
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .portada h2 {
    text-align: left;
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.05;
  }

  .go-entradeta {
    pointer-events: none;
    cursor: default;
  }

  .portada-image {
    background-position: calc(50% + 15px) top;
    height: calc(50vh);
  }

  .portada-image > div {
    left: 2rem;
    top: 15%;
  }

  .portada-image > div .far {
    display: none;
  }

  .hero {
    margin-top: 112px;
  }
    
  .hero-image {
    height: 20vh;
    min-height: inherit;
  }
    
  .llistat-blog p {
    display: none;
  }

  .llistat-blog h4 {
    font-size: 1rem;
    line-height: 1.2rem;
    margin-bottom: 0;
  }
  .paginacio span.page-numbers.dots {
    display: none;      
  }
    
  article#linkserveis {
    scroll-margin-top: 130px !important;
  }
    
  .wpcf7 form { 
   padding-bottom: 1rem;      
    }
    
  iframe {
    width: 100vw !important;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    height: auto;
  }
  .page iframe {
    aspect-ratio: 1 / 1;    
  }

  footer {
    margin-top: 1rem;
  }

}