.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
 transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

/* .theme-toggle icon display rules overridden in style.css */

.mobile-theme-toggle-wrap {
  display: none;
}

.header-user-name {
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-main {
  width: calc(100% - 20px);
  max-width: 1100px;
  padding-inline: 14px;
}

.header-main--offset {
  margin-top: 40px;
}

#site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

#site-nav ul {
  gap: 12px;
  flex-wrap: nowrap;
}

#site-nav ul li {
  flex-shrink: 0;
}

.login {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex: 0 1 fit-content;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
}

.desktop-header-tools {
  display: flex;
}

.login .btn {
  padding-inline: 14px;
}

/* Header (light mode): "Kirish" tugmasi kontrasti aniq ko'rinsin */
:root:not([data-theme='dark']) .page-header .login--guest .btn-outline {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
}

:root:not([data-theme='dark']) .page-header .login--guest .btn-outline:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.82);
}

.login--guest {
  gap: 5px;
  flex-basis: auto;
  flex-shrink: 1;
  width: auto;
}

.login--guest .locale-switcher {
  padding: 2px;
}

.login--guest .locale-switcher-link {
  min-width: 34px;
  padding: 6px 8px;
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.login--guest .theme-toggle {
  width: 38px;
  height: 38px;
}

.login--guest .btn {
  padding: 8px 12px;
  font-size: 12px;
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(8px);
  position: relative;
  transition: all 0.3s ease;
}

.locale-switcher:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(13, 63, 120, 0.15), inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.locale-switcher-link {
  min-width: 42px;
  padding: 6px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  text-decoration: none;
  z-index: 1;
  position: relative;
  transition: color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.locale-switcher-link:hover {
  color: #fff;
}

.locale-switcher-link:active {
  transform: scale(0.9);
  transition-duration: 0.08s;
}

.locale-switcher-link.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.locale-switcher-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #3b82f6, #ec4899);
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.4);
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
  pointer-events: none;
}

[data-theme='dark'] .locale-switcher {
  border-color: rgba(14, 165, 233, 0.2);
  background: rgba(11, 21, 36, 0.5);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .locale-switcher:hover {
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25), inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .locale-switcher-slider {
  background: linear-gradient(135deg, #0ea5e9, #a855f7);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4), 0 0 8px rgba(14, 165, 233, 0.5);
}

.locale-switcher-link.is-loading {
  pointer-events: none;
  opacity: 0.72;
  animation: locale-link-pulse 0.9s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

@keyframes locale-link-pulse {
  from { opacity: 0.72; transform: scale(1); }
  to { opacity: 0.55; transform: scale(0.94); }
}

.site-shell {
  position: relative;
  animation: locale-shell-enter 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.38s ease;
  transform-origin: 50% 0;
}

.site-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-120%, 0, 0);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
  background: linear-gradient(
    105deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.06) 25%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.06) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 9999;
}

.locale-transition-pending .site-shell,
.locale-switching-out .site-shell {
  pointer-events: none;
  will-change: opacity, transform, filter;
}

.locale-transition-pending .site-shell {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.982);
  filter: blur(10px);
}

.locale-switching-out .site-shell {
  opacity: 0;
  transform: translate3d(0, -22px, 0) scale(0.982);
  filter: blur(8px);
}

.locale-transition-pending .site-shell::after,
.locale-switching-out .site-shell::after {
  opacity: 1;
  transform: translate3d(120%, 0, 0);
}

[data-theme='dark'] .site-shell::after {
  background: linear-gradient(
    105deg,
    rgba(18, 28, 45, 0) 0%,
    rgba(96, 165, 250, 0.12) 30%,
    rgba(126, 182, 255, 0.22) 50%,
    rgba(96, 165, 250, 0.12) 70%,
    rgba(18, 28, 45, 0) 100%
  );
}

