/* Вариант B — светлый резюме-стиль с боковой колонкой */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
    scroll-behavior: smooth;
    height: 100%;
}
p.tag {
    font-size: 11px;
    margin: 0px;
    padding-bottom: 10px;
}
body {
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0px;
}

.layout {
    min-height: 100vh;
    max-height: 100vW;
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 16px 40px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    box-sizing: border-box;
    margin-top: 50px;
    position: relative;
    top: 20px;
}

/* Sidebar */

.sidebar {
    background: #ffffff;
    border-radius: 24px;
    padding: 18px 18px 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    position: relative;
    top: calc(50% - 279px);
    align-self: flex-start;
    border: 1px solid #e5e7eb;
}

.avatar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 20%, #38bdf8, #0f172a);
    color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(56, 189, 248, 0.45);
}

.avatar-text h1 {
    font-size: 18px;
    margin: 0 0 4px;
    line-height: 1.1;
}

.avatar-text p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.sidebar-section {
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
    margin-top: 10px;
}

.sidebar-section h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin: 0 0 4px;
}

.sidebar-section p {
    margin: 0;
    font-size: 13px;
    color: #374151;
}

.sidebar-nav {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: #374151;
    border: 1px solid transparent;
    display: inline-flex;
    transition: background 0.15s ease-out, border-color 0.15s ease-out, transform 0.12s ease-out;
}

.sidebar-nav a:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    transform: translateX(1px);
}

/* Content */

.content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow-y: auto;
    height: calc(100vh - 180px);
    overflow-y: scroll;
    scrollbar-color: #f97316 rgb(255 255 255 / 0%);
    top: -16px;
    position: relative;
    padding-top: 50px;
}

/* Hero */

.hero {
    background: linear-gradient(135deg, #0f172a, #1d283a);
    color: #f9fafb;
    border-radius: 24px;
    padding: 18px 18px 20px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.6);
    position: relative;
    /* overflow: hidden; */
}

.hero::before {
    position: absolute;
    inset: -20%;
    background:
      radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.35), transparent 55%),
      radial-gradient(circle at 100% 0, rgba(129, 140, 248, 0.35), transparent 55%);
    opacity: 0.6;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero .tag {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.8);
    font-size: 11px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.9);
    margin-bottom: 10px;
}

.hero h2 {
    margin: 0 0 8px;
    font-size: 22px;
    letter-spacing: -0.02em;
}

