
/********** Template CSS **********/


:root {
    --primary: #348E38;
    --secondary: #525368;
    --light: #E8F5E9;
    --dark: #0F4229;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1,
.h1,
h2,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
.h3,
h4,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
.h5,
h6,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
    font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: var(--light);
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand,
.navbar a.btn {
    height: 80px
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 25px 0;
    color: var(--dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(15, 66, 41, .6);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 3rem;
    background-color: var(--primary);
    border: 10px solid var(--primary);
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(rgba(15, 66, 41, .6), rgba(15, 66, 41, .6)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--light);
}


/*** Top Feature ***/
@media (min-width: 991.98px) {
    .top-feature {
        position: relative;
        margin-top: -80px;
        z-index: 1;
    }
}


/*** Facts & Quote ***/
.facts,
.quote {
    background: rgba(15, 66, 41, .6);
}


/*** Service ***/
.service-item {
    position: relative;
    text-align: center;
}

.service-item .service-img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
}

.service-item .service-img img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    object-fit: cover;
    transform: scale(1.2);
    transition: .3s;
    z-index: -1;
}

.service-item:hover .service-img img {
    transform: scale(1);
}

.service-item .service-text {
    background: #FFFFFF;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transition: .3s;
}

.service-item:hover .service-text {
    background: rgba(15, 66, 41, .6);
}

.service-item .service-text h4,
.service-item .service-text p {
    transition: .3;
}

.service-item:hover .service-text h4 {
    color: #FFFFFF;
}

.service-item:hover .service-text p {
    color: var(--light);
}

.service-item .service-text .btn-square {
    width: 100px;
    height: 100px;
    background: transparent;
    transition: .5s;
}

.service-item:hover .service-text .btn-square {
    background: var(--light);
}

.service-item .service-text .btn {
    width: 31px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    color: var(--dark);
    background: var(--light);
    white-space: nowrap;
    overflow: hidden;
    transition: .3s;
}

.service-item:hover .service-text .btn {
    width: 112px;
}




/*** Team ***/
.team-item {
    position: relative;
    overflow: hidden;
}

.team-item .team-text {
    position: absolute;
    width: calc(100% - 45px);
    left: -100%;
    bottom: 45px;
    padding: 1.5rem;
    background: #FFFFFF;
    border-radius: 0 4px 4px 0;
    opacity: 0;
    transition: .5s;
}

.team-item:hover .team-text {
    left: 0;
    opacity: 1;
}

.team-item .team-social .btn {
    background: var(--light);
    color: var(--primary);
}

.team-item .team-social .btn:hover {
    background: var(--primary);
    color: var(--light);
}

.team-item .team-img .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .5s;
    z-index: 3;
    opacity: 0;
}

.team-item:hover .team-img .team-social {
    transition-delay: .3s;
    opacity: 1;
}


/*** Testimonial ***/

.testimonial-carousel .owl-item img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-nav {
    margin-top: 30px;
    display: flex;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin-right: 15px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--light);
    border-radius: 4px;
    font-size: 22px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    color: var(--light);
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: var(--light);
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    color: var(--light);
    background: #072A19;
}

.copyright a {
    color: #FFFFFF;
}

.copyright a:hover {
    color: var(--primary);
}

.profile-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    height: 100%;
  }
  .profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  }
  .profile-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    z-index: 1;
  }
  .profile-img-container {
    padding: 20px;
    background: #f8f9fa;
    text-align: center;
  }
  .profile-svg {
    max-height: 150px;
    width: 100%;
  }
  .profile-content {
    padding: 20px;
  }
  .profile-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  .specs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
  }
  .specs span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
  }
  .profile-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
  }
  .profile-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
  }
  .profile-features li:before {
    content: "?";
    color: #0d6efd;
    position: absolute;
    left: 0;
    font-weight: bold;
  }
  .section-title {
    position: relative;
    text-align: center;
    margin: 30px 0;
  }
  .section-title span {
    display: inline-block;
    padding: 0 20px;
    background: white;
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
  }
  .section-title:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dee2e6;
    z-index: 0;
  }

/* Полный редизайн блока портфолио */
#portfolio-flters {
    display: inline-block;
    padding: 10px 15px;
    margin-bottom: 30px;
    background: var(--light);
    border-radius: 4px;
}

