:root {
    --primary-green: #00263E;
    --dark-green: #00263E;
    --orange: #f89c1c;
    --light-bg: #faf9f6;
    --section-bg: #F5F7FA;
    --footer-bg: #00263E;
    --text-dark: #1d1b20;
    --text-gray: #7a7a7a;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.hero-section {
    height: 800px;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
}

.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 45px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-green) !important;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background: var(--primary-green);
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 80%;
    left: 10%;
}

.hero-content h1 {
    font-size: 100px;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 40px;
    color: white;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.btn-hero {
    background: var(--orange);
    color: white;
    padding: 15px 47px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
}

.btn-hero:hover {
    background: #e68910;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(248, 156, 28, 0.3);
    color: white;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: var(--primary-green);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.service-card {
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
    border: none;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.service-card .card-body {
    padding: 30px 20px;
    text-align: center;
}

.service-card .card-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--dark-green);
    margin-bottom: 20px;
    line-height: 1.3;
}

.btn-service {
    background: var(--primary-green);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-service:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    color: white;
}

.advantages-section {
    background: var(--section-bg);
    padding: 80px 0;
}

.advantages-title {
    font-size: 28px;
    font-weight: 600;
    color: #2e2e2e;
    margin-bottom: 50px;
}

.news-card {
    background: var(--light-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-card .news-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.news-card .card-body {
    padding: 20px;
}

.news-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-date {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.news-excerpt {
    font-size: 16px;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-news {
    background: #f0fff0;
    color: #004b00;
    border: 1px solid #004b00;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-news:hover {
    background: #004b00;
    color: white;
}

.footer {
    background: #fff;
    color: #1B2430;
    padding: 72px 0 28px;
    border-top: 1px solid rgba(27, 36, 48, 0.06);
}

.footer-brand {
    display: inline-block;
    margin-bottom: 1rem;
    text-decoration: none;
}

.footer-brand img {
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.footer-desc {
    margin: 0;
    max-width: 32ch;
    color: #5C635E;
    font-size: 0.95rem;
    line-height: 1.55;
}

.footer-heading {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1B2430;
    margin: 0 0 1rem;
}

.footer-links li {
    margin-bottom: 0.55rem;
}

.footer-links a {
    color: #5C635E;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #00263E;
}

.footer-contacts li {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    color: #5C635E;
    font-size: 0.95rem;
    line-height: 1.45;
}

.footer-contacts i {
    margin-top: 0.2rem;
    color: #00263E;
    width: 1rem;
    text-align: center;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(27, 36, 48, 0.08);
}

.footer-bottom p {
    color: #5C635E;
    font-size: 0.88rem;
    margin: 0;
}

.btn-back-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1000;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: #00263E;
    color: #14231A;
    box-shadow: 0 8px 20px rgba(20, 30, 40, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-back-top:hover {
    background: #003C71;
    color: #14231A;
}

/* --- Стили для нового переключателя языков --- */
.language-dropdown .nav-link {
    padding: 0 12px !important; /* Убираем лишние отступы для иконки */
}

/* Убираем эффекты поднятия и подчеркивания у иконки */
.language-dropdown .nav-link:hover {
    transform: none;
}
.language-dropdown .nav-link::after {
    display: none;
}

/* Стили самой иконки */
.language-dropdown .fa-globe {
    color: var(--text-gray);
    transition: color 0.3s ease;
}
.language-dropdown:hover .fa-globe {
    color: var(--primary-green);
}

/* Появление меню при наведении на десктопе */
@media (min-width: 992px) {
    .language-dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0; 
        animation: fadeIn 0.2s ease-out;
    }
}

/* Стили для активного языка в выпадающем списке */
.language-dropdown .dropdown-item.active {
    font-weight: bold;
    background-color: transparent;
    color: var(--primary-green) !important;
}

.language-dropdown .dropdown-item:active {
    background-color: var(--primary-green);
    color: #fff !important;
}

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

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 40px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .service-card {
        margin-bottom: 30px;
    }
    
    .news-card .row {
        flex-direction: column;
    }
}

/* Mobile Navigation Dropdown Styles */
@media (max-width: 1199.98px) {
    .navbar-nav .dropdown-menu {
        background: rgba(243, 243, 243, 0.95);
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        padding: 10px 0;
        margin: 0;
        border-radius: 0;
        position: static;
        float: none;
        width: 100%;
        display: none;
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block;
    }
    
    .navbar-nav .dropdown-item {
        color: var(--text-dark);
        padding: 8px 25px;
        font-weight: 500;
        transition: all 0.2s ease;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: rgba(0, 38, 62, 0.1);
        color: var(--primary-green);
    }
}

/* Contact dropdown styling */
.contact-info {
    min-width: 280px;
}

.contact-info p {
    font-size: 14px;
    margin-bottom: 5px;
}

.contact-info i {
    color: var(--primary-green);
}

.dropdown-menu.show {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html {
    scroll-behavior: smooth;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-toggle[aria-expanded="true"]::after {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
    content: "";
    border-top: 0;
    border-right: 0.3em solid transparent;
    border-bottom: 0.3em solid;
    border-left: 0.3em solid transparent;
}

/* --- Стили для двухстрочного пункта меню --- */
.two-line-link {
    line-height: 1.15;
    padding: 6px 10px !important;
    text-align: right;
    white-space: nowrap;
}
.link-main-text {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
}
.link-sub-text {
    display: block;
    font-size: 0.72em;
    color: var(--text-gray);
}

.navbar-nav.ms-auto .two-line-link {
    margin-right: 2px;
}

/* --- ФИНАЛЬНЫЙ ФИКС для выпадающего меню языка на мобильных --- */
@media (max-width: 1199.98px) {
    /* Этот блок отменяет 'position: static' и 'width: 100%' из общих стилей,
       которые ломают наше меню. Мы возвращаем ему логику десктопа. */
    .mobile-controls .language-dropdown .dropdown-menu {
        position: absolute !important; /* !important нужен, чтобы гарантированно перебить другие стили */
        width: auto !important;
        left: 0 !important;
        right: auto !important;
    }
}