:root {
    --color-main: #3c146d; 
    --color-accent: #259da8;
    --color-bg: #ededed;
    --font-main: 'Tilda Sans', sans-serif;
  }

  html {
    scroll-behavior: smooth;
  }

  *,
  *::before,
  *::after {
  box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: var(--font-main);
    background-color: #fff;
    color: #333;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
  }

  .header-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 95px;
  }

  .section-block {
      scroll-margin-top: 95px;
  }

  .section-block + .section-block {
      margin-top: 100px;
  }

  .left-side {
  display: flex;
  /* align-items: center; */
  }

  .menu {
  display: flex;
  gap: 50px;
  z-index: 2;
  }

  .menu a {
  color: #666;
  font-weight: 600;
  }

  .logo {
  flex: 1 0 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: -320px;
  }

  .logo img {
  width: 200px;
  height: auto;
  }
  
  .burger {
    display: none;
  }

  /* === Мобильное меню === */
  .mobile-menu {
    display: none;
    flex-direction: column;
    background-color: #fff;
    position: absolute;
    top: 95px;
    left: 0;
    right: 0;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  
  .mobile-menu a {
    color: #333;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    transition: color 0.3s ease;
  }
  
  .mobile-menu a:hover {
    color: var(--color-accent);
  }
  
  .mobile-menu.active {
    display: flex;
  }

  /* Hero */
  .hero {
    position: relative;
    height: 100vh;
    background-image: url('../images/photo_2025-02-06_13-.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(60,20,109,0.8), rgba(69,50,10,0.3));
  }

  .hero-content {
    position: relative;
    z-index: 2;
  }

  .hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
  }

  .hero p {
    font-size: 30px;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
  }

  .section-block,
  .features,
  .contact {
    position: relative;
  }

  .arrow-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: bounce 2s infinite;
    display: inline-block;
    text-decoration: none;
  }


  @keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
  }

  /* About Section */
  .about {
    min-height: 80vh;
    width: 100%;
    display: flex;
    align-items: center;     
    justify-content: center; 
    padding: 0 20px;
    box-sizing: border-box;
    background-color: #fff;
  }

  .about-img {
    flex: 1 1 450px;
    background-image: url('../images/photo_2_block.jpg');
    background-size: cover;
    background-position: center;
    min-height: 560px;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;        
    justify-content: center;    
  }
  .about-text {
    flex: 1 1 450px;
    padding: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%; 
  }

  .about-text h2 {
    font-size: 40px;
    margin-bottom: 40px;
  }

  .about-text p {
    font-size: 20px;
  }

  .about-text ol {
    list-style-type: none; 
    margin-bottom: 15px;
    font-weight: bold;
    width: 1000px;
  }
  
  .about-text li {
    position: relative;
    font-size: 20px;
    margin-bottom: 50px; 
    padding-left: 0px; 
  }

  .about-text li::before {
    left: 0;
    top: 0;
    font-size: 30px;
    font-weight: bold;
  }

  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-in-out;
  }
  
  .fade-in.active {
    opacity: 1;
    transform: translateY(0);
  }

  /* Services */
  .services {
    padding: 165px 0 120px;
    background-color: var(--color-bg);
    text-align: center;
  }

  .services .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  }

  .services h2 {
    font-size: 40px;
    margin-bottom: 20px;
    margin-top: -40px;
  }

  .services p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto;
  }


  .service-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; 
  margin-bottom: 0px;
  width: 100%;
  }

  .service-img,
  .service-text {
  flex: 1 1 600px;
  min-width: 300px; 
  max-width: 500px; 
  margin-bottom: 30px;
  }

  .service-img img {
  width: 100%;
  height: auto;
  }


  .service-text h3 {
  font-size: 24px;
  margin-bottom: 10px;
  margin-left: 20px;
  }

  .service-text p {
  font-size: 16px;
  margin-left: 20px;
  }

  /* Tech Stack */
  .tech-stack {
    min-height: 80vh;
    padding: 60px 20px;
    background-color: #fff;
  }
  
  .tech-stack-container {
    max-width: 1000px;
    margin: 0 auto;
  }
  

  .stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
  }
  
  .stack-card {
    min-width: 400px; 
    flex-shrink: 0;   
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding: 30px;
    transition: transform 0.3s ease;
  }
  
  .stack-card:hover {
    transform: translateY(-5px);
  }
  
  .stack-card h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--color-accent);
  }
  
  .stack-card ul {
    list-style-type: disc;
    padding-left: 20px;
  }
  
  .stack-card li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.5;
  }

  .tech-stack-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
  }
  
  .tech-stack-fade-in.active {
    opacity: 1;
    transform: translateY(0);
  }

  /* Features */
  .features {
    padding: 180px 0;
    background-color: #f9f9f9;
    text-align: center;
  }

  .features h2 {
    font-size: 24px;
    margin-bottom: 105px;
  }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
  }

  .feature {
    text-align: center;
  }

  .feature img {
    width: 50px;
    height: 50px;
    margin-bottom: 20px;
  }

  .feature h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .feature p {
    font-size: 14px;
  }



  /* Contact */
  .contact {
    padding: 30px 0 150px;
    background-color: var(--color-bg);
    text-align: left;
  }

  .contact h2 {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .contact p {
    font-size: 20px;
    color: #333;
  }

  .contact li {
    font-size: 18px;
    color: #333;
  }

  footer {
    text-align: center;
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
    background-color: #f9f9f9;
  }

  footer a {
    color: #333;
  }

  @media (max-width: 980px) {
    .about {
      flex-direction: column;
    }

    .about-img,
    .about-text {
      flex: 1 1 100%;
    }
  }

  /* Back to top button*/
  .back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none; 
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  }
  
  .back-to-top:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-5px); 
  }
  
  /* Анимация появления */
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .back-to-top.show {
    display: flex;
    animation: fadeIn 0.5s forwards;
  }


  @media (max-width: 768px) {
    .container,
    .header-container {
      padding: 0 15px;
    }

    /* Скрываем левое меню на мобильных */
    .left-side {
        display: none;
      }
    
    /* Показываем бургер */
    .burger {
      display: block;
      position: absolute;
      right: 20px;
      top: 35px;
      cursor: pointer;
      z-index: 1000;
      width: 28px;
      height: 20px;
    }

    .burger span {
    display: block;
    height: 3px;
    background-color: #000;
    margin: 4px 0;
    transition: all 0.3s ease;
    } 
  
    /* Анимация бургера */
    .burger.active span:nth-child(1) {
      transform: translateY(8px) rotate(45deg);
    }
    .burger.active span:nth-child(2) {
      opacity: 0;
    }
    .burger.active span:nth-child(3) {
      transform: translateY(-8px) rotate(-45deg);
    }

    .menu {
      position: absolute;
      top: 95px;
      left: 0;
      right: 0;
      background-color: #fff;
      flex-direction: column;
      align-items: center;
      display: none;
      padding: 20px;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
      z-index: 999;
    }
  
    .menu.active {
      display: flex;
    }

    .menu a {
      color: #333;
      font-size: 16px;
      font-weight: 600;
      padding: 10px 0;
      text-align: center;
      width: 100%;
      border-bottom: 1px solid #eee;
    }
  
    .menu a:hover {
      color: var(--color-accent);
    }
  
    .logo {
      justify-content: center;
      margin-left: 0; 
    }

  
    .hero h1 {
      font-size: 24px;
    }
  
    .hero p {
      font-size: 14px;
    }
  
    .arrow-down {
      bottom: 20px;
      width: 30px;
      height: auto;
    }
  
    .about-text {
      padding: 20px;
    }
  
    .features-grid {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .about-text h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
      
    .about-text ol {
      list-style-type: none;
      padding-left: 0;
      counter-reset: list-item;
      width: 100%;
    }
      
    .about-text li {
      padding-left: 30px;
      font-size: 16px;
      margin-bottom: 30px;
    }
      
    .about-text li::before {
      left: 0;
      font-size: 20px;
    }

  }
