html, body {
  background-color: #f4f4f4;
  margin: 0;
}

main {
  padding: 0;
}

.section {
  padding: 40px 0;
  box-sizing: border-box;
  font-size: 1.2em;
  line-height: 1.6;
}

.recent-post {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.recent-post img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recent-post p {
  font-size: 1em;
  color: #555;
  text-align: left;
  padding: 15px;
  margin: 0;
}

footer {
  text-align: center;
  padding: 20px 0;
}

.section.bg-image {
  background: url('images/e1-0.webp') no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  position: relative;
}

.overlay {
  background: rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.section.bg-image h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

.section.bg-image h2 {
  font-size: 0.95em;
  font-weight: 400;
  max-width: 680px;
  margin: 0 auto;
  opacity: 0.9;
  letter-spacing: 0.01em;
}

.section-odd {
  background-color: #FFF;
}

.section .content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* --- Flex Container (Texto + Imagen) --- */
.flex-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.flex-container .text {
  flex: 1;
}

.flex-container .image {
  flex: 1;
}

.flex-container img {
  width: 100%;
  height: auto;
}

.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.cell {
  background-color: #fff;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  border-radius: 8px;
  height: 100%;
}

.cell-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.cell:hover {
  transform: translateY(-5px);
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.2);
}

.primary-btn {
  text-align: center;
  margin-top: 40px;
}

.primary-btn-button {
  display: inline-block;
  padding: 10px 30px;
  background-color: #4af;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.primary-btn-button:hover {
  background-color: #2269b8;
}

footer p {
  margin: 0;
}

@media (max-width: 990px) {
  header {
    height: auto;
    padding: 20px 0;
  }
  
  .title {
    left: 0;
    transform: none;
    width: 100%;
  }

  .navbar ul {
    text-align: center;
  }

  .navbar a {
    padding: 10px 0;
  }

  main {
    padding: 10px;
  }

  .logo img {
    margin-bottom: 10px;
  }

  .section .content {
    padding: 20px 10px;
  }

  .flex-container {
    flex-direction: column;
  }

  .three-columns {
    grid-template-columns: 1fr;
  }
}

/* ---- Home: "See more posts" button row ---- */
.see-more-row {
  text-align: center;
  margin-top: 40px;
}

/* ---- Games index: hero, search, filters, cards ---- */
.section.games-hero {
  height: 40vh;
  min-height: 300px;
}

.search-container {
  max-width: 500px;
  margin: 0 auto 30px;
}

.search-input {
  width: 100%;
  padding: 14px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.search-input::placeholder {
  color: #aaa;
}

.tags-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 30px;
}

.tag-btn {
  padding: 6px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.tag-btn:hover {
  border-color: #4a90d9;
  color: #4a90d9;
}

.tag-btn.active {
  background: #4a90d9;
  border-color: #4a90d9;
  color: white;
}

.game-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.game-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.game-card-content {
  padding: 15px;
}

.game-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.game-tag {
  padding: 3px 8px;
  background: #f0f0f0;
  border-radius: 10px;
  font-size: 11px;
  color: #666;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.game-hidden {
  display: none !important;
}

/* ---- Taxonomy list (tags, categories, authors index) ---- */
.section.taxonomy-hero {
  height: 30vh;
  min-height: 200px;
}

.term-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.term-card h3 {
  margin: 0;
  color: #4a90d9;
  font-size: 1.1rem;
}

.term-card p {
  margin: 0;
  color: #888;
  font-size: 0.85rem;
}

.term-icon,
.term-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
}

.term-icon {
  background: #eef3fa;
  color: #4a90d9;
}

.term-icon svg {
  width: 32px;
  height: 32px;
}

.term-avatar {
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: 'Rubik', sans-serif;
}

.taxonomy-term-header {
  text-align: center;
  margin-bottom: 40px;
}

.taxonomy-term-header h1 {
  text-transform: capitalize;
}

/* ---- Resources page ---- */
.section.resources-hero {
  height: 30vh;
  min-height: 200px;
}

.resources-intro {
  max-width: 700px;
  margin: 0 auto 30px;
  text-align: center;
  color: #555;
  font-size: 1rem;
}

.resources-filters {
  max-width: 900px;
  margin: 0 auto 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-weight: 600;
  color: #444;
  margin-right: 4px;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.resource-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.resource-card.hidden {
  display: none !important;
}

.resource-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resource-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: white;
  font-weight: 700;
  font-size: 1.4rem;
  font-family: 'Rubik', sans-serif;
  flex-shrink: 0;
}

.resource-meta {
  flex: 1;
  min-width: 0;
}

.resource-meta h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.resource-meta h3 a {
  color: #2c3e50;
  text-decoration: none;
}

.resource-meta h3 a:hover {
  color: #4a90d9;
}

.resource-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: capitalize;
}

.badge-type { background: #eef3fa; color: #4a90d9; }
.badge-age { background: #fff3e0; color: #e67e22; }
.badge-free { background: #e8f5e9; color: #2e7d32; }
.badge-lang { background: #f5f5f5; color: #666; text-transform: uppercase; }

.resource-desc {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}
