/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f4f7f9; 
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   ШАПКА (HEADER) И ЛОГОТИП
========================================= */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    height: 80px; 
    overflow: hidden; 
}

.logo-img {
    height: 170px; 
    width: auto;
    object-fit: cover;
    object-position: center; 
    margin-top: 20px;
    margin-left: -66px; 
}

/* =========================================
   НАВИГАЦИЯ И ВЫБОР ЯЗЫКА
========================================= */
.nav {
    display: flex;
    align-items: center;
    gap: 30px; /* Отступ между ссылками меню и кнопкой языка */
}

.nav-links {
    display: flex;
    gap: 20px; /* Отступ между Hem, Tjänster, Kontakt */
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #0b2545;
}

/* --- Стили для кнопки языка (Капсула) --- */
.lang-dropdown {
    position: relative; 
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f1f5f9; 
    color: #0b2545; 
    border: none;
    border-radius: 50px; 
    padding: 8px 18px; 
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.lang-btn:hover {
    background-color: #e2e8f0; 
}

.globe-icon {
    font-size: 16px; 
}

.arrow-icon {
    font-size: 10px; 
    color: #94a3b8; 
    margin-left: 4px;
}

/* --- Стили для выпадающего списка --- */
.lang-dropdown-content {
    display: none; 
    position: absolute;
    top: 100%; 
    right: 0; 
    margin-top: 8px; 
    width: 150px; 
    background-color: #ffffff; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); 
    z-index: 1000; 
    overflow: hidden; 
    border: 1px solid #e2e8f0; 
}

.lang-dropdown-content.show {
    display: block;
}

.lang-option {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    text-decoration: none !important;
    color: #333333 !important;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 400;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f1f5f9; 
}

.lang-option:last-child {
    border-bottom: none; 
}

.lang-option:hover {
    background-color: #f8fafc;
    color: #0056b3 !important; 
}

.lang-option.active {
    font-weight: 600;
    color: #0b2545 !important;
    background-color: #f8fafc;
}

.checkmark {
    color: #0056b3; 
    font-weight: 700;
}

/* =========================================
   ГЛАВНЫЙ ЭКРАН (HERO)
========================================= */
.hero {
    background-image: linear-gradient(rgba(11, 37, 69, 0.6), rgba(11, 37, 69, 0.6)), url('hero-bg.png');
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 100px 20px 280px 20px; 
}

.hero h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px auto;
    color: #e2e8f0;
}

.btn {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.5);
    color: #0b2545;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.btn:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* =========================================
   УСЛУГИ И КАРТОЧКИ
========================================= */
.services {
    padding: 100px 0;
}

.services h2 {
    text-align: center;
    font-size: 38px;
    font-weight: 300;
    color: #0b2545;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 60px;
    font-size: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 40px; 
}

.card {
    background: #ffffff;
    border-radius: 16px !important; /* Жестко задаем радиус */
    overflow: hidden !important; /* Жестко обрезаем всё, что вылезает за углы */
    box-shadow: 0 10px 30px rgba(11, 37, 69, 0.08); 
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(11, 37, 69, 0.15); 
}

.card-img {
    width: 100%;
    height: 240px; 
    object-fit: cover;
    transition: transform 0.6s ease; 
    transform: scale(1.1); 
}

.card:hover .card-img {
    transform: scale(1.2); 
}

.card-content {
    padding: 30px; 
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.card-content h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #0b2545;
    font-weight: 600;
    min-height: 70px;
}

.service-list {
    list-style: none; 
    padding: 0;
    margin-bottom: 25px; 
    flex-grow: 1;
}

.service-list li {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    padding-left: 22px; 
}

.service-list li::before {
    content: "✓";
    color: #0b2545; 
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 0;
}

.service-list strong {
    color: #0b2545;
    font-weight: 600;
}

.price {
    font-weight: 700;
    color: #0b2545;
    font-size: 16px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea; 
    margin-top: auto; 
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: 75px;
}

.card-footer {
    padding: 20px;
    background-color: #f8fafc;
    border-top: 1px solid #eaeaea;
    text-align: center;
    border-radius: 0 0 16px 16px !important; /* Принудительно скругляем низ */
}

