/*
 * Estils per al lloc web de la AELLVA.
 * Definix una paleta de colors sòbria i una maquetació senzilla.
 */
:root {
  --primary: #00407a;
  --accent: #006bb3;
  --light: #f5f5f5;
  --text: #222;
  --error: #b00020;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  /* Fondo global en patró repetit. L’image de patró es troba en assets/pattern.png. */
  background-color: var(--light);
  background-image: url('../assets/pattern.png');
  background-repeat: repeat;
  background-size: auto;
  color: var(--text);
  line-height: 1.6;
}

/* Capçalera */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-header h1 {
  margin: 0;
  font-size: 1.8rem;
}
.site-header .subtitle {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  font-style: italic;
  opacity: 0.9;
}

/* Logotip a la capçalera */
.site-header .logo {
  max-width: 280px;
  height: auto;
  margin-bottom: 0.5rem;
}

/* Contenidor central per al contingut de la pàgina. */
.content-container {
  background: rgba(255, 255, 255, 0.96);
  padding: 2rem 1.5rem;
  margin: 2rem auto;
  max-width: 900px;
  border-radius: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Enllaç superior a l'inici en la pàgina de privacitat */
.top-link {
  margin: 0 0 1rem;
  text-align: right;
}
.top-link a {
  color: var(--primary);
  text-decoration: underline;
  font-size: 0.9rem;
}
.top-link a:hover {
  color: var(--accent);
}

/* Pestanyes de navegació */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  background: var(--light);
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}
.tablink {
  padding: 0.5rem 1rem;
  border: none;
  background: var(--light);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background 0.2s, color 0.2s;
}
.tablink:hover {
  background: #e7eef6;
}
.tablink.active {
  background: var(--primary);
  color: #fff;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tab-content {
  margin-bottom: 2rem;
}
.tab-content[hidden] {
  display: none;
}

/* Llista d'arguments */
.arguments {
  list-style-type: disc;
  padding-left: 1.5rem;
}
.arguments li {
  margin: 0.4rem 0;
}

/* Formularis */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 500px;
}
.form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 0.9rem;
}
.form input,
.form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  font-size: 1rem;
}
.form-actions {
  margin-top: 0.5rem;
}
.form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}
.form button:hover {
  background: var(--accent);
}

.error-message {
  color: var(--error);
  font-size: 0.85rem;
  min-height: 1rem;
}

/* Enllaços de descàrrega i peu de pàgina */
.download-link {
  color: var(--primary);
  text-decoration: underline;
  margin-bottom: 1rem;
  display: inline-block;
}
.download-link:hover {
  color: var(--accent);
}
.site-footer {
  background: var(--light);
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid #ddd;
  font-size: 0.85rem;
}
.site-footer a {
  color: var(--primary);
  text-decoration: underline;
}
.site-footer a:hover {
  color: var(--accent);
}

/* Estils per a la pàgina de confirmació de PDF */
.confirm-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.confirm-message {
  text-align: center;
  margin-bottom: 1.5rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn {
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
}
.btn:hover {
  background: var(--accent);
}
.btn.secondary {
  background: #444;
}

.instructions {
  max-width: 700px;
  margin: 0 auto;
}
.instructions h3 {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}
.instructions ol,
.instructions ul {
  margin-left: 1.5rem;
}
.instructions li {
  margin-bottom: 0.5rem;
}

/* Estils adicionals per a la pàgina de confirmació */
.copy-text {
  background: #f5f5f5;
  padding: 0.5rem;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Llista de direccions en la confirmació */
.address-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.5rem;
}

.address-list li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.schedule {
  color: #666;
  font-size: 0.875rem;
}

.note {
  font-size: 0.875rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
}

.faq {
  margin: 2em 0;
  max-width: 800px;
  margin-inline: auto;
}

.faq-item {
  margin-bottom: 1em;
}

.faq-question {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  background-color: var(--primary);
  color: #fff;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.25rem; /* Igual que .form button y .btn */
  transition: background-color 0.2s ease-in-out;
}

.faq-question:hover {
  background-color: var(--accent);
}

.faq-answer {
  display: none;
  padding: 1rem;
  background-color: var(--light);
  border-radius: 0.25rem;
  margin-top: 0.5rem;
  color: var(--text);
  text-align: justify;
}

.faq-question.open + .faq-answer {
  display: block;
}

.faq-toggle {
  margin-left: 1rem;
  font-size: 1.2rem;
  line-height: 1;
}
