*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-width: 320px;
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-color: #f5f5f5;
    --text-color: #6c757d;
    --accent-color: #ffd333;
    --contrast-color: #3d464d;
    --gray-color: #ccc;
    --light-gray-color: #eee;
}

/* Ссылки */
a {
    color: var(--text-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}


/* ============== Общие настройки index.html ============== */
.section-title {
    font-size: 32px;
    text-align: center;
}



/* ============== Header ============== */
.header-top {
   box-shadow: 0 10px 10px rgba(0, 0, 0, .3);
}

.header-info {
    padding: 0 50px;
    height: 100px; /* Задаём фиксированную высоту хедера для точного позиционирования */
}

.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo img {
    max-width: 75%;
    height: auto;
}

.header-contacts,
.header-menu {
    display: flex;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.header-top-phone a,
.header-top-email a {
    text-decoration: none;
    color: #fff;
}

.header-top-phone a:hover,
.header-top-email a:hover {
    text-decoration: underline;
}

.header-menu .nav-link {
    color: #fff;
}

/* ============== Navbar ============== */

.navbar {
    background-color: var(--contrast-color);
}

.nav-item.dropdown {
    position: relative;
}

.nav-item.active {
    color: var(--accent-color) !important;
}

.nav-link {
    color: var(--contrast-color);
    padding: 0.5rem 1rem;
    background-color: transparent; /*!important;*/
    border-radius: 0;
    transition: color 0.3s ease;
    text-decoration: none;
    box-shadow: none; /*!important;*/
}

.nav-link:hover {
    color: var(--accent-color); /*!important;*/
}

.nav-link.active,
.nav-link:focus {
    color: var(--accent-color) !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.nav-item .nav-link.active {
    color: var(--accent-color) !important;
    font-weight: 600;
}

 .nav-link.dropdown-toggle.active {
    color: var(--accent-color) !important;
  }

/* Убираем стандартную стрелочку Bootstrap */
.dropdown-toggle::after {
    content: none; /*!important;*/
}

/* ============== Dropdown Menu ============== */

.dropdown-menu {
    top: 100%;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    min-width: 12rem;
    background-color: var(--contrast-color);
    border: none;
    padding: 0.25rem 0;
    margin: 0;
    z-index: 1000;
}

.nav-item.dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Стили для вложенных уровней меню (если они появятся в будущем) */
.dropdown-menu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
}

.dropdown-item:hover > .dropdown-menu.children {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

/* Элементы меню */
.dropdown-item {
    color: #fff;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    border-radius: 0;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
    position: relative;
    text-decoration: none;
}

.dropdown-item:hover {
    color: var(--accent-color); /* почти чёрный цвет */
    background-color: var(--contrast-color); /* жёлтый фон */
    /*background-color: var(--contrast-color);*/
    /*background-color: transparent;*/
}

.dropdown-item.active {
    color: var(--accent-color) !important;
    font-weight: 600;
    background-color: var(--contrast-color);
    box-shadow: none;
}

.dropdown-item:focus {
    color: var(--accent-color);
    background-color: var(--contrast-color);
}

.dropdown-menu .nav-link.active,
.nav-item.dropdown .nav-link.active {
    color:  var(--accent-color); /* например, белый */
}

.nav-link.active {
    color: var(--accent-color); /* чтобы текст был читаем */
}



/*========================= Section 1 rules ========================== */
.main-section > div {
    padding: 180px 0;
}

.main-section-body {
    padding-right: 60px;
}
.main-section-body p {
    margin: 40px auto;
}


/*========================= section about-us ========================== */
.about-us {
    padding-top: 120px;
    padding-bottom: 125px;
    color: var(--text-color);
    background-color: #fff;
    text-align: center;

}

.about-info {
    padding-left: 60px;
    text-align: start;
}
.about-item {
    padding-top: 80px;
    padding-bottom: 80px;
}

.about-item .about-info {
    padding-right: 60px;
}

.about-page {
    padding: 120px 100px 125px;
}

.about-item {
    display: flex;
    text-align: center;
}

.about-item img {
    width: 450px;
    height: 450px;
}

/*========================= section service ========================== */

.service {
    padding-top: 120px;
    padding-bottom: 125px;
}

.service-page {
    padding: 0 100px;
}

.tab-content {
    padding-left: 80px;
}

.service-card {
    transition: all .3s;
    border: 1px solid var(--gray-color);
    background-color: #fff;
    position: relative;
    height: 450px;
}

.service-card:hover {
    box-shadow: 0 10px 20px -15px rgba(0, 0, 0, 0.75);
    background-color: var(--gray-color);
}

.service-thumb {
    text-align: center;
}

.service-links {
    margin: 20px 20px 0;
    text-align: center;
}

.service-links a {
    display: block;
    margin: 0 10px;
    align-content: center;
    text-decoration: none;
}

.service-body-menu .nav-link a {
    color: #1a1d20;
}

.nav-pills  {
    padding: 0px;
}

.nav-pills button {
    text-align: start;
    color: var(--text-color);
   }
.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    background-color: var(--text-color);
    color: var(--accent-color);
}

.nav-pills .nav-link:hover {
    background-color: var(--text-color);
    color: var(--accent-color);
}

.service-item {
    display: flex;
}

.service-item img {
    width: 350px;
    height: 350px;
}


/*========================= section projects ========================== */

.projects {
    padding-top: 120px;
    padding-bottom: 125px;
}

.projects-page {
    padding: 120px 100px 125px;
}

.project-body {
    padding-left: 60px;
}

.projects-links {
    display: flex;
    justify-content: left;
    margin-top: 40px;
    margin-left: 20px;
}

.projects-links a:hover {
    background-color:  var(--contrast-color);
}


.project-info {
    display: block;
    padding-top: 25px;
    padding-left: 50px;
}

.projects-title {
    padding-left: 50px;
}

/*========================= section partners ========================== */
.partners {
    padding-top: 120px;
    padding-bottom: 125px;
}

/*========================= section news ========================== */
.news {
    padding-top: 120px;
    padding-bottom: 125px;
}

.news-title p {
    text-align: center;
    margin-top: 20px;
}


.card-news {
    display: block;
    width: 95%;
    height: 100%;
    margin-left: 20px;
    background-color: var(--gray-color);
    color: var( --contrast-color);
}

.card-news .card-header {
    padding: 10px 10px;
    background-color: var(--contrast-color);
    color: var(--accent-color);
}

.card-news .card-body {
    padding: 10px 10px;
}

/*========================= section contacts ========================== */

.contacts {
    padding-top: 120px;
    padding-bottom: 125px;
}

.contacts-page {
    padding: 0 250px;
}


.contacts-image img {
    text-align: center;
    max-width: 100%;
}

form {
    padding-left: 60px;
}



/*========================= footer ========================== */

.footer-info {
    padding: 0 50px;
    padding-bottom: 60px;
    background-color: #757575;
}


.footer-info .nav-link {
    padding-bottom: 0;
    color: #fff !important;
}

.footer-info .nav-link:hover {
    color: var(--accent-color) !important;
}

.footer-info .nav-item.active {
    color: var(--accent-color) !important;
}



.footer-details {
    color: var(--light-gray-color);
    display: block;
    align-content: center;
}

.footer-details p {
    font-size: 20px;
    margin-bottom: 10px;

}

.footer-menu a {
    font-size: 24px;
    padding-bottom: 0;
}

.footer-service a {
    font-size: 24px;
    padding-bottom: 0;
    text-decoration: none;
}

.footer-contacts {
    display: block;
    align-content: start;
}

.footer-contacts a {
    font-size: 24px;
    margin-left: 10px;
}

.footer-contacts p {
    font-size: 24px;
    color: var(--light-gray-color);
    padding-left: 8px;
}



/*========================= page about-us ========================== */
/*===================================================================== */






/*========================= Adaptiv header ========================== */

@media screen and (max-width: 1770px){
    .container {
        margin: 100px auto;
    }

    .header-top .navbar .dropdown-menu {
        margin-top: 20px;
    }

}


@media screen and (max-width: 1440px){
    .header-contacts, .header-menu {
        font-size: 18px;
    }
}

@media screen and (max-width: 1330px){
    .header-contacts {
        font-size: 15px;
    }
    .header-menu {
        font-size: 15px;
    }

    .header-top .navbar .dropdown-menu {
        margin-top: 10px;
    }
}

@media screen and (max-width: 1166px){
    .header-info {
        padding: 0 0;
    }

    .main-section-body h1 {
        font-size: 36px;
    }
}



@media screen and (max-width: 1110px){
    .header-top .navbar .nav-link {
        letter-spacing: normal;
    }

}

@media screen and (max-width: 1040px){
    .header-menu, .header-contacts {
        padding: 0;
    }

    .contacts-page {
        padding: 0 50px;
    }

}

@media (max-width: 992px) {
    .main-section-body {
        padding: 0 40px 0 10px;

    }

    .main-section-body h1 {
        font-size: 26px;
    }
    .main-section-body p {
        font-size: 14px;
        margin-bottom: 0;
    }
}

/* Мобильная адаптация (пример, можно дополнять) */

@media (max-width: 767px) {
    .navbar {
        background-color: var(--contrast-color);
    }

    .dropdown-menu {
        position: static;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        margin-top: 0;
        box-shadow: none;
        min-width: 100%;
    }

    .nav-link {
        padding: 1rem;
    }
}

@media screen and (max-width: 575px){
    /*.logo {*/
    /*    display: flex;*/
    /*    justify-content: center;*/
    /*}   */

    .fa-solid {
        display: none;
    }

    .header-logo img {
        display: block;       
        height: auto;
        margin: auto;
    }

    .header-contacts {
        justify-content: start;
    }

    .contacts-img {
        text-align: center;
    }


    .contacts-image img {
        max-width: 80%;
        margin: 20px 20px;
    }

    .contacts-body {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .contacts-title {
        padding: 20px 30px;
        font-size: 22px;
    }

    .contacts-title h4, p {
        font-size: 20px;
    }

    

@media screen and (max-width: 412px){

     img {
        max-width: 350px;
        height: auto;
        vertical-align: middle;
        align-content: center;
    }

    .logo {
        max-width: 100%;
    }

    .fa-solid {
        display: none;
    }

    .header-logo img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: auto;
    }

    .header-contacts {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-top-phone {
        align-content: center;
    }


    .main-section div {
        padding: 0 0;
        margin: 20px 10px;
    }


     .main-section-body {
        width: 100%;

    }

    .main-section-photo {
        width: 100%;
        align-content: center;

    }

    .about-us {
        padding-top: 20px;
        padding-bottom: 25px;
    }

    .about-us div {
        padding: 0 0;
        margin: 20px 10px;
    }

    .about-page {
        padding: 60px 20px 60px;
    }

    .about-photo, .about-info {
        width: 100%;
    }
    .about-photo {
        align-content: center;
    }

    .about-page {
        padding: 60px 20px 60px;
    }

    .about-item .about-info {
        padding-right: 0px;
        padding-left: 10px;
    }

    .about-item img {
        height: auto;
    }

    .section-title {
        font-size: 24px;
    }

    .service, .projects, .partners, .news, .contacts {
        padding-top: 20px;
        padding-bottom: 25px;
    }

    .service-page {
        padding: 0 20px;
    }

    .service-card {
        height: auto !important;
    }


    .service-thumb {
        max-width: 100%;
    }

    .service-info {
        width: 100%;
    }

    .d-flex {
        display: block!important;
    }

    .nav-link {
        padding: 10px 0;
    }

    .container {
        margin: 0 0;
    }

    .projects-page {
        padding: 40px 10px 40px;
    }

    .project-info {
        margin: 0 0;
        padding: 0 0;
        width: 100%;
    }

    .project-photo {
        display: none;
        max-width: 100%;
    }

    .project-body {
        margin-top: 10px;
        padding-left: 10px;
        width: 100%;
    }

    .projects-links {
        justify-content: center;
        margin-left: 0;
    }

    .tab-content {
        padding-left: 0;
    }

    .contacts-page {
        padding: 0 10px;
    }

    .contacts-title {
        padding: 0 20px;
        font-size: 20px;
    }


    #contact-form {
        padding-left: 20px;
    }

    .footer-menu, .footer-service, .footer-details {
        display: none;
    }

    .footer-contacts a {
        margin-left: 0;
    }

    .footer-contacts p {
        font-size: 20px;
    }

}