/* ===== Reset and base styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
}

a {
  color: #1e73be;
  text-decoration: underline;
}

a:hover {
  color: #155a96;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Top Bar ===== */
.top-bar {
  background: #2c2c2c;
  padding: 0.5rem 1rem;
}

.top-bar-content {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.btn-secondary {
  padding: 0.5rem 2rem;
  background: #e8cd84;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
  border: none;
  display: inline-block;
}

.btn-secondary:hover {
  background: #d4b96a;
}

.btn-telegram {
  background-color: #0088cc;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
}

.btn-telegram a {
  color: white;
  text-decoration: none;
}

/* ===== Header ===== */
.header {
  background: #d6b46b;
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.logo img {
  max-height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  padding-left: 10px;
}

.nav-links a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.7;
}

.header-actions .btn-download {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, rgb(122, 220, 180) 0%, rgb(0, 208, 130) 100%);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  transition: transform 0.3s;
  display: block;
  border: none;
}

.header-actions .btn-download:hover {
  transform: scale(1.05);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #333;
}

/* ===== Hero ===== */
.hero {
  background: #fff;
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #333;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: bold;
  transition: transform 0.3s, background 0.3s;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  color: white;
}

.btn.register {
  background-color: #0a7e27;
}

.btn.login {
  background-color: #1e7a9b;
}

.btn.download {
  background-color: #b04b41;
}

/* ===== Main content ===== */
.main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.gift-code {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin: 2rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.code {
  font-family: monospace;
  font-size: 1.2rem;
  background: #e9ecef;
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
  word-break: break-all;
}

.section-title {
  margin-bottom: 2rem;
}

.steps-section {
  margin: 4rem 0;
}

.step-card {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.step-card img,
.content-image {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.centered-text {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ===== Info Table ===== */
.info-table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-table th,
.info-table td {
  padding: 1rem;
  border: 1px solid #e9ecef;
  text-align: left;
}

.info-table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

.info-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* ===== Table of Contents ===== */
details.toc-container {
  margin: 2rem 0;
  background: #fff;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  padding: 0;
  border-radius: 10px;
  max-width: 50%;
}

summary.toc-title {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
}

summary.toc-title::-webkit-details-marker {
  display: none;
}

summary.toc-title::before {
  content: "►";
  font-size: 0.8em;
  margin-right: 1rem;
  transition: transform 0.2s ease-in-out;
}

details[open] > summary.toc-title::before {
  transform: rotate(90deg);
}

.toc-list {
  list-style: none;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #e9ecef;
}

.toc-list li {
  margin-bottom: 0.8rem;
}

ul.step-now {
  list-style: none;
  padding-left: 24px;
  margin-top: 0.5rem;
}

.toc-list a {
  text-decoration: none;
  color: #1e73be;
  transition: color 0.3s;
}

.toc-list a:hover {
  text-decoration: underline;
}

/* ===== FAQ ===== */
.faq-section {
  margin: 4rem 0;
}

details {
  background: #f8f9fa;
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

summary {
  padding: 1.5rem;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
  list-style: none;
  display: flex;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "►";
  font-size: 0.8em;
  margin-right: 1rem;
  transition: transform 0.2s ease-in-out;
}

details[open] > summary {
  font-weight: bold;
}

details[open] > summary::before {
  transform: rotate(90deg);
}

.faq-answer {
  padding: 0.5rem 1.5rem 1.5rem 3rem;
  line-height: 1.8;
  color: #555;
}

/* ===== Generic page content ===== */
.page-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #1a1a1a;
  text-align: center;
}

.content-section {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  margin: 2rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.content-section.center {
  text-align: center;
}

.content-section h2 {
  font-size: 2rem;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.content-section h3 {
  font-size: 1.8rem;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.content-section p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section ul {
  list-style-position: inside;
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.content-section li {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section .email-link {
  font-size: 1.2rem;
  color: #1e73be;
  text-decoration: none;
  font-weight: bold;
}

.content-section .email-link:hover {
  text-decoration: underline;
}

.intro-section {
  background: linear-gradient(135deg, #e8cd84, #d4b96a);
  color: #333;
}

.highlight-section {
  background: #f8f9fa;
  border-left: 4px solid #e8cd84;
}

/* ===== Blog ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.blog-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #d6b46b, #e8cd84);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 1rem;
}

.blog-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-body h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.blog-card-body h2 a {
  color: #1a1a1a;
  text-decoration: none;
}

.blog-card-body h2 a:hover {
  color: #1e73be;
}

.blog-card-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1rem;
}

.blog-card-excerpt {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  flex: 1;
}

.blog-card .read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #1e73be;
  text-decoration: none;
  font-weight: bold;
}

.blog-card .read-more:hover {
  text-decoration: underline;
}

/* ===== Article (blog post) ===== */
.article-meta {
  font-size: 0.95rem;
  color: #777;
  margin-bottom: 2rem;
}

.article-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.article-content h2 {
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
}

.article-content h3 {
  font-size: 1.4rem;
  margin: 1.5rem 0 1rem;
}

.article-content ul,
.article-content ol {
  padding-left: 2rem;
  margin-bottom: 1.5rem;
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.8;
}

/* ===== Footer ===== */
.footer {
  background: #1a1a1a;
  color: white;
  padding: 4rem 1rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background: #e9cd84;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    justify-content: space-between;
  }

  details.toc-container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .top-bar-content {
    flex-direction: column;
  }

  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .page-title {
    font-size: 2rem;
  }
}