.hero .lead {
    margin: 0 0 14px;
    font-size: 13px;
    color: #e5e7eb;
    max-width: 640px;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hero-card {
    background: rgba(15, 23, 42, 0.92);
    border-radius: 14px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.hero-card .label {
    display: block;
    font-size: 10px;
    color: #9ca3af;
}

.hero-card .value {
    font-size: 12px;
    font-weight: 500;
}

/* Sections */

.section {
    background: #ffffff;
    border-radius: 24px;
    padding: 16px 18px 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.section h2 {
    margin: 0 0 8px;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.section-header p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.section-header {
    margin-bottom: 10px;
}

.two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 14px;
}

.two-cols p {
    margin: 0;
    font-size: 13px;
    color: #374151;
}

/* Chips */

.chips {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chips li {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    font-size: 11px;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

/* Cards row */

.cards-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.card {
    border-radius: 18px;
    padding: 12px 12px 11px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.card h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.card p {
    margin: 0;
    font-size: 13px;
    color: #4b5563;
}

.card p + p {
    margin-top: 4px;
}

.card .hint {
    font-size: 11px;
    color: #6b7280;
}

.metric-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    font-size: 11px;
    color: #1d4ed8;
    margin-top: 6px;
}

.metric-bar .arrow {
    color: #9ca3af;
}

.card-wide {
    margin-top: 10px;
}

/* Timeline */

.timeline {
    border-left: 2px solid #e5e7eb;
    margin-top: 6px;
    padding-left: 16px;
}

.timeline-item {
    position: relative;
    margin-bottom: 10px;
}

.year-dot {
    position: absolute;
    left: -11px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(191, 219, 254, 0.9);
}

.timeline-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 9px 10px;
    border: 1px solid #e5e7eb;
}

.timeline-card h3 {
    margin: 0 0 4px;
    font-size: 13px;
}

.timeline-card p {
    margin: 0;
    font-size: 12px;
    color: #4b5563;
}

/* Pill cards & goals */

.three-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.pill-card {
    padding: 10px 11px;
    border-radius: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.pill-card h3 {
    margin: 0 0 4px;
    font-size: 13px;
}

.pill-card p {
    margin: 0;
    font-size: 12px;
    color: #4b5563;
}

.goal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.goal-item {
    background: #0f172a;
    color: #f9fafb;
    border-radius: 18px;
    padding: 10px 11px;
    position: relative;
    overflow: hidden;
}

.goal-item .num {
    font-size: 11px;
    color: #9ca3af;
}

.goal-item h3 {
    margin: 2px 0 4px;
    font-size: 13px;
}

.goal-item p {
    margin: 0;
    font-size: 12px;
    color: #e5e7eb;
}

.page-footer {
    margin-top: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #6b7280;
}

.link-top {
    text-decoration: none;
    color: #2563eb;
}

/* Responsive */

@media (max-width: 960px) {
    .layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar {
        position: static;
        order: -1;
    }

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

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

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

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

@media (max-width: 640px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cards-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .three-cols {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .two-cols {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dynamic-content {
  margin-top: 2px;
  display: block;
}

.dynamic-content .loader {
  font-size: 0.9rem;
  color: #6b7280;
  padding: 12px 0;
}


.section-gallery .section-title {
  margin-bottom: 8px;
}

.section-gallery .section-lead {
  margin-bottom: 16px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.section-gallery .card {
  min-height: 120px;
}



/* Мини-иконки изображений в админке галереи */
.gallery-images-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}

.gallery-image-thumb-btn {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.gallery-image-thumb {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: #111827;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.6);
}

.gallery-image-thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ef4444;
  color: #f9fafb;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Админка визитки --- */
.admin-body {
  background: #0f172a;
  color: #e5e7eb;
  min-height: 100vh;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  background: #020617;
  border-right: 1px solid #1f2937;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #f97316, #ea580c 65%, #7c2d12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #0b1120;
  font-size: 0.9rem;
}

.admin-sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-sidebar-subtitle {
  font-size: 0.8rem;
  color: #9ca3af;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-item {
  border: none;
  background: transparent;
  color: #e5e7eb;
  text-align: left;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.16s ease, color 0.16s ease, transform 0.08s ease;
}

.admin-nav-item::after {
  content: '›';
  opacity: 0;
  font-size: 0.8rem;
  transform: translateX(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.admin-nav-item:hover {
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-1px);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #111827;
  font-weight: 600;
}

.admin-nav-item.active::after {
  opacity: 1;
  transform: translateX(0);
}

.admin-sidebar-footnote {
  margin-top: auto;
  font-size: 0.75rem;
  color: #6b7280;
  border-top: 1px solid #1f2937;
  padding-top: 10px;
}

.admin-sidebar-footnote code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  color: #e5e7eb;
}

.admin-main {
  padding: 18px 20px;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 55%, #020617 100%);
  overflow: auto;
  height: 100vh;
}

.admin-main-header h1 {
  font-size: 1.3rem;
  margin: 0 0 4px 0;
}

.admin-main-header p {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.admin-panel {
  display: none;
  padding: 14px 16px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.admin-panel + .admin-panel {
  margin-top: 14px;
}

.admin-panel.active {
  display: block;
}

.admin-panel h2 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
}

.admin-panel-desc {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.admin-panel-desc.small {
  font-size: 0.8rem;
}

.admin-label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.admin-editor {
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  border-radius: 14px;
  padding: 10px 12px;
  background: #020617;
  border: 1px solid #1f2937;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #e5e7eb;
}

.admin-editor:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.admin-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-btn {
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.08s ease;
}

.admin-btn.primary {
  border-color: #f97316;
  background: radial-gradient(circle at 20% 0, #f97316, #ea580c);
  color: #111827;
  font-weight: 600;
}

.admin-btn.ghost {
  background: transparent;
}

.admin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.7);
}

.admin-btn.saved {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.7);
}

@media (max-width: 800px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid #1f2937;
    flex-direction: column;
  }
}


/* === Дополнительные элементы админки: переключатель темы и конструктор галереи === */

.admin-main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-main-header-left {
  max-width: 60%;
}

.admin-theme-switcher {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.8rem;
}

.admin-theme-switcher label {
  color: #9ca3af;
}

.admin-theme-switcher select {
  min-width: 190px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.8rem;
}

/* Конструктор галереи */

.admin-gallery-builder {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.gallery-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 6px;
}

.gallery-card-row {
  padding: 10px 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.6);
}

.gallery-card-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 10px;
}

.gallery-card-row-extra {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) auto;
  gap: 8px;
  align-items: flex-end;
}

.gallery-card-field label {
  display: block;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 2px;
}

.gallery-card-field.small label {
  font-size: 0.72rem;
}

.gallery-card-field .admin-input {
  width: 100%;
}

.gallery-remove-card {
  white-space: nowrap;
  padding-inline: 10px;
}

/* Чуть более «объемные» кнопки в админке */

.admin-btn {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.6);
}

.admin-btn.primary {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
}

/* === Темы (скины) визитки и админки === */

/* Базовая светлая (по умолчанию) */
body[data-theme="light"],
body.admin-body[data-theme="light"],
body:not([data-theme]) {
  background: #f3f4f6;
  color: #111827;
}

/* Оболочка на светлой теме */
body[data-theme="light"] .app-shell,
body:not([data-theme]) .app-shell {
  background: radial-gradient(circle at top left, #e5e7eb 0, #eef2ff 45%, #e5e7eb 100%);
}

/* Тёмная тема */
body[data-theme="dark"],
body.admin-body[data-theme="dark"] {
  background: #020617;
  color: #e5e7eb;
}

body[data-theme="dark"] .app-shell {
  background: radial-gradient(circle at top left, #020617 0, #020617 55%, #020617 100%);
}

body[data-theme="dark"] .sidebar {
  background: #020617;
  border-color: #111827;
}

body[data-theme="dark"] .sidebar-nav a {
  color: #e5e7eb;
  border-color: transparent;
  background: transparent;
}

body[data-theme="dark"] .sidebar-nav a:hover {
  background: rgba(30, 64, 175, 0.35);
  border-color: rgba(59, 130, 246, 0.9);
}

body[data-theme="dark"] .sidebar-nav a.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.85);
  color: #f9fafb;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.9);
}

/* Карточки и теги в тёмной теме */
body[data-theme="dark"] .card {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(30, 64, 175, 0.5);
}

body[data-theme="dark"] .tag {
  background: rgba(15, 23, 42, 0.8);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
}

/* Мягкая тема (soft) — большие скругления, нежные тени */
body[data-theme="soft"] .card,
body[data-theme="soft"] .timeline-card,
body[data-theme="soft"] .card-wide {
  border-radius: 24px;
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
}

body[data-theme="soft"] .sidebar-nav a {
  border-radius: 999px;
  background: #eef2ff;
  border-color: rgba(129, 140, 248, 0.5);
}

body[data-theme="soft"] .sidebar-nav a.active {
  background: #4f46e5;
  color: #f9fafb;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.55);
}

/* Контрастная тема */
body[data-theme="contrast"] {
  background: #0b1020;
  color: #f9fafb;
}

body[data-theme="contrast"] .sidebar {
  background: #020617;
  border-color: #f97316;
}

body[data-theme="contrast"] .sidebar-nav a {
  color: #e5e7eb;
  border-color: rgba(249, 115, 22, 0.7);
}

body[data-theme="contrast"] .sidebar-nav a.active {
  background: #f97316;
  color: #111827;
  box-shadow: 0 16px 40px rgba(248, 113, 22, 0.6);
}

/* Glass / объёмные кнопки (неоморфизм) */
body[data-theme="glass"] {
  background: radial-gradient(circle at top left, #0b1120 0, #020617 55%, #000 100%);
  color: #e5e7eb;
}

body[data-theme="glass"] .app-shell {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.92));
}

body[data-theme="glass"] .sidebar {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(15, 23, 42, 1);
  box-shadow:
    16px 16px 40px rgba(0, 0, 0, 0.9),
    -10px -10px 30px rgba(51, 65, 85, 0.8);
}

body[data-theme="glass"] .sidebar-nav a {
  border-radius: 999px;
  background: linear-gradient(145deg, #0f172a, #020617);
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow:
    4px 4px 10px rgba(0, 0, 0, 0.9),
    -3px -3px 8px rgba(30, 64, 175, 0.45);
  color: #e5e7eb;
}

body[data-theme="glass"] .sidebar-nav a.active {
  background: linear-gradient(145deg, #22c55e, #16a34a);
  border-color: rgba(22, 163, 74, 0.9);
  color: #052e16;
  box-shadow:
    6px 6px 16px rgba(0, 0, 0, 0.95),
    -4px -4px 12px rgba(34, 197, 94, 0.55);
}

/* Галерея на визитке — карточки с изображением */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-card-image {
  width: 100%;
  padding-top: 60%;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #020617;
  margin-bottom: 8px;
}

.gallery-card-body h3 {
  margin: 0 0 4px 0;
}

.gallery-card-body p {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

body[data-theme="dark"] .gallery-card-body p,
body[data-theme="glass"] .gallery-card-body p,
body[data-theme="contrast"] .gallery-card-body p {
  color: #9ca3af;
}

.sidebar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-nav .nav-icon {
    width: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-icon i {
    font-size: 13px;
}

.sidebar-nav .nav-label {
    white-space: nowrap;
}

/* Admin nav icons config */
.admin-main-header-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

@media (min-width: 900px) {
  .admin-main-header-right {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
}

.admin-nav-icons {
  background: rgba(15, 23, 42, 0.04);
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  max-width: 420px;
}

.admin-nav-icons-title {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 4px;
}

.admin-nav-icons-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.admin-nav-icon-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 6px;
  align-items: center;
}

.admin-nav-icon-label {
  font-size: 11px;
  color: #4b5563;
}


/* Фото‑карточка преподавателя (раздел «О себе») */

.section-about .about-photo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.5);
  margin-bottom: 16px;
}

.about-photo-thumb {
  width: 86px;
  height: 86px;
  border-radius: 20px;
  background: radial-gradient(circle at 20% 20%, #38bdf8, #0f172a);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.35);
  flex-shrink: 0;
}

.about-photo-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-photo-name {
  font-weight: 600;
  font-size: 0.98rem;
}

.about-photo-role {
  font-size: 0.85rem;
  color: #4b5563;
}

.about-photo-extra {
  font-size: 0.8rem;
  color: #6b7280;
}

/* В админке используем ту же карточку для превью */

.admin-body .about-photo-card {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.8));
  border-color: rgba(148, 163, 184, 0.7);
}

.admin-body .about-photo-name {
  color: #e5e7eb;
}

.admin-body .about-photo-role,
.admin-body .about-photo-extra {
  color: #9ca3af;
}

.admin-body .about-photo-thumb {
  width: 72px;
  height: 72px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.8);
}

/* Дропзона для загрузки изображений (about + галерея) */

.admin-dropzone {
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  background: rgba(15, 23, 42, 0.5);
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
  cursor: pointer;
}

.admin-dropzone.drag-over {
  border-style: solid;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Превью и поля в конструкторе галереи */

.gallery-card-row {
  position: relative;
}

.gallery-card-row-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr);
  gap: 10px;
}

.gallery-card-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gallery-thumb {
  width: 50%;
  padding-top: 30%;
  border-radius: 12px;
  background: radial-gradient(circle at 20% 20%, #38bdf8, #0f172a);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.8);
}

.gallery-thumb.empty {
  background: repeating-linear-gradient(
    45deg,
    #020617,
    #020617 6px,
    #111827 6px,
    #111827 12px
  );
}

.gallery-card-row-extra {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) auto;
  gap: 8px;
  align-items: flex-end;
}

/* Небольшая корректировка для уже существующей разметки */
.gallery-card-field.small label {
  font-size: 0.7rem;
}

/* Тема glass — чуть более объёмные миниатюры */

body[data-theme="glass"] .gallery-thumb {
  box-shadow: 0 20px 40px rgba(8, 47, 73, 0.9);
}


.admin-photo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: 12px;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .admin-photo-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-photo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-photo-controls .admin-label {
  margin-top: 6px;
}

/* Управление фоном сайта в админке */
.admin-bg-controls {
  margin-top: 10px;
  padding: 8px;
  border-radius: 18px;
  background: #020617;
  border: 1px solid #4b5563;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.admin-bg-thumb {
  border-radius: 14px;
  background: #020617;
  border: 1px dashed #4b5563;
  min-height: 70px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-bg-placeholder {
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  padding: 4px 6px;
}

.admin-bg-fields .admin-label {
  margin-top: 4px;
}

.admin-bg-fields .admin-actions.inline {
  margin-top: 6px;
}

/* Верхняя панель: язык + тема */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar-subtitle {
  font-size: 11px;
  color: #9ca3af;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.topbar-btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: transparent;
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
}

.topbar-btn.lang-btn.active {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #111827;
  font-weight: 600;
}

.topbar-btn.lang-btn:hover {
  background: rgba(249, 115, 22, 0.18);
}

.topbar-btn.theme-btn {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  padding-inline: 8px;
  background: rgba(15, 23, 42, 0.9);
}

.topbar-btn.theme-btn i {
  font-size: 13px;
}

@media (max-width: 768px) {
  .topbar {
    padding: 6px 10px;
  }
  .topbar-left {
    max-width: 55%;
  }
  .topbar-title {
    font-size: 12px;
  }
  .topbar-subtitle {
    font-size: 10px;
  }
}

/* Переключатель языков в админке */
.admin-lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-lang-label {
  font-size: 11px;
  color: #4b5563;
}

.admin-lang-btn {
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #0f172a;
  color: #e5e7eb;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.08s ease;
}

.admin-lang-btn:hover {
  background: #111827;
  border-color: #f97316;
}

.admin-lang-btn.active {
  background: linear-gradient(135deg, #f97316, #fb923c);
  border-color: #ea580c;
  color: #111827;
  font-weight: 600;
}

/* === ABOUT (О себе) – обновлённый крупный блок === */

.section-about {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 40px;
}

.section-about h2 {
  margin-bottom: 4px;
}

.about-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 18px;
  border-radius: 24px;
  margin: 0 20px 20px 20px;
  background: radial-gradient(circle at top left, rgba(59,130,246,0.1), transparent 55%),
              radial-gradient(circle at bottom right, rgba(249,115,22,0.12), transparent 60%),
              rgba(15,23,42,0.96);
  border: 4px solid rgba(148,163,184,0.7);
  color: #e5e7eb;
  box-shadow: 0px 0px 14px 8px rgba(15, 23, 42, 0.9), 0 0 0 1px rgb(0 0 0);
}

.about-hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo-large {
  width: 100%;
  max-width: 253px;
  /* margin-top: 20px; */
  padding-top: 30px;
  aspect-ratio: 2.2 / 3.4;
  border-radius: 22px;
  /* background: radial-gradient(circle at 30% 0%, rgba(248,250,252,0.2), transparent 60%),
              #020617; */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* box-shadow:
    0 18px 40px rgba(15,23,42,0.9),
    0 0 0 1px rgba(148,163,184,0.4); */
  position: relative;
  overflow: hidden;
}

.about-hero-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.about-hero-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.about-hero-role {
  font-size: 14px;
  color: #cbd5f5;
}

.about-hero-org {
  font-size: 13px;
  color: #9ca3af;
}

.about-hero-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.about-hero-tags .tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(251,146,60,0.7);
  background: rgba(15,23,42,0.9);
  color: #fed7aa;
}

/* Основной текстовый блок */

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: flex-start;
}

.about-body-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-body-text p {
  font-size: 14px;
  line-height: 1.6;
  color: #111827;
}

.about-body-text strong {
  font-weight: 600;
}

.about-body-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-side-block {
  border-radius: 18px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

[data-theme="dark"] .about-side-block,
body[data-theme="dark"] .about-side-block {
  background: rgba(15,23,42,0.96);
  border-color: rgba(55,65,81,0.9);
  color: #e5e7eb;
}

.about-side-block h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.about-side-block ul {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}

.about-side-block li {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Мобильная адаптация */

@media (max-width: 900px) {
  .about-hero {
    grid-template-columns: minmax(0, 1fr);
    text-align: left;
  }
  .about-hero-photo {
    justify-content: flex-start;
  }
  .about-hero-info {
    margin-top: 4px;
  }
  .about-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Modal */
.modal { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.8); display:flex; align-items:center; justify-content:center; z-index:9999; }
.modal.hidden { display:none; }
.modal-content { position: relative; }
.modal-content img { max-height:80vh; max-width:80vw; border-radius:8px; }
.modal .close { position:absolute; top:-40px; right:-10px; font-size:32px; color:white; background:none; border:none; cursor:pointer; }
.modal .prev, .modal .next { position:absolute; top:50%; transform:translateY(-50%); font-size:40px; color:white; background:none; border:none; cursor:pointer; }
.modal .prev { left:-60px; }
.modal .next { right:-60px; }

/* Carousel */
.carousel { position:relative; overflow:hidden; }
.carousel-track img { width:100%; border-radius:10px; cursor:pointer; }
.carousel .prev, .carousel .next { position:absolute; top:50%; transform:translateY(-50%); background:rgba(0,0,0,0.5); color:white; border:none; cursor:pointer; font-size:22px; padding:8px; border-radius:50%; }
.carousel .prev { left:10px; }
.carousel .next { right:10px; }

.admin-gal-thumb { width:80px; height:80px; object-fit:cover; margin:4px; border-radius:6px; }

.gal-builder { padding:10px; border:1px solid #ccc; margin-top:10px; }
.gal-preview { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.gal-add, #galSave { padding:6px 12px; margin-top:8px; }
/* Фон и контейнер модалки */
#mediaModal.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  opacity: 1;
  pointer-events: auto;
  transition: opacity .2s ease;
}

#mediaModal.hidden {
  opacity: 0;
  pointer-events: none;
}

#mediaModal .modal-content {
  position: relative;
  background: #0b1120;
  width: 94%;
  max-width: 980px;
  max-height: 88vh;
  border-radius: 18px;
  padding: 18px 22px 18px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  color: #e5e7eb;
}

/* Кнопка закрытия */
#mediaModal .close {
  position: absolute;
  top: 10px;
  right: 16px;

  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;

  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 6px 16px rgba(0,0,0,0.7);
  transition: background .15s, transform .1s, opacity .15s;
}

#mediaModal .close:hover {
  background: rgba(30, 64, 175, 0.95);
  transform: translateY(-1px);
}

/* Шапка: заголовок, сабтайтл, счётчик */
#mediaModal .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#mediaModal .modal-header-text h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #f9fafb;
}

