/* Section-Specific Styles */

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(15, 15, 30, 0.95) 0%, rgba(26, 26, 46, 0.9) 100%);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-base);
  border-bottom: 1px solid rgba(0, 173, 181, 0.15);
}

.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.nav.scrolled {
  background: linear-gradient(180deg, rgba(15, 15, 30, 1) 0%, rgba(26, 26, 46, 0.98) 100%);
  box-shadow: var(--shadow-lg);
  border-bottom: 1px solid rgba(0, 173, 181, 0.3);
}

.logo {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: baseline;
  letter-spacing: 1px;
  position: relative;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-number, .logo-text {
  font-size: 1em;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    #00ffff 0%,
    #00adb5 25%,
    #ffffff 50%,
    #00adb5 75%,
    #00ffff 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% auto;
  animation: shimmer 4s linear infinite, glow-pulse 2s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.8));
}

.logo-text {
  letter-spacing: 3px;
  margin-left: 2px;
}

.logo-number {
  position: relative;
}

.logo:hover .logo-number,
.logo:hover .logo-text {
  animation: shimmer 2s linear infinite;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.9));
}

@keyframes shimmer {
  to {
    background-position: 300% center;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.9));
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-xs);
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-secondary);
  transition: all var(--transition-base);
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0, 173, 181, 0.3);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
  display: flex;
  gap: var(--space-xl);
  align-items: center;
}

.nav-menu a {
  color: var(--color-text);
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
}

.nav-menu a:hover {
  color: var(--color-highlight);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-highlight);
  transition: width var(--transition-base);
}

.nav-menu a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--gradient-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    transition: right var(--transition-base);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(0, 173, 181, 0.3);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu a {
    font-size: var(--font-size-xl);
  }
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../images/hero-bg.jpg') center/cover no-repeat fixed;
  color: var(--color-secondary);
  text-align: center;
  position: relative;
  overflow: hidden;
  background-color: #0f0f1e;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 15, 30, 0.85) 0%,
    rgba(0, 173, 181, 0.2) 50%,
    rgba(15, 15, 30, 0.85) 100%
  );
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--color-background));
  z-index: 2;
}

.hero-content {
  z-index: 3;
  animation: fadeInUp 1s ease;
  position: relative;
}

.hero-title {
  font-family: 'Rajdhani', var(--font-heading);
  font-size: clamp(4rem, 15vw, 8rem);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  letter-spacing: 0px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  position: relative;
}

.hero-title .logo-number {
  font-size: 1em;
  font-weight: 700;
  background: linear-gradient(
    90deg,
    #00ffff 0%,
    #00adb5 25%,
    #ffffff 50%,
    #00adb5 75%,
    #00ffff 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% auto;
  animation: hero-shimmer 8s linear infinite;
  filter: drop-shadow(0 0 30px rgba(0, 255, 255, 0.7));
  position: relative;
}

.hero-title .logo-text {
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 12px;
  margin-left: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #00ffff 50%, #00adb5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
}

@keyframes hero-shimmer {
  to {
    background-position: 300% center;
  }
}

.hero-subtitle {
  font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
  margin-bottom: var(--space-2xl);
  font-weight: 300;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  color: var(--color-text);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    height: 70vh;
    background-attachment: scroll;
    /* Disable fixed attachment on mobile for better performance */
  }
}

/* Optimize background image loading */
@media (prefers-reduced-motion: reduce) {
  .hero {
    background-attachment: scroll;
  }
}

/* About Section */
.about {
  background: var(--gradient-dark);
  position: relative;
  padding-top: calc(var(--space-3xl) + 60px);
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0v46.29c47.79 22.2 103.59 32.17 158 28 70.36-5.37 136.33-33.31 206.8-37.5 73.84-4.36 147.54 16.88 218.2 35.26 69.27 18 138.3 24.88 209.4 13.08 36.15-6 69.85-17.84 104.45-29.34C989.49 25 1113-14.29 1200 52.47V0z' fill='%230f0f1e' /%3E%3C/svg%3E") no-repeat center top;
  background-size: cover;
  transform: translateY(-99px);
  z-index: 2;
}

