/* ============================================
   PAVGRAPHY — RETRO WIN98 STYLE
   ============================================ */

/* ---------- СБРОС ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'MS Sans Serif', 'Tahoma', 'Verdana', sans-serif;
  background: #008080; /* классический бирюзовый фон Win98 */
  color: #000;
  line-height: 1.4;
  overflow-x: hidden;
  font-size: 14px;
}

/* «Обои» рабочего стола */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 4px);
  pointer-events: none;
  z-index: 0;
}

a {
  color: #0000EE;
  text-decoration: underline;
  cursor: pointer;
}
a:visited { color: #551A8B; }
a:hover { color: #FF0000; }

img, video {
  display: block;
  max-width: 100%;
}

/* ---------- ОБЩИЕ «ОКОННЫЕ» РАМКИ ---------- */
/* Классическая выпуклая рамка Win98 */
.win-outset,
.section,
.navbar,
.carousel-main,
.carousel-thumbs,
.offer-contacts-box,
.offer-container,
.about-img-placeholder {
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #404040;
}

/* Вдавленная рамка */
.win-inset,
.thumb-item,
.carousel-arrow,
.carousel-mute-btn,
.carousel-counter,
.btn-down {
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow:
    inset 1px 1px 0 #404040,
    inset -1px -1px 0 #dfdfdf;
}

/* ---------- SCROLL CONTAINER ---------- */
.snap-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

/* Классический скроллбар Win98 */
.snap-container::-webkit-scrollbar { width: 16px; }
.snap-container::-webkit-scrollbar-track {
  background: #dfdfdf;
  border-left: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}
.snap-container::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}
.snap-container::-webkit-scrollbar-button {
  background: #c0c0c0;
  height: 16px;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.section {
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: #c0c0c0;
  margin: 8px;
  width: calc(100% - 16px);
}

/* ---------- НАВИГАЦИЯ (как панель задач) ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #c0c0c0;
  padding: 0 0.5rem;
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  border-left: none;
  border-right: none;
  border-top: none;
  box-shadow: inset 0 1px 0 #dfdfdf;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.navbar.scrolled {
  background: #c0c0c0;
}

.navbar .logo {
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 1px;
  flex-shrink: 0;
  cursor: pointer;
  background: #000080;
  color: #fff;
  padding: 4px 10px;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-shadow: 1px 1px 0 #000;
  font-family: 'Courier New', monospace;
}
.navbar .logo .pav   { color: #ffff00; }
.navbar .logo .graphy { color: #ffffff; }

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: #000;
  font-size: 0.85rem;
  padding: 6px 12px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-decoration: none;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  background: #000080;
  color: #fff;
  border-color: #808080 #ffffff #ffffff #808080;
}
.nav-links a:active {
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 7px 11px 5px 13px;
}

.nav-links .telegram-btn {
  background: #008000;
  color: #fff !important;
  font-weight: bold;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-decoration: none;
}
.nav-links .telegram-btn:hover {
  background: #00a000;
  color: #ffff00 !important;
}

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 4px;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: #000;
}

/* ---------- СЕКЦИЯ 1: HERO ---------- */
#home {
  padding: 0;
  text-align: center;
  overflow: hidden;
  background: #000080;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: grayscale(0.4) contrast(1.2) saturate(1.5);
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0 2px, transparent 2px 4px),
    rgba(0, 0, 128, 0.55);
  z-index: 1;
}

.home-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 2rem;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #404040,
    4px 4px 0 rgba(0,0,0,0.4);
}

