/* ====== Variables ====== */
:root {
    /* Colors */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #560bad;

    /* Neutrals */
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --light: #f8f9fa;
    --white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);

    /* Borders */
    --border-radius: 8px;
    --border-radius-lg: 12px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ====== Base Styles ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ====== Layout ====== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ====== Buttons ====== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ====== Preloader ====== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ====== Header ====== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-icon {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    margin-right: 0.5rem;
}

.logo-dot {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ====== Hero Section ====== */
.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ed 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, rgba(67, 97, 238, 0) 70%);
    z-index: 0;
}

.hero .container {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-title span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-10deg);
    transition: var(--transition);
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(-5deg);
}

.hero-image-badge {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background-color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.hero-image-badge i {
    color: var(--accent);
}

/* ====== Clients Section ====== */
.clients {
    padding: 2rem 0;
    background-color: var(--white);
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

.client-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

.client-logos img {
    height: 40px;
    opacity: 0.6;
    transition: var(--transition);
    filter: grayscale(100%);
}

.client-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ====== Features Section ====== */
.features {
    background-color: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transition: var(--transition);
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    height: 100%;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.feature-link i {
    transition: var(--transition);
}

.feature-link:hover i {
    transform: translateX(3px);
}

/* ====== Process Section ====== */
.process {
    background-color: var(--white);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: var(--light);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    transition: var(--transition);
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--gray);
}

.step-arrow {
    font-size: 1.5rem;
    color: var(--gray-light);
}

/* ====== CTA Section ====== */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.cta .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.cta .btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* ====== Footer ====== */
.footer {
    background-color: var(--dark);
    color: var(--gray-light);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-about-text {
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.copyright {
    font-size: 0.875rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    font-size: 0.875rem;
    color: var(--gray-light);
    transition: var(--transition);
}

.footer-legal-links a:hover {
    color: var(--white);
}

/* ====== Responsive ====== */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-image {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-buttons {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .cta h2 {
        font-size: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
    }
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    .cta-buttons {
        flex-direction: column;
    }
    .step {
        flex-direction: column;
        text-align: center;
    }
    .step-arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

/* ====== Language switcher (ТЗ 1) ====== */
.language-switcher {
  position: relative;
  display: inline-block;
  margin-left: 2rem;
}

.language-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Внешний вид */
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 1.5rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #1f2937;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: border-color var(--transition), box-shadow var(--transition);

  /* Позиционируем стрелку */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.65rem auto;
}

.language-select:hover {
  border-color: var(--primary-dark);
}

.language-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.25);
}

@media (max-width: 768px) {
  .language-switcher {
    display: none;
  }
}


/* ====== Modal & Selects ====== */
/* Network-select input */
.network-select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    background-color: #222;
    color: #fff;
    border: 1px solid #444;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.network-select:disabled {
    background-color: #333;
    cursor: not-allowed;
    opacity: 0.6;
}

.network-select:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Modal overlay & content */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: #1a1a1a;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #FFD700;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.4);
    color: #fff;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Network & Token lists */
.network-list,
.token-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.network-item,
.token-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    background-color: #343a40;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid #495057;
}

.network-item:hover,
.token-item:hover {
    background-color: #495057;
    transform: translateX(5px);
}

.network-icon,
.token-icon {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    border-radius: 50%;
}

.network-name,
.token-name {
    font-weight: 500;
    color: #fff;
}

/* Modal buttons */
.modal-btn {
    display: block;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.modal-btn.btn-primary {
    background-color: #ff3333;
    color: white;
}

.modal-btn.btn-primary:hover {
    background-color: #e60000;
}

.modal-btn.btn-secondary {
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
}

.modal-btn.btn-secondary:hover {
    background-color: #444;
}

/* ====== Departments Section (ТЗ 2) ====== */
.departments {
  background-color: var(--light);
  padding: 5rem 0;
}
.departments .section-title {
  margin-bottom: 1rem;
}
.departments .section-subtitle {
  margin-bottom: 2rem;
}
.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.dept-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.dept-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.dept-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.dept-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.dept-card p {
  color: var(--gray);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.dept-card .btn-outline {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}
/* ====== Pricing Section (ТЗ 3) ====== */
.pricing {
  background-color: var(--white);
  padding: 4rem 0;
}
.pricing .section-title {
  margin-bottom: 0.5rem;
}
.pricing .section-subtitle {
  margin-bottom: 1.5rem;
}
.pricing-text {
  text-align: center;
  font-size: 1.1rem;
  color: var(--dark);
  max-width: 700px;
  margin: 0 auto;
}
/* ====== Footer Simplified (ТЗ 4) ====== */
.footer {
  padding: 3rem 0;
  background-color: var(--dark);
  color: var(--gray-light);
  text-align: center;
}
.footer-nav {
  list-style: none;
  margin-bottom: 1.5rem;
}
.footer-nav li {
  margin: 0.5rem 0;
}
.footer-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.footer-nav a:hover {
  color: var(--primary);
}
.footer-legal {
  margin-bottom: 1rem;
}
.footer-legal a {
  color: var(--gray-light);
  margin: 0 0.5rem;
  font-size: 0.875rem;
}
.footer-legal a:hover {
  color: var(--white);
}

/* ====== Calculation Page Styles (My) ====== */
.calc-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
}

.calc-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  flex: 1 1 200px;
  max-width: 250px;
  padding: 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}

.calc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.calc-icon {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.calc-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.calc-label {
  font-size: 0.9rem;
  color: var(--gray);
}

/* ====== Contact Form Styles (My) ====== */
.contact-form {
  max-width: 500px;
  margin: 2rem auto;
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.form-group .required {
  color: var(--danger);
  margin-left: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-light);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form .btn-primary {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
}

.alt-contact {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--gray);
}

.alt-contact a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.alt-contact a:hover {
  text-decoration: underline;
}

/* ====== Rules Page (My) ====== */
.rules-page {
  padding: 6rem 1.5rem;
  text-align: center;
}
.rules-page h1 {
  margin-bottom: 0.5rem;
}
.rules-intro {
  color: var(--gray);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.rule-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.rule-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.rule-icon {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.rule-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}
.rule-desc {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}
/* ====== Optimization Page (My) ====== */
.optimization-page {
  padding: 6rem 1.5rem;
  text-align: center;
}
.optimization-page h1 {
  margin-bottom: 0.5rem;
}
.opt-intro {
  color: var(--gray);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}
.opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.opt-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.opt-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.opt-icon {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.opt-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}
.opt-desc {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}
/* ====== Product Page (My) ====== */
.product-page {
  padding: 6rem 1.5rem;
  text-align: center;
}

.product-page h1 {
  margin-bottom: 0.5rem;
}

.product-intro {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.product-icon {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.product-desc {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ====== Geography Page (My) ====== */
.geo-page {
  padding: 6rem 1.5rem;
  text-align: center;
}
.geo-page h1 {
  margin-bottom: 0.5rem;
}
.geo-intro,
.geo-outro {
  color: var(--gray);
  font-size: 1.05rem;
  margin: 0.5rem 0 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.geo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.geo-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.geo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.geo-icon {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.geo-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--dark);
}
/* Выравнивание кнопок в департамент-карточках */
.dept-card {
  display: flex;
  flex-direction: column;
}

.dept-card .btn-outline {
  /* «Автоматический» отступ сверху отводит кнопку вниз карточки */
  margin-top: auto;
}
/* 1) Уменьшаем отступ в шапке (если ещё не сделали) */
.navbar {
    padding: 1rem 0;  /* вместо 1.5rem */
}

/* 2) Блок для кнопок в шапке */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 3) Размер «малой» кнопки */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* 4) Стилизация AML-страницы */
.aml-page {
    padding-top: 6rem; /* отступ сверху чуть больше, чтобы заголовок не «ухал» под шапку */
    text-align: left;  /* выровнять весь контент по левой границе контейнера */
}
.aml-page h1 {
    font-size: 2.75rem; /* чуть больше */
    margin-bottom: 1rem;
}
.aml-page .aml-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
}
/* Статистика изначально скрыта */
#stats {
    display: none;
    margin-top: 2rem;
}

/* 5) Если нужно, чтобы кнопка в шапке оставалась сверху при скролле */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* 6) Добавляем небольшой отступ справа от логотипа до заголовка */
.aml-page h1 {
    /* чтобы заголовок начинался ровно под логотипом */
    margin-left: calc((100% - 1200px)/2);
    padding-left: 1.5rem; /* тот же отступ контейнера */
}
/* Уменьшаем отступы самого футера */
.footer {
    background-color: var(--dark);
    color: var(--gray-light);
    padding: 2rem 0;        /* было 5rem 0 2rem */
}

/* Контейнер-обёртка для выстраивания в строку */
.footer-content {
    display: flex;
    flex-wrap: wrap;        /* чтобы при узких экранах колонки «заворачивались» */
    justify-content: space-between;
    align-items: center;
    gap: 1rem;              /* небольшой отступ между колонками */
}

/* Стили навигации в футере */
.footer-nav {
    display: flex;
    gap: 1.5rem;
}
.footer-nav li {
    margin: 0;
}
.footer-nav a {
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
}
.footer-nav a:hover {
    color: var(--primary);
}

/* Стили «юридических» ссылок */
.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}
.footer-legal-links a {
    color: var(--gray-light);
    font-size: 0.875rem;
    transition: var(--transition);
}
.footer-legal-links a:hover {
    color: var(--white);
}

