/*
 * Rapide theme: shared UI components.
 * Keep reusable layout and component rules here.
 */

.surface {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: 1rem;
}

.site-header__panel,
.mobile-panel,
.site-footer,
.hero-search,
.post-card,
.service-card,
.pricing-card,
.stat-card,
.auth-card,
.article-shell,
.empty-state,
.editor-surface {
  padding: 1.5rem;
}

.site-header__panel,
.mobile-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-shell {
  width: min(100% - 2rem, var(--shell));
  margin-inline: auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.site-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1.2rem;
  background: #020617;
  color: #fff;
}

.theme-dark .site-brand__mark {
  background: #fff;
  color: #020617;
}

.site-brand__mark svg {
  width: 1.5rem;
  height: 1.5rem;
}

.site-brand__title {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-brand__tagline,
.stat-copy,
.entry-content p,
.service-card p,
.pricing-card p,
.post-card p,
.helper-list,
.helper-panel p {
  color: var(--muted);
}

.site-nav {
  justify-self: center;
}

.menu-list,
.footer-links,
.helper-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-list {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.menu-list a,
.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
}

.menu-list a:hover,
.footer-links a:hover,
.post-card a:hover {
  color: var(--brand);
}

.site-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.site-actions--compact {
  gap: 0.5rem;
}

.site-actions--member {
  gap: 0.85rem;
}

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

.language-switcher__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.language-switcher__link:hover {
  color: var(--brand);
  border-color: rgba(47, 111, 237, 0.32);
}

.language-switcher__link--current {
  background: rgba(47, 111, 237, 0.08);
  color: var(--brand);
  border-color: rgba(47, 111, 237, 0.22);
}

.language-menu {
  position: relative;
}

.language-menu__trigger,
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  font-weight: 700;
}

.theme-dark .language-menu__trigger,
.theme-dark .member-chip {
  background: rgba(15, 23, 42, 0.92);
}

.language-menu__trigger:hover,
.member-chip:hover {
  border-color: rgba(47, 111, 237, 0.32);
  color: var(--brand);
}

.language-menu__icon,
.language-menu__caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.language-menu__icon svg,
.language-menu__caret svg {
  width: 1rem;
  height: 1rem;
}

.language-menu__panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 11rem;
  padding: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.theme-dark .language-menu__panel {
  background: rgba(15, 23, 42, 0.96);
}

.language-menu__panel[hidden] {
  display: none;
}

.language-menu__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 0.85rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.language-menu__option:hover {
  background: rgba(148, 163, 184, 0.12);
}

.language-menu__option[aria-current="true"] {
  background: rgba(47, 111, 237, 0.08);
  color: var(--brand);
}

.language-menu__option-code {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.member-chip__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.member-chip__name {
  color: var(--text);
  font-weight: 700;
}

.member-name {
  color: var(--text);
  font-weight: 700;
}

.site-brand--member .site-brand__title {
  font-size: 1.15rem;
}

.site-brand--member .site-brand__tagline {
  font-size: 0.92rem;
}

.theme-toggle,
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.theme-dark .theme-toggle,
.theme-dark .menu-toggle {
  background: rgba(15, 23, 42, 0.9);
}

.theme-toggle svg,
.menu-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

.theme-dark .theme-toggle__sun,
.theme-toggle__moon {
  display: none;
}

.theme-dark .theme-toggle__moon {
  display: inline-flex;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}

.button--primary:hover {
  background: var(--brand-strong);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
}

.cta-primary,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.8rem 1.25rem;
  border-radius: 1rem;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cta-primary:hover,
.cta-secondary:hover {
  transform: translateY(-1px);
}

.cta-primary {
  background: var(--brand);
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 18px 40px -24px rgba(47, 111, 237, 0.45);
}

.cta-primary:hover {
  background: var(--brand-strong);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--border);
  color: var(--text);
}

.theme-dark .cta-secondary {
  background: rgba(15, 23, 42, 0.92);
}

.theme-dark .button--ghost {
  background: rgba(15, 23, 42, 0.92);
}

.button--large {
  min-height: 3.75rem;
  font-size: 1rem;
}

.button--small {
  min-height: 2.5rem;
  padding-inline: 1rem;
}

.desktop-only {
  display: none;
}

.mobile-panel {
  margin-top: 0.85rem;
}

.menu-list--mobile {
  display: grid;
  gap: 0.75rem;
}

.mobile-panel__actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mobile-panel__language {
  margin-top: 1rem;
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(47, 111, 237, 0.22);
  background: rgba(47, 111, 237, 0.08);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.section-title--small {
  font-size: clamp(1.85rem, 3.5vw, 2.7rem);
}

.section-copy,
.entry-content,
.post-card p,
.service-card p,
.pricing-card p {
  font-size: 1.05rem;
}

.field-group {
  display: grid;
  gap: 0.5rem;
}

.field-label {
  font-weight: 800;
}

.field-input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
}

.theme-dark .field-input {
  background: rgba(15, 23, 42, 0.84);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.lift-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(47, 111, 237, 0.18);
  background: rgba(47, 111, 237, 0.08);
  color: var(--brand);
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 1.15rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-link:hover {
  color: var(--brand);
}

.app-link-active,
.app-link[aria-current="page"] {
  background: rgba(47, 111, 237, 0.16);
  color: #5fa0ff;
}

.text-balance {
  text-wrap: balance;
}

.card-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stats-grid,
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.post-card .card-title a {
  color: var(--text);
}

.footer-grid {
  grid-template-columns: 1.3fr 1fr 1fr;
  align-items: start;
}

.footer-grid--public {
  grid-template-columns: 1.2fr 0.9fr 1fr 1fr;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 0;
}

.site-footer--compact {
  padding-top: 0.5rem;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-links--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-heading {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.footer-surface {
  padding: 1rem 1.25rem;
}

.footer-meta {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
}

.footer-meta--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-nav .menu-list--app a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.app-nav .menu-list--app a.is-current,
.app-nav .menu-list--app a[aria-current="page"] {
  background: rgba(47, 111, 237, 0.16);
  color: #5fa0ff;
}

.empty-state {
  text-align: center;
}

.editor-surface {
  padding: 1.5rem;
}

.entry-content > * + * {
  margin-top: 1rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content a {
  color: var(--brand);
}

.wp-block-image img {
  border-radius: 1rem;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.page-numbers {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-weight: 800;
}

.page-numbers.current {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

@media (min-width: 768px) {
  .desktop-only {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .site-nav {
    display: none;
  }
}

@media (max-width: 767px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-branding {
    grid-column: 1 / 2;
  }

  .site-actions {
    justify-self: end;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links--inline,
  .footer-meta--split {
    flex-direction: column;
    align-items: flex-start;
  }
}