#portfolio-flters li {
    display: inline-block;
    padding: 5px 15px;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 4px;
}

#portfolio-flters li:hover,
#portfolio-flters li.active {
    color: white;
    background: var(--primary);
}

.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

/* Убираем все псевдоэлементы и переопределяем стили */
.portfolio-inner {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Гарантированно убираем зеленые полосы */
.portfolio-inner::before,
.portfolio-inner::after {
    display: none !important;
    content: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
}

.portfolio-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.portfolio-inner:hover img {
    transform: scale(1.05);
}

.portfolio-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    transform: translateY(0);
    opacity: 1;
    z-index: 2;
}

/* Пагинация */
#portfolio-pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

.page-item {
    margin: 0 5px;
}

.page-link {
    display: block;
    padding: 8px 15px;
    color: var(--primary);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.page-item.active .page-link {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link:hover {
    background: #e8f5e9;
}

/* Галерея портфолио */
.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 60px; /* Увеличиваем отступ снизу */
}

/* Карточка проекта */
.portfolio-item {
    width: 100%;
    margin-bottom: 0; /* Убираем лишний отступ у элементов */
}

/* Контейнер изображения */
.portfolio-inner {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0; /* Убираем лишний margin */
}

/* Текст поверх изображения */
.portfolio-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    z-index: 2;
}

/* Секция после портфолио (например, футер) */
.footer {
    margin-top: 40px; /* Добавляем отступ сверху */
}

/* Фильтры */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-buttons .btn {
    transition: all 0.3s;
}

.filter-buttons .btn.active {
    background: var(--primary);
    color: white;
}

/* Галерея */
.gallery-grid {
    margin-bottom: 30px;
}

.gallery-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 280px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 66, 41, 0.9), transparent);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.gallery-card:hover .gallery-overlay {
    transform: translateY(0);
}

/* Адаптивность */
@media (max-width: 767px) {
    .gallery-card {
        height: 220px;
    }
    
    .filter-buttons {
        gap: 5px;
    }
    
    .filter-buttons .btn {
        padding: 5px 10px;
        font-size: 14px;
    }
}

/* Дополните ваш CSS этими стилями */
.gallery-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 280px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(15, 66, 41, 0.9);
    color: white;
    padding: 15px;
    transition: bottom 0.3s;
}

.gallery-card:hover .gallery-overlay {
    bottom: 0;
}

/* Пагинация */
.pagination .page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

.pagination .page-link {
    color: var(--primary);
    margin: 0 5px;
    border-radius: 4px;
}

@media (max-width: 767px) {
    .gallery-card {
        height: 200px;
    }
}

/* ==========================================================================
   АДАПТИВНОСТЬ И ИСПРАВЛЕНИЕ ШРИФТОВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================================== */
@media (max-width: 768px) {
    .carousel-caption h1.display-1 {
        font-size: 2.2rem !important; /* Уменьшаем главный заголовок */
        line-height: 1.3;
    }
    .carousel-caption p.fs-5 {
        font-size: 1.1rem !important;
    }
    .display-5 {
        font-size: 1.8rem !important; /* Уменьшаем заголовки секций */
    }
    .top-feature .bg-white {
        min-height: auto !important;
        padding: 20px !important;
    }
}

/* ==========================================================================
   СТИЛИ ДЛЯ НОВЫХ СЕКЦИЙ (Этапы, Калькулятор, Сертификаты)
   ========================================================================== */
/* Этапы работы */
.step-item {
    position: relative;
    text-align: center;
    padding: 20px;
}
.step-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}
.step-item:hover .step-icon {
    transform: translateY(-10px);
}
.step-arrow {
    position: absolute;
    top: 45px;
    right: -15px;
    color: #ccc;
    font-size: 1.5rem;
    transform: translateY(-50%);
}
@media (max-width: 991px) {
    .step-arrow { display: none; }
}

/* Калькулятор */
.calculator-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 5px solid var(--primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

/* Сертификаты */
.certificate-card img {
    border: 1px solid #eee;
    padding: 5px;
    transition: transform 0.3s;
    background: #fff;
}
.certificate-card img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}