.home-content h1 {
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: bold;
  letter-spacing: 4px;
  line-height: 1.1;
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
  background: #000080;
  color: #fff;
  padding: 0.3rem 1rem;
  text-shadow: 2px 2px 0 #000;
}
.home-content h1 .pav   { color: #ffff00; }
.home-content h1 .graphy { color: #ffffff; }

.home-content .subhead {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: #000;
  margin-bottom: 1.5rem;
  font-weight: bold;
  font-family: 'Courier New', monospace;
}

.btn-down {
  display: inline-block;
  background: #c0c0c0;
  color: #000;
  padding: 8px 24px;
  font-size: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-decoration: none;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
}
.btn-down:hover {
  background: #000080;
  color: #ffff00;
}
.btn-down:active {
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 9px 23px 7px 25px;
}

.scroll-hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: #fff;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  animation: blink 1s steps(2, start) infinite;
}
.scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: #000;
  padding: 2px 6px;
}
.scroll-hint-arrow {
  width: 2px;
  height: 24px;
  background: #ffff00;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ---------- СЕКЦИЯ 2: ОБО МНЕ ---------- */
#about {
  background: #c0c0c0;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: calc(44px + 1.5rem) 2rem 1.5rem;
  overflow-y: auto;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text {
  max-width: 560px;
  flex: 1 1 280px;
  text-align: left;
  background: #ffffff;
  padding: 1.2rem;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  box-shadow: inset 1px 1px 0 #404040;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background: #000080;
  padding: 2px 8px;
  margin-bottom: 0.7rem;
  font-family: 'Courier New', monospace;
}

.about-text h2 {
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: bold;
  color: #000080;
  margin-bottom: 1rem;
  line-height: 1.3;
  font-family: 'Courier New', monospace;
  text-shadow: 1px 1px 0 #c0c0c0;
}

.about-text h2 .highlight-name {
  color: #ff0000;
  text-decoration: underline;
}

.about-text p {
  font-size: 0.95rem;
  color: #000;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.about-text .highlight {
  background: #ffff00;
  color: #000;
  padding: 0 3px;
  font-weight: bold;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.service-tags .tag {
  background: #c0c0c0;
  color: #000;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
}

.about-img-placeholder {
  width: clamp(180px, 26vw, 280px);
  height: clamp(180px, 26vw, 280px);
  background: #c0c0c0;
  overflow: hidden;
  flex-shrink: 0;
  padding: 4px;
}
.about-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.3);
  border: 1px solid #000;
}

/* ---------- СЕКЦИЯ 3: КАРУСЕЛЬ ---------- */
#carousel {
  background: #c0c0c0;
  padding: 0;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 44px 8px 8px;
  gap: 8px;
}

.carousel-main {
  flex: 1;
  min-width: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.carousel-slide-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease;
  background:
    repeating-conic-gradient(#404040 0% 25%, #303030 0% 50%) 50% / 16px 16px;
}

.carousel-slide-wrapper img,
.carousel-slide-wrapper video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
  border: 1px solid #000;
}

/* Стрелки — как кнопки Win98 */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  background: #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #000;
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1;
  font-family: 'Courier New', monospace;
  padding: 0;
}
.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

.carousel-arrow:hover {
  background: #000080;
  color: #ffff00;
}
.carousel-arrow:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

/* Счётчик — как индикатор */
.carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  background: #000;
  color: #00ff00;
  font-size: 0.8rem;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 1px;
}

/* Превью */
.carousel-thumbs {
  width: 22%;
  max-width: 300px;
  min-width: 90px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  background: #c0c0c0;
  padding: 6px;
}

.carousel-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  align-content: start;
}

.thumb-item {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #808080;
  overflow: hidden;
  cursor: pointer;
  padding: 2px;
}
.thumb-item:hover {
  background: #000080;
}
.thumb-item.active {
  background: #ff0000;
  border-color: #ffffff #808080 #808080 #ffffff;
}
.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 1px solid #000;
}
.thumb-item .video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffff00;
  background: rgba(0,0,0,0.5);
  pointer-events: none;
  text-shadow: 1px 1px 0 #000;
}

#carousel.hidden {
  display: none;
}

/* ---------- СЕКЦИЯ 4: ОФЕРТА + КОНТАКТЫ ---------- */
#offer-contacts {
  background: #c0c0c0;
  justify-content: flex-start;
  overflow-y: auto;
  padding: calc(44px + 1.5rem) 1rem 1.5rem;
  align-items: center;
}

.offer-contacts-box {
  max-width: 800px;
  width: 100%;
  background: #ffffff;
  padding: 1.5rem;
  margin: auto 0;
}

.offer-contacts-box h2 {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: bold;
  color: #fff;
  background: #000080;
  padding: 6px 12px;
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
  text-shadow: 1px 1px 0 #000;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.offer-short p {
  font-size: 0.92rem;
  color: #000;
  line-height: 1.6;
  margin-bottom: 0.7rem;
}

