/* ====== Estilos generales ====== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
}

/* ====== Encabezado y navegación ====== */
header {
  background: #333;
  padding: 10px 20px;
  text-align: center;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

nav a:hover {
  color: red;
}

/* ====== Responsive navegación ====== */
@media (max-width: 768px) {
  nav {
    gap: 10px;
  }
  nav a {
    display: block;
    margin-bottom: 8px;
  }
}

/* ====== Contenedor principal ====== */
.container {
  padding: 20px;
  text-align: center;
}

h1 {
  margin-bottom: 10px;
}

/* ====== Tarjetas de países ====== */
.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.country-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  flex: 1 1 calc(33.333% - 20px);
  min-width: 220px;
}

.country-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.country-card img {
  max-width: 100px;
  height: auto;
  width: 100px;
  height: 67px;
}

.country-card-link:hover .country-name,
.country-card-link:hover p {
  color: red;
}

.country-name {
  color: black;
  text-decoration: none;
  transition: color 0.3s;
  text-transform: uppercase;
  font-size: calc(1em + 2pt);
  display: block;
  font-weight: bold;
}

/* ====== Responsive tarjetas ====== */
@media (max-width: 768px) {
  .country-card-link {
    flex: 1 1 calc(50% - 20px);
  }
}

@media (max-width: 480px) {
  .country-card-link {
    flex: 1 1 100%;
  }
}

/* ====== Pie de página ====== */
footer {
  background: black;
  color: white;
  text-align: center;
  padding: 10px;
}

footer a,
footer a:visited,
footer a:active {
  color: white !important;
  text-decoration: none !important;
}

footer a:hover {
  color: red !important;
  text-decoration: none !important;
}

/* ====== Logo y nombre del sitio ====== */
.site-header {
  text-align: center;
  margin-bottom: 15px;
}

.site-link {
  color: #00AEEF;
  text-decoration: none;
  font-size: 1.5em;
  font-weight: bold;
}

.site-link:hover {
  color: #0077CC;
  text-decoration: none;
}

.content-wrapper {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* Ajuste responsive opcional */
@media (max-width: 768px) {
  .content-wrapper {
    max-width: 95%;
    padding: 0 10px;
  }
}

/* ====== Estilos para títulos de departamentos ====== */
.department-title {
    background-color: #000;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin: 30px 0 20px 0; /* Más espacio arriba y un poco menos abajo */
    font-size: 24px;
    width: 100%; /* Para que ocupe todo el ancho disponible */
    display: block; /* Para que se comporte como un bloque y el width funcione */
}

/* Puedes ajustar el font-size y el padding para el responsive si lo necesitas */
@media (max-width: 768px) {
    .department-title {
        font-size: 20px;
        padding: 15px 0;
    }
}