/* =============================================
   SECTIONS.CSS — Música, Noticias, Letras
   ============================================= */

/* ---- MÚSICA / ALBUMS ---- */
#musica {
  background: var(--bg);
  clip-path: polygon(0 0, 100% 40px, 100% 100%, 0 100%);
  margin-top: -40px;
}

.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  padding: 0 40px;
}

.album-card {
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s cubic-bezier(0.22,1,0.36,1),
              transform 1.2s cubic-bezier(0.22,1,0.36,1);
}
.album-card.album-visible {
  opacity: 1;
  transform: translateY(0);
}
.album-card.album-visible:hover { transform: translateY(-4px); }

.album-cover-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface);
  margin-bottom: 12px;
}

.album-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.album-card:hover .album-cover-wrap img {
  transform: scale(1.04);
  filter: brightness(0.7);
}

.album-play-btn {
  position: absolute;
  bottom: 12px; right: 12px;
  width: 44px; height: 44px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(192, 57, 43, 0.5);
}
.album-card:hover .album-play-btn   { opacity: 1; transform: translateY(0); }
.album-play-btn i                   { color: white; font-size: 16px; margin-left: 2px; }

.album-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.album-year {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

.album-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-dim);
  margin-top: 6px;
}

/* ---- TRACKLIST (inside album modal) ---- */
.tracklist { padding: 16px 0; }

.track-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  cursor: pointer;
  transition: background 0.2s;
}
.track-item:hover         { background: var(--surface); }
.track-item.playing       { background: rgba(192, 57, 43, 0.1); }

.track-num {
  width: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
  font-family: var(--font-mono);
}
.track-item.playing .track-num  { color: var(--red); }

.track-name               { flex: 1; font-size: 14px; color: var(--text); }
.track-item.playing .track-name { color: var(--red); }

.track-duration {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.track-play-btn {
  opacity: 0;
  transition: opacity 0.2s;
  background: var(--red) !important;
  border-radius: 50% !important;
  width: 26px !important;
  height: 26px !important;
  color: white !important;
}
.track-item:hover .track-play-btn { opacity: 1; }

.track-actions { display: flex; gap: 8px; }

.track-link {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text-dim);
  font-size: 11px;
  transition: all 0.2s;
  opacity: 0;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}
.track-item:hover .track-link { opacity: 1; }
.track-link:hover             { background: var(--red); color: white; }

.track-play-btn {
  background: var(--surface2) !important;
  color: var(--text-dim) !important;
  border-radius: 50% !important;
  font-size: 10px !important;
  opacity: 0.5;
  transition: all 0.2s !important;
}
.track-item:hover .track-play-btn {
  background: var(--red) !important;
  color: white !important;
  opacity: 1;
}
.track-item.playing .track-play-btn {
  background: var(--red) !important;
  color: white !important;
  opacity: 1;
}

/* ---- NEWS CARD REVEAL ---- */
.news-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.news-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- NOTICIAS ---- */
#noticias {
  background: var(--bg2);
  clip-path: polygon(0 55px, 100% 0, 100% 100%, 0 100%);
  margin-top: -55px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
  padding: 0 40px;
}

.news-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s, transform 0.2s;
}
.news-card:hover { border-color: var(--red); transform: translateX(4px); }

.news-img-wrap {
  flex: 0 0 200px;
  width: 200px;
  position: relative;
  overflow: hidden;
}
.news-img-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: -1px; bottom: 0;
  width: 40px;
  background: var(--surface);
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}
.news-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-img-placeholder i { font-size: 28px; color: var(--text-muted); }

.news-body {
  flex: 1;
  min-width: 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--red);
  text-transform: uppercase;
}

.news-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-excerpt {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-readmore {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 4px;
  align-self: flex-end;
}
.news-card:hover .news-readmore { gap: 12px; }

/* ---- ADMIN PANEL ---- */
.admin-toggle {
  display: flex;
  justify-content: flex-end;
  padding: 0 40px;
  margin-bottom: 40px;
}

.btn-admin {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-admin:hover { border-color: var(--red); color: var(--red); }

#admin-panel {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 40px 48px;
  padding: 32px;
  display: none;
}
#admin-panel.visible { display: block; }

.admin-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--gold);
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field              { display: flex; flex-direction: column; gap: 8px; }
.form-field.full         { grid-column: 1 / -1; }

.form-field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-field input,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--red); }

.btn-publish {
  margin-top: 8px;
  padding: 14px 32px;
  background: var(--red);
  color: white;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, transform 0.15s;
  font-family: var(--font-body);
}
.btn-publish:hover { background: var(--red-bright); transform: translateY(-1px); }

/* ---- LETRAS ---- */
#letras {
  background: var(--bg);
  clip-path: polygon(0 45px, 100% 0, 100% 100%, 0 100%);
  margin-top: -45px;
}

.letras-search-wrap { padding: 0 40px; margin-bottom: 40px; }

.letras-search { position: relative; max-width: 500px; }

.letras-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 14px 44px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.letras-search input:focus { border-color: var(--red); }

.letras-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.letras-list {
  columns: 3;
  column-gap: 24px;
  padding: 0 40px;
  list-style: none;
}

.letras-list li {
  break-inside: avoid;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: padding-left 0.2s;
}
.letras-list li:hover              { padding-left: 8px; }
.letras-list li:hover .letra-name  { color: var(--red); }

.letra-icon            { color: var(--text-muted); font-size: 11px; flex-shrink: 0; }
.letra-icon.has-chords { color: var(--red); }

.letra-name { font-size: 14px; color: var(--text); }

.letra-badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}
#acerca {
  clip-path: polygon(0 0, 100% 35px, 100% 100%, 0 100%);
  margin-top: -35px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .albums-grid      { padding: 0 20px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .news-grid     { padding: 0 20px; grid-template-columns: 1fr; }
  .news-img-wrap { flex: 0 0 35%; width: 35%; }
  .news-body     { flex: 0 0 65%; }
  .news-title    { font-size: 15px; }
  .letras-list      { columns: 1; padding: 0 20px; }
  .letras-search-wrap { padding: 0 20px; }
  .admin-toggle     { padding: 0 20px; }
  #admin-panel      { margin: 0 20px 32px; }
  .admin-form       { grid-template-columns: 1fr; }
}