/* Общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Andale Mono', monospace;
  background: rgb(255, 255, 255);
  color: #ffffff;
  overflow-x: hidden;
  animation: backgroundAnimation 10s infinite alternate;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* Шапка */
/* Шапка */
header {
  background: url('/media/products/solar2.jpg') center/cover no-repeat;
  height: 300px; /* Высота хедера */
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  color: #fff;
  text-align: center;
  border-bottom: 3px solid #ff4e50;
  z-index: 10;
  transition: top 0.3s; /* Плавное скрытие */
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

header .container {
  position: relative;
  z-index: 1;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  margin-left: 270px;
  margin-top: 50px;
}

header p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

header .btn {
  background-color: #fff;
  color: #ff4e50;
  padding: 10px 20px;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

header .btn:hover {
  background-color: #ff4e50;
  color: #fff;
}


/* Секции */
section {
  padding: 30px 20px;
  margin-top: 0px;
}

section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: #333;
  text-transform: uppercase;
}

section p {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #333;
}

/* Карточки услуг */
.service-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.card {
  background: #f4f4f4;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  text-align: center;
  flex: 1 1 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.card h3 {
  color: #ff4e50;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 1rem;
  color: #555;
}

/* Подвал */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.9rem;
  border-top: 3px solid #f9d423;
}

/* Форма */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

form input,
form textarea {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: #ff4e50; /* Улучшение видимости активного поля ввода */
}

form button {
    background-color: #ff4e50;
    color: #fff;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #f9d423;
}

/* Подвал */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-top: 3px solid #f9d423; /* Добавлено для отделения подвала */
}

/* Адаптивность */
/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .service-cards {
      flex-direction: column;
      gap: 15px;
  }

  .card {
      max-width: 100%;
  }

  .btn {
      padding: 8px 16px;
      font-size: 0.9rem;
  }
}

.btn-more-info {
  display: none; /* Скрываем кнопку по умолчанию */
  background-color: #ff4e50;
  color: #fff;
  padding: 10px 20px;
  font-size: 1.2rem;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  
  /* Центрируем кнопку */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Показываем кнопку на мобильных устройствах */
@media screen and (max-width: 768px) {
  .btn-more-info {
      display: inline-block;
  }
}

.header-mobile {
  display: none; /* Скрыть на ПК */
}

.header-mobile img {
  width: 100%; /* Фотография на всю ширину */
  height: auto;
  object-fit: cover; /* Сохраняем соотношение сторон */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); /* Добавляем тени для фотографии */
}

.header-mobile .header-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  font-size: 20px; /* Уменьшаем размер текста для мобильных устройств */
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.6); /* Добавляем тени для текста */
  padding: 10px;
}

.header-mobile .header-text h1 {
  font-size: 2.5em; /* Уменьшаем размер заголовка на мобильных */
  font-weight: bold;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7); /* Тень для заголовка */
}

.header-mobile .header-text p {
  font-size: 1.2em; /* Уменьшаем размер текста на мобильных */
  font-weight: lighter;
  margin-top: 10px;
}

/* Медиазапрос для мобильных устройств (до 768px) */
@media (max-width: 768px) {
  .header-mobile {
    display: block; /* Показывать на мобильных устройствах */
  }
  .parallax {
    display: none; /* Скрыть хедер для ПК */
  }
}

/* Медиазапрос для ПК (от 769px и выше) */
@media (min-width: 769px) {
  .header-mobile {
    display: none; /* Скрыть на мобильных устройствах */
  }
  .parallax {
    display: block; /* Показывать хедер для ПК */
  }
}

@media (max-width: 480px) {

  .contact-btn, .contact-up-btn {
      font-size: 14px;
      padding: 8px 16px;
  }

  .service-cards {
      gap: 10px;
  }

  .gallery-item {
    min-width: 200px; /* уменьшаем ширину фоток */
    height: 100%; /* подстраиваем под новую высоту */
  }

  .gallery-btn {
    font-size: 1.5rem; /* кнопки листания чуть меньше */
  }
}

/* Для Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #888 #f0f0f0;
}

.gallery-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.gallery {
  display: flex;
  gap: 10px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  white-space: nowrap;
}

.gallery-item {
  width: 200px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
}

.gallery-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  background: rgba(0, 0, 0, 0.694);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.gallery-btn.left {
  left: 0;
  border-radius: 8px;
}

.gallery-btn.right {
  right: 0;
  border-radius: 8px;
}

/* Позиционирование кнопки "Зв'язатися з нами" справа */
.contact-btn {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Сдвигаем кнопку вправо */
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}

/* Кнопка "Зв'язатися з нами" - эффект при наведении */
.contact-btn:hover {
    background-color: #0056b3;
}

/* Круглая кнопка для возврата вверх */
.contact-up-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Размещаем слева */
    background-color: #4CAF50;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Делаем кнопку круглой */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 18px;
    margin-left: 1420px;
}

/* Эффект при наведении на круглую кнопку */
.contact-up-btn:hover {
    background-color: #0056b3;
}

.contact-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.contact-icon {
    margin-top: -4px;
    font-size: 35px;
    color: #af6a4c;
    text-decoration: none;
}

