/* ======= Configuració Global ======= */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: #f0f4f8;
  color: #333;
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ======= Header i Footer ======= */
header, footer {
  background: #281d44;
  color: #ffee00;
  text-align: center;
  padding: 20px;
}

/* ======= Navegació ======= */
nav ul {
  list-style: none;
  text-align: center;
}
nav ul li {
  display: inline;
  margin: 0 15px;
}
nav ul li a {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}
nav ul li a:hover { color: #5100ff; }

/* ======= Secció Inici (Home) ======= */
@keyframes anim {
  0%, 100% { background-color: #5100ff; }
  25%, 75% { background-color: #ae00ff; }
  50% { background-color: #3d044e; }
}
#home {
  animation: anim 10s infinite;
  color: #ffee00;
  text-align: center;
  padding: 190px 20px;
  border-radius: 0 0 50px 50px;
}
#home h1 { font-size: 4em; margin-bottom: 20px; }
#home p { font-size: 1.5em; }
#about h3, h2,
#projects h2,
#contact h3 {
  color: #000b4d;
}


/* ======= Seccions Generals ======= */
section {
  padding: 40px 20px;
  margin: 20px 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ======= Sobre Mi ======= */
#about {
  background-color: #f4f4f9;
  padding: 40px;
  max-width: 1200px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 50px auto;
}
#about p {
  font-size: 1.2em;
  line-height: 1.6;
  color: #333;
  margin-left: 80px; 
}

#about h2 {
  font-size: 1.5em;
  margin-top: 30px;
  font-weight: bold;
  margin-left: 80px; 
}

#about h3 {
  font-size: 1.5em;
  margin-top: 30px;
  text-align: center;
  font-weight: bold;
}

.highlight {
  color: #5100ff; /* Canvia aquest valor pel color que vulguis */
  font-weight: bold; /* Pots afegir un estil extra si vols */
}

.highlight2 {
  color: #ae00ff; /* Canvia aquest valor pel color que vulguis */
  font-weight: bold; /* Pots afegir un estil extra si vols */
}

.highlight3 {
  color: #33004a; /* Canvia aquest valor pel color que vulguis */
  font-weight: bold; /* Pots afegir un estil extra si vols */
  font-size: 1.5em; /* Augmentar el tamany del text */
}


/* ======= Projectes ======= */
#projects {
  flex-wrap: wrap;
  max-width: 1200px;
  align-items: center;
  text-align: center;
  margin: 50px auto;
}
.projecte1 a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #5100ff;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  margin: 10px;
}

.project-content {
  display: none;
}

#projects h2 {
  text-align: center;
}

.project-image {
  border-radius: 15px;
  width: 400px;
  height: 200px;
  margin-left: 180px; 
}

.filter-btn {
  align-items: center;
  max-width: 90px;
  margin: 5px;
  padding: 10px;
  background-color: #5f007c;
  color: rgb(255, 255, 255);
  text-decoration: none;
  border-radius: 5px;
}
.project-btn {
  align-items: center;
  max-width: 250px;
  margin: 5px;
  padding: 10px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
}

.project-content {
  display: none;
  margin-top: 20px;
}

.project-info {
  display: flex;
  align-items: center;
}

.project-image {
  border-radius: 15px;
  width: 330px;
  height: 200px;
}

.project-text p {
  font-size: 16px;
  color: #333;
  max-width: 300px;
  word-wrap: break-word;
  margin-left: 80px; 
  margin-right: 80px;
  color: #000000;
}

.project-buttons-container {
  display: flex;
  flex-direction: column;
}

.project-btn {
  margin: 5px 0;
  padding: 10px;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  width: 40%;
}

.project-btn-2 {
  margin: 5px 0;
  padding: 10px;
  background-color: #5100ff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  width: 100%;
}

.project-buttons {
  margin-bottom: 20px;
}

.project-buttons button {
  padding: 10px;
  margin: 5px;
  background-color: #5100ff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.project-buttons button:hover {
  background-color: #5f007c;
}

.project-btn.active {
  background-color: #5f007c;
}


/* ======= Contacte ======= */
#contact {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ======= Botó Veure Projectes ======= */
.view-projects-btn {
  background-color: #5100ff;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 30px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.view-projects-btn:hover { transform: scale(1.05); }

/* ======= Graella d'Habilitats ======= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.skill-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}
.tech-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

/* ======= Responsivitat ======= */
@media (max-width: 768px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .project { width: 100%; }
}
@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
}

/* Migatge mail*/
.copy-message {
  display: none;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #5100ff;
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  font-size: 16px;
  animation: fadeOut 4s forwards;
}
  
@keyframes fadeOut {
  0% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; display: none; }
}
  