@charset "UTF-8";
/* CSS Document */

/* Estils base per a totes les variants de body */
body,
.body2,
.body3 {
  font-family: "Andale Mono", "Lucida Console", "Menlo", "Monaco", monospace;
  color: #000;
  background-color: #D4D5D9;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  flex-direction: column;
  padding-top: 80px;
}

/* Alçades específiques per a cada variant */
body, .body2 { min-height: 130vh; }
.body3 { min-height: 220vh; }

header {
  height: 50px;
  width: 99%;
  background-color: #004080;
  padding: 10px 20px;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  justify-content: flex-start;
  align-items: center;
  position: fixed;
  top: 0;
  z-index: 1000;
  display: flex;
  transition: height 0.3s ease;
  box-sizing: border-box;
  /*justify-content: space-between; */
}

header img {
  height: 40px;
  width: auto;
  transition: height 0.3s ease, width 0.3s ease;
  margin-right: 10px;
}

header:hover img {
  transform: scale(1.2);
}

header a {
  color: #FFF;
}

header nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  position: relative;
}

header:hover {
  height: 80px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 5px;
  margin-left: auto;
  align-items: center;
  padding: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 8px 15px;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: all 0.3s;
}

nav ul li a:hover {
  border: 2px solid #333;
  background-color: #994500;
}

#video-fons {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 200px;
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center 55%; 
  z-index: -1;
}

.footer {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: -140px;
  width: auto;
  height: 250px;
  background-color: #004080;
  background-image: url('header.jpg');
  background-size: cover;
  color: #000;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 40px 10px 40px; 
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  transition: bottom 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
  z-index: 2000;
  font-weight: bold;
  text-shadow: 1px 1px 2px #fff;
  font-size: 18px;
}

.main-content {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  box-sizing: border-box;
  position: relative;
  margin-top: 70px;
}

.main-content_2 {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  box-sizing: border-box;
  position: relative;
  display: grid;
  justify-content: center;
  gap: 20px;
  grid-template-columns: repeat(2, 1fr);
}

/* Per a animacio de la pagina Maquinaria*/
@keyframes zoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.2); }
}

.main-content_2 img {
  border-radius: 20px;
  max-width: 100%; /* Imatges responsive */
  height: auto;
}

.item {
  position: relative; 
  animation: zoom 10s infinite alternate;
  overflow: hidden;
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Assegura que la imatge omple l'espai sense deformar-se */
  display: block;
}

.text-overlay {
  position: absolute; /* El treu del flux normal i el fa flotar */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.6); /* Fons negre semitransparent */
  padding: 10px 20px;
  text-align: center;
  border-radius: 4px;
  max-width: 70%; /* més compacte per semblar més centrat */
  width: auto;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

.formulari-card {
  position: fixed;
  /* Centrat horitzontal */
  left: 50%;
  transform: translateX(-50%); 
  width: 90%; /* Adaptable a mòbil */
  max-width: 300px;
  backdrop-filter: blur(20px);
  padding: 20px; 
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  bottom: -400px; /* Amagat */
  transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Més suau */
  cursor:pointer;
  z-index: 1500;
}

/* Estat obert (quan té la classe) */
.formulari-card.obert {
  bottom: 50%;
  background-color: #0040805c; 
  transform: translate(-50%, 50%);
}

.button {
  background-color: transparent;
  backdrop-filter: blur(20px); /* Efecte de vidre per desenfocar el fons */
  border-radius: 15px;
  color:#ffffff;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: none;
  cursor: pointer;
}

.camps-formulari {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px); /* Efecte de vidre per desenfocar el fons */
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  padding: 10px;
  box-sizing: border-box;
}

table {
  width: 100%;
  max-width: 500px;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  margin: 20px auto;
  border: 2px solid #000;
  background-color: rgba(255, 255, 255, 0.3);
  overflow-x: auto;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background-color: #f4f4f4;
  color: #333;
}

tr:hover {
  background-color: #f9f9f9;
}

.tancat {
  color: #888;
  font-style: italic;
}