#mediaModal .modal-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: #9ca3af;
}

#mediaModal .modal-counter {
  font-size: 13px;
  color: #9ca3af;
  white-space: nowrap;
}

/* Основная область слайдера */
#mediaModal .modal-body {
  position: relative;
  flex: 1 1 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 4px 36px;
  max-height: 60vh;
}

#mediaModal .modal-body img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

/* Стрелки навигации */
#mediaModal .prev,
#mediaModal .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;

  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.75);
  transition: background .15s, transform .1s, opacity .15s;
}

#mediaModal .prev { left: 6px; }
#mediaModal .next { right: 6px; }

#mediaModal .prev:hover,
#mediaModal .next:hover {
  background: rgba(37, 99, 235, 0.95);
  transform: translateY(-50%) scale(1.03);
}

/* Адаптация для мобильных: стрелки ближе к центру и чуть меньше */
@media (max-width: 640px) {
  #mediaModal .modal-body {
    padding: 4px 18px;
  }
  #mediaModal .prev,
  #mediaModal .next {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

/* Мини-превью (thumbs) */
#mediaModal .modal-thumbs {
  display: flex;
  gap: 8px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid rgba(249, 250, 251, 0.05);

  overflow-x: auto;
}

#mediaModal .modal-thumbs::-webkit-scrollbar {
  height: 6px;
}

