/* ============================================================
   TrendyBeatz v2 – Main CSS  (rebuilt to match original design)
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  background: #fff;
  color: #222;
  margin: 0; padding: 0;
}

a { color: #00008b; text-decoration: none; }
a:hover { text-decoration: underline; color: #c00; }

img { max-width: 100%; height: auto; }

/* ── Grid (col-3 / col-9 / col-12 etc.) ─────────────────── */
.row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
}

[class*="col-"] { padding: 6px; }

.col-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
.col-2  { flex: 0 0 16.667%; max-width: 16.667%; }
.col-3  { flex: 0 0 25%;     max-width: 25%; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5  { flex: 0 0 41.667%; max-width: 41.667%; }
.col-6  { flex: 0 0 50%;     max-width: 50%; }
.col-7  { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8  { flex: 0 0 66.667%; max-width: 66.667%; }
.col-9  { flex: 0 0 75%;     max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.667%; max-width: 91.667%; }
.col-12 { flex: 0 0 100%;    max-width: 100%; }

@media (max-width: 768px) {
  .col-s-12 { flex: 0 0 100%; max-width: 100%; }
  .col-s-6  { flex: 0 0 50%;  max-width: 50%; }
}

/* ── Header ──────────────────────────────────────────────── */
.header {
  background: #fff;
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
}

/* ── Top Nav (#topnav) ───────────────────────────────────── */
#topnav {
  display: flex;
  flex-wrap: wrap;
  background: #f4f4f4;
  border-bottom: 1px solid #ccc;
  padding: 2px 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#topnav a {
  display: inline-block;
  color: #222;
  text-align: center;
  padding: 6px 10px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 8px;
  margin: 2px;
  transition: background 0.15s;
}

#topnav a p {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.4;
}

#topnav a:hover,
#topnav a.active {
  background: #009900;
  color: #fff !important;
  text-decoration: none;
}

#topnav.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* ── Search bar row ──────────────────────────────────────── */
#topnav input[type="text"],
#topnav input[type="search"] {
  border: 1px solid #aaa;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 14px;
  outline: none;
}

#topnav button,
#topnav input[type="submit"] {
  background: #009900;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 13px;
  margin-left: 6px;
}

#topnav button:hover { background: #007700; }

/* ── Main + Aside ────────────────────────────────────────── */
.main  { padding: 10px 12px; }
.aside { padding: 10px 8px; border-left: 1px solid #eee; }

/* ── Section headings ────────────────────────────────────── */
h2.section-title,
.section-title {
  font-family: georgia, garamond, serif;
  font-size: 22px;
  color: brown;
  border-bottom: 2px solid #ccc;
  padding-bottom: 5px;
  margin-bottom: 12px;
}

/* ── Music card grid ─────────────────────────────────────── */
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.music-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  font-size: 13px;
  transition: box-shadow 0.15s;
}
.music-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); }

.music-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.music-card .card-body { padding: 6px 8px; }

.music-card .card-title {
  font-weight: bold;
  font-size: 13px;
  color: #111;
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.music-card .card-artist {
  font-size: 11px;
  color: #666;
  display: block;
  margin-bottom: 4px;
}

.music-card .btn-download {
  display: inline-block;
  background: #009900;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  margin-bottom: 4px;
}
.music-card .btn-download:hover { background: #007700; text-decoration: none; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}
.btn-green  { background: #009900; color: #fff; }
.btn-red    { background: #c00;    color: #fff; }
.btn-grey   { background: #888;    color: #fff; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 12px 0;
  justify-content: center;
}
.pagination a,
.pagination span {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  color: #009900;
}
.pagination .active span,
.pagination span[aria-current] {
  background: #009900;
  color: #fff;
  border-color: #009900;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: #4682B4; color: #fff; }
.footer a { color: #fff; }
.footer h4 { color: #fff; }

/* ── Album / Artist cards ────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  text-align: center;
  font-size: 13px;
}
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.card .card-body { padding: 8px; }
.card .card-title { font-weight: bold; color: #111; font-size: 13px; display: block; }
.card .card-sub   { font-size: 11px; color: #777; }

/* ── Blog list ───────────────────────────────────────────── */
.blog-list { display: flex; flex-direction: column; gap: 14px; }
.blog-item { display: flex; gap: 12px; border-bottom: 1px solid #eee; padding-bottom: 12px; }
.blog-item img { width: 100px; height: 75px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.blog-item .blog-info { flex: 1; }
.blog-item .blog-title { font-weight: bold; font-size: 15px; color: #111; display: block; margin-bottom: 4px; }
.blog-item .blog-meta  { font-size: 12px; color: #888; }
.blog-item .blog-intro { font-size: 13px; color: #444; margin-top: 4px; }

/* ── Go-to-top button ────────────────────────────────────── */
.gotop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  background: red;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

/* ── Detail page ─────────────────────────────────────────── */
.detail-cover {
  float: left;
  margin: 0 16px 10px 0;
  border-radius: 6px;
  max-width: 220px;
}
.detail-info { font-size: 14px; line-height: 1.8; }
.detail-info h1 { font-family: georgia, garamond, serif; font-size: 22px; color: brown; margin-bottom: 6px; }
.clearfix::after { content: ''; display: block; clear: both; }

/* ── Category tabs ───────────────────────────────────────── */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cat-tab {
  padding: 5px 14px;
  border-radius: 20px;
  background: #eee;
  font-size: 13px;
  color: #333;
  border: 1px solid #ccc;
}
.cat-tab:hover, .cat-tab.active { background: #009900; color: #fff; border-color: #009900; text-decoration: none; }

/* ── Autocomplete ────────────────────────────────────────── */
.autocomplete { position: relative; display: inline-block; }
.autocomplete-items {
  position: absolute;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 99;
  background: #fff;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
}
.autocomplete-items div { padding: 8px 10px; cursor: pointer; font-size: 13px; }
.autocomplete-items div:hover { background: #e5e5e5; }
.autocomplete-active { background: #009900 !important; color: #fff; }
