html {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Courier New', Courier, monospace, sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  position: relative;
  line-height: 1.6;
}

/* Сброс стилей */
*,
*:before,
*:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

.cf:before,
.cf:after {
  content: ' ';
  display: table;
}

.cf:after {
  clear: both;
}

.cf {
  *zoom: 1;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow: visible;
}

/* Header */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 3px solid #ffdd10;
  overflow: visible;
}

.header__logo {
  font-size: 26px;
  font-weight: 800;
  color: #34495e;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Menu */
.menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu > li {
  position: relative;
  background: linear-gradient(135deg, #34495e, #2d3033);
  border-radius: 8px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(52, 73, 94, 0.3);
  overflow: visible;
}

.menu > li > a {
  display: block;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 24px;
  transition: all 0.4s ease;
  border-radius: 8px;
}

.menu > li:hover {
  background: linear-gradient(135deg, #ffdd10, #fff);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255, 221, 16, 0.4);
}

.menu > li:hover > a {
  color: #34495e;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(52, 73, 94, 0.3);
}

/* Intro */
.intro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(52, 73, 94, 0.92), rgba(255, 221, 16, 0.15)),
    url('Images/yellow-tools-frame-with-copy-space.png') no-repeat center /
      cover;
  padding: 120px 20px 80px;
  text-align: center;
  position: relative;
}

.intro__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.intro__title {
  margin-bottom: 80px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.1;
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 4px 4px 20px rgba(0, 0, 0, 0.8);
  letter-spacing: 2px;
}

.intro p {
  color: #fff;
}

/* Этапы работ */
.stages-timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.stage-item {
  position: relative;
  flex: 1;
  text-align: center;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stage-item:hover {
  transform: translateY(-15px);
}

.stage-icon {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #ffdd10, #fff);
  border: 5px solid #34495e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  box-shadow: 0 10px 30px rgba(52, 73, 94, 0.3);
  transition: all 0.4s ease;
  position: relative;
}

.stage-item:hover .stage-icon {
  transform: scale(1.15) rotate(360deg);
  box-shadow: 0 20px 40px rgba(255, 221, 16, 0.5);
  border-color: #ffdd10;
}

.stage-icon img {
  width: 55px;
  height: 55px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.stage-content {
  background: rgba(255, 255, 255, 0.98);
  padding: 30px 20px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.4s ease;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stage-number {
  background: linear-gradient(135deg, #34495e, #2d3033);
  color: #ffdd10;
  width: 55px;
  height: 55px;
  margin-bottom: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(52, 73, 94, 0.4);
}

.stage-content h3 {
  color: #2d3033;
  font-size: 22px;
  margin-bottom: 12px;
  font-weight: 700;
}

.stage-content p {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
}

/* Секции */
.section__header {
  text-align: center;
  padding: 80px 0 40px;
}

.section__title {
  font-size: clamp(42px, 6vw, 64px);
  color: #333;
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section__text {
  font-size: 20px;
  font-weight: 300;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
  border-bottom: 3px solid #ffdd10;
  padding-bottom: 30px;
}

/* ФИЛЬТРЫ ГАЛЕРЕИ */
.gallery-filters {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 40px 0 60px 0;
  flex-wrap: wrap;
  padding: 0 20px;
}

.filter-btn {
  padding: 12px 28px;
  background: rgba(52, 73, 94, 0.1);
  border: 2px solid transparent;
  border-radius: 50px;
  color: #34495e;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, #ffdd10, #fff);
  border-color: #34495e;
  box-shadow: 0 10px 30px rgba(255, 221, 16, 0.4);
  transform: translateY(-2px);
}

.gallery-image {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  padding: 0 20px 100px;
  max-width: 1400px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.gallery-image .img-box {
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: 25px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 3px solid transparent;
  opacity: 1;
  transform: translateY(0);
}

/* Анимация появления только для новых элементов */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-image .img-box:hover {
  transform: translateY(-25px) scale(1.03);
  border-color: #ffdd10;
  box-shadow: 0 40px 100px rgba(255, 221, 16, 0.4);
}

.gallery-image .img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  z-index: 5;
}

.gallery-image .img-box:hover img {
  transform: scale(1.12);
}

.gallery-image .img-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 221, 16, 0.1) 0%,
    rgba(52, 73, 94, 0.15) 50%,
    rgba(0, 0, 0, 0.85) 100%
  );
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2;
}

.gallery-image .img-box:hover::before {
  opacity: 1;
}

.transparent-box {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.95) 100%);
  color: #fff;
  padding: 40px 30px 30px;
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 3;
  pointer-events: none !important;
}
body.modal-open {
  overflow: hidden;
}
.gallery-image .img-box:hover .transparent-box {
  opacity: 1;
}

.caption p {
  margin: 0 0 8px 0;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-family: 'Courier New', monospace;
}

.caption p.opacity-low {
  opacity: 0.95;
  font-size: 18px;
  font-weight: 500;
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.97);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-modal.active {
  display: flex;
  opacity: 1;
}

.modal-img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 25px;
  box-shadow: 0 0 120px rgba(255, 221, 16, 0.6);
  animation: zoomIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  cursor: pointer;
  z-index: 10002;
  padding: 0;
  line-height: 1;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes zoomIn {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2d3033 0%, #1a1f26 100%);
  color: #fff;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  padding: 80px 0;
}

.footer__block {
  text-align: center;
}

.footer__title {
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 700;
  color: #ffdd10;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer__text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.8);
}

.copyright {
  padding: 30px 0;
  background: #1a1f26;
  text-align: center;
}

.copyright__text {
  font-size: 14px;
  color: #999;
}

.copyright__text span {
  color: #ffdd10;
  font-weight: 600;
}

/* Button Up */
.footer-up {
  position: fixed;
  bottom: 35px;
  right: 30px;
  width: 75px;
  height: 75px;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, #ffdd10, #fff);
  border: 6px solid #34495e;
  box-shadow: 0 12px 35px rgba(255, 221, 16, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 20px;
  font-weight: bold;
  color: #34495e;
}

.footer-up:hover {
  transform: scale(1.2) rotate(360deg);
  box-shadow: 0 20px 50px rgba(255, 221, 16, 0.6);
}

.footer-ics {
  width: 35px;
  height: 35px;
  position: relative;
}

.footer-ics::before,
.footer-ics::after {
  content: '';
  position: absolute;
  top: 30px;
  left: 22px;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border-left: 6px solid #34495e;
  border-bottom: 6px solid #34495e;
  animation: animate 3s linear infinite;
}

.footer-ics::after {
  animation-delay: -1.5s;
}

@keyframes animate {
  0% {
    opacity: 0;
    transform: translateY(20px) rotate(135deg);
  }
  15%,
  85% {
    opacity: 1;
  }
  50% {
    opacity: 1;
    transform: translateY(0) rotate(135deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-20px) rotate(135deg);
  }
}

/* Адаптивность */
@media (max-width: 991px) {
  .stages-timeline {
    flex-direction: column;
    gap: 50px;
  }

  .stage-item {
    max-width: 350px;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .gallery-image {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 0 15px 80px;
  }

  .img-box {
    height: 300px !important;
  }

  .intro {
    padding: 100px 20px 60px;
    min-height: 90vh;
  }

  .gallery-filters {
    gap: 10px;
    margin: 30px 0 40px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .gallery-image {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px 60px;
  }

  .img-box {
    height: 280px !important;
  }

  .stage-icon {
    width: 75px;
    height: 75px;
  }

  .stage-icon img {
    width: 45px;
    height: 45px;
  }

  .gallery-filters {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .filter-btn {
    width: 200px;
    padding: 12px;
  }
}
