* {
    margin: 0;
    padding: 0;
}

/* iOS Safari/Chrome иначе автоматически увеличивает шрифты и ломает vw-размеры */
html {
    -webkit-text-size-adjust: 100%;
}

@font-face {
    font-family: 'Montserrat-Regular';
    src: url(../fonts/Montserrat-Regular.ttf);
}

@font-face {
    font-family: 'Montserrat-Semi-Bold';
    src: url(../fonts/Montserrat-SemiBold.ttf);
}

@font-face {
    font-family: 'Old-Style';
    src: url(../fonts/Old-Style.ttf);
}

/* HEADER */

header {
    width: 100%;
    /* высоту задаёт контейнер: 5% от auto-высоты body в WebKit не работает */
    height: auto;

    display: flex;
    justify-content: center;

    position: sticky;
    top: 0;
    z-index: 100;

    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#header-wrapper {
    width: 100%;
    height: 8dvh;


    display: flex;
    /* align-items: center; */
    justify-content: space-between;

    font-size: 1vw;
    font-family: 'Montserrat-Regular';


}

/* Явная ширина + сброс margin: svg с width="100%" внутри flex-элемента
   без ширины в WebKit получает дефолтные 300px и сдвигает всю шапку */
#header-logo-wrapper {
    width: 100%;
    height: 60%;
    min-width: 0;
    box-sizing: border-box;
}

#header-logo-wrapper svg {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

#search-btn {
    width: 20%;
    height: 50px;

    color: white;
    background: linear-gradient(90deg,rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 15px;
    cursor: pointer;

}

#map-icon-white {
    padding: 5px 10px 0px 10px;
    display: block;
}

#map-icon-color {
    padding: 5px 10px 0px 10px;
    display: none;
}

#search-btn:hover span {
    background: #d9d9d9b4;
    font-weight: bold;
    color: transparent;
    -webkit-background-clip: text;
	background-clip: text;
	background-image: linear-gradient(90deg,rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);

}

#search-btn:hover {
    background: #d9d9d9b4;
}



#menu-bar {
    /* Ширину задаёт grid-трек, а не проценты/min-content */
    width: 100%;
    min-width: 0;
    height: 60%;
    background: #d9d9d9b4;
    border-radius: 15px;
    font-size: 2vw;
    overflow: hidden;
    scroll-behavior: smooth;

    display: flex;
    flex-wrap: wrap;
}

.menu-options {
    border: 1px solid rgba(255, 255, 255, 0);
    height: 30px;
    padding-left: 10px;
    padding-right: 20px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.menu-element {
    text-align: center;
    flex: 0 0 100%;
    width: 100%;

    color: transparent;
    -webkit-background-clip: text;
	background-clip: text;
	background-image: linear-gradient(90deg,rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);
    text-align: center;
    height: 100%;
    font-size: 3.5vw;

    display: flex;
    align-items: center;
    justify-content: center;

}


.menu-options:hover {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-btn {
    cursor: pointer;
}


svg {
    margin-left: 3%;
    margin-top: 2%;
}

.dropdown-list {
    display: flex;
    justify-content: center;
    align-items: center;

    /* Ширину задаёт grid-трек: абсолютное меню с min-width
       не может расширить кнопку и вытолкнуть шапку вбок */
    width: 100%;
    height: 60%;
    min-width: 0;

    position: relative;
    cursor: pointer;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-list img {
    width: 100%;
    height: 100%;
    transition: transform 0.18s ease;
    transform-origin: center;
}

.dropdown-list:active img {
    transform: scale(0.9);
}

.dropdown-list.open img {
    transform: scale(0.96);
}

/* DROPDOWN MENU */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1001;

    display: flex;
    flex-direction: column;
    gap: 4px;

    min-width: min(260px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 10px;
    margin: 0;
    list-style: none;
    box-sizing: border-box;

    /* background: #c9c9c9b4; */
    /* требуется выбрать один из двух */
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);

    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(0.96);
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        visibility 180ms ease;
}

.dropdown-list.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition:
        opacity 240ms ease,
        transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
        visibility 240ms ease;
}

.dropdown-item {
    margin: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.dropdown-list.open .dropdown-item {
    opacity: 1;
    transform: translateY(0);
}

.dropdown-list.open .dropdown-item:nth-child(1) { transition-delay: 0.02s; }
.dropdown-list.open .dropdown-item:nth-child(2) { transition-delay: 0.05s; }
.dropdown-list.open .dropdown-item:nth-child(3) { transition-delay: 0.08s; }
.dropdown-list.open .dropdown-item:nth-child(4) { transition-delay: 0.11s; }
.dropdown-list.open .dropdown-item:nth-child(5) { transition-delay: 0.14s; }

.dropdown-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;

    width: 100%;
    padding: 12px 16px;

    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 12px;

    font-family: 'Montserrat-Regular';
    font-size: 3.5vw;
    font-size: clamp(15px, 3.5vw, 22px);
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;

    transition: background 0.18s ease, border-color 0.18s ease, backdrop-filter 0.18s ease;
}

.dropdown-link:hover,
.dropdown-link:focus-visible {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.dropdown-label {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(90deg, rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);
}

@media (prefers-reduced-motion: reduce) {
    .dropdown-list img,
    .dropdown-menu,
    .dropdown-item,
    .dropdown-link {
        transition: none !important;
        animation: none !important;
    }

    .dropdown-item,
    .dropdown-menu,
    .dropdown-list.open .dropdown-item,
    .dropdown-list.open .dropdown-menu {
        transform: none !important;
        transition-delay: 0s !important;
    }

    /* SLIDER */
    #banner-wrapper {
        scroll-behavior: auto !important;
    }

    .banner-box,
    .banner-box.active,
    .done-banner:hover {
        transition: none !important;
        scale: none !important;
    }
}

/* Пустой легаси-элемент, в вёрстке не участвует (background: reds — опечатка) */
#burger-menu {
    display: none;
}


