/*
Theme Name: Инвайтинг в MAX
Theme URI: https://example.com
Author: Инвайтинг в MAX
Description: Кастомная тема для сайта услуг инвайтинга в мессенджере MAX. Фиолетовая цветовая схема, встроенные CPT (кейсы, отзывы, пакеты, FAQ), формы заявок, SEO-оптимизация.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: invajting-max
*/

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #7C3AED;
  --primary-dark: #5B21B6;
  --primary-light: #A78BFA;
  --primary-bg: #F5F3FF;
  --primary-bg-alt: #EDE9FE;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --success: #10B981;
  --danger: #EF4444;
  --text: #1E1B4B;
  --text-secondary: #4C4578;
  --text-muted: #7C7A94;
  --bg: #FFFFFF;
  --bg-light: #FAFAFF;
  --bg-dark: #0F0A2A;
  --border: #E5E1F0;
  --border-light: #F0EDF7;
  --shadow-sm: 0 1px 3px rgba(124,58,237,0.08);
  --shadow: 0 4px 20px rgba(124,58,237,0.1);
  --shadow-lg: 0 12px 40px rgba(124,58,237,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Manrope', var(--font);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p { margin-bottom: 1rem; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section {
  padding: 5rem 0;
}
.section--alt {
  background: var(--bg-light);
}
.section--purple {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a0940 100%);
  color: #fff;
}
.section--purple h2,
.section--purple h3 { color: #fff; }
.section--purple p { color: rgba(255,255,255,0.8); }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-logo span {
  color: var(--primary);
}
.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-menu a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-menu a:hover,
.nav-menu a.current {
  color: var(--primary);
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}
.nav-menu a:hover::after { width: 100%; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}
.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124,58,237,0.4);
  color: #fff;
}
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--accent-dark);
  color: #fff;
}
.btn--white {
  background: #fff;
  color: var(--primary);
}
.btn--white:hover {
  background: var(--primary-bg);
  color: var(--primary-dark);
}
.btn--lg {
  padding: 1.1rem 2.5rem;
  font-size: 1.05rem;
}
.btn--sm {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}

/* ===== HERO ===== */
.hero {
  padding: 6rem 0 4rem;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a0940 50%, #2d1065 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(124,58,237,0.3);
  border: 1px solid rgba(167,139,250,0.3);
  color: var(--primary-light);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  margin-bottom: 1.5rem;
  max-width: 700px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent) 0%, #FBBF24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subtitle {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2.5rem;
  max-width: 550px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero__stats {
  display: flex;
  gap: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero__stat-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.hero__stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition);
}
.card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  color: var(--primary);
}
.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.card__text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover::before { opacity: 1; }

/* ===== STEPS ===== */
.steps {
  display: flex;
  gap: 2rem;
  counter-reset: step;
}
.step {
  flex: 1;
  text-align: center;
  position: relative;
  counter-increment: step;
}
.step__num {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
}
.step__title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}
.step__text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== PRICING ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}
.pricing-card {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
}
.pricing-card--featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}
.pricing-card--featured::before {
  content: 'Популярный';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 0.3rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}
.pricing__name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.pricing__amount {
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.pricing__price {
  font-size: 2.5rem;
  color: var(--primary);
}
.pricing__volume {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.pricing__features {
  text-align: left;
  margin-bottom: 2rem;
}
.pricing__features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing__features li::before {
  content: '\2713';
  color: var(--success);
  font-weight: 700;
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.testimonial__stars {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.testimonial__text {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  font-style: italic;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
}
.testimonial__name {
  font-weight: 700;
  font-size: 0.95rem;
}
.testimonial__role {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ===== CASE STUDIES ===== */
.case-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.case-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.case-card__img {
  height: 200px;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-card__body { padding: 1.5rem; }
.case-card__tag {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.case-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.case-card__stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.case-card__stat-val {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.1rem;
}
.case-card__stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.faq-item__q {
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  transition: background var(--transition);
}
.faq-item__q:hover { background: var(--bg-light); }
.faq-item__q::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-item.active .faq-item__q::after {
  transform: rotate(45deg);
}
.faq-item__a {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-item__a {
  padding: 0 1.5rem 1.2rem;
  max-height: 500px;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ===== CONTACT FORM ===== */
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--bg);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.footer__brand span { color: var(--primary-light); }
.footer__desc {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 280px;
}
.footer h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.footer-links a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 0.3rem 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary-light); }
.footer__bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header__label {
  display: inline-block;
  background: var(--primary-bg);
  color: var(--primary);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.section-header h2 {
  margin-bottom: 1rem;
}
.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ===== BLOG LIST ===== */
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.blog-card__img {
  height: 200px;
  background: var(--primary-bg);
  overflow: hidden;
}
.blog-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card__body { padding: 1.5rem; }
.blog-card__meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.blog-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.blog-card__title a {
  color: var(--text);
}
.blog-card__title a:hover { color: var(--primary); }
.blog-card__excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== SINGLE POST ===== */
.single-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.single-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.single-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.single-content p { margin-bottom: 1.2rem; }
.single-content ul, .single-content ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}
.single-content ul { list-style: disc; }
.single-content ol { list-style: decimal; }
.single-content li { margin-bottom: 0.4rem; }
.single-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
}
.single-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--primary-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span { margin: 0 0.3rem; }

/* ===== TRUST BAR ===== */
.trust-bar {
  background: var(--primary-bg);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.trust-bar__item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid,
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card--featured { transform: none; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-wrap: wrap; }
  .step { min-width: calc(50% - 1rem); }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    gap: 1rem;
  }
  .menu-toggle { display: block; }
  .services-grid,
  .pricing-grid,
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero__stats { flex-wrap: wrap; gap: 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; }
  .step { min-width: 100%; }
  .cta-banner { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }
.animate-in:nth-child(6) { animation-delay: 0.5s; }

/* ===== WP SPECIFIC ===== */
.wp-block-image { margin: 1.5rem 0; }
.wp-block-image img { border-radius: var(--radius); }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
