:root {
  --brand: #6ec8b0;
  --brand-2: #8fd4ff;
  --ink: #0b1220;
  --paper: #0b1220;
  --surface: #0f172a;
  --muted: rgba(226, 232, 240, 0.72);
}

@media (min-width: 992px) {
  .navbar-collapse {
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
  }

  .navbar-collapse .navbar-nav {
    margin-bottom: 0;
  }

  .navbar-collapse .nav-cta {
    flex-direction: row;
    gap: 12px;
  }

  .navbar-collapse .nav-cta .btn {
    width: auto;
  }

  .navbar .navbar-nav.flex-row .nav-link {
    padding: 0.25rem 0;
  }
  .navbar .navbar-nav.flex-row {
    gap: 1.25rem;
  }
}

.sidebar-panel {
  position: sticky;
  top: 82px;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e5e7eb;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-nav a:hover {
  background: rgba(110, 200, 176, 0.12);
  color: #fff;
}

.sidebar-nav .active {
  background: rgba(110, 200, 176, 0.18);
  border: 1px solid rgba(110, 200, 176, 0.35);
  color: #fff;
}

html {
  height: 100%;
}

body {
  color: #e5e7eb;
  background: var(--paper);
  min-height: 100vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: scroll;
}

.mobile-nav-offset {
  padding-bottom: 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  width: 0;
  z-index: 999;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
  margin-top: auto;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  z-index: 1100;
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45);
}

.mobile-nav-spacer {
  height: 0;
}

.mobile-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.72rem;
  color: rgba(229, 231, 235, 0.7);
  text-decoration: none;
  padding: 4px 0;
}

.mobile-nav-link i {
  font-size: 1.25rem;
}

.mobile-nav-link.active,
.mobile-nav-link:focus,
.mobile-nav-link:hover {
  color: var(--brand);
}

.bg-hero {
  background: radial-gradient(1000px 500px at 10% 10%, rgba(110, 200, 176, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(143, 212, 255, 0.16), transparent 55%),
    linear-gradient(180deg, #0b1220 0%, #0b1220 40%, #0b1220 100%);
}

.bg-surface {
  background: var(--surface);
}

.glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.text-soft {
  color: rgba(255, 255, 255, 0.72);
}

.text-secondary {
  color: var(--muted) !important;
}

.badge-soft {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
}

.btn-brand {
  position: relative;
  background: transparent;
  color: var(--brand);
  border: 1px solid rgba(110, 200, 176, 0.6);
  --bs-btn-hover-bg: rgba(110, 200, 176, 0.08);
  --bs-btn-hover-border-color: rgba(110, 200, 176, 0.85);
  --bs-btn-color: var(--brand);
  overflow: hidden;
}

.btn-outline-light {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.35);
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: #0b1220;
  overflow: hidden;
}

.btn-outline-dark {
  --bs-btn-color: #e5e7eb;
  --bs-btn-border-color: rgba(255, 255, 255, 0.25);
  --bs-btn-hover-bg: #1f2937;
  --bs-btn-hover-border-color: #1f2937;
  overflow: hidden;
}

.btn,
.btn-brand,
.btn-outline-light,
.btn-outline-dark {
  position: relative;
}

.btn::after,
.btn-brand::after,
.btn-outline-light::after,
.btn-outline-dark::after {
  content: "";
  position: absolute;
  inset: -10%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 46%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.08) 54%, transparent 100%);
  opacity: 0;
  transform: translateX(-40%);
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.btn:hover::after,
.btn:focus-visible::after,
.btn-brand:hover::after,
.btn-outline-light:hover::after,
.btn-outline-dark:hover::after {
  opacity: 1;
  animation: btn-sweep 1.6s ease-in-out infinite alternate;
}