@keyframes locale-shell-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.982);
    filter: blur(10px);
  }
  40% {
    opacity: 0.6;
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown--offset {
  margin-top: 5px;
}

.nav-dropdown-details {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.nav-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.nav-dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.nav-dropdown-details[open] .nav-dropdown-toggle i {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
  z-index: 9999;
}

:root[data-theme='dark'] .nav-dropdown-menu {
  background: rgba(6, 31, 58, 0.96);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 34px rgba(4, 23, 47, 0.26);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #1e293b;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

:root[data-theme='dark'] .nav-dropdown-item {
  color: #fff;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  transform: translateY(-1px);
}

:root[data-theme='dark'] .nav-dropdown-item:hover,
:root[data-theme='dark'] .nav-dropdown-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-dropdown-item-disabled {
  cursor: default;
  opacity: 0.72;
}

.nav-dropdown-item-disabled:hover {
  background: transparent;
  transform: none;
}

.nav-dropdown-item-note {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
}

:root[data-theme='dark'] .nav-dropdown-item-note {
  color: rgba(255, 255, 255, 0.7);
}

.nav-dropdown-form {
  margin: 0;
}

.post-filter-hidden-input {
  display: none;
}

.post-filter-dropdown-wrap {
  position: relative;
}

.post-filter-dropdown {
  position: relative;
  width: 100%;
}

.post-filter-dropdown[open] {
  z-index: 6;
}

.post-filter-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.post-filter-dropdown-toggle::-webkit-details-marker {
  display: none;
}

.post-filter-dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.post-filter-dropdown[open] .post-filter-dropdown-toggle i {
  transform: rotate(180deg);
}

.post-filter-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.post-filter-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.post-filter-dropdown-item:hover,
.post-filter-dropdown-item.active {
  background: rgba(21, 101, 192, 0.1);
  color: var(--primary-2);
  transform: translateY(-1px);
}

.post-filter-dropdown-item i {
  font-size: 13px;
  opacity: 0.9;
}

.post-filter-actions {
  flex: 0 0 auto;
  min-width: auto;
  display: flex;
  align-items: center;
}

@media (max-width: 980px) {
  .mobile-theme-toggle-wrap {
    display: block;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-details {
    width: 100%;
    display: block;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    top: 0;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .post-filter-dropdown-menu {
    position: static;
    margin-top: 10px;
  }
}

:root[data-theme='dark'] .post-filter-dropdown-toggle {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(11, 21, 36, 0.94);
  color: #e5eefc;
  box-shadow: 0 12px 28px rgba(2, 8, 23, 0.36);
}

:root[data-theme='dark'] .post-filter-dropdown-menu {
  background: rgba(11, 21, 36, 0.98);
  border-color: rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 44px rgba(2, 8, 23, 0.42);
}

:root[data-theme='dark'] .post-filter-dropdown-item {
  color: #dbeafe;
}

:root[data-theme='dark'] .post-filter-dropdown-item:hover,
:root[data-theme='dark'] .post-filter-dropdown-item.active {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.mobile-nav-extras {
  display: none;
}

.mobile-nav-actions {
  display: grid;
  gap: 10px;
}

.mobile-nav-actions--auth {
  margin-top: 2px;
}

.mobile-nav-form {
  margin: 0;
}

.mobile-nav-form .btn {
  width: 100%;
}

.mobile-nav-user {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-nav-user-name {
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}

.mobile-nav-user-role {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.mobile-nav-note {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .header-main {
    width: calc(100% - 20px);
    padding: 12px;
    gap: 12px;
  }

  .header-main--offset {
    margin-top: 0;
  }

  .logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
  }

  #site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none !important;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(6, 31, 58, 0.98);
    box-shadow: 0 18px 34px rgba(4, 23, 47, 0.26);
    max-height: min(70vh, calc(100svh - 110px));
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 40;
  }

  html.mobile-menu-open #site-nav,
  body.mobile-menu-open #site-nav,
  #site-nav.open {
    display: block !important;
  }

  #site-nav ul {
    gap: 12px;
  }

  #site-nav .nav-dropdown {
    display: none;
  }

  .login {
    display: none !important;
  }

  .desktop-header-tools {
    display: none !important;
  }

  .nav-link {
    display: inline-flex;
    align-items: center;
    width: 100%;
  }

  .mobile-nav-extras {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

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

  .mobile-nav-actions .btn {
    width: 100%;
  }

  .mobile-nav-extras .locale-switcher {
    width: fit-content;
    max-width: 100%;
  }

  .mobile-nav-actions--auth {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .mobile-nav-actions {
    grid-template-columns: 1fr;
  }

  .mobile-nav-extras .locale-switcher {
    width: 100%;
  }

  .mobile-nav-extras .locale-switcher-link {
    flex: 1 1 0;
  }
}

/* Laravel paginator (Bootstrap 5 markup) — public / profil (Bootstrap yo‘q) */
.pagination {
  display: flex;
  flex-wrap: wrap;
  padding-left: 0;
  margin: 0;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.page-link {
  position: relative;
  min-width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.page-link:hover {
  color: #0f4aa1;
  background-color: rgba(13, 63, 120, 0.06);
  border-color: rgba(13, 63, 120, 0.2);
}

.page-item.active .page-link {
  z-index: 1;
  color: #fff;
  background-color: #0f4aa1;
  border-color: #0f4aa1;
}

.page-item.disabled .page-link {
  color: #94a3b8;
  pointer-events: none;
  background-color: #f8fafc;
  border-color: #e8edf3;
}

nav[aria-label] .pagination {
  margin-bottom: 0;
}

nav.d-flex.justify-content-between {
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

nav.d-flex .small.text-muted {
  color: #64748b;
  font-size: 0.8125rem;
  margin-bottom: 0;
}

.related-posts-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 63, 120, 0.12);
}

.related-teachers-section {
  margin-top: 2.5rem;
  margin-bottom: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(15, 63, 120, 0.12);
}

.related-section-title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.6rem);
}

.related-section-more {
  margin: 1.5rem 0 0;
  text-align: center;
}

.about-card--wide {
  grid-column: 1 / -1;
}

.site-credits-intro {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.site-credits-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.site-credits-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f7fbff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-credits-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.site-credits-item--lead {
  position: relative;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.08) 50%, rgba(168, 85, 247, 0.08) 100%) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.45) !important;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.12), inset 0 0 16px rgba(56, 189, 248, 0.04);
}

.site-credits-name {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.site-credits-name--lead {
  font-weight: 800 !important;
  font-size: 1.02rem;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 50%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

:root[data-theme='dark'] .site-credits-name--lead {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-credits-exponent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(99, 102, 241, 0.22));
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
  top: -0.65em;
  line-height: 1.2;
  margin-left: 4px;
  vertical-align: baseline;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.15);
}

:root[data-theme='dark'] .site-credits-exponent {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.28));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.22);
}

.site-credits-date {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

:root[data-theme='dark'] .site-credits-item {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme='dark'] .site-credits-item--lead {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.1) 50%, rgba(168, 85, 247, 0.12) 100%) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.18), inset 0 0 20px rgba(56, 189, 248, 0.08);
}

/* Turnstile */
.turnstile-field-wrap {
  margin: 14px 0 10px;
}

.comment-turnstile-host,
.chat-turnstile-host {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
