
body, html {
  overflow-x: hidden;
  overflow-y: auto;
}

.index-lateral {
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}
/* ========================================
   LAYOUT PRINCIPAL (igual que blog)
======================================== */
.home-seccio {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  gap: 3rem;
}

/* ========================================
   ÍNDEX LATERAL (igual que columna lateral blog)
======================================== */
.index-lateral {
  max-width: 300px;
  min-width: 300px;
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
}

.index-lateral h3 {
  font-size: 1rem;
  color: #495057;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navegacio-index ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.navegacio-index li {
  margin-bottom: 0.75rem;
}

.navegacio-index a {
  color: #666;
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  transition: all 0.2s;
}

.navegacio-index a:hover {
  color: #333;
  background-color: rgba(0, 123, 255, 0.05);
  padding-left: 1rem;
}

/* ========================================
   CONTINGUT PRINCIPAL (igual que columna entrades blog)
======================================== */
.contingut-principal {
  flex: 2;
  width: 100%;
  margin: 0;
}

/* ========================================
   SECCIONS (igual estil que entrades blog)
======================================== */
.seccio-home {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  scroll-margin-top: 2rem; /* Espai quan es fa scroll amb ancoratge */
}

.seccio-home:not(:last-child) {
  border-bottom: 1px solid #eee;
}

.seccio-home h1 {
  font-size: 2rem;
  font-weight: 400;
  color: #222;
  margin-bottom: 1.5rem;
  line-height: 1.3;
  font-family: Georgia, 'Times New Roman', serif;
}

.seccio-home h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: #333;
  margin: 2rem 0 1rem 0;
  font-family: Georgia, 'Times New Roman', serif;
}

.seccio-home h3 {
  font-size: 1.2rem;
  font-weight: 400;
  color: #333;
  margin: 1.5rem 0 1rem 0;
  font-family: Georgia, 'Times New Roman', serif;
}

/* ========================================
   TEXT I PARÀGRAFS (igual que blog)
======================================== */
.text-seccio {
  font-size: 1.1rem;
  color: #333;
  line-height: 1.7;
  font-family: Georgia, 'Times New Roman', serif;
}

.text-seccio p {
  margin-bottom: 1.5rem;
}

.text-seccio p:last-child {
  margin-bottom: 0;
}

.text-seccio ul,
.text-seccio ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.text-seccio li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.text-seccio strong {
  font-weight: 600;
  color: #222;
}

.text-seccio em {
  font-style: italic;
  color: #555;
}

/* ========================================
   ENLLAÇOS (igual que blog)
======================================== */
.text-seccio a {
  color: #007bff;
  text-decoration: none;
}

.text-seccio a:hover {
  text-decoration: underline;
}

/* ========================================
   TAULA DE COSTOS
======================================== */
.taula-costos {
  width: 100%;
  max-width: 500px;
  margin: 2rem 0;
  border-collapse: collapse;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.taula-costos tr {
  border-bottom: 1px solid #e9ecef;
}

.taula-costos td {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.taula-costos td:first-child {
  color: #555;
}

.taula-costos td:last-child {
  text-align: right;
  color: #333;
  font-weight: 500;
}

.taula-costos tr.total {
  background-color: #f8f9fa;
  border-top: 2px solid #dee2e6;
}

.taula-costos tr.total td {
  font-weight: 600;
  color: #222;
}

/* ========================================
   BOTONS I CRIDES A L'ACCIÓ
======================================== */
.text-destacat {
  text-align: center;
  margin: 2rem 0;
}

.btn-aportacio {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.btn-aportacio:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

/* ========================================
   BOX D'ADVERTÈNCIA
======================================== */
.advertencia-box {
  background-color: #fff3cd;
  border: 2px solid #ffc107;
  border-radius: 5px;
  padding: 2rem;
  margin: 1rem 0;
}

.advertencia-box p:first-child {
  color: #856404;
  font-weight: 600;
  font-size: 1.15rem;
}

.advertencia-box h2 {
  color: #856404;
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

.advertencia-box ul {
  color: #856404;
}

/* ========================================
   INFO CONTACTE
======================================== */
.info-contacte {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 5px;
  margin: 1.5rem 0;
  border-left: 4px solid #007bff;
}

.info-contacte p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.info-contacte p:last-child {
  margin-bottom: 0;
}

.info-contacte strong {
  color: #495057;
  font-weight: 600;
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .home-seccio {
    padding: 2rem 1rem;
    flex-direction: column;
    gap: 2rem;
  }
  
  .index-lateral {
    position: static;
    max-width: none;
    min-width: auto;
    max-height: none;
    margin-bottom: 2rem;
  }
  
  .seccio-home h1 {
    font-size: 1.6rem;
  }
  
  .seccio-home h2 {
    font-size: 1.2rem;
  }
  
  .text-seccio {
    font-size: 1rem;
  }
  
  .taula-costos {
    font-size: 0.9rem;
  }
  
  .taula-costos td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .home-seccio {
    padding: 1rem 0.5rem;
  }
  
  .index-lateral {
    padding: 1rem;
  }
  
  .advertencia-box {
    padding: 1rem;
  }
  
  .btn-aportacio {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}
.home-seccio {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;  /* Altura completa viewport */
    overflow: hidden;  /* Evitar scroll general */
}

.index-lateral {
    flex: 0 0 250px;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.contingut-principal {
    flex: 1;
    overflow-y: auto;  /* AQUÍ està el scroll */
    max-height: calc(100vh - 40px);
    padding-right: 15px;  /* Espai per la scrollbar */
}