/* === Font === */
@font-face {
  font-family: 'Mont';
  src: url('Fonts/Montserrat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* === Cos principal === */
body {
  font-family: 'Montserrat', 'Mont', sans-serif;
  text-align: center;
  background: #dceeff;
  color: #351717;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  animation: fadeSlideIn 0.8s ease-out;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Títol === */
h1 {
  font-weight: 700;
  font-size: 2.1rem;
  color: #0078d7;
  letter-spacing: 0.4px;
  margin: 1.5em 0 0.8em;
  position: relative;
  display: inline-block;
  text-align: center;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

h1::after {
  content: "";
  display: block;
  width: 55%;
  margin: 0.4em auto 0;
  height: 3px;
  background: linear-gradient(90deg, #0078d7, #00a8ff);
  border-radius: 3px;
  opacity: 0.6;
}

/* === Formulari === */
.form {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #e3e9ef;
  padding: 2.2em;
  border-radius: 1em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  width: 90%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}


label {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.3em;
  text-align: center;
  width: 80%;
}

input, select {
  display: block;
  margin: 0.5em auto 1em;
  padding: 0.6em;
  width: 75%;
  border-radius: 0.5em;
  border: 1px solid #ccc;
  text-align: center;
  font-size: 1em;
}

button {
  padding: 0.8em 1.5em;
  background: #0078D7;
  color: white;
  border: none;
  border-radius: 0.5em;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,120,215,0.15);
}
button:hover {
  background: #1d7bbe;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,120,215,0.3);
}

/* === Fases === */
.fase-obligatoria,
.fase-opcional {
  color: #004b8d;
  font-weight: 600;
  font-size: 1.1rem;
  margin-top:0.4em;
  margin-bottom: 0.8em;
  text-align: center;
  position: relative;
}
.fase-obligatoria::after,
.fase-opcional::after {
  content: "";
  display: block;
  width: 60%;
  margin: 0.4em auto;
  height: 2px;
  background: #0078d7;
  border-radius: 1px;
  opacity: 0.25;
}

/* === Opcional === */
.optional {
  border: 1px solid #ddd;
  padding: 1em;
  border-radius: 0.5em;
  background: #fafafa;
  margin-bottom: 1em;
  width: 85%;
  text-align: center;
}

/* === Resultat === */
.result-box {
  margin-top: 1.5em;
  padding: 1.5em 1em 2em;
  background: #fff;
  border-radius: 1em;
  display: inline-block;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  animation: fadeIn 0.8s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.nota {
  font-size: 1.5em;
  font-weight: bold;
  color: #222;
}

.progress-container {
  width: 80%;
  background: #e5e5e5;
  border-radius: 1em;
  margin: 0.5em auto 1em;
  height: 18px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: #0078d7;
  width: 0;
  border-radius: 1em;
  transition: width 1s ease-in-out;
}

/* === FOOTER === */
footer {
  width: 100%;
  background: linear-gradient(180deg, #f3f8ff 0%, #dceeff 100%);
  border-top: 1px solid #b7d3f5;
  padding: 2.5em 0;
  margin-top: 5em;
  text-align: center;
  color: #333;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
  width: 100%;
  padding: 0 1.2rem;
}

.copyright {
  font-size: 0.9em;
  color: #444;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
}

.footer-link {
  color: #0078d7;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: #005bb5;
  text-decoration: underline;
}

/* Xarxes socials */
.social-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6em;
}

.social-section h4 {
  font-size: 1em;
  font-weight: 600;
  color: #004b8d;
  margin: 0.4em 0 0.3em;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9em;
  flex-wrap: wrap;
}

.social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: white;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0.9;
  transition: all 0.3s ease;
  vertical-align: middle;
}

a[aria-label*="Twitter"] .social-icon:hover { background: #1da1f2; transform: translateY(-2px); opacity: 1; }
a[aria-label*="WhatsApp"] .social-icon:hover { background: #25d366; transform: translateY(-2px); opacity: 1; }
a[aria-label*="Instagram"] .social-icon:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  transform: translateY(-2px);
  opacity: 1;
}

/* === Responsive === */
@media (max-width: 768px) {
  h1 { font-size: 1.4em; margin: 1.2em 0; }
  .form { width: 92%; padding: 1.5em; }
  input, select, button { width: 100%; max-width: 280px; }
  .optional { width: 100%; }
  footer { padding: 2em 1em; }
  .footer-content { max-width: 340px; gap: 1em; }
  .copyright { font-size: 0.8em; }
}


/* ===== ESTIL PER A LES PÀGINES LEGALS ===== */
body.legal-page {
  background: #dceeff;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 3em 1em;
  color: #222;
}

.legal-container {
  max-width: 800px;
  margin: 3em auto;
  background: #ffffff;
  padding: 2.5em 2.8em;
  border-radius: 1em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: left;
  line-height: 1.7;
}

/* Títol principal */
.legal-container h1 {
  color: #0078d7;
  margin-bottom: 1em;
  font-size: 1.6rem;
  font-weight: 700;
  text-align: left;
  position: relative;
}

.legal-container h1::after {
  content: "";
  display: block;
  width: 80px;
  height: 2.5px;
  background: #0078d7;
  margin-top: 0.4em;
  border-radius: 2px;
}

/* Subtítols */
.legal-container h2 {
  color: #004b8d;
  margin-top: 1.8em;
  margin-bottom: 0.5em;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Paràgrafs */
.legal-container p {
  color: #333;
  margin-bottom: 1em;
  font-size: 1em;
}

/* Enllaç de retorn */
.legal-container a.footer-link {
  display: inline-block;
  margin-top: 1.5em;
  color: #0078d7;
  text-decoration: none;
  font-weight: 500;
}

.legal-container a.footer-link:hover {
  text-decoration: underline;
}

/* Responsiu per mòbils */
@media (max-width: 600px) {
  .legal-container {
    padding: 2em 1.2em;
    border-radius: 0.8em;
  }
}
/* ===== INTRODUCCIÓ ALS RECURSOS ===== */

.resources-intro {
  max-width: 650px;
  margin: 3em auto 1em;
  text-align: center;
  padding: 0 1em;
}

.resources-intro p {
  font-size: 1rem;
  color: #333;
  line-height: 1.6;
  opacity: 0.9;
}


/* ===== TARGETES DE RECURSOS ===== */

.resources {
  margin: 2em auto 3.5em;
  text-align: center;
}

.resources h2 {
  font-size: 1.5rem;
  color: #004b8d;
  margin-bottom: 1em;
  font-weight: 600;
}

.resource-grid {
  display: flex;
  gap: 1.2em;
  justify-content: center;
  flex-wrap: wrap;
}

.resource-card {
  background: white;
  border-radius: 1em;
  padding: 1.3em 1.5em;
  width: 260px;
  text-decoration: none;
  color: #333;
  border: 1px solid #e3e9ef;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  transition: all 0.25s ease;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

.resource-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4em;
  color: #0078d7;
}

.resource-card p {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 600px) {
  .resource-card {
    width: 90%;
  }

  .resources-intro {
    margin-top: 2em;
  }
}

.intro-text {
  max-width: 750px;
  margin: 1.5em auto 2.2em;
  padding: 0 1em;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #333;
  opacity: 0.95;
}
.links-legals {
  white-space: nowrap;
}