.contact-icon:hover {
    color: #000cf5;
}

::-webkit-scrollbar {
    width: 10px; /* Ширина полосы прокрутки */
}

::-webkit-scrollbar-track {
    background: #f0f0f0; /* Цвет фона полосы прокрутки */
}

::-webkit-scrollbar-thumb {
    background-color: #888; /* Цвет ползунка */
    border-radius: 5px; /* Скругленные края */
    border: 2px solid #f0f0f0; /* Промежуток между треком и ползунком */
}





.text-line text {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: dash 5s linear forwards, filling 4s ease-in forwards;
  }
  
  @keyframes dash {
    to {
      stroke-dashoffset: 0;
    }
  }
  
  @keyframes filling {
    from{
      fill: #ffffff;
      fill-opacity: 0;
    }
    to {
      fill: #ffffff;
      fill-opacity: 1;
    }
  }



  @media only screen and (min-width: 1920px) {
    #main {
      background: url("https://res.cloudinary.com/dcl67luxn/image/upload/v1543874348/Web_1920_1.svg")
        no-repeat;
      height: 1080px;
    }
    .nav-item,
    .navbar-nav {
      margin: 20px;
    }
    #name {
      font-size: 6.5rem;
    }
  }
  
  @media screen and (min-width: 1366px) and (max-width: 1919px) {
    #main {
      background: url("https://res.cloudinary.com/dcl67luxn/image/upload/v1543874529/Web_1366_2.svg")
        no-repeat;
      height: 768px;
    }
    .nav-item,
    .navbar-nav {
      margin: 20px;
    }
    #name {
      font-size: 6.5rem;
    }
  }
  
  @media screen and (min-width: 1280px) and (max-width: 1365px) {
    #main {
      background: url("https://res.cloudinary.com/dcl67luxn/image/upload/v1543874535/Web_1280_1.svg")
        no-repeat;
      height: 800px;
    }
    .nav-item,
    .navbar-nav {
      margin: 20px;
    }
    #name {
      font-size: 6.5rem;
    }
  }
  
  @media screen and (min-width: 768px) and (max-width: 1279px) {
    #main {
      background: url("https://res.cloudinary.com/dcl67luxn/image/upload/v1543874570/iPad_1.svg")
        no-repeat;
      height: 1024px;
    }
    #name {
      font-size: 3.5rem;
    }
  }
  
  @media only screen and (max-width: 767px) {
    #main {
      background: url("https://res.cloudinary.com/dcl67luxn/image/upload/v1543874575/iPhone_6-7-8_1.svg")
        no-repeat;
      height: 736px;
    }
    #name {
      font-size: 3.5rem;
      margin-left: 20px !important;
    }
    .line-1 {
      margin-left: 20px !important;
    }
  }
  
  #main {
    background-size: cover;
  }
  
  .navbar-nav {
    font-size: 2rem;
  }
  
  #about,
  #contact {
    background-color: #e9ecefb3;
  }
  
  .aboutHeading {
    font-size: 4rem;
    padding-top: 100px;
    padding-bottom: 20px;
  }
  
  .aboutPG {
    font-size: 2rem;
    padding-bottom: 100px;
    padding-top: 48px;
  }
  
  /*Text Font */
  
  #name {
    margin-left: 65px;
  }
  
  /* Global */
  .line-1 {
    position: relative;
    border-right: 2px solid rgba(0, 0, 0, 0.75);
    font-size: 180%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    transform: translateY(-50%);
    margin-left: 65px;
    margin-top: 20px;
  }
  
  /* Animation */
  .anim-typewriter {
    animation: typewriter 4s steps(48) 1s 1 normal both,
      blinkTextCursor 500ms steps(48) infinite normal;
  }
  @keyframes typewriter {
    from {
      width: 0;
    }
    to {
      width: 33em;
    }
  }
  @keyframes blinkTextCursor {
    from {
      border-right-color: rgba(0, 0, 0, 0.75);
    }
    to {
      border-right-color: transparent;
    }
  }
  
  form {
    padding-bottom: 100px;
    padding-top: 48px;
  }
  

  .footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px; /* Set the fixed height of the footer here */
    line-height: 60px; /* Vertically center the text there */
    background-color: #484848;
  }
  
  .footer-text {
    color: white;
  }
  
  /*Submit Button*/
  .btn {
    border: none;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    position: relative;
    transition: all 0.15s ease-in-out;
  }
  .btn:hover,
  .btn:focus,
  .btn:active,
  .btn:active:focus {
    outline: none;
    transition: all 0.15s ease-in-out;
  }
  .btn:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease-in-out;
    transform: translateY(-1px);
  }
  .btn:active {
    box-shadow: none;
    transition-duration: 0.05s;
    transform: translateY(1px);
  }
  .btn.btn-default:hover,
  .btn.btn-default:focus,
  .btn.btn-default:active {
    background-color: #f8f8f8;
  }
  .btn.btn-default:active {
    background-color: #eeeeee;
  }
  .btn.btn-info {
    background-color: #3498db;
  }
  .btn.btn-info:hover,
  .btn.btn-info:focus,
  .btn.btn-info:active {
    background-color: #2383c4;
  }
  .btn.btn-info:active {
    background-color: #2077b2;
  }
  .btn.btn-primary {
    background-color: #7caae7;
  }
  .btn.btn-primary:hover,
  .btn.btn-primary:focus,
  .btn.btn-primary:active {
    background-color: #253544;
  }
  .btn.btn-primary:active {
    background-color: #1e2a37;
  }
  .btn.btn-success {
    background-color: #2ecc71;
  }
  .btn.btn-success:hover,
  .btn.btn-success:focus,
  .btn.btn-success:active {
    background-color: #26ab5f;
  }
  .btn.btn-success:active {
    background-color: #239a55;
  }
  .btn.btn-warning {
    background-color: #f39c12;
  }
  .btn.btn-warning:hover,
  .btn.btn-warning:focus,
  .btn.btn-warning:active {
    background-color: #d2850b;
  }
  .btn.btn-warning:active {
    background-color: #be780a;
  }
  .btn.btn-danger {
    background-color: #e74c3c;
  }
  .btn.btn-danger:hover,
  .btn.btn-danger:focus,
  .btn.btn-danger:active {
    background-color: #df2e1b;
  }
  .btn.btn-danger:active {
    background-color: #cd2a19;
  }
  
  /*Project Cards*/
  .card-custom {
    overflow: hidden;
    min-height: 450px;
    box-shadow: 0 0 15px rgba(10, 10, 10, 0.3);
  }
  
  .card-custom-img {
    height: 200px;
    min-height: 200px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    border-color: inherit;
  }
  
  /* First border-left-width setting is a fallback */
  .card-custom-img::after {
    position: absolute;
    content: "";
    top: 161px;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-top-width: 40px;
    border-right-width: 0;
    border-bottom-width: 0;
    border-left-width: 545px;
    border-left-width: calc(575px - 5vw);
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: inherit;
  }
  
  .card-custom-avatar img {
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(10, 10, 10, 0.3);
    position: absolute;
    top: 100px;
    left: 1.25rem;
    width: 100px;
    height: 100px;
  }
  
  .card-custom-avatar img:hover {
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  }
  
  .img-fluid {
    background-color: #7ed956;
  }
  
  #project1 {
    background: #21d4fd linear-gradient(19deg, #21d4fd 0%, #b721ff 100%);
  }
  
  #project2 {
    background: #fad961 linear-gradient(90deg, #fad961 0%, #f76b1c 100%);
  }
  
  #portfolio {
    background-image: radial-gradient(
      circle farthest-corner at 8.6% 21.8%,
      rgba(231, 0, 0, 1) 0%,
      rgba(122, 0, 0, 1) 90.1%
    );
  }
  
  #projectCards {
    margin-bottom: 100px !important;
  }