.offer-link {
  color: #0000EE;
  text-decoration: underline;
  font-weight: bold;
}
.offer-link:hover { color: #FF0000; }

.contacts-block {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px dashed #808080;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}

.contacts-block p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #000;
}

.contacts-block a {
  color: #0000EE;
  text-decoration: underline;
}
.contacts-block a:hover { color: #FF0000; }

.footer-ip {
  margin-top: 1.2rem;
  font-size: 0.7rem;
  color: #404040;
  border-top: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding-top: 0.8rem;
  line-height: 1.6;
  text-align: center;
  font-family: 'Courier New', monospace;
}

/* ---------- СТРАНИЦА ОФЕРТЫ ---------- */
body.offer-page {
  background: #008080;
  color: #000;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.offer-container {
  max-width: 800px;
  width: 100%;
  background: #c0c0c0;
  padding: 1.5rem;
  margin: 0 auto;
}

.offer-header {
  margin-bottom: 1.5rem;
  border-bottom: 2px dashed #808080;
  padding-bottom: 1rem;
}

.back-link {
  display: inline-block;
  color: #000;
  font-size: 0.9rem;
  background: #c0c0c0;
  padding: 4px 12px;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  text-decoration: none;
  margin-bottom: 0.6rem;
  font-weight: bold;
}
.back-link:hover {
  background: #000080;
  color: #ffff00;
}

.offer-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: bold;
  color: #fff;
  background: #000080;
  padding: 6px 12px;
  margin: 0.4rem 0 0.2rem;
  font-family: 'Courier New', monospace;
  text-shadow: 1px 1px 0 #000;
}

.offer-date {
  font-size: 0.78rem;
  color: #404040;
  font-family: 'Courier New', monospace;
}

.offer-content section {
  margin-bottom: 1.5rem;
  background: #ffffff;
  padding: 1rem;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
}

.offer-content h2 {
  font-size: 1.1rem;
  font-weight: bold;
  color: #000080;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid #000080;
  padding-bottom: 0.3rem;
  font-family: 'Courier New', monospace;
}

.offer-content p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #000;
  margin-bottom: 0.4rem;
}

.offer-content p strong {
  color: #ff0000;
  font-weight: bold;
}

.offer-footer-meta {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px dashed #808080;
  font-size: 0.75rem;
  color: #404040;
  text-align: center;
  font-family: 'Courier New', monospace;
}

.offer-footer {
  margin-top: 1.5rem;
  text-align: center;
}

/* ---------- АНИМАЦИИ ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================
   АДАПТИВ — ПЛАНШЕТ ≤ 1024px
   ============================================ */
@media (max-width: 1024px) {
  .carousel-thumbs {
    width: 25%;
  }
}

/* ============================================
   АДАПТИВ — МОБИЛЬНЫЙ ≤ 768px
   ============================================ */
@media (max-width: 768px) {

  .navbar {
    padding: 0 0.4rem;
    height: 44px;
  }

  .burger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    width: 100%;
    background: #c0c0c0;
    flex-direction: column;
    padding: 0.5rem;
    gap: 2px;
    align-items: stretch;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 8px 12px;
    font-size: 0.95rem;
    text-align: left;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
  }

  .nav-links .telegram-btn {
    text-align: center;
    margin-top: 4px;
  }

  .home-content h1 {
    letter-spacing: 2px;
    font-size: 2rem;
  }

  #about {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    padding: calc(44px + 1rem) 1rem 1.5rem;
    gap: 1rem;
    overflow-y: auto;
  }

  .about-text {
    text-align: left;
  }

  .service-tags {
    justify-content: center;
  }

  .about-img-placeholder {
    width: clamp(140px, 50vw, 220px);
    height: clamp(140px, 50vw, 220px);
  }

  /* ===== МОБИЛЬНАЯ КАРУСЕЛЬ ===== */
  #carousel {
    overflow: hidden;
  }

  .carousel-container {
    flex-direction: column;
    padding: 44px 6px 6px;
    gap: 6px;
    height: 100vh;
    justify-content: flex-start;
  }

  .carousel-main {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 2 / 3;
    max-height: 70vh;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    opacity: 1;
  }

  .carousel-thumbs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px;
  }

  .carousel-thumbs-grid {
    display: flex;
    flex-wrap: nowrap;
    grid-template-columns: unset;
    gap: 4px;
    align-items: center;
    width: max-content;
  }

  .thumb-item {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
  }

  .offer-contacts-box {
    padding: 1rem;
  }

  .contacts-block {
    grid-template-columns: 1fr;
  }

  .offer-container {
    padding: 1rem;
  }
}

@media (max-width: 420px) {
  .home-content h1 {
    letter-spacing: 1px;
    font-size: 1.7rem;
  }

  .btn-down {
    padding: 6px 16px;
    font-size: 0.85rem;
  }

  .thumb-item {
    width: 56px;
    height: 56px;
  }
}

/* ---------- НИЖНЯЯ ПАНЕЛЬ КАРУСЕЛИ ---------- */
.carousel-bottom-bar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.carousel-mute-btn {
  pointer-events: all;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 30px;
  background: #c0c0c0;
  color: #000;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
}
.carousel-mute-btn:hover {
  background: #000080;
  color: #ffff00;
}
.carousel-mute-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.carousel-counter {
  pointer-events: none;
  background: #000;
  color: #00ff00;
  font-size: 0.78rem;
  padding: 4px 10px;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 1px;
  position: static;
  bottom: auto;
  right: auto;
}