@import url("style-header.css");
@import url("style-footer.css");

body {
  font-family: "Poppins", sans-serif;
  background-color: #0e0e0f;
  background-image: radial-gradient(
      ellipse 7000px 2700px at 35% 10%,
      rgba(255, 255, 255, 0.08) 5%,
      transparent 10%
    ),
    radial-gradient(
      ellipse at 90% 50%,
      rgba(255, 255, 255, 0.08) 2%,
      transparent 50%
    );
  color: white;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  max-width: 83.333vw;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 96px 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-text h1 {
  font-size: 40px;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.3;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-text p {
  color: #9ca3af;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 520px;
}

/* Poprawione hero-buttons */
.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-buttons a.btn-primary,
.hero-buttons a.btn-secondary {
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
  border-radius: 8px;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
  background-color: #ff250f;
  color: white;
  padding: 12px 28px;
  border: none;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 2px 12px rgba(239, 46, 46, 0.3);
}

.btn-primary:hover {
  background-color: #d32222;
}

.btn-secondary {
  background-color: #111;
  color: #e5e7eb;
  padding: 12px 24px;
  border: 1px solid #ffffff59;
  font-size: 15px;
  font-weight: 500;
}

.btn-secondary:hover {
  background-color: #1f2937;
  color: white;
}

/* Kontener na obraz i slider */
.diagram-container {
  display: flex;
  justify-content: center;
}

.hero-image-wrapper {
  margin-top: 30px;
  max-width: 1100px;
  height: 500px;
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.hero-image-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slider-image.active {
  opacity: 1;
  z-index: 1;
}

.about {
  padding: 64px 24px;
}

.about h2 {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 64px;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about h2 .highlight,
.services h2 .highlight,
.mission-section h2 .highlight {
  position: relative;
  display: inline-block;
}

.about h2 .highlight::after,
.services h2 .highlight::after,
.mission-section h2 .highlight::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.375rem;
  background-color: #ff250f;
  z-index: -1;
  border-radius: 0.25rem;
}

.about h2 .highlight::after,
.services h2 .highlight::after {
  transform: translateY(-0.875rem);
}

.mission-section h2 .highlight::after {
  transform: translateY(-0.625rem);
}

.about-text h3 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 24px;
}

.about-text p {
  color: #d1d5db;
  margin-bottom: 20px;
  line-height: 1.7;
}

.specialization {
  padding: 64px 24px;
}

.specialization-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.specialization h2 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 24px;
}

.specialization p {
  color: #d1d5db;
  margin-bottom: 20px;
  line-height: 1.7;
}

.image-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image,
.specialization-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}

.services {
  padding: 64px 24px;
}

.services h2 {
  font-size: 48px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 64px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}

.service-card {
  background-color: #ffffff1a;
  border: 1px solid #ffffff59;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.service-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  white-space: nowrap;
}

.service-indicator {
  width: 12px;
  height: 12px;
  background-color: #ff250f;
  border-radius: 50%;
  flex-shrink: 0;
}

.service-card h3 {
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
  flex-grow: 1;
}

.service-card p {
  color: #d1d5db;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-outline {
  background-color: transparent;
  color: #ff250f;
  border: 1px solid #ff250f;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  align-self: flex-start;
  margin-top: auto;
  text-decoration: none;
}

.btn-outline:hover {
  background-color: #ff250f;
  color: white;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.mission-section {
  padding: 80px 20px;
  background-color: transparent;
  position: relative;
  overflow: visible;
}

.mission-section h2 {
  text-align: center;
  font-size: clamp(28px, 5vw, 40px);
  font-weight: bold;
  margin-bottom: 80px;
}

.mission-boxes {
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .mission-boxes {
    flex-direction: row;
    justify-content: space-between;
  }
}

.mission-box {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #ffffff59;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 24px;
  position: relative;
}

.mission-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
}

.mission-dot {
  width: 10px;
  height: 10px;
  background-color: #ff250f;
  border-radius: 50%;
  margin-right: 10px;
}

.mission-dotted-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: 1;
  pointer-events: none;
}

.mission-dotted-line path {
  animation: dash-move 4s linear infinite;
  stroke: #ff250f;
  stroke-width: 4;
  stroke-dasharray: 20, 20;
  stroke-linecap: round;
  fill: none;
}

