@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@300;400;500;600&display=swap');
:root {
  /* BRAND COLORS */
  --color-primary: #ff5b00;     /* Taronja del logo */
  --color-secondary: #2a4e6e;   /* Blau serenor */
  --color-tertiary: #4f8a83;    /* Verd equilibri */
  --color-accent: #ffd66b;      /* Groc accent */

  /* NEUTRALS – LIGHT */
  --neutral-100: #ffffff;       /* Blanc pur */
  --neutral-200: #f4f4f4;       /* Gris molt clar */
  --neutral-300: #e6e6e6;       /* Gris suau */

  /* NEUTRALS – MEDIUM */
  --neutral-600: #6b6b6b;       /* Text secundari */
  --neutral-700: #4a4a4a;       /* Text primari */

  /* NEUTRALS – DARK */
  --neutral-900: #1f1f1f;       /* Antracita */
  --radius: 14px;
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 10px 32px rgba(0,0,0,0.16);

  --border: 1px solid #e6e6e6;

  --transition: 0.35s ease;
  --transition-button: background 0.2s, transform 0.1s, box-shadow 0.2s;

  --error: #ff2e2e;
  --success: #00b347;
}

/* HEADINGS */
h1, h2, h3, h4, h5, h6 {
  width: 100%;
    font-family: "Playfair Display", serif;
  color: var(--neutral-900);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* H1 — més petit i més airejat */
h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  line-height: clamp(2.2rem, 6vw, 3.2rem);

}

/* H2 — elegant i prim */
h2 {
  color: var(--color-primary);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: clamp(1.9rem, 4.5vw, 2.8rem);
}

/* H3 — mida mitjana, molt llegible */
h3 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: clamp(1.6rem, 4vw, 2.2rem);
  color:var(--color-primary);

}

/* H4 — subtítols petits */
h4 {

  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom:0;
  color:var(--neutral-900);

}

/* H5 — encara més discret */
h5 {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 0;
   color:var(--neutral-900);




}

/* H6 — petit i net */
h6 {
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  line-height: clamp(1.25rem, 2.2vw, 1.6rem);
   color:var(--neutral-900);
}


/* BODY TEXT — més petit i estilitzat */
p {
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: clamp(1.35rem, 1.6vw, 1.6rem);
}

/* text petit i notes */
.small {
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  line-height: clamp(1.1rem, 1.3vw, 1.4rem);
}


/* FIGCAPTION — estil editorial */
figcaption {
  font-size: clamp(0.8rem, 0.9vw, 0.9rem);
  line-height: clamp(1.1rem, 1.4vw, 1.4rem);
  opacity: 0.85;
  margin-top: clamp(0.4rem, 0.8vw, 0.7rem);
}


/* ENLLAÇOS — més petits i nets */



a {
  position: relative;
  color: var(--neutral-900);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s ease;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.25s ease;
}

a:hover {
  transform: translateY(-2px);
}


a:hover::after {
  width: 100%;
}



/* EMPHASIS */
em {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  line-height: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 200;
}
em a{
  font-weight: 200;
}
/* dins un paràgraf */
p strong,
p em {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 600;
}
p strong{
color:var(--color-primary);


}

/* enllaços amb énfasi */
a strong,
a em {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}
a strong:hover,
a em:hover {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}


/* LLISTES */
ul li {
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: clamp(1.3rem, 1.7vw, 1.6rem);
  list-style: none;
  margin-bottom: clamp(0.35rem, 0.8vw, 0.6rem);
}
.llista-minuscules ul {
  list-style: none;
  counter-reset: lletres;
}

.llista-minuscules ul li {
  counter-increment: lletres;
  margin-bottom: 0.6rem;
  padding-left: 2rem;
  position: relative;
}

.llista-minuscules ul li::before {
  content: counter(lletres, lower-alpha) ")";
  position: absolute;
  left: 0;
  font-weight: 600;
}
.llista-nombres ul {
  list-style: none;
  counter-reset: comptador;
  padding: 0;
  margin: 0;
}

.llista-nombres ul li {
  counter-increment: comptador;
  margin-bottom: 1.2rem;
  padding-left: 3rem;
  position: relative;
  transition: color 0.3s ease;
}

/* Número minimalista */
.llista-nombres ul li::before {
  content: counter(comptador);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0.9;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Línia fina que apareix en hover */
.llista-nombres ul li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0%;
  height: 2px;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
  opacity: 0.4;
}

