/* Header */
.header--small {
  min-height: 200px;
}

.header--small .header__cloud {
  width: 35%;
  max-width: 600px;
}

.header--small .header__content {
  margin-top: 0;
}

.header__title span {
  font-size: 3rem;
}

/* Main */
.main {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: 0;
  gap: 2rem;
  justify-content: center;
  box-sizing: border-box;
  align-items: flex-start;
}

.content {
  flex: 1;
  max-width: 800px;
  box-sizing: border-box;
  overflow-x: hidden;
  margin-bottom: 1rem;
}

.content--styling {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

.content__title {
  font-family: "AveriaSerif", sans-serif;
  font-size: clamp(2.4rem, 4vw, 2.7rem);
  color: var(--color-black);
  margin: -10px 0 2.7rem -15px;
  text-align: left;
  line-height: 1.2;
}

.content__text {
  font-family: "Arial", sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--color-black);
}

article {
  margin-bottom: 3rem;
}

article:last-child {
  margin-bottom: 0;
}

h2 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.75rem;
  line-height: 1.3;
  margin-left: -10px;
}

h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

ul {
  margin-top: 0;
}

/* Lists */
li {
  list-style-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 4c-4-1-6 3-6 3s-2-4-6-3-4 6-2 8l8 8 8-8c2-2 2-7-2-8z" fill="%23494949"/></svg>');
}

li:last-child {
  margin-bottom: 0;
}

li:has(> ul) {
  list-style: none;
}

li::marker {
  font-size: 1.3em;
  line-height: 0.1;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  line-height: 1.5;
  margin: 1rem 0;
}

th {
  padding: 12px 5px;
  text-align: left;
  font-size: clamp(1rem, 2vw, 1.2rem);
  border-top: none;
}

td {
  padding: 0 12px 0 16px;
  vertical-align: top;
}

tr {
  border-bottom: 1px solid var(--color-table-border);
}

tr:last-child,
.table--empty-border-row {
  border-bottom: none;
}

.table--visual-media {
  --col-title-width: 45%;
  --col-genre-width: 35%;
  --col-format-width: 20%;
}

.table--visual-media .table__cell--title {
  width: var(--col-title-width);
}

.table--visual-media .table__cell--genre {
  width: var(--col-genre-width);
}

.table--visual-media .table__cell--format {
  width: var(--col-format-width);
}

.table__cell-info {
  color: var(--color-gray);
  font-size: 0.7em;
  font-weight: normal;
  vertical-align: top;
  margin-left: 0.25em;
}

.table--visual-media td:nth-child(2),
.table--visual-media td:nth-child(3) {
  font-size: 0.9em;
  white-space: normal;
  word-wrap: break-word;
}

/* Link Icons */
.link__icon {
  vertical-align: middle;
  max-width: 0;
  opacity: 0;
  transition: all 0.2s ease;
  margin-right: 0;
}

a {
  display: inline-flex;
  align-items: center;
}

a:hover .link__icon {
  max-width: 20px;
  opacity: 1;
  margin-right: 5px;
}

.link__icon--youtube {
  position: relative;
  margin-top: -3px;
}

/* Collapse List */
.collapsible-list {
  display: none;
}

.collapsible-list.active {
  display: block;
}

.collapse-btn {
  background: var(--color-collapse-button);
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 5px 10px;
  color: var(--color-black);
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Sidebar */
.sidebar-container {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.sidebar-container.loaded {
  opacity: 1;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 250px;
  padding-right: 20px;
  height: fit-content;
  padding-bottom: 2rem;
  scroll-behavior: smooth;
  margin-top: -3rem;
}

.sidebar .nav__item {
  width: 180px;
  margin: 0;
  transform: none;
}

.sidebar .nav__item:nth-child(1) {
  margin-left: 10px;
}
.sidebar .nav__item:nth-child(2) {
  margin-left: -15px;
}
.sidebar .nav__item:nth-child(3) {
  margin-left: 25px;
}
.sidebar .nav__item:nth-child(4) {
  margin-left: -20px;
}
.sidebar .nav__item:nth-child(5) {
  margin-left: 15px;
}
.sidebar .nav__item:nth-child(6) {
  margin-left: -10px;
}
.sidebar .nav__item:nth-child(7) {
  margin-left: 20px;
}

.sidebar .nav__item:hover,
.sidebar .nav__item:focus {
  transform: scale(1.1) rotate(var(--rotate));
}

.sidebar .cloud__text {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
}

.nav__item--active {
  transform: scale(1.1) !important;
}

.nav__item--active .cloud {
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.8))
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.6))
    drop-shadow(0 0 18px rgba(255, 255, 255, 0.2));
}

@media (max-width: 1024px) {
  .main {
    flex-direction: column;
    gap: 1rem;
    margin: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    flex-direction: row;
    width: 100%;
    padding: 1rem 0;
    overflow-x: auto;
    z-index: 10;
    gap: 1rem;
  }

  .sidebar .nav__item {
    flex-shrink: 0;
    width: 140px;
    margin-left: 0 !important;
  }

  .content {
    width: 100%;
    max-width: none;
    background-color: transparent;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .header__title span {
    font-size: 2.5rem;
  }
  .header--small {
    min-height: 160px;
  }

  .content__title {
    margin-bottom: 2rem;
    font-size: 2rem;
  }

  .content__text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .content__text article {
    margin-bottom: 2.5rem;
  }

  .table__cell-info {
    display: none;
  }
}

@media (max-width: 560px) {
  .header__title span {
    font-size: 2rem;
  }
  .header--small {
    min-height: 130px;
  }
}

@media (max-width: 480px) {
  .header__title span {
    font-size: 1.5rem;
  }

  .header--small {
    min-height: 150px;
  }

  .sidebar .nav__item {
    width: 120px;
  }

  .content {
    padding: 1rem;
  }
}
