body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafc;
  color: #333;
    opacity: 1;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
body.loaded {
  opacity: 1;
  transform: translateY(0);
}

h1, h2, h3 { margin: 0; }

/* Хедер */
.hero-header {
  background: url(./header.png) no-repeat center center/cover;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  opacity: 0; /* початково прихований */
  animation: fadeBackground 2s ease forwards; /* плавне проявлення */
}

.hero-header .overlay {
  background: rgba(0,0,0,0.5);
  padding: 40px;
  border-radius: 12px;
  max-width: 90%;
  opacity: 0;
  transform: translateY(30px);
}

.hero-header .overlay.animate {
  animation: fadeInUp 1.5s ease forwards;
  animation-delay: 1s; /* з’являється після фону */
}

.hero-header h1 {
  font-size: 2.8em;
  margin-bottom: 10px;
}

.hero-header p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

.hero-header .btn {
  background: #0077cc;
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 2s ease forwards;
  animation-delay: 1.5s; /* кнопка з’являється останньою */
}
.hero-header .btn:hover {
  background: #005fa3;
}

/* Анімації */
@keyframes fadeBackground {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.btn { background: #0077cc; color: white; padding: 12px 25px; border-radius: 8px; text-decoration: none; }
.btn:hover { background: #005fa3; }

/* Навігація після хедера */
nav {
  background: #003366;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 999;
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
nav li { margin: 0 20px; }
nav a { color: white; text-decoration: none; font-weight: bold; }
nav a:hover { color: #ffcc00; }

/* Анімації */
@keyframes fadeBackground { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }



/* Секції */
section { padding: 60px 20px; max-width: 1200px; margin: auto; }
h2 { color: #004080; font-size: 2em; margin-bottom: 20px; }

/* Карта */
.map-container { width: 100%; height: 400px; margin-top: 20px; }

/* Футер */
footer {
  background: #003366;
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}
footer .footer-content p {
  margin: 5px 0;
  font-size: 0.9em;
}
/* Модальне вікно */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover { color: #000; }
textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
}
button.submit {
  background: #0077cc;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
}
button.submit:hover { background: #005fa3; }

.product-category {
  margin-bottom: 50px;
}
.product-category h3 {
  color: #0077cc;
  margin-bottom: 20px;
}
.cards, .news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
    opacity: 0; /* початково прихований */
  animation: fadeBackground 2s ease forwards; /* плавне проявлення */
}

.contacts { 
    opacity: 0; /* початково прихований */
  animation: fadeBackground 2s ease forwards; /* плавне проявлення */
}
.contact-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.contact-btn:hover {
  background: #005fa3;
}

.card, .news-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  padding: 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.accordion {
  background-color: #0077cc;
  color: white;
  cursor: pointer;
  padding: 14px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  font-size: 1em;
  border-radius: 6px;
  margin-bottom: 5px;
  transition: background-color 0.3s;
}
.accordion:hover {
  background-color: #005fa3;
}
.panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background-color: #f1f1f1;
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 0 15px;
}
.panel p {
  margin: 10px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}
.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.product-card h3 {
  margin: 15px;
  color: #004080;
}
.product-card p {
  margin: 0 15px 15px;
  font-size: 0.95em;
  color: #555;
}
.product-btn {
  display: block;
  width: calc(100% - 30px);
  margin: 0 auto 15px;
  padding: 10px;
  background: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
.product-btn:hover {
  background: #005fa3;
}


/* Модальне вікно */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0; /* top:0; left:0; right:0; bottom:0 */
  background-color: rgba(0,0,0,0.6);

  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  animation: fadeInScale 0.4s ease;
}


/* Заголовок */
.modal-content h2 {
  font-size: 1.6em;
  margin-bottom: 20px;
  text-align: center;
}

/* Поля вводу */
.modal-content label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 1.1em;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.1em;
  box-sizing: border-box;
}

.modal-content textarea {
  min-height: 150px;
  resize: vertical;
}

/* Кнопка */
.modal-content button {
  display: block;
  width: 100%;
  padding: 14px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.3s;
}
.modal-content button:hover {
  background: #005fa3;
}

/* Кнопка закриття */
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}


.close:hover { color: #000; }

/* Базові стилі вже є */
/* Планшети */
@media (max-width: 1024px) {
  nav ul { flex-wrap: wrap; }
  section { padding: 40px 15px; }
}

/* Телефони */
@media (max-width: 600px) {
  .burger { display: block; }
  nav ul {
    display: none;
    flex-direction: column;
    background: #003366;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    text-align: center;
  }
  nav ul.show { display: flex; }
  nav li { margin: 15px 0; }
  .cards, .news-grid { grid-template-columns: 1fr; }
  .modal-content {
    width: 95%;
    margin: 30% auto;
    padding: 15px;
  }
}

/* Для планшетів (ширина до 1024px) */
@media (max-width: 1024px) {
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-header {
    height: 300px;
  }
  .hero-header h1 {
    font-size: 2em;
  }
  .hero-header p {
    font-size: 1em;
  }
  .product-btn {
    width: 100%;
    margin: 8px 0;
  }
  .modal-content {
    width: 95%;
    margin: 20% auto;
  }
}

/* Для мобільних (ширина до 600px) */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  nav li {
    margin: 10px 0;
  }
  .hero-header {
    height: 250px;
    padding: 20px;
  }
  .hero-header h1 {
    font-size: 1.6em;
  }
  .hero-header p {
    font-size: 0.9em;
  }
  .btn, .product-btn {
    width: 100%;
    padding: 14px;
    font-size: 1em;
  }
  section {
    padding: 30px 15px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .map-container {
    height: 250px;
  }
  footer {
    font-size: 0.8em;
    padding: 15px;
  }
  .modal-content {
    width: 90%;
    margin: 30% auto;
    padding: 15px;
  }
}

#about {
  padding: 60px 20px;
  background: #f9fafc;
}
#about h2 {
  color: #004080;
  margin-bottom: 20px;
}
.about-content p {
  font-size: 1.1em;
  margin-bottom: 20px;
}
.about-content ul {
  list-style: none;
  padding: 0;
}
.about-content li {
  margin-bottom: 15px;
  line-height: 1.5;
}
.about-content li strong {
  color: #0077cc;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #0077cc;
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 5px;
  width: 16px;
  height: 16px;
  background: #0077cc;
  border-radius: 50%;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.timeline-item .year {
  font-weight: bold;
  color: #004080;
  margin-bottom: 5px;
}
.timeline-item h3 {
  margin: 0;
  color: #0077cc;
}
.timeline-item p {
  margin: 5px 0 0;
}


.news-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 16px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.news-btn:hover {
  background: #005fa3;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}
.news-card .date {
  background: #0077cc;
  color: white;
  padding: 5px 10px;
  font-size: 0.8em;
  position: absolute;
  top: 10px; left: 10px;
  border-radius: 6px;
}
.news-card .tag {
  display: inline-block;
  margin-top: 10px;
  background: #ffcc00;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8em;
}
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6);
}
.modal-content {
  background: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%; max-width: 500px;
  position: relative;
}
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
}
.close:hover { color: #000; }

/* Базовий стиль модалки */
.modal {
  display: none; /* приховано за замовчуванням */
  position: fixed;
  z-index: 1000; /* поверх контенту */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* прокрутка якщо контент великий */
  background-color: rgba(0,0,0,0.6); /* затемнення фону */
}

/* Контент модалки */
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: fadeInScale 0.4s ease; /* анімація відкриття */
}

/* Кнопка закриття */
.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* Субмодалка поверх першої */
.submodal {
  z-index: 1100;
}

/* Анімація */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.product-btn {
  display: block;
  width: calc(100% - 30px);
  margin: 15px auto;
  padding: 10px;
  background: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  text-align: center;
  font-weight: bold;
}
.product-btn:hover {
  background: #005fa3;
}

.modal-nws {
  display: none; /* приховано за замовчуванням */
  position: fixed;
  z-index: 1000;
  inset: 0; /* top:0; left:0; right:0; bottom:0 */
  background-color: rgba(0,0,0,0.6);

  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content-nws {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  position: relative;
}


.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;          /* білий фон */
  border-radius: 50%;        /* кругла кнопка */
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s, transform 0.2s;
}

.home-btn svg {
  color: #0077cc;            /* колір іконки */
}

.home-btn:hover {
  background: #f0f0f0;       /* легке затемнення при наведенні */
  transform: scale(1.1);     /* невелике збільшення */
}

.home-link {
  display: flex;
  align-items: center;
  gap: 6px; /* відступ між іконкою та текстом */
  text-decoration: none;
}

#why-us {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

#why-us h2 {
  font-size: 2em;
  margin-bottom: 40px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.why-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.why-card:hover {
  transform: translateY(-5px);
}

.why-card svg {
  color: #0077cc;
  margin-bottom: 15px;
}

.why-card h3 {
  margin-bottom: 10px;
  font-size: 1.2em;
}

#testimonials {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

#testimonials h2 {
  font-size: 2em;
  margin-bottom: 30px;
}