#mediaModal .modal-thumbs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

/* Кнопки превью */
#mediaModal .modal-thumb-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: outline .12s, transform .1s;
}

#mediaModal .modal-thumb-btn .modal-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  filter: saturate(0.85);
}

#mediaModal .modal-thumb-btn.active {
  outline: 2px solid #60a5fa;
}

#mediaModal .modal-thumb-btn.active .modal-thumb {
  filter: saturate(1.1);
}

#mediaModal .modal-thumb-btn:hover:not(.active) {
  transform: translateY(-1px);
}




/* Базовый вид карточки галереи */
.card.gallery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;

  background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 40%, #ffffff 100%);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(148, 163, 184, 0.35);

  cursor: pointer;
  transition:
    transform 0.16s ease-out,
    box-shadow 0.16s ease-out,
    background 0.16s ease-out,
    border-color 0.16s ease-out,
    filter 0.16s ease-out;
}

/* Лёгкое подсветка и подъём при наведении */
.card.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.20),
    0 0 0 1px rgba(59, 130, 246, 0.55);
  background: radial-gradient(circle at top left, #e0ecff 0, #f9fafb 40%, #ffffff 100%);
}

/* Эффект нажатия (mousedown) */
.card.gallery-card:active {
  transform: translateY(0) scale(0.985);
  box-shadow:
    0 8px 20px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(37, 99, 235, 0.7);
  filter: brightness(0.98);
}