/* Стили копирайта */
.footer-copy {
    font-size: 0.875rem;
    color: var(--gray-light);
    margin: 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    .footer-legal-links {
        justify-content: center;
    }
}
/* ====== Responsive: Optimization Page ====== */

/* до 992px — уменьшаем количество колонок на два */
@media (max-width: 992px) {
  .opt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* до 768px — одна колонка, подгоняем отступы и типографику, включаем мобильное меню */
@media (max-width: 768px) {
  /* Optimization page container */
  .optimization-page {
    padding: 4rem 1.5rem;
  }
  .optimization-page h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  .opt-intro {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 2rem;
  }

  /* Cards → одна колонка */
  .opt-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .opt-card {
    padding: 1.5rem;
  }
  .opt-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  .opt-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .opt-desc {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  /* Header → показываем бургер, прячем обычную навигацию */
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* до 576px — ещё компактнее */
@media (max-width: 576px) {
  .optimization-page {
    padding: 3rem 1rem;
  }
  .optimization-page h1 {
    font-size: 1.75rem;
  }
  .opt-intro {
    font-size: 0.95rem;
  }
  .opt-card {
    padding: 1rem;
  }
  .opt-icon {
    font-size: 1.75rem;
  }
  .opt-title {
    font-size: 1.1rem;
  }
  .opt-desc {
    font-size: 0.9rem;
  }
}
/* ====== Responsive: Product Page ====== */

/* до 992px — из 4 карточек делаем 2 колонки */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* до 768px — одна колонка, центрируем заголовки и вводные тексты, уменьшаем отступы */
@media (max-width: 768px) {
  /* основной контейнер */
  .product-page {
    padding: 4rem 1.5rem;
  }
  /* заголовок и вводные абзацы */
  .product-page h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  .product-intro {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  /* карточки в одну колонку */
  .product-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .product-card {
    padding: 1.5rem;
  }
  .product-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  .product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .product-desc {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  /* шапка: скрываем обычные ссылки, показываем бургер */
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* до 576px — ещё компактнее */
@media (max-width: 576px) {
  .product-page {
    padding: 3rem 1rem;
  }
  .product-page h1 {
    font-size: 1.75rem;
  }
  .product-intro {
    font-size: 0.9rem;
  }
  .product-card {
    padding: 1rem;
  }
  .product-icon {
    font-size: 1.75rem;
  }
  .product-title {
    font-size: 1.1rem;
  }
  .product-desc {
    font-size: 0.85rem;
  }
}
/* ====== Fix headings visibility under fixed header ====== */
/* на планшетах и мелких десктопах */
@media (max-width: 992px) {
  .product-page,
  .optimization-page {
    padding-top: 6rem; /* отступ сверху под шапку */
  }
}

/* на мобильных */
@media (max-width: 576px) {
  .product-page,
  .optimization-page {
    padding-top: 5rem;
  }
}
/* ====== Geo Page Responsive ====== */
/* чуть «оттолкнуть» вниз под фиксированную шапку и увеличить/уменьшить заголовок */
@media (max-width: 992px) {
  .geo-page {
    padding-top: 6rem; /* отступ под header */
  }
  .geo-page h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
  }
  .geo-intro,
  .geo-outro {
    font-size: 1.1rem;
    margin: 1rem 0;
  }
}

/* планшеты и небольшие десктопы: чуть компактнее */
@media (max-width: 768px) {
  .geo-page {
    padding-top: 5.5rem;
  }
  .geo-page h1 {
    font-size: 2.25rem;
  }
  .geo-intro,
  .geo-outro {
    font-size: 1rem;
  }
  .geo-grid {
    gap: 1rem;
  }
}

/* мобильные: одна колонка, центрируем текст */
@media (max-width: 576px) {
  .geo-page {
    padding-top: 5rem;
    text-align: center;
  }
  .geo-page h1 {
    font-size: 2rem;
  }
  .geo-intro,
  .geo-outro {
    font-size: 0.95rem;
    margin: 0.75rem 0;
  }
  .geo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}
/* ====== Rules Page Responsive ====== */

/* чуть сбросить паддинг под фикс. хедер и сделать 2 колонки вместо 3 */
@media (max-width: 992px) {
  .rules-page {
    padding-top: 6rem; /* от хедера */
    padding-bottom: 3rem;
  }
  .rules-page h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
  }
  .rules-intro {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }
  .rules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* планшет: ещё компактнее, одна колонка на узких тачах */
@media (max-width: 768px) {
  .rules-page {
    padding-top: 5.5rem;
    padding-bottom: 2rem;
    text-align: center;
  }
  .rules-page h1 {
    font-size: 2.25rem;
  }
  .rules-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .rules-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .rule-card {
    padding: 1.5rem;
  }
  .rule-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }
  .rule-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }
  .rule-desc {
    font-size: 0.95rem;
  }
}

/* мобильные: ещё чуть поменьше шрифты и отступы */
@media (max-width: 576px) {
  .rules-page {
    padding-top: 5rem;
    padding-bottom: 1.5rem;
  }
  .rules-page h1 {
    font-size: 2rem;
  }
  .rules-intro {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  .rules-grid {
    gap: 0.75rem;
  }
  .rule-card {
    padding: 1rem;
  }
  .rule-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  .rule-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .rule-desc {
    font-size: 0.9rem;
  }
}
/* ====== Contact Page Responsive ====== */

/* большие планшеты и узкие десктопы */
@media (max-width: 992px) {
  main.container {
    padding: 5rem 1rem; /* чуть меньше сверху/снизу */
  }
  .contact-form {
    max-width: 400px;
    margin: 1.5rem auto;
  }
}

/* планшеты */
@media (max-width: 768px) {
  /* скрываем обычное меню, показываем бургер */
  .nav-links,
  .nav-buttons {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* поднимаем главный блок чуть вниз, чтобы не перекрывался хедером */
  main.container {
    padding: 6rem 1rem 3rem;
  }

  /* заголовок и текст по центру и чуть меньше */
  main.container h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  main.container p {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  /* форма во всю ширину контейнера */
  .contact-form {
    width: 100%;
    max-width: none;
    margin: 0 auto;
  }
  .contact-form .form-group {
    margin-bottom: 1rem;
  }
}

/* телефоны */
@media (max-width: 576px) {
  /* ещё более компактные отступы */
  main.container {
    padding: 5rem 0.75rem 2rem;
  }

  /* заголовок и текст ещё чуть поменьше */
  main.container h1 {
    font-size: 1.75rem;
  }
  main.container p {
    font-size: 0.95rem;
  }

  /* инпуты растягиваются на всю ширину */
  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  /* кнопка тоже */
  .contact-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  /* альтернативная ссылка */
  .alt-contact {
    font-size: 0.9rem;
    margin-top: 1rem;
  }
}
/* ====== Calc Page Responsive ====== */

/* большие планшеты и узкие десктопы */
@media (max-width: 992px) {
  .calc-page {
    padding: 5rem 1rem; /* чуть меньше сверху/снизу */
  }
  .calc-page h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  .calc-page p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }
  .calc-container {
    gap: 1.5rem;
  }
}

/* планшеты */
@media (max-width: 768px) {
  /* меню */
  .nav-links,
  .nav-buttons {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* отступ под шапкой */
  .calc-page {
    padding: 6rem 1rem 2rem;
  }

  /* заголовок и текст по центру */
  .calc-page h1 {
    font-size: 2rem;
    text-align: center;
  }
  .calc-page p {
    font-size: 1rem;
    text-align: center;
  }

  /* кнопка во всю ширину */
  #connectBtn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin: 1rem 0 2rem;
  }

  /* карточки становятся колонками */
  .calc-container {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .calc-card {
    width: 100%;
    max-width: 360px;
  }
}

/* телефоны */
@media (max-width: 576px) {
  .calc-page {
    padding: 5rem 0.75rem 1.5rem;
  }

  .calc-page h1 {
    font-size: 1.75rem;
  }
  .calc-page p {
    font-size: 0.9rem;
  }

  /* ещё компактнее карточки */
  .calc-container {
    gap: 0.75rem;
  }
  .calc-card {
    padding: 1rem;
  }
  .calc-icon {
    font-size: 1.75rem;
  }
  .calc-value {
    font-size: 1.5rem;
  }
  .calc-label {
    font-size: 0.85rem;
  }
}
/* ====== Главная страница: адаптив ====== */

/* планшеты и узкие десктопы */
@media (max-width: 992px) {
  /* Hero */
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    padding: 0;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
    max-width: none;
  }
  .hero-buttons {
    justify-content: center;
    margin-bottom: 2rem;
  }
  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .stat-number {
    font-size: 1.75rem;
  }

  /* Departments */
  .departments-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }

  /* Pricing */
  .pricing-text {
    text-align: center;
    font-size: 1.05rem;
  }

  /* Process */
  .process-steps .step {
    flex-direction: column;
    text-align: center;
  }
  .step-arrow {
    transform: rotate(90deg);
    margin: 1rem 0;
  }

  /* CTA */
  .cta h2 {
    font-size: 2rem;
  }
  .cta p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }
}

/* мобильные телефоны */
@media (max-width: 768px) {
  /* Header */
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }

  /* Hero */
  .hero {
    padding: 6rem 1rem 3rem;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  .hero-image-badge {
    position: static;
    margin-top: 1.5rem;
  }

  /* Departments */
  .departments-grid {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-steps {
    gap: 1rem;
  }
  .step-content h3 {
    font-size: 1.1rem;
  }
  .step-content p {
    font-size: 0.9rem;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Modals */
  .modal-content {
    width: 90%;
    max-width: 360px;
    padding: 1.5rem;
  }
}

/* совсем маленькие экраны */
@media (max-width: 576px) {
  /* Hero */
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Stats */
  .stat-number {
    font-size: 1.5rem;
  }
  .stat-label {
    font-size: 0.75rem;
  }

  /* Departments */
  .dept-icon {
    font-size: 1.75rem;
  }
  .dept-card h3 {
    font-size: 1.1rem;
  }
  .dept-card p {
    font-size: 0.9rem;
  }

  /* Process */
  .step-number {
    font-size: 1.25rem;
  }

  /* CTA */
  .cta h2 {
    font-size: 1.75rem;
  }
  .cta p {
    font-size: 0.9rem;
  }
}

/* ====== Off-Canvas Mobile Menu ====== */
@media (max-width: 768px) {
  /* Скрываем desktop-меню */
  .nav-links {
    display: none;
  }

  /* Показываем кнопку-гамбургер */
  .mobile-menu-btn {
    display: block;
        position: relative;
    z-index: 1002;
  }

  /* Стили off-canvas */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    padding-top: 4rem; /* отступ под шапку */
    gap: 1.5rem;
    transition: right 0.3s ease;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 1001;
  }

  /* Когда header получает класс .menu-open — показываем меню */
  .header.menu-open .nav-links {
    display: flex;  /* вернуть flex */
    right: 0;       /* выдвинуть */
  }

  /* Увеличим размеры ссылок */
  .header.menu-open .nav-links a {
    font-size: 1.25rem;
    padding: 0.5rem 0;
  }
}

/* Показываем language-switcher на мобильных */
@media (max-width: 768px) {
  .language-switcher {
    display: block;               /* убираем скрытие */
    position: absolute;           /* абсолютное позиционирование */
    top: 1rem;                    /* чуть ниже верха экрана */
    right: 4rem;                  /* рядом с крестиком меню */
    z-index: 1002;                /* выше выдвижного меню */
  }
}