/* Interacció minimalista */
.llista-nombres ul li:hover::before {
  transform: translateX(4px);
  opacity: 1;
}

.llista-nombres ul li:hover::after {
  width: 2rem;
}






/* ADDRESS */
address {
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  line-height: clamp(1.25rem, 1.6vw, 1.6rem);
  font-style: normal;
  font-weight: 600;
  opacity: 0.9;
}

footer address{
  font-weight: 400;
}




/* estructura */
/**************/

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

body {
  width: 100%;
  padding: 0;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 100;
  font-size: 62.5%;
   -webkit-font-smoothing: antialiased;/* El text es veu més fi, més elegant, més “imprès”.
És especialment útil quan utilitzes tipografies editorials com Playfair Display, perquè ajuda a suavitzar els serifs i millora molt la lectura.*/
}
/* HEADER */
header {
    width: 100%;
    max-height: 100px;
    margin: 0;           
    padding: clamp(1.2rem, 3vw, 2.2rem) clamp(1.5rem, 4vw, 3rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
}




/* BOTÓ MENÚ */
.menu-toggle {
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 9999; /* IMPORTANT perquè no quedi sota el menú */
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: #111; /* Assegura que es veu */
    transition: 0.3s ease;
    display: block;
}

/* ANIMACIÓ A "X" */
.menu-toggle.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* MENÚ LATERAL */
.side-menu {
      position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 619px;
    height: 100vh;
    background-color:var(--neutral-100);
    padding: clamp(2rem, 5vw, 3rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2rem);
    transition: right 0.35s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.08);
    z-index: 9998;
        
}

.side-menu.open {
    right: 0;
}

/* LLISTA */
.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(1.2rem, 3vw, 1.8rem);
  
}

.side-menu a {
    text-decoration: none;
    color: #111;
    padding:5px 10px;
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 500;
    font-variant: small-caps;

}/* Estat actiu del menú */

/* DESKTOP */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .side-menu {
        position: static;
        height: auto;
        width: auto;
        background: none;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        right: 0;
    }

    .side-menu ul {
        flex-direction: row;
        gap: clamp(1.2rem, 3vw, 2.5rem);
    }

    .side-menu a {
        font-size: clamp(1rem, 1.8vw, 1.15rem);
    }
}



main{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  color: inherit;
}



.contenidor-space-between {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
}
.section{
  display: flex;
  flex-flow: row wrap;
}

section{
  margin:4% auto;

}
footer section{
  margin:0 auto;
}
footer{
  width: 100%;
  margin:0;
  padding:0;
  background-color: var(--neutral-200);
}
.footer {
  color:var(--neutral-100);
  width: 100%;
  min-height: 50px;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;     /* Centra horitzontalment */
  align-items: center;         /* Centra verticalment */
  text-align: center;          /* Centra el text */
  padding: 0;
  margin:0;
  background-color: var(--color-tertiary);
}
.footer a{
  color:var(--neutral-100);
}

.mida-contenidor{
    width: 100%;
  max-width: 1200px;
}

.fons-neutre{
  background-color:var(--neutral-200);
}
.fons-groc{
  background-color: var(--color-accent);
}


/* estils icones i idiomes */

.idiomes,
.contact-icons {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 0.8rem; /* separació entre icones */
  padding: 0;
  margin: 0;
}


i, .idiomes a{
  margin-top:15px;
  width: 50px;
  height:auto;
  padding:10px;
  background-color: var(--neutral-200);
  text-align: center;
}


/* mides dels contenidors */
/* base comuna per a tots els contenidors */

[class^="mida"] {
  padding: clamp(1.4rem, 2vw, 2.6rem);
  margin-bottom: clamp(1rem, 2vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.8rem, 1.6vw, 1.4rem);
   /*min-width: clamp(220px, 40vw, 360px);*/
}


/* amplades individuals */
.mida100 { width: 100%; }
.mida085 { width: 85%; }
.mida080 { width: 80%; }
.mida075 { width: 75%; }
.mida070 { width: 70%; }
.mida066 { width: 66%; }
.mida060 { width: 60%; }
.mida055 { width: 55%; }
.mida050 { width: 50%; }
.mida045 { width: 45%; }
.mida040 { width: 40%; }
.mida033 { width: 33%; }
.mida025 { width: 25%; }
.mida020 { width: 20%; }
.mida012 { width: 12%; }
.mida008 { width: 8%; }