.offert-btn {
    display: inline-block;
    padding: 10px 24px;
    background-color: transparent;
    color: #0b2545;
    border: 2px solid #0b2545;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}

.offert-btn:hover {
    background-color: #0b2545;
    color: white;
}

/* =========================================
   ПРЕМИАЛЬНЫЙ ПОДВАЛ (FAT FOOTER)
========================================= */
.footer {
    background-color: #0b2545; 
    color: #e2e8f0;
    padding: 80px 0 20px 0; 
    font-size: 15px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo-box {
    background-color: #ffffff;
    display: inline-block;
    padding: 0; 
    border-radius: 12px;
    margin-bottom: 25px;
    overflow: hidden;
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.footer-logo {
    height: 100px; 
    width: auto;
    display: block;
    transform: scale(1.4) translateY(6px); 
    transform-origin: center center;
}

.footer-col p {
    color: #a0aec0; 
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
    display: inline-block; 
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%; 
    height: 2px;
    background-color: #3b82f6; 
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-col ul a:hover {
    color: #ffffff;
    transform: translateX(5px); 
}

.footer-col p a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    padding-top: 25px;
    text-align: center;
    color: #718096;
    font-size: 14px;
}

/* =========================================
   ВСПЛЫВАЮЩЕЕ ОКНО (POPUP MODAL)
========================================= */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 37, 69, 0.6); 
    backdrop-filter: blur(5px); 
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #0b2545;
}

.modal-header h2 {
    color: #0b2545;
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 600;
}

.modal-header p {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0b2545;
    box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.1);
}

.submit-btn {
    width: 100%;
    background-color: #0b2545;
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #081b33;
}

/* =========================================
   ИДЕАЛЬНАЯ СИММЕТРИЯ ПОДВАЛА (Только для ПК)
========================================= */
@media (min-width: 769px) {
    .footer-grid {
        display: flex;
        justify-content: space-between;
        gap: 30px;
    }
    
    .footer-col {
        flex: 1; /* Все 3 колонки делят место поровну */
    }
    
    /* 1. Сдвигаем заголовки 2-й и 3-й колонки чуть ниже, 
          чтобы визуально выровнять их с логотипом */
    .footer-col:nth-child(2),
    .footer-col:nth-child(3) {
        padding-top: 15px; 
    }

    /* 2. Центральная колонка (Услуги): ставим её ровно по центру экрана */
    .footer-col:nth-child(2) {
        display: flex;
        flex-direction: column;
        align-items: center; 
    }
    
    /* Удерживаем текст услуг ровным внутри центральной колонки */
    .footer-col:nth-child(2) > h4,
    .footer-col:nth-child(2) > ul {
        width: 100%;
        max-width: 180px; 
    }

    /* 3. Правая колонка (Контакты): жестко прижимаем к правому краю контейнера */
    .footer-col:nth-child(3) {
        display: flex;
        flex-direction: column;
        align-items: flex-end; 
    }
    
    /* Текст контактов оставляем аккуратным блоком, не ломая выравнивание иконок */
    .footer-col:nth-child(3) > h4,
    .footer-col:nth-child(3) > p {
        width: 100%;
        max-width: 270px; 
    }
}

/* =========================================
   АДАПТИВНОСТЬ (МОБИЛЬНЫЕ ТЕЛЕФОНЫ)
   Этот блок должен быть СТРОГО в самом низу!
========================================= */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }
    .logo-img {
        margin-left: 0;
        height: 120px;
    }
    
    /* Исправленная мобильная навигация */
    .nav {
        margin-top: 15px;
        flex-direction: column; /* Ставим язык под меню на маленьких экранах */
        gap: 15px;
    }
    .nav-links {
        gap: 15px;
        flex-wrap: wrap; 
        justify-content: center;
    }
    
    .hero {
        padding: 80px 20px 150px 20px;
    }
    .hero h1 {
        font-size: 32px;
    }
    .footer {
        padding: 60px 0 20px 0;
    }
}