.flag-container {
    position: relative;
    background: url('https://cdn.pixabay.com/photo/2022/03/01/12/39/flag-7041215_1280.jpg') no-repeat center center;
    background-size: cover;
    padding: 20px;
    border-radius: 10px;
    margin: auto;
    overflow: hidden;
    opacity: 0.9;
}
.flag-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(10px);
    z-index: -1;
    opacity: 0.5;
}
.flag-text {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeIn 3s ease-in-out;
}
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-text {
    position: relative;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: #15ff00;
    padding: 20px;
    border-radius: 10px;
    animation: fadeIn 3s ease-in-out;
}

.form-button-wrapper {
  display: flex;
  justify-content: center;
  margin: 30px 0; /* отступы сверху и снизу */
}

.form-big-btn {
  display: block;
  width: 90%;             /* почти на всю ширину */
  max-width: 800px;       /* ограничение, чтобы не растягивалась на больших экранах */
  background-color: #ff4e50;
  color: #fff;
  padding: 18px 24px;
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, transform 0.2s;
}

.form-big-btn:hover {
  background-color: #f9d423;
  color: #000;
  transform: translateY(-2px);
}

#product-offer .offer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

#product-offer .image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#product-offer .image-wrapper img.main-img {
    max-width: 300px;
    height: auto;
    z-index: 2;
}

#product-offer .image-wrapper img.duplicate {
    position: absolute;
    max-width: 140px;
    opacity: 0.15;
    pointer-events: none;
}

#product-offer .image-wrapper img.left {
    left: -90px;
    top: -20px;
}

#product-offer .image-wrapper img.right {
    right: -90px;
    top: 0;
    margin-top: 190px;
}

#product-offer .text-block {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#product-offer .text-block h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 15px;
}

#product-offer .text-block p {
    color: #555;
    font-size: 16px;
    margin-bottom: 15px;
}

#product-offer .text-block ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
}

#product-offer .text-block li {
    margin-bottom: 8px;
}

#product-offer .btn {
    font-size: 16px;
    padding: 10px 22px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

#product-offer .btn:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    #product-offer .offer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    #product-offer .image-wrapper img.duplicate {
        display: none;
    }

    #product-offer .text-block {
        margin-top: 20px;
    }
}