/*
Theme Name: StartapusAi Theme
Description: Тема для AI-акселератора стартапів StartapusAi
Version: 1.0
Author: Сокіл Андрій - Falkon AI
*/

/* ======================================================
   DESIGN SYSTEM — STARTAPUSAI
   Стиль: Dark Tech з фіолетовими акцентами
   Програмний продукт розроблено Соколом Андрієм - Falkon AI
====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-dark:        #0a0a0f;
  --bg-card:        #111118;
  --bg-elevated:    #16161f;
  --border:         #1e1e2e;
  --border-glow:    rgba(125, 86, 243, 0.3);

  --accent:         #7d56f3;
  --accent-bright:  #9b7cff;
  --accent-dim:     rgba(125, 86, 243, 0.15);
  --accent-glow:    0 0 40px rgba(125, 86, 243, 0.25);

  --text-primary:   #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted:     #4a4a6a;

  --success:        #22c55e;
  --danger:         #ef4444;

  --radius:         12px;
  --radius-lg:      20px;
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 120px; /* Збільшений відступ для фіксованого меню */
}


/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── TYPOGRAPHY ────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--text-secondary); }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-bright) 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT ────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 100px 0; }

/* ── NAVIGATION ────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* Враховуємо Admin Bar */
.admin-bar .nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .nav {
    top: 46px;
  }
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-primary); text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}
.nav-logo span { color: var(--accent-bright); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.9rem; font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); }

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  border: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(125, 86, 243, 0.4);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 8px 30px rgba(125, 86, 243, 0.6);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-dim);
}
.btn-lg { padding: 16px 40px; font-size: 1.05rem; }

/* ── CARDS ─────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--accent-glow);
  transform: translateY(-4px);
}

/* ── HERO SECTION ──────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(125, 86, 243, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 50%, rgba(192, 132, 252, 0.07) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(30, 30, 46, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 30, 46, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.hero-content {
  position: relative; z-index: 1;
  text-align: center; max-width: 800px; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 100px;
  background: var(--accent-dim); border: 1px solid var(--border-glow);
  font-size: 0.8rem; font-weight: 600; color: var(--accent-bright);
  margin-bottom: 28px; letter-spacing: 0.05em; text-transform: uppercase;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright);
  animation: pulse 2s infinite;
}
.hero h1 { margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── HOW IT WORKS ──────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 60px; }
.step-card { text-align: center; padding: 40px 24px; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-dim); border: 2px solid var(--border-glow);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 800; color: var(--accent-bright);
  margin-bottom: 20px;
}
.step-card h3 { margin-bottom: 12px; color: var(--text-primary); }

/* ── FEATURES ──────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 60px; }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature-card h3 { margin-bottom: 8px; color: var(--text-primary); }

/* ── DEMO CHAT (для головної сторінки) ────────────── */
.demo-section { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.demo-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.demo-chat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--accent-glow);
}
.demo-chat-header {
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.demo-chat-dots { display: flex; gap: 6px; }
.demo-chat-dots span { width: 10px; height: 10px; border-radius: 50%; }
.demo-chat-dots span:nth-child(1) { background: #ef4444; }
.demo-chat-dots span:nth-child(2) { background: #f59e0b; }
.demo-chat-dots span:nth-child(3) { background: var(--success); }
.demo-chat-title { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.demo-messages { padding: 20px; min-height: 300px; display: flex; flex-direction: column; gap: 12px; }
.demo-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.demo-msg.ai {
  background: var(--accent-dim);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  align-self: flex-start;
  border-radius: 4px 12px 12px 12px;
}
.demo-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
}

/* ── STARTAPUSAI CHAT WIDGET ───────────────────────── */
.startapusai-wrapper { max-width: 800px; margin: 0 auto; }
#startapusai-chat-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--accent-glow);
}
#startapusai-messages {
  padding: 24px; min-height: 400px; max-height: 600px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
}
.msg-bubble {
  max-width: 80%;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: fadeInUp 0.3s ease;
}
.msg-bubble.ai {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-radius: 4px 12px 12px 12px;
}
.msg-bubble.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-radius: 12px 4px 12px 12px;
}
.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; align-items: flex-end;
  background: var(--bg-elevated);
}
#startapusai-input {
  flex: 1; background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  resize: none; outline: none;
  transition: border-color var(--transition);
}
#startapusai-input:focus { border-color: var(--accent); }
#startapusai-input::placeholder { color: var(--text-muted); }
#startapusai-send {
  background: var(--accent);
  color: #fff; border: none;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
#startapusai-send:hover { background: var(--accent-bright); transform: scale(1.05); }
#startapusai-mic-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 44px; height: 44px;
  border-radius: var(--radius);
  cursor: pointer; font-size: 1.1rem;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
#startapusai-mic-btn:hover { border-color: var(--accent); color: var(--accent-bright); }
#startapusai-mic-btn.recording {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #ef4444;
  animation: pulse 1s infinite;
}
.typing-indicator {
  display: flex; align-items: center; gap: 4px; padding: 14px 18px;
  align-self: flex-start;
}
.typing-indicator span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.6;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