.testimonial-slider {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.testimonial-card {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 1s ease-in-out;
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  font-style: italic;
}

.testimonial-card.active {
  opacity: 1;
  position: relative;
}

.testimonial-card h4 {
  margin-top: 15px;
  font-weight: bold;
  color: #0077cc;
}

.testimonial-controls {
  margin-top: 20px;
}

.testimonial-controls button {
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 0 10px;
  cursor: pointer;
  font-size: 1.5em;
  transition: background 0.3s;
}

.testimonial-controls button:hover {
  background: #005fa3;
}

#partners {
  padding: 60px 20px;
  background: #f9f9f9;
  text-align: center;
}

#partners h2 {
  font-size: 2em;
  margin-bottom: 40px;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px;
  align-items: center;
}

.partner-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.partner-card:hover {
  transform: scale(1.05);
}

.partner-card img {
  max-width: 100px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.partner-card p {
  font-weight: bold;
  color: #0077cc;
}



.review-btn {
  margin-top: 30px;
  padding: 12px 20px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s;
}

.review-btn:hover {
  background: #005fa3;
}

/* Модалка */
.modal {
  display: none;
  position: absolute; /* тепер вона залежить від скролу */
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: #fff;
  margin: auto;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
}



.close {
  float: right;
  font-size: 1.5em;
  cursor: pointer;
}

/* Секція продукції */
#products {
  padding: 40px 20px;
  background: #f9f9f9;
}

.product-grid {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}

.product-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 250px;
  text-align: center;
}

.product-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Модалка */
.modal {
  display: none; /* прихована за замовчуванням */
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}


.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  text-align: center;
}

/* Адаптація зображення в модалці */
.modal-content img {
  max-width: 100%;   /* картинка не ширша за модалку */
  max-height: 60vh;  /* не вища за 60% висоти екрану */
  height: auto;      /* пропорційне масштабування */
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: contain; /* акуратне вписування */
}


.brands-grid {
  display: flex;
  justify-content: space-around;
  gap: 20px;
  flex-wrap: wrap;
}

.brand-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  width: 250px;
  text-align: center;
  cursor: pointer;
}

.brand-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

.brand-btn {
  background: #0077cc;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.brand-btn:hover {
  background: #005fa3;
}

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

.news-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.news-card h3 {
  margin: 10px 0;
}

.news-card .date {
  display: block;
  margin-top: 10px;
  font-size: 0.85em;
  color: #777;
}
