/* ======== Reset general ======== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f9f9f9;
  color: #333;
}

a {
  text-decoration: none;
  color: #0077cc;
}

a:hover {
  text-decoration: underline;
}

/* ======== Estructura general ======== */
body {
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "aside"
    "footer";
  grid-template-columns: 1fr;
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  padding-top: 0;
}

/* ======== HEADER ======== */
.site-header {
  grid-area: header;
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  top: 0;
  z-index: 999;
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #222;
}

.logo span {
  color: #0077cc;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.main-nav a {
  color: #444;
  font-weight: 500;
  font-size: 16px;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: #0077cc;
  text-decoration: underline;
}

/* ======== MAIN ======== */
main {
  grid-area: main;
  margin-top: 30px;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

main .intro {
  margin-bottom: 30px;
}

main .intro h1 {
  font-size: 26px;
  color: #111;
  margin-bottom: 10px;
}

main .intro p {
  font-size: 16px;
  color: #555;
}

/* ======== LISTING ======== */
.listing {
  display: flex;
  flex-direction: column;
  background-color: #fdfdfd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(0, 0, 0);
  overflow: hidden;
  padding: 15px;
  margin-bottom: 30px; /* separación entre listados */
  margin-top: 5%;
}

.listing-top {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.listing-image {
  width: 400px;
  height: auto;
  object-fit: cover;
  flex-shrink: 0;
  border-radius: 6px;
}

.listing-content {
  flex: 60%;
  display: flex;
  flex-direction: column;
}

.listing-content h2 {
  margin-bottom: 10px;
  color: #0066cc;
  font-size: 22px;
}

.listing-content p {
  margin-bottom: 6px;
  font-size: 15px;
  color: #333;
}

.listing-description {
  margin-top: 10px;
  padding: 10px;
  background-color: #f3f7ff;
  border-left: 3px solid #0077cc;
  border-radius: 4px;
  color: #555;
  line-height: 1.5;
  flex-grow: 1;

}

/* Botón abajo de todo, centrado */
.listing-button {
  margin-top: 40px;
  text-align: center;
  display:inline;

}

.center {
  text-align: center;
}



.btn-action {
  display: inline-block;
  background-color: #0077cc;
  color: #fff;
  padding: 10px 25px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  transition: background-color 0.3s ease;
  text-decoration: none;
    padding-left: 15%;
  padding-right: 15%; 
  margin-top: 5%;
}

.btn-action:hover {
  background-color: #005fa3;
}

/* ======== ASIDE (vacío por ahora) ======== */
.sidebar {
  grid-area: aside;
  margin-top: 30px;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: 0 0 5px rgba(0,0,0,0.03);
  min-height: 80px;
}

/* ======== FOOTER ======== */
footer {
  grid-area: footer;
  margin-top: 40px;
  text-align: center;
  font-size: 14px;
  padding: 20px 0;
  color: #777;
  border-top: 1px solid #ddd;
  background-color: #fff;
}

footer a {
  margin: 0 10px;
  color: #555;
}

/* ======== RESPONSIVE ======== */
@media (min-width: 768px) {
  body {
    grid-template-areas:
      "header header"
      "main aside"
      "footer footer";
    /*grid-template-columns: 3fr 1fr;*/
  }

  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }


}

@media (max-width: 600px) {

    * {
width: 100%;
}
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 10px;
  }

  /* Adaptamos listing para móvil: imagen arriba, contenido abajo */
  .listing-top {
    flex-direction: column;
    align-items: center;
  }

  .listing-image {
    width: 100%;
    height: 200px;
    border-radius: 6px;
  }

  .listing-content {
    width: 100%;
  }

  .listing-description {
  }

  .listing-button {
    margin-top: 15px;
  }
}


.cluster-links {
    padding: 2em;
    background-color: #f9f9f9;
    border-top: 2px solid #e0e0e0;
    margin-top: 2em;
}

.cluster-links h2 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 1em;
    text-align: center;
}

.cluster-links ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    list-style: none;
    padding: 0;
    margin: 0;
}

.cluster-links li {
    background: #fff;
    padding: 0.8em 1.2em;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cluster-links li:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

.cluster-links a {
    text-decoration: none;
    color: #0077cc;
    font-weight: 600;
}


.extra-info {
  padding: 2em;
  background-color: #fff;
  border-top: 2px solid #eaeaea;
  margin-top: 3em;
}

.extra-info h2 {
  font-size: 1.5em;
  margin-top: 1em;
  color: #222;
}

.extra-info p {
  margin-bottom: 1em;
  line-height: 1.7;
  color: #444;
}

.extra-info ul {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

.extra-info li {
  margin-bottom: 0.5em;
  color: #333;
}