/* Фокус с клавиатуры (если нужно табом проходить по карточкам) */
.card.gallery-card:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

/* Верхняя часть с картинкой */
.gallery-card-image {
  position: relative;
  padding-top: 62%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.18s ease-out, filter 0.18s ease-out;
}

/* Лёгкий zoom картинки при наведении */
.card.gallery-card:hover .gallery-card-image {
  transform: scale(1.03);
}

/* Иконка внизу превью (если используется) */
.gallery-thumb-icon {
  position: absolute;
  left: 12px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.9);
  color: #f9fafb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.7);
  font-size: 15px;
}

/* Тело карточки */
.gallery-card-body {
  padding: 8px 5px 5px;
}

/* Тег / категория */
.gallery-card-body .tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;

  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;

  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  margin-bottom: 6px;
}

/* Заголовок работы */
.gallery-card-body h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

/* Описание работы */
.gallery-card-body p {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #4b5563;
}

/* Метки разделов в витрине галереи */
.gallery-card-sections-line {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.gallery-card-sections-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-right: 4px;
}

.badge.badge-section {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(59, 130, 246, 0.08);
    color: #111827;
}

body[data-theme="dark"] .badge.badge-section,
body[data-theme="glass"] .badge.badge-section,
body[data-theme="contrast"] .badge.badge-section {
    background: rgba(96, 165, 250, 0.16);
    color: #e5e7eb;
}

