/* BODY */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}

/* LOGO */
.logo img {
  width: 180px;
  height: auto;
}

/* HEADER */
header {
  background: rgba(255, 68, 0, 0.831);
  color: white;
  padding: 1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

header ul {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  text-align: center;
}

header a {
  color: white;
  text-decoration: none;
}

/* BOTÓ HAMBURGUESA */
.menu-toggle {
  background: none;
  border: none;
  font-size: 3rem;
  color: white;
  cursor: pointer;
  display: block;
}

/* Oculta overlay por defecto */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.menu-cuadro {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 80%;
  max-width: 300px;
  text-align: center;
  position: relative;
}

.menu-cuadro ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.menu-cuadro li {
  margin: 1rem 0;
}

.menu-cuadro a {
  text-decoration: none;
  color: #ff4400;
  font-weight: bold;
  font-size: 1.3rem;
}

.menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
}

/* BLOG */
#blog {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

#blog h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #004d40;
}

#blog p {
  text-align: center;
  margin-bottom: 2rem;
  color: #444;
}

/* BLOG CARDS */
.blog-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.blog-card {
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  padding: 1rem;
  transition: transform 0.3s ease;
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: #fff;
}

.blog-card h3 {
  margin: 1rem 0 0.5rem;
  color: rgba(255, 68, 0, 0.831);
}

.blog-card p {
  font-size: 0.95rem;
  color: #444;
}

.blog-card .btn {
  display: inline-block;
  background: #00695c;
  color: white;
  padding: 0.7rem 1.2rem;
  border-radius: 5px;
  text-decoration: none;
  margin-top: 1rem;
  transition: background 0.3s ease;
}

footer {
  background: #004d40;
  color: white;
  text-align: center;
  padding: 1rem;
}

.social a {
  color: white;
}

/* ------------------------------
   MEDIA QUERIES
--------------------------------*/

/* Tablets (≥600px) */
@media (min-width: 600px) {
  header {
    flex-direction: row;
    justify-content: space-between;
  }

  header ul {
    flex-direction: row;
    gap: 1rem;
  }

  .blog-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Escriptori (≥900px) */
@media (min-width: 900px) {
  .menu-toggle {
    display: none; /* ocultem hamburguesa en escriptori */
  }

  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 5rem;
  }

  header nav ul {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    font-size: 1.5rem;
  }

  header ul {
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }

  .logo img {
    width: 220px;
  }

  .blog-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem; /* espai entre les cards */
  }

  .blog-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* separa contingut i botó */
    text-align: center;
    padding: 2rem;
    width: 550px; /* mida fixa */
    min-height: 600px; /* alçada mínima perquè tot el contingut hi càpiga */
    box-sizing: border-box;
  }

  .blog-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    background: #fff;
  }

  .blog-card h3 {
    margin: 1rem 0 0.5rem;
    color: rgba(255, 68, 0, 0.831);
  }

  .blog-card p {
    font-size: 0.95rem;
    color: #444;
    flex-grow: 1; /* ocupa espai restant */
    margin-bottom: 1rem;
  }

  .blog-card .btn {
    display: block; /* assegura que es mostri */
    background: #00695c;
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    margin-top: auto; /* manté el botó a la part inferior */
  }
}