/* Pricelist Section */
.pricelist {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-background) 100%);
  position: relative;
  padding-top: calc(var(--space-3xl) + 60px);
}

.pricelist::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M321.39 56.44c58-10.79 114.16-30.13 172-41.86 82.39-16.72 168.19-17.73 250.45-.39C823.78 31 906.67 72 985.66 92.83c70.05 18.48 146.53 26.09 214.34 3V0H0v27.35a600.21 600.21 0 00321.39 29.09z' fill='%231a1a2e' /%3E%3C/svg%3E") no-repeat center top;
  background-size: cover;
  transform: translateY(-99px);
  z-index: 2;
}

/* Contact Section */
.contact {
  background: var(--gradient-primary);
  position: relative;
  padding-top: calc(var(--space-3xl) + 60px);
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M985.66 92.83C906.67 72 823.78 31 743.84 14.19c-82.26-17.34-168.06-16.33-250.45.39-57.84 11.73-114 31.07-172 41.86A600.21 600.21 0 010 27.35V120h1200V95.8c-67.81 23.12-144.29 15.51-214.34-2.97z' fill='%230f0f1e' /%3E%3C/svg%3E") no-repeat center top;
  background-size: cover;
  transform: translateY(-99px);
  z-index: 2;
}

/* Footer */
.footer {
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-background) 100%);
  color: var(--color-text);
  padding: var(--space-lg) 0;
  text-align: center;
  border-top: 1px solid rgba(0, 173, 181, 0.2);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.footer p {
  margin: 0;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.footer-logo {
  font-family: 'Rajdhani', 'Orbitron', sans-serif;
  display: inline-flex;
  align-items: baseline;
  letter-spacing: 0px;
  margin: 0 4px;
}

.footer-logo .logo-number,
.footer-logo .logo-text {
  font-size: 1em;
  font-weight: 700;
}

.footer-logo .logo-text {
  margin-left: 2px;
  letter-spacing: 3px;
}

/* Floating Contacts */
.floating-contacts {
  position: fixed;
  right: var(--space-lg);
  bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 999;
}

.contact-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  color: var(--color-secondary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.contact-btn svg {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.phone-btn {
  background: linear-gradient(135deg, #25d366 0%, #20ba5a 100%);
}

.phone-btn:hover {
  background: linear-gradient(135deg, #20ba5a 0%, #1aa34a 100%);
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.vk-btn {
  background: linear-gradient(135deg, #0077ff 0%, #0066dd 100%);
}

.vk-btn:hover {
  background: linear-gradient(135deg, #0066dd 0%, #0055cc 100%);
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.telegram-btn {
  background: linear-gradient(135deg, #0088cc 0%, #0077bb 100%);
}

.telegram-btn:hover {
  background: linear-gradient(135deg, #0077bb 0%, #0066aa 100%);
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: var(--gradient-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    transition: right var(--transition-base);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
    border-left: 1px solid rgba(0, 173, 181, 0.3);
    padding: var(--space-lg);
    overflow-y: auto;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
    text-align: center;
  }

  .nav-menu a {
    font-size: var(--font-size-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    min-height: 48px; /* Better touch target */
  }

  .nav-menu a::after {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-menu a:hover::after {
    width: 80%;
  }

  .floating-contacts {
    left: 50%;
    right: auto;
    bottom: var(--space-md);
    transform: translateX(-50%);
    flex-direction: row;
    gap: var(--space-sm);
    background: rgba(26, 26, 46, 0.95);
    padding: var(--space-sm) var(--space-md);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 173, 181, 0.3);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    max-width: calc(100% - var(--space-md) * 2);
  }

  .contact-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    flex-shrink: 0;
  }

  .contact-btn svg {
    width: 22px;
    height: 22px;
  }

  .hero {
    background-attachment: scroll;
  }

  /* Prevent horizontal scroll from wave dividers */
  .about::before,
  .pricelist::before,
  .contact::before {
    left: -1px;
    right: -1px;
    width: calc(100% + 2px);
  }
}