#big-menu-rect {
    width: 100%;
    min-width: 0;
    /* Grid вместо flex: три явных трека, WebKit не подменяет их
       intrinsic-шириной svg/img, как это было с flex-basis: auto */
    display: grid;
    grid-template-columns: clamp(28px, 9vw, 40px) minmax(0, 1fr) clamp(28px, 9vw, 40px);
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    /* была смесь vh/dvh: на iOS с видимым адрес-баром высоты не совпадали */
    height: 100%;
    box-sizing: border-box;
}

/* NEW TABLE */

.table-element {
    background: white;
    border: 1px solid rgba(255, 255, 255, 0);
    width: 22%;
    height: 14vh;
    /* padding-left: 40px;
    padding-right: 40px; */
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9vw;
    text-align: center;
}

.table-element-head-wrapper {
    display: flex;
    width: 97%;
    height: 10%;
    justify-content: space-around;
}


.table-element-head {
    margin-top: 1%;
    margin-bottom: 1%;
    margin-left: 0%;
    width: 22%;          /* ширина */
    height: 11vh;         /* высота */
    background: linear-gradient(90deg, rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%); /* цвет фона */; 
    border-radius: 20px;   /* радиус закругления углов */
    display: flex;            /* Включаем flex-контейнер */
    color: white;
    justify-content: center;     /* Горизонтальное выравнивание */
    align-items: center;         /* Вертикальное выравнивание */
    font-size: 1vw;             /* Размер шрифта */
    font-family: 'Montserrat-Semi-Bold';
    text-align: center;
}

.table-element-wrapper {
    padding: 10px;
    margin-top: 0%;
    margin-bottom: 1.5%;
    width: 93.5%;
    height: 14.5vh;
    padding: 10px;
    background: #e4e0e0d0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px; 
    color: rgba(77, 204, 64, 1);
    font-size: 1.4vw;    
    font-family: 'Montserrat-Regular';
    text-align: center;
}

.data-table {
    margin-top: 1%;
    margin-bottom: 1%;
    width: 100%;
    padding: 10px;
    background: linear-gradient(90deg, rgba(70, 147, 65, 0.500) 0%, rgba(78, 204, 64, 0.500) 100%);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    border-radius: 30px;
}

.list-ico-first {
    margin-top: 1%;
    margin-left: 2%;
}

.list-ico-second {
    margin-top: 1%;
    padding-left: 32%;
}

#lab-wrapper {
    width: 100%;

    display: flex;
    justify-content: center;

}

/* LAB */
#lab {
    width: 80%;
    font-size: 3vw;
    font-family: 'Montserrat-Regular';
}

table td {width: 25%;}

.lab-task-head {
    width: 100%;
    text-align: center;
    font-weight: bold;
    font-size: 4vw;
    font-family: 'Montserrat-Semi-Bold';
    color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: linear-gradient(90deg,rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);

  margin-top: 30px;
  margin-bottom: 30px;
}

details {
    margin-top: 25px;
    margin-bottom: 25px;
}

details:hover {
    cursor: pointer;
}

summary {
    background: linear-gradient(90deg,rgba(70, 147, 65, 1) 0%, rgba(77, 204, 64, 1) 100%);
    width: 22vw;
    text-align: center;
    padding: 10px;

    border-radius: 15px;

    color: white;

}

details[open] > summary {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
}

details div {
    background: linear-gradient(90deg,rgba(70, 147, 65, .25) 0%, rgba(77, 204, 64, .25) 100%);
    border: 3px solid rgba(70, 147, 65, 1);

    padding: 10px;

}

#lab-description {
    margin-top: 5%;
}

/* FOOTER */

footer {
    width: 100%;

    background: linear-gradient(90deg,rgb(47, 109, 42) 0%, rgba(77, 204, 64, 1) 100%);

    display: flex;
    justify-content: center;
    align-items: center;
}

#footer-wrapper {
    width: 100%;

    display: flex;
    justify-content: center;
    align-items: start;
    flex-wrap: wrap;
    color: white;

}

#footer-title {
    width: 100%;
    height: 15%;
    padding-top: 6vw;
    padding-bottom: 6vw;

    text-align: center;
    
}

#authors, #developers {
    width: 45%;
    height: 20%;

    border-radius: 5px;

    font-family: 'Montserrat-Regular';

    padding: 0px;
    margin-left: 5%;
}

#copyright {
    width: 100%;
    height: 15%;

    text-align: center;
    font-size: 3vw;
    font-family: 'Montserrat-Semi-Bold';

    padding-top: 6vw;
    padding-bottom: 6vw;
}

.footer-title {
    margin-top: 6vw;
    font-size: 5vw;
    font-family: 'Montserrat-Semi-Bold';
}

.footer-subtitle {
    font-size: 2.5vw;
}

.footer-name {
    font-size: 4.2vw;
    font-family: 'Montserrat-Semi-Bold';
}

