/* Hero Section */
.hero-sec {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 24px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(to bottom, rgba(5, 4, 9, 0.4) 0%, rgba(5, 4, 9, 0.88) 100%), url('../shared/cosmic_bg.png') no-repeat center center / cover;
  box-shadow: var(--glow);
  /* Фиксация субпиксельного выпирания фона на скруглениях */
  transform: translateZ(0);
  background-clip: padding-box;
  margin-bottom: 40px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.65;
  margin-bottom: 32px;
}

/* Feature Grid */
.features-title {
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  margin: 40px 0 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--glow);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: block;
}

.feature-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Drive2 Style Blocks */
.drive-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  margin-top: 20px;
}

.drive-widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drive-widget-title {
  font-size: 1.1rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(139,92,246,0.1);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.drive-list-num {
  font-weight: 900;
  color: var(--purple);
  width: 24px;
}

.drive-list-text {
  flex: 1;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.drive-list-text:hover {
  color: var(--purple);
}

/* Master Highlights */
.masters-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.master-highlight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.master-highlight-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow);
}

.mh-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--purple);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: rgba(139,92,246,0.06);
}

.mh-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.mh-spec {
  font-size: 0.78rem;
  color: var(--purple);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.mh-rating {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
}

@keyframes qcPulse { 0%,100%{box-shadow:0 4px 20px rgba(139,92,246,0.5)} 50%{box-shadow:0 4px 30px rgba(139,92,246,0.8),0 0 0 8px rgba(139,92,246,0.15)} }
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.b2b-calculator-link {
  border: 1px dashed var(--gold);
  color: var(--gold);
}

.drive-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.diary-comments-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.diary-expert-avatar {
  font-size: 1.5rem;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.diary-master-badge {
  font-size: 0.6rem;
  padding: 2px 6px;
}

.master-day-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.master-day-row + .master-day-row {
  margin-top: 8px;
}

.master-day-icon {
  font-size: 1.8rem;
}

.master-day-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.master-day-spec {
  font-size: 0.75rem;
  color: var(--purple);
  font-weight: 600;
}

.master-day-spec-alt {
  color: var(--pink);
}

@media (max-width: 760px) {
  .hero-sec {
    padding: 48px 16px;
    border-radius: 24px;
    margin-bottom: 24px;
    min-height: auto;
  }

  .hero-title {
    font-size: 2.0rem;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
  }

  .drive-layout,
  .masters-highlight-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .drive-column,
  .drive-widget,
  .drive-list-item,
  .master-highlight-card,
  .master-day-row {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .drive-list-text,
  .master-day-name,
  .master-day-spec {
    overflow-wrap: anywhere;
  }
}

.qc-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5);
  animation: qcPulse 2s ease-in-out infinite;
}

.qc-icon,
.qc-widget-icon {
  font-size: 1.5rem;
}

.qc-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qc-widget {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 9000;
  width: 320px;
  background: rgba(10, 9, 18, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-family: 'Inter Tight', sans-serif;
  
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s;
}

.qc-widget.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

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

.qc-title {
  font-weight: 800;
  font-size: 0.9rem;
  color: #f1f5f9;
}

.qc-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.qc-close,
.qc-reset {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-family: inherit;
}

.qc-close {
  font-size: 1.1rem;
  margin-left: auto;
}

.qc-field {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.85rem;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.qc-category {
  margin-bottom: 14px;
}

.qc-submit,
.qc-result-link {
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  font-weight: 700;
}

.qc-submit {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
}

.qc-result {
  display: none;
}

.qc-result.is-open {
  display: block;
}

.qc-text {
  font-size: 0.85rem;
  color: #e2e8f0;
  line-height: 1.6;
  margin-bottom: 14px;
}

.qc-result-card {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  margin-bottom: 12px;
}

.qc-result-note {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.qc-result-link {
  display: inline-block;
  font-size: 0.82rem;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
}

.qc-reset {
  font-size: 0.75rem;
  width: 100%;
}

@media (max-width: 480px) {
  .qc-bubble {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }

  .qc-widget {
    left: 12px;
    right: 12px;
    bottom: 78px;
    width: auto;
    max-height: calc(100dvh - 98px);
    overflow-y: auto;
    padding: 16px;
    border-radius: 16px;
  }

  .qc-widget-head {
    align-items: flex-start;
  }

  .qc-title {
    font-size: 0.86rem;
  }

  .qc-subtitle {
    font-size: 0.68rem;
  }
}

.is-hidden {
  display: none !important;
}

@keyframes qcPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(139, 92, 246, 0.5); }
  50% { box-shadow: 0 4px 30px rgba(139, 92, 246, 0.8), 0 0 0 8px rgba(139, 92, 246, 0.15); }
}
