
:root {
    --primary-red: #6f872f;
    --dark-red: #62772a;
    --light-red: #97bd32;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px; /* Для фиксированного навбара */
}

.bg-primary-red {
    background-color: var(--primary-red) !important;
}

.text-primary-red {
    color: var(--primary-red) !important;
}

.btn-primary-red {
    background-color: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.btn-primary-red:hover {
    background-color: var(--dark-red);
    border-color: var(--dark-red);
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-scrolled {
    background-color: #343a40 !important;
    padding: 0.5rem 0;
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('assets/images/20240604_155039.webp') center/cover no-repeat;
    color: white;
    padding: 150px 0;
    position: relative;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
        text-align: center;
    }
}

.section-title {
    position: relative;
    margin-bottom: 3rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #6f872f;
}

.section-title.text-center:after {
    left: 50%;
    transform: translateX(-50%);
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    height: 300px;
}

@media (max-width: 576px) {
    .portfolio-item {
        height: 250px;
        margin-bottom: 15px;
    }
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 53, 69, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.testimonial-card {
    border-left: 4px solid var(--primary-red);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    height: 100%;
}

.contact-info i {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

footer {
    background: #343a40;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.blog-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.stats-counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: #6f872f;
}
.it-is-our-btn-clr {
    color: #6f872f;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.alert-message {
    display: none;
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* Адаптивные улучшения */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .contact-info {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .stats-counter {
        font-size: 2rem;
    }
}


/* Мобильная оптимизация */
@media (max-width: 768px) {
  /* Убираем горизонтальную прокрутку */
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Исправляем контейнеры */
  .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
  }
  
  /* Оптимизация навигации */
  .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }
  
  /* Оптимизация геро-секции */
  .hero-section {
    padding-top: 100px;
    padding-bottom: 50px;
  }
  
  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero-section .btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
  
  /* Статистика в одну строку */
  .stats-counter {
    font-size: 1.5rem;
  }
  
  /* Оптимизация секции "О нас" */
  #about .row .col-lg-6:last-child {
    margin-top: 20px;
  }
  
  /* Услуги - одна колонка */
  .service-card {
    margin-bottom: 20px;
  }
  
  /* Фильтры портфолио */
  #portfolio-filters .btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  #portfolio-filters .btn {
    margin: 2px;
    font-size: 0.8rem;
    padding: 5px 10px;
  }
  
  /* Карточки проектов */
  .portfolio-item {
    margin-bottom: 20px;
  }
  
  /* Карусель отзывов */
  .testimonial-card {
    padding: 15px;
  }
  
  /* Контактная форма */
  .contact-info {
    margin-bottom: 20px;
  }
  
  .social-icons a {
    margin-right: 10px;
  }
  
  /* Футер */
  footer .col-md-6 {
    text-align: center !important;
    margin-bottom: 10px;
  }
  
  /* Модальные окна */
  .modal-dialog {
    margin: 10px;
  }
  
  /* Убираем лишние отступы */
  .py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .mb-4, .mb-5 {
    margin-bottom: 1rem !important;
  }
  
  /* Улучшаем читаемость текста */
  p, .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Исправляем изображения */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Улучшаем кнопки */
  .btn {
    white-space: normal;
    word-wrap: break-word;
  }
}

/* Дополнительные исправления для очень маленьких экранов */
@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .stats-counter {
    font-size: 1.25rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  /* Галерея изображений в секции "О нас" */
  #about .row.g-3 .col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Исправление для iOS Safari */
@supports (-webkit-touch-callout: none) {
  .hero-section {
    background-attachment: scroll;
  }
}

        .navbar-scrolled {
            background-color: #343a40 !important;
            padding: 0.3rem 0;
        }
        
        /* Стили для логотипа */
        .navbar-brand {
            padding: 0;
            margin-right: 1rem;
        }
        
        .navbar-logo {
            height: 50px;
            width: auto;
            transition: all 0.3s ease;
        }
        
        .navbar-scrolled .navbar-logo {
            height: 40px;
        }
        .it-is-our-btn {
            background: #6f872f;
        }