/* =========================================================
   COMMUNITY PAGE
   Perfect modern design
========================================================= */

/* ---------------------------------------------------------
   Page Setup
--------------------------------------------------------- */
@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geologica";
  src: url("../fonts/Geologica-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.page-community {
  position: relative;
  min-height: 100vh;
  padding-top: 120px; /* Increased for fixed header */
  overflow-x: hidden;
  /* Фон страницы */
  background: #0a0f0a; /* Темный зеленоватый фон */
  font-family: "Geologica", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Background layers */
.page-community::before {
  content: '';
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34, 197, 94, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(34, 197, 94, 0.08), transparent),
    linear-gradient(180deg, rgba(10, 15, 10, 0.95), #0a0f0a); /* Добавлен основной фон */
  pointer-events: none;
  z-index: 0;
}

/* Grid pattern overlay */
.page-community::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.community {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

/* ---------------------------------------------------------
   HERO SECTION
--------------------------------------------------------- */
.comm-hero {
  margin-bottom: 120px;
}

.comm-hero__inner {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 80px;
  align-items: start;
}

@media (max-width: 1024px) {
  .comm-hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

/* Left Content */
.comm-hero__content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Badge */
.comm-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  color: #22c55e;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comm-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 12px #22c55e;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

/* Title */
.comm-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(135deg, #f0fdf4 0%, #4ade80 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle */
.comm-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(240, 253, 244, 0.7);
  margin: 0;
  max-width: 560px;
}

/* Actions */
.comm-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Buttons */
.comm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.comm-btn--primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #07111f;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.comm-btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.comm-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

.comm-btn--primary:hover::before {
  transform: translateX(100%);
}

.comm-btn--secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #f0fdf4;
  border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.comm-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.comm-btn__icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s;
}

.comm-btn:hover .comm-btn__icon {
  transform: scale(1.1);
}

/* CTA Section buttons (without icons) */
.comm-cta .comm-btn__icon {
  display: none;
}

.comm-cta .comm-btn {
  gap: 8px;
}

/* Note */
.comm-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: 12px;
  font-size: 14px;
  color: rgba(240, 253, 244, 0.8);
  line-height: 1.6;
  margin-top: 8px;
}

.comm-note::before {
  content: '💡';
  font-size: 18px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   SIDE PANEL
--------------------------------------------------------- */
.comm-hero__side {
  position: sticky;
  top: 120px; /* Match increased padding-top */
}

@media (max-width: 1024px) {
  .comm-hero__side {
    position: static;
    order: -1;
  }
}

.comm-panel {
  background: rgba(17, 24, 17, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.comm-panel__head {
  font-weight: 700;
  font-size: 16px;
  color: #f0fdf4;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comm-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.comm-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.comm-item__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 0.3s;
}

.comm-item:hover .comm-item__ico {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  transform: scale(1.05);
}

.comm-item__content {
  flex: 1;
}

.comm-item__t {
  font-weight: 600;
  color: #f0fdf4;
  margin-bottom: 4px;
  font-size: 15px;
}

.comm-item__d {
  font-size: 13px;
  color: rgba(240, 253, 244, 0.5);
  line-height: 1.5;
}

.comm-panel__foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comm-kpi {
  text-align: center;
}

.comm-kpi__k {
  font-size: 11px;
  color: rgba(240, 253, 244, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.comm-kpi__v {
  font-weight: 700;
  color: #f0fdf4;
  font-size: 14px;
}

/* ---------------------------------------------------------
   RULES SECTION
--------------------------------------------------------- */
.comm-section {
  margin-bottom: 100px;
}

.comm-section__head {
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.comm-h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #f0fdf4;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.comm-p {
  font-size: 17px;
  color: rgba(240, 253, 244, 0.6);
  line-height: 1.6;
  margin: 0;
}

.comm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .comm-grid {
    grid-template-columns: 1fr;
  }
}

.comm-card {
  background: rgba(17, 24, 17, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.comm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #22c55e, transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.comm-card:hover {
  transform: translateY(-4px);
  background: rgba(17, 24, 17, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.comm-card:hover::before {
  opacity: 1;
}

.comm-card__t {
  font-size: 18px;
  font-weight: 700;
  color: #f0fdf4;
  margin-bottom: 12px;
}

.comm-card__d {
  font-size: 15px;
  color: rgba(240, 253, 244, 0.6);
  line-height: 1.6;
}

/* ---------------------------------------------------------
   CTA SECTION
--------------------------------------------------------- */
.comm-cta {
  margin-bottom: 40px;
}

.comm-cta__card {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(17, 24, 17, 0.6) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 24px;
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.comm-cta__card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.5), transparent);
}

@media (max-width: 768px) {
  .comm-cta__card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }
}

.comm-cta__title {
  font-size: 28px;
  font-weight: 800;
  color: #f0fdf4;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.comm-cta__text {
  color: rgba(240, 253, 244, 0.6);
  font-size: 16px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0;
}

.comm-cta__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .comm-cta__actions {
    justify-content: center;
    width: 100%;
  }
}

/* ---------------------------------------------------------
   ANIMATIONS
--------------------------------------------------------- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate="fade-left"].is-visible {
  transform: translateX(0);
}

[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  
  .comm-card,
  .comm-btn {
    transition: none;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .page-community {
    padding-top: 100px;
  }
  
  .community {
    padding: 20px 16px 60px;
  }
  
  .comm-hero {
    margin-bottom: 80px;
  }
  
  .comm-actions {
    flex-direction: column;
  }
  
  .comm-btn {
    width: 100%;
  }
  
  .comm-panel {
    padding: 20px;
  }
  
  .comm-card {
    padding: 20px;
  }
  
  .comm-cta__card {
    padding: 24px 20px;
  }
}