/* ── Homepage Section Shared Styles ── */
/* Used by: LatestNews, GameDatabase, Characters, LeonidaMap */

/* ── Section container ── */
.news-section,
.db-section,
.char-section,
.map-section {
  padding: 3rem 1rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: clip;
  box-sizing: border-box;
}

/* ── Section header row ── */
.news-section__header,
.db-section__header,
.char-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-section__header-end {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.news-section__title,
.db-section__title,
.char-section__title {
  font-family: var(--typography-fontFamily-display);
  font-size: 2.2rem;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  font-weight: var(--typography-fontWeight-display);
}

.news-section__subtitle,
.db-section__subtitle,
.char-section__subtitle {
  font-size: 0.78rem;
  color: #616161;
  margin: 0;
}

.news-section__view-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #FF1493;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #FF1493;
  padding-bottom: 2px;
  text-decoration: none;
  white-space: nowrap;
}

.db-section__view-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #00E5FF;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(0, 229, 255, 0.45);
  padding-bottom: 2px;
  text-decoration: none;
  white-space: nowrap;
}

.char-section__view-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #FF1493;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #FF1493;
  padding-bottom: 2px;
  text-decoration: none;
  white-space: nowrap;
}

/* ── Grids ── */
.news-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.5rem;
}

.db-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
}

.char-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}

/* ── Map section ── */
.map-section__title {
  font-family: var(--typography-fontFamily-display);
  font-size: clamp(3rem, 11vw, 5.5rem);
  color: #FFFFFF;
  letter-spacing: 0.09em;
  line-height: 1;
  margin: 0 0 0.5rem;
  text-align: center;
  text-transform: uppercase;
  font-weight: var(--typography-fontWeight-display);
}

.map-section__desc {
  font-size: 1rem;
  color: #757575;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.map-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

/* ── Badge variants ── */
.badge--confirmed { background-color: rgba(0, 229, 255, 0.10); color: #00E5FF; }
.badge--rumor { background-color: rgba(255, 214, 0, 0.12); color: #FFD600; }
.badge--info { background-color: rgba(155, 48, 255, 0.15); color: #9B30FF; }
.badge--news { background-color: rgba(0, 229, 255, 0.10); color: #00E5FF; }
.badge--analysis { background-color: rgba(155, 48, 255, 0.15); color: #9B30FF; }
.badge--community { background-color: rgba(255, 107, 53, 0.15); color: #FF6B35; }

/* ── Database card specific ── */
.db-card {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0.9rem;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.db-card:hover {
  border-color: #00E5FF;
  transform: translateY(-4px);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.16);
}

.db-card__image-wrap {
  position: relative;
  height: 155px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

.db-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.db-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,0.84) 100%);
}

.db-card__icon {
  position: absolute;
  left: 1rem;
  bottom: -1.25rem;
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.45));
}

.db-card__body {
  padding: 2.1rem 1.25rem 1.35rem;
}

.db-card__name {
  font-family: var(--typography-fontFamily-display);
  font-size: 1.75rem;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  line-height: 1;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  font-weight: var(--typography-fontWeight-display);
}

.db-card__count {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #00E5FF;
  background-color: rgba(0, 229, 255, 0.1);
  padding: 2px 8px;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.db-card__desc {
  font-size: 0.875rem;
  color: #757575;
  line-height: 1.75;
  margin: 0;
}

/* ── Mobile: database cards horizontal ── */
@media (max-width: 600px) {
  .news-section,
  .db-section,
  .char-section,
  .map-section {
    padding: 1.5rem 0.75rem;
  }

  .news-section__title,
  .db-section__title,
  .char-section__title {
    font-size: 1.4rem;
  }

  /* Database cards become horizontal on mobile */
  .db-card {
    flex-direction: row;
  }

  .db-card__image-wrap {
    width: 130px;
    min-width: 130px;
    height: auto;
    min-height: 130px;
  }

  .db-card__image {
    position: absolute;
    inset: 0;
  }

  .db-card__icon {
    left: 0.5rem;
    bottom: auto;
    top: 0.5rem;
    transform: scale(0.7);
    transform-origin: top left;
  }

  .db-card__body {
    padding: 0.85rem 0.85rem;
    flex: 1;
    min-width: 0;
  }

  .db-card__name {
    font-size: 1rem;
  }

  .db-card__desc {
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .db-card__count {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
  }
}
