/* Mail CDN — стиль Telegram: чистый, современный, адаптивный */

:root {
  --tg-blue: #2AABEE;
  --tg-blue-hover: #229ED9;
  --tg-blue-dark: #1e8bc3;
  --bg-page: #f4f4f5;
  --bg-card: #ffffff;
  --text-primary: #222222;
  --text-secondary: #707579;
  --border: #e5e5ea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(42, 171, 238, 0.15);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover {
  color: var(--tg-blue);
  background: rgba(42, 171, 238, 0.08);
}

/* Main content */
.main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 1.5rem;
}

/* Hero */
.hero {
  background: linear-gradient(145deg, var(--bg-card) 0%, #e8f4fc 100%);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--tg-blue);
  color: white;
}

.btn-primary:hover {
  background: var(--tg-blue-hover);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--tg-blue);
  border: 1px solid var(--tg-blue);
}

.btn-secondary:hover {
  background: rgba(42, 171, 238, 0.08);
}

/* Cards grid */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex: 1 1 280px;
  min-width: 0;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(42, 171, 238, 0.3);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(42, 171, 238, 0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Page title (inner pages) */
.page-hero {
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Content block */
.content-block {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.content-block h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.content-block p,
.content-block ul {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.content-block ul {
  padding-left: 1.25rem;
}

.content-block li {
  margin-bottom: 0.35rem;
}

/* Feature list */
.features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(42, 171, 238, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--tg-blue);
}

.feature-row span:first-child {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.feature-row div strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.feature-row div span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Footer */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--tg-blue);
}

.content-block a.link {
  color: var(--tg-blue);
  text-decoration: none;
  font-weight: 500;
}

.content-block a.link:hover {
  text-decoration: underline;
}

.footer-copy {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .site-header {
    padding: 0.5rem 1rem;
  }

  .header-inner {
    justify-content: center;
  }

  .nav {
    justify-content: center;
  }

  .main {
    padding: 1rem;
  }

  .hero {
    padding: 1.5rem;
  }

  .content-block {
    padding: 1.25rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .cards .card {
    flex: 1 1 100%;
  }
}
