:root {
  --prime: #1a1a2e;
  --second: #16213e;
  --accent: #e94560;
  --text: #eaeaea;
  --muted: #a0a0b0;
  --card-bg: rgba(30, 30, 60, 0.7);
  --grad: linear-gradient(135deg, rgba(233, 69, 96, 0.8), rgba(26, 26, 46, 0.9));
  --radius: 12px;
  --transition: all 0.3s ease;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--prime);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body.burger-active {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #c73753;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-light {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
  background: rgba(26, 26, 46, 0.98);
  box-shadow: var(--shadow);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--accent);
}

.logo svg, .logo img {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav__link {
  color: var(--muted);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav__link:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text);
}

.nav__link:hover:after,
.nav__link.active:after {
  width: 100%;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav__toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  margin: 5px 0;
  transition: var(--transition);
}

/* Burger menu */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--second);
    flex-direction: column;
    justify-content: center;
    gap: 40px;
    transition: right 0.3s ease;
    padding: 30px;
  }

  .nav.burger-active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
  }

  .nav__toggle {
    display: block;
  }

  .nav__toggle.burger-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav__toggle.burger-active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.burger-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: url('images/hero-bg.jpg') center center / cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--grad);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 0 60px;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

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

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero__buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 50px;
}

.hero__stat {
  text-align: center;
}

.hero__stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.hero__stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero__title {
    font-size: 2.2rem;
  }

  .hero__subtitle {
    font-size: 1rem;
  }

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

/* Features */
.features {
  padding: 80px 0;
  background: var(--second);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px;
  transition: var(--transition);
  backdrop-filter: blur(5px);
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-card__icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 15px;
}

.feature-card__title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-card__desc {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section__title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section__title:after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 15px auto 0;
}

.section__subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 30px;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.blog-card:hover {
  transform: translateY(-5px);
}

.blog-card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--grad);
}

.blog-card__body {
  padding: 20px;
}

.blog-card__category {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-card__title {
  font-size: 1.2rem;
  margin: 10px 0;
  line-height: 1.3;
}

.blog-card__desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.blog-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
}

/* Glossary */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.glossary-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.glossary-item:hover {
  border-left-color: var(--accent);
  transform: translateX(5px);
}

.glossary-item__term {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.glossary-item__def {
  color: var(--muted);
  font-size: 0.9rem;
}

/* About */
.about {
  background: var(--second);
  text-align: center;
}

.about__text {
  max-width: 800px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.8;
}

.about__text p:first-child {
  color: var(--text);
  font-size: 1.1rem;
  margin-bottom: 20px;
}

/* FAQ */
.faq-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  margin-bottom: 15px;
  overflow: hidden;
}

.faq-item__question {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.faq-item__question:hover {
  background: rgba(233, 69, 96, 0.1);
}

.faq-item__question:after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent);
  transition: var(--transition);
}

.faq-item.open .faq-item__question:after {
  transform: rotate(45deg);
}

.faq-item__answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--muted);
}

.faq-item.open .faq-item__answer {
  max-height: 500px;
  padding: 0 20px 20px;
}

/* Newsletter */
.newsletter {
  background: var(--grad);
  padding: 60px 0;
}

.newsletter__content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter__title {
  font-size: 2rem;
  margin-bottom: 15px;
}

.newsletter__desc {
  margin-bottom: 30px;
}

.newsletter form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.newsletter input {
  flex: 1;
  max-width: 400px;
  padding: 15px;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
}

.newsletter input::placeholder {
  color: var(--muted);
}

/* Contact */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  color: var(--text);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(233, 69, 96, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
.footer {
  background: var(--second);
  padding: 50px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.footer__title {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer__list {
  list-style: none;
}

.footer__list li {
  margin-bottom: 10px;
}

.footer__list a {
  color: var(--muted);
  transition: var(--transition);
}

.footer__list a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer__bottom {
  text-align: center;
  color: var(--muted);
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.footer__social {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.footer__social a:hover {
  background: var(--accent);
  color: #fff;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 100px 0 30px;
  background: var(--second);
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--accent);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Single post */
.post {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px 0;
}

.post__title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.post__meta {
  color: var(--muted);
  margin-bottom: 30px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.post__content {
  line-height: 1.8;
}

.post__content h2 {
  font-size: 1.8rem;
  margin: 30px 0 15px;
}

.post__content p {
  margin-bottom: 20px;
}

.post__content img {
  margin: 20px 0;
  border-radius: var(--radius);
}

.post__content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.post__content blockquote {
  border-left: 4px solid var(--accent);
  padding: 15px 20px;
  margin: 30px 0;
  background: var(--card-bg);
  color: var(--muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .section__title {
    font-size: 1.8rem;
  }

  .container {
    padding: 0 15px;
  }

  .hero__title {
    font-size: 2rem;
  }

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

/* Utility classes */
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--prime);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 100;
  font-size: 1.2rem;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.5);
}

/* Dark mode toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Responsive grid fix */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .hero__buttons {
    flex-direction: column;
  }

  .hero__buttons .btn {
    width: 100%;
  }
}