/*
 * Vivoices dark theme and migration-specific components.
 */

:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
  --q2-bg: #07090d;
  --q2-bg-elev: #10151c;
  --q2-bg-muted: #151d26;
  --q2-text: #eef5f7;
  --q2-text-strong: #ffffff;
  --q2-text-muted: #9fb0b9;
  --q2-divider: rgba(191, 229, 238, 0.13);
  --q2-border-ring: rgba(117, 217, 232, 0.16);
  --q2-border-strong: rgba(117, 217, 232, 0.26);
  --q2-nav-bg: rgba(7, 9, 13, 0.86);
  --q2-nav-border: rgba(117, 217, 232, 0.16);
  --q2-accent: #66d9e8;
  --q2-accent-contrast: #041014;
  --q2-link: #8ce7f1;
  --q2-focus-ring: rgba(102, 217, 232, 0.35);
  --pico-background-color: var(--q2-bg);
  --pico-card-background-color: var(--q2-bg-elev);
  --pico-color: var(--q2-text);
  --pico-muted-color: var(--q2-text-muted);
  --pico-primary: var(--q2-link);
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(102, 217, 232, 0.14), transparent 34rem),
    linear-gradient(180deg, #07090d 0%, #0a1017 44%, #07090d 100%);
}

#header {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

#body-wrapper {
  background: transparent;
}

#body-wrapper > .container > .content-item {
  background: linear-gradient(180deg, rgba(16, 21, 28, 0.96), rgba(10, 14, 19, 0.96));
  border: 1px solid var(--q2-border-ring);
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.content-item h1 {
  color: var(--q2-text-strong);
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
}

.content-item a:not(.video-card) {
  color: var(--q2-link);
}

.navbar-brand img {
  height: 42px;
}

.dropmenu a {
  color: var(--q2-text);
}

.dropmenu a.active,
.dropmenu a:hover {
  color: var(--q2-link);
}

.language-switcher ul {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.language-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  min-height: 2rem;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--q2-border-strong, currentColor);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.language-switcher a.active,
.language-switcher a:hover {
  background: var(--q2-accent, currentColor);
  border-color: var(--q2-accent, currentColor);
  color: var(--q2-accent-contrast, #fff);
}

.video-embed {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin: 1.5rem auto 0;
  overflow: hidden;
  border: 1px solid var(--q2-border-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(102, 217, 232, 0.18), transparent 42%),
    #050608;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-facade {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.video-facade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.video-facade__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.74)),
    radial-gradient(circle at center, rgba(102, 217, 232, 0.2), transparent 46%);
}

.video-facade__play {
  position: relative;
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  background: rgba(5, 10, 14, 0.78);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.video-facade__play::before {
  position: absolute;
  top: 50%;
  left: 53%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-block: 0.85rem solid transparent;
  border-inline-start: 1.3rem solid #fff;
  content: "";
}

.video-facade__title {
  position: absolute;
  right: 1.25rem;
  bottom: 1rem;
  left: 1.25rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.content-item .video-title {
  margin: 2.25rem 0 0;
  color: var(--q2-text-strong);
  font-size: clamp(1.2rem, 1.8vw, 1.65rem);
  line-height: 1.2;
}

.content-item h1 + .video-title {
  margin-top: 1.5rem;
}

.video-facade:hover .video-facade__play,
.video-facade:focus-visible .video-facade__play {
  border-color: var(--q2-link);
  background: rgba(102, 217, 232, 0.18);
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.video-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--q2-border-strong, rgba(127, 127, 127, 0.25));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--q2-text);
  text-decoration: none;
}

.video-card:hover {
  border-color: var(--q2-link);
  color: var(--q2-text-strong);
  text-decoration: none;
}

.video-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

[dir="rtl"] .content-item,
[dir="rtl"] .navigation,
[dir="rtl"] .overlay-menu {
  text-align: right;
}

[dir="rtl"] .language-switcher ul {
  direction: ltr;
}

#footer {
  background: rgba(7, 9, 13, 0.9);
}
