/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .btn--primary {
    color: #0b241a;
  }
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn--lg {
  padding: 0.9rem 1.8rem;
  font-size: var(--step-1);
}

.btn--sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  min-height: 36px;
  border-radius: var(--radius);
}

/* Cards */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.cards--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.cards--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.cards--auto {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-card);
  border-top: 3px solid var(--card-accent, var(--accent));
}

.section--alt .card {
  background: var(--bg);
}

.card__title {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card__text {
  color: var(--text-muted);
}

/* Language switcher */
.lang-switcher {
  position: relative;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.lang-switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.16);
  min-width: 10rem;
  z-index: 60;
}

@supports ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))) {
  .lang-switcher__menu {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
  }
}

.lang-switcher__menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.lang-switcher__menu a:hover {
  background: var(--bg);
}

.lang-switcher__menu a[aria-current="true"] {
  font-weight: 700;
  color: var(--accent);
}

/* Phone frame (hero) */
.phone {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2.5rem;
  padding: 0.75rem;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.18);
  width: min(100%, 20rem);
  margin-inline: auto;
}

.phone img {
  border-radius: 1.9rem;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  counter-reset: step;
}

@media (min-width: 48em) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.steps__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .steps__num {
    color: #0b241a;
  }
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.75rem;
}

.faq__item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.25rem;
}

.faq__question {
  display: block;
  width: 100%;
  margin: 0;
  padding: 1rem 2rem 1rem 0;
  background: none;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 600;
  font-size: var(--step-0);
  color: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.faq__question::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  translate: 0 -50%;
  font-size: var(--step-2);
  color: var(--accent);
  line-height: 1;
}

.faq__question[aria-expanded="true"]::after {
  content: "–";
}

.faq__answer {
  padding-bottom: 1rem;
  color: var(--text-muted);
}

/* JS-enhanced accordion: collapse visually via grid rows so answers
   stay in the DOM and render tree (SEO/GEO friendly, no display:none). */
.faq[data-enhanced] .faq__answer {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.3s ease, padding-bottom 0.3s ease;
}

.faq[data-enhanced] .faq__answer-inner {
  overflow: hidden;
  min-height: 0;
}

.faq[data-enhanced] .faq__item.is-collapsed .faq__answer {
  grid-template-rows: 0fr;
  padding-bottom: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 0.8);
}

.lightbox__body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(100%, 30rem);
  flex-direction: column;
}

.lightbox__img {
  max-height: 75vh;
  width: auto;
  border-radius: var(--radius);
  background: var(--surface);
}

.lightbox__caption {
  color: #fff;
  text-align: center;
}

.lightbox__close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.lightbox__nav {
  background: rgb(255 255 255 / 0.12);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 3rem;
  height: 3rem;
  cursor: pointer;
}

@media (min-width: 48em) {
  .lightbox__body {
    flex-direction: row;
  }

  .lightbox__caption {
    position: absolute;
    bottom: -2.5rem;
    width: 100%;
  }
}
