:root {
  --bar-height: 0px;
  --bar-bg: rgba(244, 244, 244, 1);
  --bar-color: rgba(31, 31, 28, 1);
  --template-color: rgba(148, 212, 203, 1);
  --template-color-transp: rgba(148, 212, 203, 0.5);
  --text-bg: rgba(31, 31, 28, 1);
  --text-highlighted: rgba(31, 31, 28, 1);
  --top-bar-active: #3498db;
  --compare-handle-span: #555;
  --card-border: rgba(31, 31, 28, 1);
  --nav-h: 55px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .about {
    flex-direction: column;
    text-align: center;
  }
  .about img {
    margin: 0 0 30px 0;
  }
  .body-margin {
    width: min(90%, 400px) !important;
  }

  .scientist-img {
    display: none !important;
  }
  .scientist-btn {
    display: inline-block !important;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    color: var(--text-bg);
    font-weight: 700;
    margin-bottom: 50px;
    text-decoration: none !important;
    background: var(--template-color-transp);
  }
}
@media (max-width: 400px) {
  .body-margin {
    width: min(90%, 350px) !important;
  }
  .top-demo {
    padding-left: 20px;
  }
  .top-demo-text {
    font-size: 30px !important;
    max-width: 90%;
  }
  .img-box .text {
    font-size: 17px !important;
  }
  .top-bar-email {
    position: absolute;
    left: -9999px;
  }
  .top-bar {
    justify-content: flex-start;
  }
  .footer {
    padding-left: 0px;
    padding-right: 0px;
  }

  .scientist-img {
    display: none !important;
  }
  .scientist-btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    color: var(--text-bg);
    font-weight: 700;
    margin-bottom: 50px;
    text-decoration: none !important;
    background: var(--template-color-transp);
  }
}

@media (min-width: 1200px) {
  .top-nav {
    height: var(--nav-h) !important;
  }
}

body {
  padding-top: var(--nav-h);
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bar-bg);
  overflow-x: hidden;
  /* color: var(--bar-bg); kolor tekstu */
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
}

nav a {
  color: var(--bar-bg);
  margin: 0 12px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
nav a:hover {
  opacity: 0.7;
}

.body {
  /* padding-top: 70px; */
  background: var(--bar-bg);
}

.body-margin {
  width: min(90%, 1200px);
  margin: 0 auto;
}

.top-bar {
  height: var(--bar-height);
  background: var(--bar-bg);
  color: var(--bar-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  /* padding: 0 16px; */
  width: 100%;
  transition: transform 0.3s ease;
}

.top-bar-contact {
  display: inline-block;
  background-color: var(--template-color);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-bg);
  font-family: Arial;
  font-size: 25px;
  padding: 15px 20px;
  text-decoration: none;
  line-height: 0px;
}

.top-bar-email {
  display: inline-block;
  color: var(--text-bg);
  font-family: Arial;
  font-size: 20px;
  text-decoration: none;
}

.top-bar-lang-button {
  display: inline-block;
  background-color: var(--template-color);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-highlighted);
  font-family: Arial;
  font-size: 20px;
  font-weight: 700;
  padding: 15px 5px;
  text-decoration: none;
  line-height: 0px;
  border: 0px;
  transition: all 0.3s;
  width: 40px;
}
.top-bar-lang-button:hover {
  background-color: var(--bar-bg);
  color: var(--bar-color);
  border: 2px solid var(--bar-color);
}

.top-bar-lang-clicked {
  background-color: var(--bar-bg);
  color: var(--bar-color);
  border: 2px solid var(--bar-color);
}

.top-bar-lang-button:active {
  background: var(--top-bar-active);
  color: var(--bar-bg);
  transform: scale(0.95); /* efekt "wciśnięcia" */
}

.hide-topbar {
  transform: translateY(-100%);
}

.top-nav {
  background: var(--template-color);
  padding-top: 0px;
  transition: top 0.3s ease;
  top: 0px !important; /* wysokość topbara */
  /* height: var(--nav-h) !important; */
  justify-content: center;
}

.nav-link-text {
  display: inline-block;
  margin-top: 5px;
  color: var(--text-bg);
  font-weight: 700;
}
.nav-link-text:hover {
  /* text-decoration: underline; */
  color: var(--text-bg);
  /* text-underline-offset: 10px; obniża podkreślenie */
}

.nav-link-text-logo {
  margin-top: -5px;
  color: var(--text-bg);
  font-size: 25px;
}

.nav-link-text-logo:hover {
  color: var(--text-bg);
}

.underline-link {
  text-decoration: underline !important;
  text-underline-offset: 10px; /* obniża podkreślenie */
}

.cart-heasder {
  color: var(--text-bg);
  font-weight: bold;
  font-size: 30px;
  margin-top: 10px;
}

.cart-heasder-left {
  color: var(--text-bg);
  font-weight: bold;
  font-size: 30px;
  text-align: left;
  margin-top: 10px;
}

.cart-body {
  background: var(--bar-bg);
  text-align: left;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 20px;
}

/* TOP DEMO */
.top-demo {
  margin-top: 0px;
  position: relative;
  background: url("/img/device-header.png");
  background-size: cover;
  background-position: center;
  height: 800px;
  display: flex;
  align-items: center;
  padding-left: 70px;
}