@keyframes dash-move {
  to {
    stroke-dashoffset: -40;
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Media queries */

@media (max-width: 992px) {
  .about h2 .highlight::after,
  .services h2 .highlight::after {
    transform: translateY(-0.75rem);
  }

  .mission-section h2 .highlight::after {
    transform: translateY(-0.5rem);
  }
}

@media (max-width: 768px) {
  .about h2 .highlight::after,
  .services h2 .highlight::after,
  .mission-section h2 .highlight::after {
    height: 0.25rem;
  }

  .about h2 .highlight::after,
  .services h2 .highlight::after {
    transform: translateY(-0.625rem);
  }

  .mission-section h2 .highlight::after {
    transform: translateY(-0.375rem);
  }
}

@media (max-width: 480px) {
  .about h2 .highlight::after,
  .services h2 .highlight::after,
  .mission-section h2 .highlight::after {
    height: 0.1875rem;
    border-radius: 0.1875rem;
  }

  .about h2 .highlight::after,
  .services h2 .highlight::after {
    transform: translateY(-0.5rem);
  }

  .mission-section h2 .highlight::after {
    transform: translateY(-0.25rem);
  }
}

@media (max-width: 440px) {
  body {
    background-image:
      radial-gradient(ellipse 2700px 1300px at 35% 10%, rgba(255, 255, 255, 0.08) 5%, transparent 10%),
      radial-gradient(ellipse at 90% 50%, rgba(255, 255, 255, 0.08) 2%, transparent 50%);
  }

  .container {
    padding: 0 14px;
    max-width: 100%;
  }

  .hero {
    padding: 45px 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-text h1 {
    font-size: 25px;
    margin-bottom: 20px;
    line-height: 1.35;
  }

  .hero-text p {
    font-size: 15px;
    margin-bottom: 30px;
    word-break: break-word;
  }

  /* Poprawione hero-buttons pod 440px */
  .hero-buttons {
    flex-direction: column;
    gap: 14px;
    padding: 0 14px;
  }

  .hero-buttons a.btn-primary,
  .hero-buttons a.btn-secondary {
    width: 100%;
    max-width: 100%;
    padding: 10px 18px;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    margin: 0;
    border-radius: 8px;
    text-align: center;
  }

  .btn-primary:not(:last-child),
  .btn-secondary:not(:last-child) {
    margin-bottom: 12px;
  }

  .about,
  .specialization,
  .services {
    padding: 65px 0;
  }

  .about h2,
  .specialization h2,
  .services h2 {
    font-size: 30px;
    margin-bottom: 45px;
  }

  .about-content,
  .specialization-content,
  .services-grid {
    gap: 30px;
    display: block;
  }

  .service-card {
    padding: 22px 16px;
    margin-bottom: 14px;
  }

  .service-card h3 {
    font-size: 19px;
    word-break: break-word;
  }

  .service-card p {
    font-size: 15px;
    word-break: break-word;
  }

  .mission-section {
    padding: 65px 14px;
  }

  .mission-section h2 {
    font-size: 30px;
    margin-bottom: 55px;
  }

  .mission-boxes {
    gap: 30px;
    display: block;
  }

  .mission-box {
    padding: 24px 20px;
    margin-bottom: 22px;
  }

  .hero-image-wrapper {
    max-width: 100%;
    height: auto;
    margin-top: 24px;
  }

  .hero-image-slider,
  .slider-image {
    position: relative;
    width: 100%;
    height: auto;
    opacity: 1 !important;
  }
}

@media (max-width: 400px) {
  body {
    background-image: radial-gradient(
        ellipse 2500px 1200px at 35% 10%,
        rgba(255, 255, 255, 0.08) 5%,
        transparent 10%
      ),
      radial-gradient(
        ellipse at 90% 50%,
        rgba(255, 255, 255, 0.08) 2%,
        transparent 50%
      );
  }

  .container {
    padding: 0 12px;
    max-width: 100%;
  }

  .hero {
    padding: 50px 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-text h1 {
    font-size: 26px;
    margin-bottom: 18px;
    line-height: 1.4;
  }

  .hero-text p {
    font-size: 15px;
    margin-bottom: 32px;
    word-break: break-word;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    padding: 0 12px;
  }

  .btn-primary,
  .btn-secondary,
  button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 16px;
    font-size: 14px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
    display: inline-block;
    margin: 0;
    border-radius: 8px;
  }

  .btn-primary:not(:last-child),
  .btn-secondary:not(:last-child) {
    margin-bottom: 12px;
  }

  .about {
    padding: 70px 0;
  }

  .about h2 {
    font-size: 28px;
    margin-bottom: 42px;
  }

  .about-content {
    gap: 36px;
    display: block;
  }

  .about-text h3 {
    font-size: 32px;
  }

  .about-text p {
    word-break: break-word;
  }

  .specialization {
    padding: 70px 0;
  }

  .specialization h2 {
    font-size: 28px;
    margin-bottom: 42px;
  }

  .specialization-content {
    gap: 36px;
    display: block;
  }

  .services {
    padding: 70px 0;
  }

  .services h2 {
    font-size: 28px;
    margin-bottom: 42px;
  }

  .services-grid {
    gap: 28px;
    display: block;
  }

  .service-card {
    padding: 20px;
    margin-bottom: 12px;
  }

  .service-card h3 {
    font-size: 20px;
    word-break: break-word;
  }

  .service-card p {
    word-break: break-word;
  }

  .mission-section {
    padding: 70px 12px;
  }

  .mission-section h2 {
    margin-bottom: 50px;
    font-size: 28px;
  }

  .mission-boxes {
    gap: 28px;
    display: block;
  }

  .mission-box {
    padding: 22px;
    margin-bottom: 20px;
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media screen and (max-width: 400px) {
  .hero {
    padding: 24px 10px;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  .hero-text h1 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 10px;
    word-wrap: break-word;
  }

  .hero-text p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    word-wrap: break-word;
  }

  .hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .hero-buttons a {
    font-size: 13px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-image-wrapper {
    width: 100%;
  }

  .slider-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
  }
}
