/* ========================================
   БАЗОВЫЕ СТИЛИ
   ======================================== */

body {
  font-family: sans-serif;
  background: #111;
  color: #fff;
  text-align: left;
}

main {
  max-width: 50%;
  margin: 0;
  padding-left: 2rem;
}

/* ========================================
   СПЕЦИФИЧНЫЕ СТРАНИЦЫ
   ======================================== */

body.page-reviews main,
body.page-gear main,
body.page-_index main {
  max-width: 80%;
}

/* ========================================
   ТИПОГРАФИКА
   ======================================== */

h1 {
  text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #cb9c05;
}

p {
  color: #fff;
}

/* ========================================
   ССЫЛКИ
   ======================================== */

a {
  color: #cb9c05;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, transform 0.15s ease;
}

a:hover,
a:focus {
  color: #ffd95e;
  transform: translateY(-1px);
}

a:visited {
  color: #cb9c05;
}

a:active {
  transform: translateY(0);
  color: #f1c93b;
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  background: #cb9c05;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

a:hover::after,
a:focus::after {
  transform: scaleX(1);
}

/* ========================================
   СПИСКИ
   ======================================== */

ul {
  list-style: disc;
}

ul li::marker {
  color: #cb9c05;
}

li {
  color: #fff;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

.toc-list li {
  margin: 0.1rem 0;
}

.toc-list a {
  color: #ffb400;
  text-decoration: none;
}

/* ========================================
   ИЗОБРАЖЕНИЯ
   ======================================== */

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

.reviews-grid,
.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.reviews-grid img,
.studio-grid img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
}

/* ========================================
   НАВИГАЦИЯ И FOOTER
   ======================================== */

.taglist {
  text-align: center;
  clear: both;
}

#nextprev {
  margin-top: 2rem;
  padding-bottom: 2rem;
}

#prevart {
  float: left;
  text-align: left;
  max-width: 33%;
}

#nextart {
  float: right;
  text-align: right;
  max-width: 33%;
}

footer {
  margin-top: 2rem;
  padding-bottom: 1rem;
  text-align: left;
  clear: both;
}
/* ========================================
   TOC (TABLE OF CONTENTS)
   ======================================== */

.toc {
  border: 1px solid #444;
  padding: 1rem;
  margin-bottom: 2rem;
  background: #111;
}

.toc h2 {
  margin-top: 0;
}

.toc ul {
  list-style: none;
  padding-left: 0;
}

.toc a {
  color: #ffb400;
  text-decoration: none;
}

/* ========================================
   АУДИО-ПЛЕЕРЫ (ДО/ПОСЛЕ)
   ======================================== */

.before-after-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}

.before-after-table td {
  padding: 0.75rem 1rem;
  vertical-align: top;
  border: 1px solid #333;
}

.before-after-table em {
  display: block;
  color: #cb9c05;
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  font-style: normal;
}

audio {
  width: 100%;
  height: 32px;
  outline: none;
}

/* ========================================
   АДАПТИВ (МОБИЛА)
   ======================================== */

@media (max-width: 768px) {
  main {
    max-width: 90%;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .reviews-grid,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .before-after-table {
    display: block;
  }

  .before-after-table tr,
  .before-after-table td {
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid #333;
  }

  .before-after-table td:last-child {
    border-bottom: none;
  }

  #prevart,
  #nextart {
    float: none;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }
}