.top-demo-text {
  font-weight: 800;
  font-size: 40px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-top: -500px;
  position: relative;
  left: -50px;
  background: var(--template-color-transp);
  padding: 25px 35px;
  border-radius: 75px;
  color: var(--text-highlighted);
  max-width: 390px;
  min-width: 300px;
  display: flex;
  justify-content: center; /* centrowanie treści */
  animation: fadeIn 1.2s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.img-box {
  margin-top: 100px;
  margin-bottom: 100px;
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: stretch;
  align-items: center;
  padding-left: 0px;
  height: 600px;
}

.img-box img {
  display: inline-block;
  width: 100%;
  height: 100%; /* dopasowanie do wysokości kontenera */
}

.img-box .text {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);

  color: var(--text-bg);
  font-size: 20px;
  overflow: auto;

  max-height: 100%; /* nie może być wyższy od obrazka */
  max-width: 800px;
  width: min(80%, 800px); /* żeby faktycznie trzymało się max-width */
}

.img-box .text-header {
  font-size: 50px;
  font-weight: bold;
  text-align: center;
}

.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
}

.title {
  text-align: center;
  font-size: 42px;
  margin-top: 40px;
  font-weight: 700;
}

.scientist-link {
  display: flex;
  justify-content: center;
}

/* domyślnie: desktop -> obrazek widoczny, przycisk ukryty */
.scientist-img {
  display: block;
  height: 400px;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.scientist-btn {
  display: none;
}

.scientist {
  width: min(40%, 300px);
  height: 400px;
  overflow: hidden;
  margin: 0px 0px 10px 10px;
  width: auto;
}

/* obrazek ma mieć stałą wysokość 400px */
.scientist img {
  height: 400px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* CAROUSEL */
.myCarousel {
  width: 100%;
  max-width: 900px;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
}
.myCarouselBoxInside {
  margin: 20px;
  position: relative;
  height: 480px;
  text-align: center;
}

.item {
  width: 250px;
  margin: 10px auto;
  position: relative;
  border: 1px solid black; /* grubość | styl | kolor */
}

.item:hover {
  background: var(--template-color);
}

/* SOCIAL MEDIA LINKS */

.social-bar {
  position: fixed; /* Zawsze widoczne */
  right: 20px; /* Odstęp od prawej krawędzi */
  top: 50%; /* W połowie wysokości ekranu */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column; /* Ikony jedna pod drugą */
  gap: 15px; /* Odstęp między ikonami */
  opacity: 0.6;
  z-index: 9999; /* Na wierzchu */
}

.social-bar img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.social-bar img:hover {
  transform: scale(1.15);
}

.section {
  padding: 70px 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 100px;
}

.card {
  background: var(--bar-bg);
  border: 1px solid var(--card-border); /* grubość | styl | kolor */
  border-radius: 0;
  width: 350px;
  text-align: center;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  padding: 0px;
}

.filters-description {
  position: absolute;
  top: 10%;
  left: 5%;
  margin-left: 0%;
  color: var(--bar-bg);
  font-size: 20px;
  width: 80%;
  overflow: auto;
  max-height: 100%; /* nie może być wyższy od obrazka */
}

.filters_pic_under_text {
  margin-top: 0px;
  position: relative;
  background: url("/img/filters-description.png");
  background-size: cover;
  background-position: center;
  height: 600px;
  display: flex;
  align-items: center;
  padding-left: 100%;
}

.main_pic_under_text {
  margin-top: 0px;
  position: relative;
  background: url("/img/device-description.png");
  background-size: cover;
  background-position: center;
  height: 495px;
  display: flex;
  align-items: center;
  padding-left: 100%;
}

.footer {
  display: flex;
  justify-content: space-between;
  background: var(--template-color);
  color: var(--text-bg);
  align-items: center;
  padding-left: 10%;
  padding-right: 10%;
  min-height: 50px;
}

.footer-img {
  height: 25px;
  display: inline-block;
}

.footer-text {
  color: var(--text-bg);
  text-decoration: none;
}

.footer-text-bold {
  color: var(--text-bg);
  text-decoration: none;
  font-weight: 700;
}

.compare-container {
  position: relative;
  width: 220px;
  overflow: hidden;
  cursor: ew-resize;
  -webkit-user-select: none; /* Chrome/Opera/Safari */
  user-select: none;
  -webkit-user-drag: none; /* blokuje "przeciąganie" obrazków */
}

.compare-container img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* klucz dla PNG */
  user-select: none;
  pointer-events: none;
}

.compare-after {
  clip-path: inset(0 0 0 50%);
}

.compare-divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: var(--bar-bg);
  transform: translateX(-50%);
  z-index: 10;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  background: var(--bar-bg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-handle span {
  font-size: 14px;
  font-weight: bold;
  color: var(compare-handle-span);
  margin-top: -3px;
}

.triangle-container {
  position: absolute;
  top: -250px;
  left: 50%;
  animation: slideDown 1.6s ease-out forwards;
  opacity: 0;
  transform: rotate(180deg) translateX(150px);
}

.triangle {
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 170px solid var(--template-color);
  position: relative;
}

/* Tekst przy górnej krawędzi */
.triangle-text {
  position: absolute;
  top: 120px; /* odległość od górnej krawędzi trójkąta */
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  font-size: 30px;
  font-weight: bold;
  color: var(--text-highlighted);
  white-space: nowrap;
}

.no-underline {
  text-decoration: none;
}
.no-underline:hover,
.no-underline:focus,
.no-underline:active {
  text-decoration: none;
}

@keyframes slideDown {
  0% {
    top: -250px;
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    top: 655px; /* końcowa pozycja */
    opacity: 1;
  }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 700ms ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
