/* nav_styles.css */
/*********************** 1.2 Navigation (reworked, -style) *******************************/
nav {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    border-radius: 0;
}

/* Burger checkbox is still used, but hidden visually */
#menu__toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Burger button (desktop: hidden) */
.menu__btn {
    display: none;
    cursor: pointer;
    position: relative;
    width: 26px;
    height: 26px;
    z-index: 1000;
}

/* Main menu row (desktop) */
.n1_main_menu {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 4px;
    flex-wrap: wrap;
}

/* Remove old “button blocks” look */
.n1_menu_items,
.n1_menu_logo_box,
.n1_language_switcher {
    background: transparent; /**/
    box-shadow: none;
    border-radius: 0;
    width: auto;
    margin-right: 0;
}

/* Logo */
.n1_menu_items_logo {
    width: 160px;
    height: auto;
    display: block;
}

.n1_menu_logo_box {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

/* Links look like : clean text, underline on hover */
.n1_menu_items_links {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: auto;
    padding: 6px 2px;

    text-decoration: none;
    color: #1f2937;                 /* near-black */
    font-size: 16px;
    font-weight: 500;

    background: transparent;
    border-bottom: 2px solid transparent;
    border-radius: 0;

    transition: color 0.15s ease, border-color 0.15s ease;
}

.n1_menu_items_links:hover {
    color: #2386a7;                 /* accent like  */
    border-bottom-color: #2386a7;
    background: transparent;
}

/* Home link text was transparent before; keep it normal if ever used */
.n1_menu_items_links_home {
    color: inherit;
}

/* Logout username style */
#username-display {
    font-style: normal;
    opacity: 0.85;
}

/* Language  ****************************************/
/* Keep dropdown clickable and above other elements */
.n1_language_switcher{
    margin-left:auto;
    position:relative;     /* important */
    border-radius:3px;
    overflow:visible;      /* important */
    z-index:2000;          /* important */
}

/* parent */
.n1_language_switcher .dropdown{
    position:relative;     /* important: anchor for absolute menu */
    width:100%;
}

/* button */
.n1_language_switcher .dropbtn{
    color:#1f2937;
    font-size:16px;
    border:none;
    width:100%;
    height:38px;
    padding:3px;
    text-align:center;
    display:block;
    cursor:pointer;
    border-radius:3px;
    background: none;   /* or transparent if you want like  */
}

/* hover */
.n1_language_switcher .dropbtn:hover{
    color: #2386a7;                 /* accent like  */
    background: transparent;
}

/* dropdown menu */
.n1_language_switcher .dropdown-content{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    min-width:100%;
    border-radius:3px;
    box-shadow:0 8px 16px rgba(0,0,0,0.2);
    z-index:3000;          /* important: be above menu */
    pointer-events:auto;   /* important */
}

/* links */
.n1_language_switcher .dropdown-content a{
    color:#000;
    padding:8px 16px;
    text-decoration:none;
    display:block;
    font-size:14px;
    white-space:nowrap;
}

/* show on hover (desktop) */
.n1_language_switcher .dropdown:hover .dropdown-content{
    display:block;
}

/* also keep it open when keyboard focusing inside */
.n1_language_switcher .dropdown:focus-within .dropdown-content{
    display:block;
}
/* hover effect for language options (inside dropdown) */
.n1_language_switcher .dropdown-content a:hover{
    background: rgba(35, 134, 167, 0.12); /* soft highlight */
    color: #2386a7;                       /* accent text */
}

/* optional: active click feedback */
.n1_language_switcher .dropdown-content a:active{
    background: rgba(35, 134, 167, 0.22);
}
/********************************************* 1. Header: конец *******************************/

/*** АДАПТАЦИЯ ********************************************************************************/
/****************************************** 595 рх ********************************************/
/*1.0 Меню: блок с элементами*/
@media (max-width: 862px) { /* reworked burger menu */

    /* show burger */
    .menu__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 1100;
    }

    /* Burger icon lines */
    .menu__btn > span,
    .menu__btn > span::before,
    .menu__btn > span::after {
        display: block;
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: #1f2937;
        transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
        content: '';
    }

    .menu__btn > span::before { top: -8px; }
    .menu__btn > span::after  { top:  8px; }

    /* Off-canvas menu */
    .n1_main_menu {
        position: fixed;
        top: 0;
        left: -290px;
        /*width: 280px; /**/
        height: 100%;
        padding: 70px 16px 16px 16px;
        background: #ffffff;
        border-right: 1px solid rgba(0,0,0,0.10);
        box-shadow: 8px 0 25px rgba(0,0,0,0.12);

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;

        overflow-y: auto;
        z-index: 1050;
        transition: left 0.25s ease;
    }

    /* When checked -> open */
    #menu__toggle:checked ~ .n1_main_menu {
        left: 0;
    }

    /* animate burger to X */
    #menu__toggle:checked ~ .menu__btn > span {
        transform: rotate(45deg);
    }
    #menu__toggle:checked ~ .menu__btn > span::before {
        top: 0;
        transform: rotate(0deg);
    }
    #menu__toggle:checked ~ .menu__btn > span::after {
        top: 0;
        transform: rotate(90deg);
    }

    /* Links full width */
    .n1_menu_items,
    .n1_menu_logo_box,
    .n1_language_switcher {
        width: 100%;
    }

    .n1_menu_items_links {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }

    .n1_menu_items_links:hover {
        border-bottom-color: rgba(211,0,0,0.35);
    }

    /* Logo inside drawer */
    .n1_menu_items_logo {
        width: 170px;
    }

    .n1_language_switcher {
        margin-left: 0;
    }

    .n1_language_switcher .dropbtn {
        text-align: left;
    }
}
/************************************ 1.1_Меню Гамбургер: конец *******************************/

/****************************************** 595 рх ********************************************/
/*1.1 Меню: блок с элементами*/
@media (max-width: 595px) { /*при ширине меньше блоки меню искажаются*/
 
    header {
        padding-bottom: 20px; /*отступ снизу: уменьшен в 2 раза*/
        height: auto; /* v2 nav: keep auto height */
    }

    /*Заголовки первого уровня*/
    .s3_services_h1, .s4_0_header { /*мин ширина 278 px при размере 28рх*/
        margin: 25px 0px 15px 0px; /*отсутпы увеличенные: уменьшены в 2 раза*/
        font-size: 18px; /*размер шрифта: оригинальный 28*/
    }
    
    /*--2_1 Блоки с информацией о компании-*/
    .s2_1_items_container {
        margin-left: 10px; /*отступ уменьшен от основного в 2 раза*/
        margin-right: 10px; /*отступ уменьшен от основного в 2 раза*/
    }
}