.fons-verd{
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: 
    background-color 0.35s ease,
    color 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* Efecte elegant en hover */
.fons-verd:hover {
  background-color: var(--color-tertiary);
  color: var(--neutral-100);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Text blanc en hover */
.fons-verd:hover h4,
.fons-verd:hover p {
  color: var(--neutral-100);
  transition: color 0.35s ease;
}
/* Efecte glow subtil i premium */
.fons-verd::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(255, 214, 107, 0.25),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.fons-verd:hover::after {
  opacity: 1;
}


@media (max-width: 768px) {
  [class^="mida"] {
    width: 100% !important;
    min-width: 100%;
  }
}

/*imatges i vídeos*/

img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

video{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

figure {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
 

}
.ombra{
  box-shadow: rgba(17, 17, 26, 0.05) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
}

.foto-rotativa {
    width: 100%;
    margin:0 auto;
    height: auto;
    overflow: hidden;
  
}

.foto-rotativa img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: opacity 0.6s ease;
    opacity: 1;
}

.foto-rotativa img.fade {
    opacity: 0.50;
      border: 1px solid var(--color-primary);
 box-shadow: var(--shadow-soft);
}
#fotoActual{
  margin:0 auto;
}


/* LOGO */
.logo img{
  max-width: 150px;
  height:auto;

}

/* FORMULARI */

#contactForm{
  width: 100%;
  padding:5%;
  border-radius: var(--radius);
  border: var(--border);
}

.form-group{
display: flex;
flex-direction: column;

margin-top:2%;
padding:1%;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--neutral-300);
  transition: border-color 0.2s, box-shadow 0.2s;
        
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: clamp(1.35rem, 1.6vw, 1.6rem);
}


input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(74,111,165,0.15);
}

textarea{
  min-height: 120px;
  resize: vertical;

}
label{
  color:var(--neutral-900);
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: clamp(1.35rem, 1.6vw, 1.6rem);
  font-weight:400;
}
::placeholder{
  color: var(--neutral-600);
}
.checkbox-group{
  display:flex;
  align-items: flex-start;
  gap:0.5rem;
}

.checkbox-group label{
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  line-height: clamp(1.1rem, 1.3vw, 1.4rem);
}

.error-message{
  display:none;
  margin-top: 0.30rem;
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  line-height: clamp(1.1rem, 1.3vw, 1.4rem); 
  color: var(--error);
}
.success-message, 
.server-message{
  margin-top: 0.80rem;
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
  line-height: clamp(1.1rem, 1.3vw, 1.4rem);
  padding:1%;
  border-radius:var(--radius);
}

.success-message{
  background-color: var(--neutral-200);
  color:var(--success);
  border: var(--border);
}

.server-message{
  display: none;
}

.server-message.error{
  background-color: var(--neutral-100);
  color:var(--error);
  border: var(--border);
}

.server-message.success{
  background-color: var(--neutral-300);
  color: var(--success);
  border:var(--border);
}

.btn-row{
  display:flex;
  justify-content: flex-end;
  margin-top:3%;
}
button[type="submit"]{
  background-color: var(--color-tertiary);
  color:var(--neutral-100);
  border:none;
  padding:2% 3%;
  border-radius:var(--border);
    font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: clamp(1.35rem, 1.6vw, 1.6rem);
  font-weight: 600;
  cursor:pointer;
  display:inline-flex;
  align-items: center;
  gap:0.4rem;
  transition: var(--transition-button);

}

button[type="submit"]:hover{
  color:var(--neutral-100);
  background-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
}
button[type="submit"]:active{
  background-color: var(--color-secondary);
  transform:translateY(1px);
  box-shadow: var(--shadow-soft);
}

button[disabled] {
opacity:0.7;
cursor: not-allowed;
box-shadow: none;
}




/*******************/
/* marcar la pàgina*/
.side-menu a.active {
    border-top: 2px solid var(--color-tertiary);
    font-weight: 600;
}

.side-menu a.active::after {
    width: 100%;
}



/* estils per als errors */
#formMessage {
  margin-top: 15px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
}

#formMessage.ok {
  background-color: #d4f8e3;
  color: #0f6b3d;
  border: 1px solid #8be0b0;
}

#formMessage.error {
  background-color: #ffe0e0;
  color: #a30000;
  border: 1px solid #ff8a8a;
}
