/*
 * Stylesheet for the PID Game Repository website.
 *
 * This file defines the look and feel of the site.  The design is intentionally
 * minimal and elegant to keep the focus on the content: interactive games for
 * learning English.  Colours and spacing have been chosen to work well in
 * classroom projectors and on personal devices alike.  Feel free to tweak the
 * variables at the top of this file if you want to adjust the colour palette
 * or typography.
 */

:root {
  /* Primary brand colours */
  --color-primary: #00695c;   /* teal for headings and accents */
  --color-secondary: #00796b; /* darker teal for hover states */
  --color-background: #f7fafa; /* very light grey for page background */
  --color-card: #ffffff;      /* white cards for resources */
  --color-border: #e0e0e0;    /* light grey border on cards */
  --color-text: #333333;      /* dark text for good contrast */
  --color-muted: #757575;     /* muted text for labels */
  --color-al: #4caf50;        /* green for Autonomous learning badges */
  --color-cm: #ff7043;        /* coral for Class material badges */
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.5;
}

header {
  background: var(--color-primary);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
  margin: 0;
  font-size: 2rem;
}

header p {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Filter section */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  background: var(--color-card);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters label {
  font-weight: bold;
  margin-right: 0.25rem;
  color: var(--color-primary);
}

.filters select,
.filters input[type="text"] {
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: #fff;
  font-size: 0.9rem;
  color: var(--color-text);
}

.filters select:focus,
.filters input[type="text"]:focus {
  outline: none;
  border-color: var(--color-secondary);
}

/* Resource grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.resource-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}

.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.resource-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.resource-meta {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--color-muted);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: white;
  margin-right: 0.25rem;
}

.badge.al {
  background: var(--color-al);
}

.badge.cm {
  background: var(--color-cm);
}

.tag-list {
  margin-top: 0.25rem;
}

.tag {
  display: inline-block;
  background: #eef6f6;
  color: var(--color-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin: 0.1rem;
}

.resource-link {
  margin-top: auto;
  display: inline-block;
  padding: 0.5rem 0.75rem;
  background: var(--color-primary);
  color: #fff;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.15s ease-in-out;
}

.resource-link:hover {
  background: var(--color-secondary);
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 1rem;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filters label {
    margin-right: 0;
    margin-top: 0.5rem;
  }
}

/* Logo del CUD en el encabezado */
.logo-cud {
  max-height: 80px;
  margin-bottom: 0.5rem;
}

/* Línea de autores bajo el título principal */
.site-authors {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Bloque del disclaimer legal */
.disclaimer {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  line-height: 1.6;
}

/* Enlace con aspecto de texto subrayado para la palabra "miembros" */
.link-like {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Sección de miembros del proyecto */
.members-list {
  max-width: 1200px;
  margin: 1rem auto 0;
  text-align: left;
}

.members-list h2 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-top: 0;
}

.members-list ul {
  padding-left: 1.25rem;
  margin: 0.25rem 0 0 0;
}

.members-list li {
  margin-bottom: 0.25rem;
}

/* Cabecera en disposición horizontal */
.header-flex {
  display: flex;
  justify-content: center; /* centrado en la página */
  padding: 1rem 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem; /* espacio entre logo y texto */
}

/* Logo más pequeño para no robar protagonismo */
.logo-cud {
  max-height: 60px;
  width: auto;
}

/* Alineación del texto del encabezado */
.header-text h1 {
  margin: 0;
}

.header-text p {
  margin: 0.25rem 0;
}

.site-authors {
  font-size: 0.85rem;
  opacity: 0.9;
}