/* Smyčka project header & footer */

.smycka-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(10, 8, 7, 0.96);
  border-bottom: 1px solid var(--color-border, #2a2228);
  box-shadow: 0 1px 0 rgba(196, 92, 255, 0.14);
  backdrop-filter: blur(8px);
}

.smycka-header__bar-inner {
  max-width: var(--layout-max, 72rem);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-padding-x, 1.25rem);
  padding-right: var(--layout-padding-x, 1.25rem);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.75rem;
  min-height: 3rem;
}

.smycka-header--compact .smycka-header__brand {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  flex-shrink: 0;
}

.smycka-header--compact .smycka-header__brand-link {
  white-space: nowrap;
}

.smycka-header--compact .smycka-header__crest {
  width: auto;
  min-width: 3.25rem;
  gap: 0.35rem;
}

.smycka-header--compact .smycka-header__title {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
}

/* Homepage uses the compact sticky bar; the large logo lives in .page-header */

.smycka-header__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  flex-shrink: 0;
}

.smycka-header__brand-link {
  color: var(--color-ink, #f4efe9);
  text-decoration: none;
}

.smycka-header__brand-link:hover,
.smycka-header__brand-link:focus {
  color: var(--color-ink, #f4efe9);
}

.smycka-header__title {
  margin: 0;
  font-family: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow:
    0 0 20px rgba(196, 92, 255, 0.14),
    0 0 40px rgba(140, 60, 200, 0.12);
}

.smycka-header--compact .smycka-header__title {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

.smycka-header__crest {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: min(12rem, 72%);
}

.smycka-header--compact .smycka-header__crest {
  width: min(8rem, 56%);
  gap: 0.4rem;
}

.smycka-header__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(143, 78, 200, 0.85) 35%,
    rgba(196, 92, 255, 0.95) 50%,
    rgba(143, 78, 200, 0.85) 65%,
    transparent
  );
  box-shadow: 0 0 10px rgba(196, 92, 255, 0.14);
}

.smycka-header__infinity {
  display: block;
  flex-shrink: 0;
  color: var(--color-accent, #c45cff);
  filter:
    drop-shadow(0 0 3px rgba(224, 138, 255, 0.95))
    drop-shadow(0 0 10px rgba(196, 92, 255, 0.75));
}

.smycka-header--compact .smycka-header__infinity {
  width: 1.65rem;
  height: 0.85rem;
}

.smycka-header__tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

.smycka-header__start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: var(--color-accent, #c45cff);
  color: #140c18 !important;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.smycka-header__start:hover,
.smycka-header__start:focus,
.smycka-header__start:focus-visible {
  background: var(--color-accent-hover, #e08aff);
  color: #120a16 !important;
  outline: 2px solid rgba(244, 239, 233, 0.55);
  outline-offset: 2px;
}

.smycka-header .lang-switcher {
  gap: 0;
  padding: 0.15rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 92, 255, 0.22);
  background: rgba(22, 16, 26, 0.72);
  box-shadow: none;
}

.smycka-header .lang-switcher__link {
  min-width: 2rem;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.smycka-header .lang-switcher__flag {
  display: none;
}

.smycka-header .lang-switcher__code {
  line-height: 1;
}

.smycka-header--compact .smycka-header__bar {
  position: relative;
}

.smycka-header--compact .smycka-header__bar-inner {
  padding-right: var(--layout-padding-x, 1.25rem);
}

.smycka-book-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 0;
}

.smycka-book-actions--header {
  flex: 0 1 auto;
  min-width: 0;
}

.smycka-book-actions__action {
  position: relative;
  flex-shrink: 0;
}

.smycka-book-actions__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.7rem 0.42rem 0.85rem;
  border: 1px solid rgba(196, 92, 255, 0.35);
  border-radius: var(--radius-sm, 0.35rem);
  background: linear-gradient(
    180deg,
    rgba(155, 63, 212, 0.28) 0%,
    rgba(120, 40, 180, 0.18) 100%
  );
  color: #f4efe9;
  font-family: var(--font-sans, "Source Sans 3", sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.smycka-book-actions__toggle--listen {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(22, 16, 26, 0.78);
  color: #cfc4bc;
}

a.smycka-book-actions__toggle {
  text-decoration: none;
  box-sizing: border-box;
}

a.smycka-book-actions__toggle--vote {
  border-color: rgba(0, 229, 255, 0.4);
  background: linear-gradient(
    180deg,
    rgba(0, 180, 200, 0.28) 0%,
    rgba(0, 120, 140, 0.16) 100%
  );
  color: #e8f7fa;
  padding-right: 0.95rem;
}

a.smycka-book-actions__toggle--vote:hover,
a.smycka-book-actions__toggle--vote:focus {
  border-color: rgba(0, 229, 255, 0.7);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.18);
  outline: none;
}

body.page--smycka a.smycka-book-actions__toggle--vote,
body.page--smycka a.smycka-book-actions__toggle--vote:visited {
  color: #e8f7fa;
}

body.page--smycka a.smycka-book-actions__toggle--vote:hover,
body.page--smycka a.smycka-book-actions__toggle--vote:focus {
  color: #ffffff;
}

.smycka-book-actions__toggle:hover,
.smycka-book-actions__toggle:focus,
.smycka-book-actions__action.is-open .smycka-book-actions__toggle {
  border-color: var(--color-accent, #c45cff);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(196, 92, 255, 0.18);
  outline: none;
}

.smycka-book-actions__toggle--listen:hover,
.smycka-book-actions__toggle--listen:focus,
.smycka-book-actions__action.is-open .smycka-book-actions__toggle--listen {
  border-color: rgba(196, 92, 255, 0.5);
  color: #f4efe9;
  background: rgba(38, 28, 44, 0.95);
}

a.smycka-book-actions__toggle--vote:hover,
a.smycka-book-actions__toggle--vote:focus,
body.page--smycka a.smycka-book-actions__toggle--vote:hover,
body.page--smycka a.smycka-book-actions__toggle--vote:focus {
  border-color: rgba(0, 229, 255, 0.7);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.18);
  outline: none;
}

.smycka-book-actions__chevron {
  width: 0.4rem;
  height: 0.4rem;
  margin-top: -0.12rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.smycka-book-actions__action.is-open .smycka-book-actions__chevron {
  margin-top: 0.12rem;
  transform: rotate(225deg);
}

.smycka-book-actions__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 12.5rem;
  padding: 0.4rem;
  border: 1px solid rgba(196, 92, 255, 0.28);
  border-radius: var(--radius-sm, 0.35rem);
  background: rgba(12, 9, 14, 0.98);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 18px rgba(196, 92, 255, 0.1);
  transform: translateX(-50%);
}

.smycka-book-actions__menu[hidden] {
  display: none;
}

.smycka-book-actions__item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.3rem;
  color: #cfc4bc;
  font-family: var(--font-sans, "Source Sans 3", sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.smycka-book-actions__item:hover,
.smycka-book-actions__item:focus {
  color: #f4efe9;
  background: rgba(38, 28, 44, 0.95);
  outline: none;
}

.smycka-book-actions__item--soon {
  cursor: default;
  opacity: 0.72;
  pointer-events: none;
}

.smycka-book-actions__item--soon:hover,
.smycka-book-actions__item--soon:focus {
  color: #cfc4bc;
  background: transparent;
}

.smycka-book-actions__item .smycka-chapter__web-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  color: currentColor;
}

.smycka-book-actions__item .smycka-chapter__web-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.smycka-book-actions__item i {
  width: 0.95rem;
  font-size: 0.9rem;
  line-height: 1;
  text-align: center;
}

.smycka-book-actions__item .fa-spotify {
  color: #1db954;
}

.smycka-book-actions__item .fa-youtube {
  color: #ff4d4d;
}

.smycka-book-actions__item .fa-apple {
  color: #f4efe9;
}

.smycka-book-actions__file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7rem;
  padding: 0.12rem 0.2rem;
  border-radius: 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
}

.smycka-book-actions__file-icon--pdf {
  background: #d0442a;
}

.smycka-book-actions__file-icon--epub {
  background: #5b4d9a;
}

.smycka-book-actions__file-icon--mobi {
  background: #f6993f;
}

.smycka-book-actions__seznam-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 0.15rem;
  background: #c8102e;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

.smycka-book-actions--hero {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.smycka-book-actions--hero .smycka-book-actions__toggle {
  min-height: 2.75rem;
  padding: 0.65rem 1rem 0.65rem 1.15rem;
  font-size: 0.98rem;
}

.smycka-book-actions--hero .smycka-book-actions__menu {
  top: auto;
  bottom: calc(100% + 0.4rem);
  left: 0;
  min-width: 14rem;
  z-index: 30;
  transform: none;
}

.smycka-book-actions--hero .smycka-book-actions__item {
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
}

@media (max-width: 767px) {
  .smycka-book-actions--hero {
    flex-direction: column;
    align-items: stretch;
  }

  .smycka-book-actions--hero .smycka-book-actions__toggle {
    width: 100%;
    justify-content: center;
  }

  .smycka-book-actions--hero .smycka-book-actions__menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }
}

.smycka-header .lang-switcher {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  gap: 0;
  padding: 0.15rem;
  border-radius: 999px;
  border: 1px solid rgba(196, 92, 255, 0.22);
  background: rgba(22, 16, 26, 0.72);
  box-shadow: none;
}

.smycka-header .lang-switcher__link {
  min-width: 2rem;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  color: #c8bdb6;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.smycka-header .lang-switcher__flag {
  display: none;
}

.smycka-header .lang-switcher__link:hover {
  color: #f4efe9;
  background: rgba(38, 28, 44, 0.9);
}

.smycka-header .lang-switcher__link.is-active {
  color: #140c18;
  background: var(--color-accent, #c45cff);
}

.smycka-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid rgba(196, 92, 255, 0.28);
  border-radius: var(--radius-sm, 0.35rem);
  background: rgba(22, 16, 26, 0.92);
  color: #f4efe9;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.smycka-header__menu-toggle:hover,
.smycka-header__menu-toggle:focus {
  border-color: var(--color-accent, #c45cff);
  box-shadow: 0 0 12px rgba(196, 92, 255, 0.14);
  outline: none;
}

.smycka-header__menu-icon,
.smycka-header__menu-icon::before,
.smycka-header__menu-icon::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.smycka-header__menu-icon {
  position: relative;
}

.smycka-header__menu-icon::before,
.smycka-header__menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.smycka-header__menu-icon::before {
  top: -0.35rem;
}

.smycka-header__menu-icon::after {
  top: 0.35rem;
}

.smycka-header--nav-open .smycka-header__menu-icon {
  background: transparent;
}

.smycka-header--nav-open .smycka-header__menu-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.smycka-header--nav-open .smycka-header__menu-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.smycka-header__nav {
  flex: 1 1 auto;
  min-width: 0;
}

.smycka-header__nav-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.smycka-header__nav-list::-webkit-scrollbar {
  display: none;
}

.smycka-header__nav-link {
  display: inline-block;
  padding: 0.45rem 0.72rem;
  font-family: var(--font-sans, "Source Sans 3", sans-serif);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  white-space: nowrap;
  color: #c8bdb6;
  text-decoration: none;
  border-radius: var(--radius-sm, 0.35rem);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.smycka-header__nav-link:hover,
.smycka-header__nav-link:focus {
  color: var(--color-accent, #c45cff);
  background: rgba(38, 28, 44, 0.72);
  outline: none;
}

.smycka-header__nav-link.is-active,
.smycka-header__nav-item.is-active .smycka-header__nav-link {
  color: var(--color-accent, #c45cff);
  background: rgba(38, 28, 44, 0.82);
  box-shadow: 0 0 12px rgba(196, 92, 255, 0.14);
}

/* Footer */
.smycka-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid rgba(196, 92, 255, 0.28);
  background: rgba(6, 5, 4, 0.92);
  box-shadow: inset 0 1px 0 rgba(196, 92, 255, 0.14);
}

.smycka-footer__inner {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 var(--layout-padding-x, 1.25rem);
  text-align: center;
}

.smycka-footer__attribution {
  margin: 0 0 1rem;
  font-family: var(--font-sans, "Source Sans 3", sans-serif);
  font-size: 0.92rem;
  color: #cfc4bc;
}

.smycka-footer__attribution a {
  font-weight: 600;
  text-decoration: none;
}

.smycka-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.smycka-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #c8bdb6;
  border: 1px solid rgba(196, 92, 255, 0.22);
  border-radius: 50%;
  background: rgba(22, 16, 26, 0.72);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.smycka-footer__social a:hover,
.smycka-footer__social a:focus {
  color: var(--color-accent, #c45cff);
  border-color: rgba(196, 92, 255, 0.45);
  background: rgba(38, 28, 44, 0.9);
  box-shadow: 0 0 12px rgba(196, 92, 255, 0.14);
  outline: none;
}

.smycka-footer__legal {
  margin: 0;
  font-size: 0.78rem;
}

.smycka-footer__legal a {
  color: #b8aea6;
  text-decoration: none;
}

.smycka-footer__legal a:hover,
.smycka-footer__legal a:focus {
  color: var(--color-accent, #c45cff);
  text-decoration: underline;
}

@media (max-width: 991px) {
  .smycka-header__menu-toggle {
    display: inline-flex;
  }

  .smycka-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    flex: none;
    border-top: 1px solid rgba(196, 92, 255, 0.12);
    background: rgba(8, 6, 5, 0.98);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  }

  .smycka-header--nav-open .smycka-header__nav {
    display: block;
  }

  .smycka-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.35rem var(--layout-padding-x, 1.25rem) 0.75rem;
    overflow-x: visible;
  }

  .smycka-header__nav-link {
    padding: 0.55rem 0.9rem;
    font-size: 0.94rem;
    text-align: center;
  }
}

@media (min-width: 992px) {
  .smycka-header__menu-toggle {
    display: none;
  }
}
