/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #121212;
  color: #fff;
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 90px;
  background: #181818;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  z-index: 1000;
}

.logo {
  font-size: 24px;
  font-weight: bold;
}

.nav a {
  color: #fff;
  margin-left: 20px;
  text-decoration: none;
  padding: 10px 20px;
  transition: 0.3s;
}

.nav a:hover {
  background: #1e90ff;
  color: #000;
}

/* BUTTONS */
.btn {
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.btn.primary {
  background: #1e90ff;
  color: #000;
  padding: 15px 40px;
}

.btn.small {
  padding: 10px 25px;
  background: #1e90ff;
  color: #000;
}

/* VIDEO HERO */
.video-hero {
  height: 100vh;
  position: relative;
}

.video-hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.video-overlay h1 {
  font-size: 48px;
  margin-bottom: 30px;
}

/* SERVICES */
.services {
  padding: 30px 10%;
}

.tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab {
  position: relative;
  padding: 15px 40px;
  cursor: pointer;
  border-radius: 14px;
  overflow: hidden;
  z-index: 1;
}

.tab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #1e90ff;
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: -1;
}

.tab.active::before {
  transform: translateX(0);
}

.services-content {
  display: flex;
  gap: 60px;
  align-items: center;
}

.tab-content,
.tab-image {
  width: 50%;
}

.tab-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 20px;
}

/* PROJECTS */
.projects {
  padding: 140px 10%;
  text-align: center;
}

.projects.page {
  padding-top: 140px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 40px;
  margin-bottom: 50px;
}

.projects-grid.two {
  grid-template-columns: repeat(2,1fr);
}

.project-card {
  background: #1b1b1b;
  padding: 20px;
}

.project-card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  margin-bottom: 15px;
}

/* CONTACT */
.contact {
  padding: 140px 10%;
}

.contact-wrapper {
  display: flex;
  gap: 50px;
}

.contact-form,
.contact-info {
  width: 50%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
}

.message {
  resize: none;
  min-height: 180px;
}

.upload {
  display: block;
  margin-bottom: 15px;
  cursor: pointer;
}

.upload input {
  display: none;
}

#fileList {
  font-size: 14px;
  margin-bottom: 15px;
}

#successMsg {
  margin-top: 10px;
  color: #1e90ff;
}

/* PROJECT DETAIL */
.project-hero img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
}

.project-desc {
  padding: 60px 10%;
}

/* ✅ FIXED GALLERY (NO STRETCH) */
.gallery {
  padding: 10px;
  display: grid;
  grid-template-columns: auto auto auto auto;
  gap: 20px;
}

.gallery img {
  width: 24%;

  cursor: pointer;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

/* FOOTER */
.footer {
  height: 80px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ABOUT US – SAFE */
.about-details-grid {
  padding: 60px 10%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  text-align: center;
}

.about-details-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ================= MOBILE ================= */
@media (max-width: 900px) {

  /* ✅ VIDEO OFFSET FROM FIXED HEADER */
  .video-hero {
    margin-top: 90px;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .services-content {
    flex-direction: column;
  }

  .tab-content,
  .tab-image {
    width: 100%;
  }

  .tab {
    width: calc(50% - 10px);
    text-align: center;
  }

  /* ❗ ONLY PROJECT PAGE → 1 COLUMN */
 

  .contact-wrapper {
    flex-direction: column;
  }

  .contact-form,
  .contact-info {
    width: 100%;
  }

  .about-details-grid {
    grid-template-columns: 1fr;
  }

  /* GALLERY = 2 PER ROW */
  .gallery {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width: 600px) {

  .tab {
    width: 100%;
  }

  /* PROJECT PAGE STILL 1 */
  .projects.page .projects-grid,
  .projects.page .projects-grid.two {
    grid-template-columns: 2fr;
  }

  /* GALLERY = 1 PER ROW */
  @media (max-width: 900px) {
  .gallery {
    grid-template-columns: auto auto auto;
  }
  .gallery img {
  width: 47%;
  cursor: pointer;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(1,1fr);
  gap: 40px;
  margin-bottom: 50px;
}
.projects-grid.two {
  grid-template-columns: repeat(1,1fr);
}
}

}


/* ================= LARGE SCREENS / 4K ================= */
@media (min-width: 2200px) {

  body {
    background: #121212;
  }

  .header,
  .services,
  .projects,
  .contact,
  .project-desc,
  .video-hero,
  .about-details-grid {
    max-width: 2180px;
    margin-left: auto;
    margin-right: auto;
  }

  /* header padding не розтягується */
  .header,
  .video-hero {
    max-width: none;
    padding-left: auto;
    padding-right: auto;
  }
}