@keyframes btn-sweep {
  0% {
    transform: translateX(-60%);
    opacity: 0;
  }
  12% {
    transform: translateX(-60%);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  75% {
    transform: translateX(60%);
    opacity: 1;
  }
  88% {
    transform: translateX(60%);
    opacity: 0;
  }
  100% {
    transform: translateX(60%);
    opacity: 0;
  }
}


.icon-pill {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(110, 200, 176, 0.12);
  border: 1px solid rgba(110, 200, 176, 0.22);
  color: var(--brand);
}

.panel {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.section-pad {
  padding: 72px 0;
}

.panel:hover {
  /*transform: translateY(-4px);*/
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-color: rgba(110, 200, 176, 0.3);
}

.btn,
.nav-link,
.icon-pill,
.accordion-button {
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-brand:hover {
  box-shadow: 0 10px 25px rgba(110, 200, 176, 0.35);
  transform: translateY(-1px);
}

.btn-outline-dark:hover,
.btn-outline-light:hover {
  transform: translateY(-1px);
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: #fff;
  transform: translateY(-1px);
}

.table-dark tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: border-color 0.2s ease;
}

.lang-btn img {
  border-radius: 3px;
  display: block;
}

.lang-btn:hover {
  border-color: rgba(110, 200, 176, 0.6);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 8px;
  list-style: none;
  margin: 0;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  transition-delay: 0.3s, 0.3s;
}

.lang-dropdown-inner {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 0;
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.lang-switcher:hover .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s, 0s;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-option img {
  border-radius: 3px;
  flex-shrink: 0;
}

.lang-option:hover {
  background: rgba(110, 200, 176, 0.1);
  color: #fff;
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse-bar {
  0% { width: 0; }
  100% { width: var(--target-width, 100%); }
}

.progress.animate .progress-bar {
  animation: pulse-bar 1.2s ease-out forwards;
}

.support-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(110, 200, 176, 0.12);
  border: 1px solid rgba(110, 200, 176, 0.32);
  color: #e8fff8;
  font-size: 0.9rem;
  white-space: nowrap;
}

.accordion-button:not(.collapsed) {
  box-shadow: none;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.78);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.active {
  color: #fff;
}

.form-control,
.form-select {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.form-control:focus,
.form-select:focus {
  background: #0f172a;
  color: #fff;
  border-color: rgba(109, 94, 252, 0.6);
  box-shadow: 0 0 0 0.2rem rgba(109, 94, 252, 0.25);
}

.form-control::placeholder {
  color: rgba(229, 231, 235, 0.7);
}

.table-dark th,
.table-dark td {
  border-color: rgba(255, 255, 255, 0.08);
}

a {
  color: #cdd5ff;
}

a:hover {
  color: #fff;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.template-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.template-meta {
  margin-top: auto;
}

.template-thumb-img {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(110,200,176,0.16), rgba(143,212,255,0.1)),
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08), transparent 35%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06), transparent 40%),
    #0f172a;
}

.stats-panel {
  position: relative;
  overflow: hidden;
}

.stats-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(143, 212, 255, 0.18), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(110, 200, 176, 0.18), transparent 40%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(17,24,39,0.5));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: -40% 0 auto;
  height: 75%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(110, 200, 176, 0.45);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.45);
}

.stat-card:hover::after {
  transform: translateX(120%);
}

.counter {
  display: inline-block;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(110, 200, 176, 0.2);
  border: 1px solid rgba(110, 200, 176, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 4px;
}

.stat-card small {
  margin-top: auto;
}

.text-brand {
  color: var(--brand) !important;
}

.contact-form .form-control,
.contact-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e5e7eb;
}

.contact-form .form-control:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.2rem rgba(110, 200, 176, 0.15);
}

.contact-form .form-label {
  letter-spacing: 0.02em;
}

.contact-form button {
  box-shadow: 0 4px 10px rgba(110, 200, 176, 0.2);
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    width: 100%;
    background: rgba(11, 18, 32, 0.95);
    padding: 16px 0;
    border-radius: 18px;
    margin-top: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
  }

  .navbar-collapse .navbar-nav {
    width: 100%;
    margin-bottom: 1rem;
  }

  .navbar-collapse .navbar-nav .nav-link {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .navbar-collapse .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }

  .navbar-collapse .nav-cta .btn {
    width: 100%;
  }

  .navbar-collapse .support-badge {
    width: fit-content;
  }

  .mobile-nav-offset {
    padding-bottom: 0;
  }

  .site-footer {
    /*padding-bottom: calc(90px + env(safe-area-inset-bottom));*/
    margin-bottom: 80px;
  }

  .mobile-nav-spacer {
    height: 0;
  }
}
