/* Шапка главного сайта (не .navbar — тот класс у Bootstrap в админке/кабинете) */
.site-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Гамбургер (только узкие экраны — см. media ниже) */
.site-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.12);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.site-nav-toggle:hover {
  background: rgba(102, 126, 234, 0.2);
}

.site-nav-toggle:focus-visible {
  outline: 2px solid rgba(78, 115, 223, 0.6);
  outline-offset: 2px;
}

.site-nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #333;
}

.site-nav-drawer {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.site-nav-backdrop {
  display: none;
}

.nav-auth-logout-form {
  display: inline;
}

.nav-auth-logout-form .nav-btn-logout {
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

/* Fallback CSS logo if image doesn't load */
.nav-logo img:not([src]), 
.nav-logo img[src=""],
.nav-logo img[src*="error"] {
  display: none;
}

.nav-logo img:not([src]) + .nav-logo::before,
.nav-logo img[src=""] + .nav-logo::before,
.nav-logo img[src*="error"] + .nav-logo::before {
  content: "HVAC";
  display: inline-block;
  font-weight: bold;
  font-size: 18px;
  color: #007bff;
  margin-right: 10px;
}

.nav-logo span {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 8px 16px;
  border-radius: 20px;
}

.nav-link:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-email {
  color: #666;
  font-size: 0.9rem;
  margin-right: 10px;
  margin-left: 10px; /* Добавляем отступ слева от кнопки админки */
}

.nav-btn {
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.nav-btn-login {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.nav-btn-login:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
}

.nav-btn-register {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: 2px solid transparent;
}

.nav-btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-btn-logout {
  background: #dc3545;
  color: white;
  border: 2px solid #dc3545;
  cursor: pointer;
  font-family: inherit;
}

.nav-btn-logout:hover {
  background: #c82333;
  border-color: #c82333;
  transform: translateY(-1px);
}

.nav-link-admin {
  background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
  color: white !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,184,148,0.08);
  border: 2px solid #00b894;
  margin-left: 10px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.nav-link-admin:hover {
  background: linear-gradient(135deg, #00a085 0%, #00b894 100%);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0,184,148,0.18);
  transform: translateY(-1px);
}

/* Широкий экран: пункты в строку, без гамбургера */
@media (min-width: 1200px) {
  .site-nav-toggle {
    display: none !important;
  }

  .site-nav-backdrop {
    display: none !important;
  }
}

/* До 1200px — гамбургер (планшет, iPad в альбоме, узкие окна) */
@media (max-width: 1199.98px) {
  .nav-container {
    padding: 0 15px;
    flex-wrap: nowrap;
  }

  .nav-logo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 52px);
  }

  .nav-logo span {
    display: none;
  }

  .site-nav-toggle {
    display: flex !important;
    margin-left: auto;
    position: relative;
    z-index: 2;
  }

  .site-nav-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 15px 20px;
    margin-top: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 24px rgba(58, 59, 69, 0.12);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-navbar.is-menu-open .nav-container {
    z-index: 1001;
  }

  .site-navbar.is-menu-open .site-nav-drawer {
    display: flex;
  }

  .site-navbar.is-menu-open .site-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 998;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
  }

  .site-nav-drawer .nav-menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav-drawer .nav-link {
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: 12px;
    text-align: left;
  }

  .site-nav-drawer .nav-auth {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .site-nav-drawer .user-email {
    display: block;
    margin: 0;
    font-size: 0.85rem;
    word-break: break-all;
  }

  .site-nav-drawer .nav-btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.95rem;
    box-sizing: border-box;
  }

  .nav-auth-logout-form {
    display: block;
    width: 100%;
  }
}

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

  .nav-menu {
    gap: 15px;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .nav-auth {
    gap: 10px;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

/* Главная страница: стили под .public-home, чтобы не перебивались air/vent/heating.css */
.public-home .hero-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 120px 0 80px 0;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 80px; /* Добавляем отступ сверху для навигации */
}

.public-home .hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.public-home .hero-logo {
  margin-bottom: 30px;
}

.public-home .hero-logo img {
  height: 80px;
  width: auto;
  /* Убираем фильтр, который может делать изображение белым */
  /* filter: brightness(0) invert(1); */
}

/* Fallback CSS logo for hero section */
.public-home .hero-logo img:not([src]), 
.public-home .hero-logo img[src=""],
.public-home .hero-logo img[src*="error"] {
  display: none;
}

.public-home .hero-logo img:not([src]) + .hero-logo::before,
.public-home .hero-logo img[src=""] + .hero-logo::before,
.public-home .hero-logo img[src*="error"] + .hero-logo::before {
  content: "HVAC";
  display: block;
  font-weight: bold;
  font-size: 48px;
  color: white;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.public-home .hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.public-home .hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.public-home .hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.public-home .btn-primary {
  background: #007bff;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid #007bff;
}

.public-home .btn-primary:hover {
  background: #0056b3;
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.public-home .btn-outline {
  background: transparent;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.public-home .btn-outline:hover {
  background: white;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

/* Секция информации о компании */
.public-home .company-info {
  padding: 80px 0;
  background: #f8f9fa;
}

.public-home .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.public-home .section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: #e6dcdc;
}

.public-home .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.public-home .info-card {
  background: white;
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.public-home .info-card:hover {
  transform: translateY(-5px);
}

.public-home .info-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #007bff;
}

.public-home .info-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
}

.public-home .info-text {
  color: #666;
  line-height: 1.6;
}

/* Секция услуг */
.public-home .services {
  padding: 80px 0;
  background: white;
}

.public-home .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.public-home .service-item {
  text-align: center;
  padding: 30px 20px;
  border-radius: 10px;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.public-home .service-item:hover {
  background: #e9ecef;
  transform: translateY(-3px);
}

.public-home .service-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #28a745;
}

.public-home .service-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.public-home .service-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 15px;
}

.public-home .service-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border: 2px solid #667eea;
  border-radius: 20px;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.public-home .service-link:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
}

/* Контактная информация */
.public-home .contact-info {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.public-home .contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-top: 50px;
}

.public-home .contact-item {
  /* background: rgba(255, 255, 255, 0.1); */
  padding: 30px 20px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.public-home .contact-item:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.public-home .contact-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #3498db;
  display: block;
}

.public-home .contact-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #ecf0f1;
  text-align: center;
  display: block;
}

.public-home .contact-text {
  color: #bdc3c7;
  line-height: 1.6;
  margin-bottom: 8px;
  font-size: 1rem;
  text-align: center;
  display: block;
}

.public-home .contact-text:last-child {
  margin-bottom: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
  .public-home .hero-section {
    margin-top: 70px; /* Меньший отступ для мобильных */
    padding: 80px 0 60px 0;
  }
  
  .public-home .hero-title {
    font-size: 2rem;
  }
  
  .public-home .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .public-home .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .public-home .section-title {
    font-size: 2rem;
  }
  
  .public-home .info-grid {
    grid-template-columns: 1fr;
  }
  
  .public-home .services-grid {
    grid-template-columns: 1fr;
  }
  
  .public-home .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .public-home .contact-item {
    padding: 20px 15px;
  }
  
  .public-home .contact-icon {
    font-size: 2rem;
  }
  
  .public-home .contact-title {
    font-size: 1.1rem;
  }
} 