h2 {
  margin-bottom: 20px;
  text-transform: uppercase;
  word-wrap: break-word;
}

.footer-info {
  display: flex;
  font-weight: bold;
  font-size: 20px;
  color: #004080;
  margin: 0;
  order: 1; /* esquerra */
  margin-right: 750px; 
  backdrop-filter: blur(1.5px);
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.footer-info-2 {
  display: flex;
  font-weight: bold;
  font-size: 20px;
  color: #000;
  margin: 0;
  order: 2; /* derecha */
  margin-left: auto; 
  backdrop-filter: blur(2px);
  border-radius: 15px;
  margin-top: 80px;
}

.img-icon-footer {
  width: 32px;
  height: 32px;
  margin-right: 8px;
}


/* Si el footer te un contenidor intermedi (com <div>), convertir-lo a flex per distribuir els fills */
.footer > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* alinear al top dins del footer */
  gap: 20px;
  flex: 1;
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

header img {
  margin-right: 0;
}

nav ul li a {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: rgba(255,255,255,0.1);
}

.main-content_2 {
  grid-template-columns: 1fr; 
}

/* Textos */
h2 { font-size: 1.5rem; }

/* Taules */
th, td { padding: 8px; font-size: 14px; }
.main-content {
  margin-top: 220px; /* Espai per header centralitzat */
  margin-bottom: 180px;
}

.main-content_2 {
  margin-top: 120px;
  margin-bottom: 180px;
}

.main-content_3 {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 150px 0 50px 0; /* Marge superior perquè no ho tapi el header */
  box-sizing: border-box;
  margin-bottom: 100px;
}

.item {
  position: relative;
  width: 100%;
  height: 400px; 
  overflow: hidden;
  animation: none !important;
}

.item img {
  width: 100%;
  height: 100%; 
  object-fit: cover; 
  object-position: center;
  display: block;
  animation: none !important;
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  /* Amplada i alçada */
  width: 90%;  
  max-height: 90%; 
  
  /* Estil del fons */
  background-color: rgba(0, 0, 0, 0.7); /* Més fosc perquè es llegeixi millor */
  color: white;
  padding: 20px;
  border-radius: 10px;
  
  /* Alineació del text */
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-y: auto; /* Si el text fos EXTREMADAMENT llarg, es podria fer scroll dins la caixa */
}

header {
  height: auto; /* L'alçada s'adapta al contingut */
  flex-direction: column; /* Posem els elements un sota l'altre */
  padding: 15px;
  border-radius: 0 0 15px 15px;
}

/* Ajustem el contenidor dels logos */
.logo-container {
  margin-bottom: 15px; /* Espai entre logo i menú */
  justify-content: center;
  width: 100%;
}

/* Menú en vertical o més compacte */
header nav ul {
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap; /* Si no hi caben, baixen a la línia següent */
}

header nav a {
  font-size: 14px; /* Text una mica més petit */
}

/* Desactivem l'expansió del header en mòbil perquè molesta la navegació */
header:hover {
  height: auto; 
}

.footer-info {
  display: none;
}
} 

/* --- ESTILS DEL DISCLAIMER / AVÍS LEGAL --- */

/* Fons fosc que cobreix tota la pantalla */
.disclaimer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fons semi-transparent fosc */
    z-index: 9999; /* Per sobre de tot */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* La caixa blanca del missatge */
.disclaimer-box {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-family: Arial, sans-serif;
    border: 3px solid #ffcc00; /* Vora groga per cridar l'atenció */
}

.disclaimer-box h2 {
    color: #d9534f;
    margin-top: 0;
    font-size: 1.5rem;
}

.disclaimer-box p {
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 20px;
}

.disclaimer-box a {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.disclaimer-box a:hover {
    text-decoration: underline;
}

/* Botó per tancar */
.btn-acceptar {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-acceptar:hover {
    background-color: #555;
}

/* Classe per ocultar el disclaimer via JavaScript */
.ocult {
    display: none !important;
}
