/* =============================================
   ЖК ГРАФ Club House — Blog Design System
   Premium dark theme with gold accents
   ============================================= */

/* ---------- CSS Reset & Variables ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand Colors — from graf.ua */
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f4;
  --bg-tertiary: #ebebeb;
  --bg-card: #ffffff;
  --bg-card-hover: #fafafa;
  --bg-input: #ffffff;

  --accent-gold: #c9a96e;
  --accent-gold-light: #dcc08a;
  --accent-gold-dark: #a88b4a;
  --accent-gold-glow: rgba(201, 169, 110, 0.15);

  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #777777;
  --text-accent: #c9a96e;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-gold: rgba(201, 169, 110, 0.3);
  --border-gold-strong: rgba(201, 169, 110, 0.6);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-bg-strong: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-blur: blur(24px);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 30px rgba(201, 169, 110, 0.15);

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Sizing */
  --container-max: 1200px;
  --header-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-out);
  --transition-normal: 0.35s var(--ease-out);
  --transition-slow: 0.5s var(--ease-out);
}

/* ---------- Base Styles ---------- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-gold-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

::selection {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-gold-dark);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 1rem;
}

/* ---------- HEADER ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.header.scrolled {
  background: rgba(13, 13, 13, 0.95);
  box-shadow: var(--shadow-md);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header__logo-text {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.header__logo-img {
  height: 40px;
  width: auto;
}

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

.header__nav-link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--accent-gold);
  background: rgba(201, 169, 110, 0.08);
}

/* Telegram icons in header */
.header__social {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  transition: all var(--transition-fast);
}

.header__social-link:hover {
  background: var(--accent-gold);
  color: var(--bg-primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-gold);
}

.header__social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.lang-switcher__btn {
  padding: 5px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 5px;
  transition: all var(--transition-fast);
  text-transform: uppercase;
}

.lang-switcher__btn.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.lang-switcher__btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Mobile burger menu */
.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

.header__burger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(5px);
}

.header__burger.open span:nth-child(2) {
  opacity: 0;
}

.header__burger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(13, 13, 13, 0.98);
  backdrop-filter: var(--glass-blur);
  z-index: 999;
  padding: 32px 24px;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.3s var(--ease-out);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav__link {
  display: block;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}

.mobile-nav__link:hover {
  color: var(--accent-gold);
}

.mobile-nav__social {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-gold);
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  padding: 20px 24px 10px;
  margin-top: calc(var(--header-height) - 10px);
  background: var(--bg-primary);
}

.hero__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.hero__content {
  flex: 1;
  max-width: 650px;
}

.hero__image {
  flex: 0 0 150px; /* Even smaller mini version */
  position: relative;
}

.hero__image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1; /* Square for mini look */
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  filter: contrast(1.05) saturate(1.05);
}

.hero__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero__title span {
  color: var(--accent-gold);
  display: block;
}

.hero__subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.hero__title span {
  color: var(--accent-gold);
  display: block;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .hero__inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- BLOG SECTION ---------- */
.blog-section {
  padding: 32px 0 80px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title__line {
  width: 40px;
  height: 3px;
  background: var(--accent-gold);
  border-radius: 2px;
}

.section-title__text {
  font-size: 1.6rem;
  font-weight: 700;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* Blog Card */
.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  background: var(--bg-card-hover);
}

.blog-card__image-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.blog-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image {
  transform: scale(1.06);
}

.blog-card__category {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  background: rgba(201, 169, 110, 0.9);
  color: var(--bg-primary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 50px;
  backdrop-filter: blur(8px);
}

.blog-card__body {
  padding: 22px;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.blog-card__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.blog-card__meta-item svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-gold-dark);
}

.blog-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.blog-card:hover .blog-card__title {
  color: var(--accent-gold);
}

.blog-card__excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.blog-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.blog-card__author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-primary);
}

.blog-card__read-more {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition-fast);
}

.blog-card:hover .blog-card__read-more {
  gap: 8px;
}

.blog-card__read-more svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ---------- POST PAGE ---------- */
.post-page {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 80px;
}

.post-header {
  max-width: 800px;
  margin: 0 auto 32px;
}

.post-header__top-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.post-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color var(--transition-fast);
}

.post-header__back:hover {
  color: var(--accent-gold);
}

.post-header__back svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.post-header__category {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(201, 169, 110, 0.15);
  border: 1px solid var(--border-gold);
  color: var(--accent-gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
}

.post-header__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
  line-height: 1.25;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-wrap: wrap;
}