/* Чекбоксы разделов в админке галереи */
.gallery-sections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.gallery-section-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #e5e7eb;
}

.gallery-section-option input[type="checkbox"] {
    accent-color: #f97316;
}

/* ==== Портфолио: фильтры и мини-галереи по разделам ==== */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.gallery-filter-btn {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.5);
    padding: 4px 10px;
    font-size: 0.75rem;
    color: #e5e7eb;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.gallery-filter-btn:hover {
    background: rgba(37, 99, 235, 0.4);
    border-color: rgba(59, 130, 246, 0.9);
    transform: translateY(-1px);
}

.gallery-filter-btn.active {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 1);
    color: #f9fafb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.6);
}

.portfolio-section-linked {
    margin-top: 28px;
    border-top: 1px solid rgba(55, 65, 81, 0.7);
    padding-top: 18px;
}

.portfolio-grid-mini {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.gallery-card.gallery-card-mini {
    cursor: pointer;
}

/* Темы для фильтров */
body[data-theme="light"] .gallery-filter-btn {
    background: #f9fafb;
    color: #111827;
    border-color: rgba(148, 163, 184, 0.9);
}

body[data-theme="light"] .gallery-filter-btn:hover {
    background: #e5e7eb;
}

body[data-theme="light"] .gallery-filter-btn.active {
    background: #2563eb;
    color: #f9fafb;
}

/* Немного адаптива для мини-галерей на мобильных */
@media (max-width: 640px) {
    .portfolio-grid-mini {
        grid-template-columns: 1fr;
    }
}
.admin-main-header-right {
    display: none;
}
.portfolio-section-linked {
    margin-top: 28px;
    border-top: 1px solid rgba(55, 65, 81, 0.7);
    padding-top: 18px;
    padding: 0px;
    background: none;
    border: none;
}
