/* Estilos do Módulo Músicas - Mobile First & Vanilla CSS */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding: 1rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Foco visível para Acessibilidade */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

header p {
  color: var(--text-muted);
}

/* Controles de Busca e Ordenação */
.controles-barra {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .controles-barra {
    flex-direction: row;
    justify-content: space-between;
  }
}

.campo-busca {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  min-height: 48px;
}

.seletor-ordenacao {
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background-color: #fff;
  min-height: 48px;
}

/* Grid de Cards */
.grid-musicas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .grid-musicas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-musicas {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card Individual */
.card-musica {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.card-musica:hover {
  transform: translateY(-4px);
}

.card-capa {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  background-color: #e2e8f0;
}

.card-corpo {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-titulo {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.card-ano {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.card-resumo {
  font-size: 0.95rem;
  color: #475569;
  margin-bottom: 1.25rem;
  flex: 1;
}

.btn-conheca {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  text-align: center;
}

.btn-conheca:hover {
  background-color: var(--primary-hover);
}

/* Botão Carregar Mais */
.container-carregar-mais {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.btn-carregar-mais {
  min-height: 48px;
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  background-color: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn-carregar-mais:hover {
  background-color: #1e293b;
}

/* Detalhe da Música */
.topo-detalhe {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .topo-detalhe {
    flex-direction: row;
  }
  .capa-detalhe {
    width: 320px;
    height: 320px;
  }
}

.capa-detalhe {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.info-detalhe {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.plataformas-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-plataforma {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  background-color: #f1f5f9;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

/* Container de Letra Retrátil */
.secao-letra {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 2.5rem;
}

.btn-toggle-letra {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  background-color: #f8fafc;
  color: var(--primary-color);
  border: 2px dashed var(--primary-color);
  border-radius: var(--radius);
  cursor: pointer;
}

.conteudo-letra {
  margin-top: 1.5rem;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #334155;
  display: none;
}

.conteudo-letra.letra-visivel {
  display: block;
}

/* --- ESTILOS COMPLEMENTARES DA SUBFASE 5.4 (HOME PÚBLICA) --- */
.nav-home {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
}

.nav-brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.nav-link {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.ativo {
  color: var(--primary-color);
}

.hero-home {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #2563eb 100%);
  color: #ffffff;
  padding: 3rem 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.hero-home h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #ffffff;
  line-height: 1.2;
}

.hero-home p {
  font-size: 1.1rem;
  max-width: 650px;
  margin: 0 auto 1.75rem auto;
  color: #e2e8f0;
}

.hero-botoes {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  min-height: 48px;
  padding: 0.8rem 1.75rem;
  background-color: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-hero-primary:hover {
  background-color: var(--primary-hover);
}

.btn-hero-secondary {
  min-height: 48px;
  padding: 0.8rem 1.75rem;
  background-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
}

.btn-hero-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

.secao-titulo-bloco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.secao-titulo-bloco h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
}

.secao-link-ver-mais {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.secao-link-ver-mais:hover {
  text-decoration: underline;
}

.card-destaque-home {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  border-left: 4px solid var(--primary-color);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.card-destaque-capa {
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}

.card-destaque-corpo {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 768px) {
  .card-destaque-home {
    flex-direction: row;
    align-items: center;
  }
  .card-destaque-capa {
    width: 200px;
    height: 200px;
    max-width: 200px;
    max-height: 200px;
    flex-shrink: 0;
  }
}

.rodape-home {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Respeito a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .card-musica {
    transition: none;
  }
}