.post-header__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-header__meta-item svg {
  width: 16px;
  height: 16px;
  fill: var(--accent-gold-dark);
}

/* Post hero image */
.post-hero-image {
  float: left;
  max-width: 320px;
  margin: 0 30px 20px 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-body);
}

.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Post content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-secondary);
}

.post-content h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.post-content h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 18px;
}

.post-content img {
  border-radius: var(--radius-md);
  margin: 28px 0;
  border: 1px solid var(--border-subtle);
}

.post-content blockquote {
  border-left: 3px solid var(--accent-gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(201, 169, 110, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.post-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.post-content a {
  color: var(--accent-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- COMMENTS SECTION ---------- */
.comments-section {
  max-width: 760px;
  margin: 64px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
}

.comments-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 1.4rem;
}

.comments-section__count {
  background: rgba(201, 169, 110, 0.15);
  color: var(--accent-gold);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Comment form */
.comment-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 32px;
}

.comment-form__row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-form__input {
  flex: 1;
}

.comment-form__textarea {
  width: 100%;
  min-height: 100px;
  margin-bottom: 16px;
}

.comment-form__actions {
  display: flex;
  justify-content: flex-end;
}

/* Comment item */
.comment-item {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: border-color var(--transition-fast);
}

.comment-item:hover {
  border-color: var(--border-gold);
}

.comment-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.comment-item__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-item__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bg-primary);
  flex-shrink: 0;
}

.comment-item__name {
  font-weight: 600;
  font-size: 0.95rem;
}

.comment-item__date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-item__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.comment-item__actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.comment-item__action {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition-fast);
  padding: 4px 0;
}

.comment-item__action:hover {
  color: var(--accent-gold);
}

.comment-item__action svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Nested comments (replies) */
.comment-replies {
  margin-left: 36px;
  padding-left: 16px;
  border-left: 2px solid var(--border-gold);
  margin-top: 16px;
}

.comment-replies .comment-item {
  background: var(--bg-tertiary);
}

/* Reply form (inline) */
.reply-form {
  margin-left: 36px;
  padding-left: 16px;
  border-left: 2px solid var(--border-gold);
  margin-top: 12px;
  padding-top: 12px;
}

.reply-form .comment-form {
  padding: 16px;
  background: var(--bg-tertiary);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.btn--primary:hover {
  background: var(--accent-gold-light);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(201, 169, 110, 0.1);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
}

.btn--secondary:hover {
  background: rgba(201, 169, 110, 0.2);
  border-color: var(--border-gold-strong);
}

.btn--danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

.btn--danger:hover {
  background: rgba(220, 53, 69, 0.2);
}

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

.btn--ghost:hover {
  color: var(--accent-gold);
  background: rgba(201, 169, 110, 0.08);
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.82rem;
}

.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 24px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.footer__brand {
  max-width: 360px;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.footer__description {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--accent-gold);
}

.footer__bottom {
  max-width: var(--container-max);
  margin: 40px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- FLOATING TELEGRAM BUTTON ---------- */
.floating-tg {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.floating-tg__btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2AABEE, #229ED9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  position: relative;
}

@keyframes tgPulse {
  0% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(42, 171, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(42, 171, 238, 0); }
}

.floating-tg__btn.animate {
  animation: tgPulse 2s infinite;
}

.floating-tg__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.floating-tg__badge.show {
  opacity: 1;
  transform: scale(1);
}

.floating-tg__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.floating-tg__btn svg {
  width: 30px;
  height: 30px;
  fill: #fff;
  margin-right: 2px;
  margin-top: 1px;
}

.floating-tg__tooltip {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  animation: slideUp 0.3s var(--ease-out);
}

.floating-tg__tooltip.show {
  display: block;
}

.floating-tg__tooltip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.floating-tg__tooltip-item:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

.floating-tg__tooltip-item:hover {
  color: var(--accent-gold);
}

.floating-tg__tooltip-item svg {
  width: 18px;
  height: 18px;
  fill: #2AABEE;
  flex-shrink: 0;
}

/* ---------- ADMIN PANEL ---------- */
.admin-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

.admin-login__card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.admin-login__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login__icon svg {
  width: 28px;
  height: 28px;
  fill: var(--accent-gold);
}

.admin-login__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.admin-login__subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.btn--google {
  width: 100%;
  padding: 14px 24px;
  background: #fff;
  color: #333;
  font-weight: 600;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all var(--transition-fast);
}

.btn--google:hover {
  background: #f5f5f5;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--google img {
  width: 20px;
  height: 20px;
}

/* Admin dashboard */
.admin-dashboard {
  padding-top: calc(var(--header-height) + 32px);
  padding-bottom: 80px;
  min-height: 100vh;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.admin-topbar__user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-gold);
}

/* Post editor */
.post-editor {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 40px;
}

.post-editor__title {
  font-size: 1.2rem;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-editor__title svg {
  fill: var(--accent-gold);
  width: 20px;
  height: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group__row {
  display: flex;
  gap: 16px;
}

/* Image upload area */
.image-upload {
  max-width: 320px;
  border: 2px dashed var(--border-gold);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: rgba(201, 169, 110, 0.03);
}

.image-upload:hover {
  border-color: var(--accent-gold);
  background: rgba(201, 169, 110, 0.08);
}

.image-upload__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  fill: var(--accent-gold);
  opacity: 0.6;
}

.image-upload__text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.image-upload__text span {
  color: var(--accent-gold);
  font-weight: 600;
}

.image-upload__preview {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-top: 15px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Quill editor overrides */
.ql-toolbar.ql-snow {
  background: var(--bg-tertiary) !important;
  border-color: var(--border-subtle) !important;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.ql-container.ql-snow {
  border-color: var(--border-subtle) !important;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  color: var(--text-primary) !important;
  background: var(--bg-input) !important;
  min-height: 250px;
}

.ql-editor {
  color: var(--text-primary) !important;
  min-height: 250px;
}

.ql-editor.ql-blank::before {
  color: var(--text-muted) !important;
  font-style: normal !important;
}

.ql-snow .ql-stroke {
  stroke: var(--text-secondary) !important;
}

.ql-snow .ql-fill,
.ql-snow .ql-stroke.ql-fill {
  fill: var(--text-secondary) !important;
}

.ql-snow .ql-picker {
  color: var(--text-secondary) !important;
}

.ql-snow .ql-picker-options {
  background: var(--bg-card) !important;
  border-color: var(--border-subtle) !important;
}

/* Admin posts list */
.admin-posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.admin-post-item:hover {
  border-color: var(--border-gold);
}

.admin-post-item__info {
  flex: 1;
  min-width: 0;
}

.admin-post-item__title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-post-item__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-post-item__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

/* ---------- LOADING & STATES ---------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}

.loading-spinner__circle {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state__text {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.empty-state__subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination__btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.pagination__btn:hover,
.pagination__btn.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(201, 169, 110, 0.1);
}

.pagination__btn.active {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 14px 24px;
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast--success {
  border-color: #28a745;
}

.toast--error {
  border-color: #dc3545;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(12px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Scroll reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

/* Staggered children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s var(--ease-out);
}

.modal__title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.modal__text {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .blog-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .header__nav {
    display: none;
  }

  .header__burger {
    display: flex;
  }

  .form-group__row {
    flex-direction: column;
  }

  .comment-form__row {
    flex-direction: column;
  }

  .admin-post-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .admin-post-item__actions {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    height: auto;
    min-height: auto;
  }

  .hero__title {
    font-size: 1.6rem;
  }

  .hero__content {
    padding: 32px 16px;
  }

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

  .blog-section {
    padding: 40px 0 60px;
  }

  .post-editor {
    padding: 20px;
  }

  .admin-login__card {
    padding: 32px 24px;
    margin: 0 16px;
  }

  .floating-tg {
    bottom: 20px;
    right: 20px;
  }

  .floating-tg__btn {
    width: 50px;
    height: 50px;
  }

  .comment-replies {
    margin-left: 16px;
    padding-left: 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  /* Post image: stack vertically on mobile */
  .post-hero-image {
    float: none;
    max-width: 100%;
    margin: 0 0 20px 0;
  }

  .post-body-wrapper {
    max-width: 100% !important;
  }

  /* Admin form: stack category/author vertically */
  .form-group__row {
    flex-direction: column;
  }

  .form-group__row .form-group {
    margin-left: 0 !important;
  }

  /* Admin tabs: smaller text */
  .admin-tab {
    font-size: 0.95rem !important;
  }

  /* Admin post actions: stack */
  .admin-post-item {
    flex-direction: column;
    gap: 10px;
  }

  .admin-post-item__actions {
    align-self: flex-start;
  }

  /* Image upload: full width on mobile */
  .image-upload {
    max-width: 100%;
  }
}

/* ---------- PRINT ---------- */
@media print {
  .header, .footer, .floating-tg, .comment-form, .admin-topbar {
    display: none !important;
  }

  body {
    background: white;
    color: #333;
  }

  .post-content {
    color: #333;
  }
}