/* ── AUTH PAGES ────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 60% 60% at 30% 20%, rgba(125, 86, 243, 0.12) 0%, transparent 60%),
    var(--bg-dark);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.auth-card h2 { margin-bottom: 8px; }
.auth-card .subtitle { color: var(--text-muted); margin-bottom: 32px; font-size: 0.9rem; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-secondary); }
.form-group input {
  width: 100%; background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  color: var(--text-primary); font-size: 0.95rem;
  outline: none; transition: border-color var(--transition);
}
.form-group input:focus { border-color: var(--accent); }
.btn-social {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-primary); font-weight: 600; cursor: pointer;
  transition: all var(--transition); margin-bottom: 12px; text-decoration: none;
  font-size: 0.95rem;
}
.btn-social:hover { border-color: var(--accent); background: var(--accent-dim); }
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: 0.85rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── FOOTER ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
}
.footer p { font-size: 0.85rem; color: var(--text-muted); }
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--accent-bright); }

/* ── ANIMATIONS ────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(0.9); }
}
@keyframes typing {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%       { transform: translateY(-4px); opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.loading {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--border) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ── DASHBOARD LAYOUT ──────────────────────────────── */
.dash-container {
  display: grid;
  grid-template-columns: 90px 1fr; /* Вузький сайдбар */
  min-height: 100vh;
}

/* Sidebar (Desktop) */
.dash-sidebar {
  background: #0F0F12; /* Глибокий чорний */
  border-right: 1px solid rgba(255,255,255,0.05);
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.dash-nav-item {
  display: flex;
  flex-direction: column; /* Іконка над текстом */
  align-items: center;
  gap: 8px;
  width: 100%;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

.nav-icon-wrapper {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #666;
  transition: all 0.3s ease;
  position: relative;
}

.dash-nav-item span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #666;
  text-transform: uppercase;
}

/* Active State with Glow */
.dash-nav-item.active .nav-icon-wrapper,
.dash-nav-item:hover .nav-icon-wrapper {
  color: #fff;
  background: rgba(255,255,255,0.03);
}

.dash-nav-item.active .nav-icon-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  filter: blur(8px);
}

.dash-nav-item.active span {
  color: #fff;
}

/* Content Area */
.dash-content {
  padding: 40px 60px;
  background: #08080A;
}

/* ── MOBILE NAVIGATION ───────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(15, 15, 18, 0.8);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.05);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #666;
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.mobile-nav-item.active {
  color: #fff;
}

.mobile-nav-item svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 992px) {
  .dash-container {
    grid-template-columns: 1fr; /* Прибираємо сайдбар з розмітки */
  }
  .dash-sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  .dash-content {
    padding: 30px 20px 100px 20px; /* Відступ знизу для мобільної панелі */
  }
}
.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.dash-title h1 { margin-bottom: 8px; }
.dash-title p { color: var(--text-secondary); }

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}
.project-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--transition), border-color var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
}
.project-status {
  display: flex;
  gap: 8px;
}
.status-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.project-card-title h3 { font-size: 1.5rem; margin-bottom: 8px; }
.project-card-title p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.4; }

.health-circle {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.health-circle svg { transform: rotate(-90deg); }
.health-circle .bg { fill: none; stroke: var(--border); stroke-width: 4; }
.health-circle .progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  transition: stroke-dasharray 1s ease;
}
.health-val {
  position: absolute;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.health-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

.project-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.footer-item label { display: block; font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
.footer-item span { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }

/* Loading State */
.dash-loader {
  display: flex; justify-content: center; padding: 100px;
}

/* ── GUTENBERG BLOCKS SUPPORT ─────────────────────── */

.wp-block-group { padding: 40px 0; }
.wp-block-columns { gap: 40px; margin-bottom: 40px; }
.wp-block-column { min-width: 0; }
.wp-block-heading { margin-bottom: 24px; color: var(--text-primary); }
.wp-block-paragraph { margin-bottom: 16px; color: var(--text-secondary); }
.wp-block-spacer { clear: both; }

/* Виправлення для сторінок */
.page-main { padding: 40px 0; }
.page-title { margin-bottom: 40px; }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 768px) {
  .demo-wrapper { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .container { padding: 0 16px; }
  .section { padding: 60px 0; }
}

/* ── BLOG STYLES ──────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.post-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.post-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #111;
}

.post-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-content h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-content h2 a {
  color: #fff;
  text-decoration: none;
}

.post-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 16px;
  display: flex;
  gap: 12px;
}

.post-excerpt {
  color: #999;
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.read-more {
  color: var(--accent-bright);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
}

/* Single Post Layout */
.single-post-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 20px;
}

.post-header {
  text-align: center;
  margin-bottom: 60px;
}

.post-header h1 {
  font-size: 3.5rem;
  margin-bottom: 24px;
  line-height: 1.1;
}

.post-main-content {
  line-height: 1.8;
  font-size: 1.15rem;
  color: #d1d1d1;
}

.post-main-content h2, .post-main-content h3 {
  color: #fff;
  margin-top: 50px;
  margin-bottom: 20px;
}

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